Search Results: "ag"

10 March 2008

Rob Bradford: Cunning tip

Shoes get caught when trying to put on waterproofs? Simply place a carrier bag over your shoe. Your foot will then glide smoothly through without getting snagged. Essential advice for anyone braving the elements in the UK tonight.

Filip Van Raemdonck: PyGTK/glade object reuse

Someone asked on the PyGTK mailinglist if it is possible to reuse certain parts of a libglade window several times within an application.
It certainly is, and it's not even hard to do!

I've quickly written a demo application to show how it's done.
Glade widget tree

The user interface designed in glade is really simple, a textbox with two toggle buttons underneath. Activating one button will display a second, disparate textbox beside the original one. Deactivating it will remove that second textarea.
The other button will display and remove a copy of the first textbox which was there from application startup.
The full widget tree of this interface is shown in the first screenshot.

The actual code to the demo application is rather brief.
Continue reading "PyGTK/glade object reuse"

Filip Van Raemdonck: PyGTK/glade object reuse

Someone asked on the PyGTK mailinglist if it is possible to reuse certain parts of a libglade window several times within an application.
It certainly is, and it's not even hard to do!

I've quickly written a demo application to show how it's done.
Glade widget tree

The user interface designed in glade is really simple, a textbox with two toggle buttons underneath. Activating one button will display a second, disparate textbox beside the original one. Deactivating it will remove that second textarea.
The other button will display and remove a copy of the first textbox which was there from application startup.
The full widget tree of this interface is shown in the first screenshot.

The actual code to the demo application is rather brief.
Continue reading "PyGTK/glade object reuse"

Filip Van Raemdonck: PHP and SSL with Lighttpd on Debian Etch

First, a question: dear lazyweb, how do I completely disable non-SSL access with lighttpd? I can't seem to find how to have a lighttpd SSL-only configuration. (and only binding port 80 on localhost does not count for an answer)

On to the subject. While it's easy to add SSL to lighttpd and enable PHP (through fastcgi) and Debian makes it even easier with it's lighty-enable-mod tool if you only do it once in a blue moon then it's not exactly resident knowledge. So here are the steps to do it, on Debian Etch:
  1. apt-get the lighttpd, php4-cgi or php5-cgi, and openssl packages
  2. lighty-enable-mod fastcgi
  3. if using php5, update the path to the cgi binary in /etc/lighttpd/conf-available/10-fastcgi.conf (it's preconfigured for php4)
  4. lighty-enable-mod ssl
  5. update the path to the SSL certificate in /etc/lighttpd/conf-available/10-ssl.conf
  6. restart the lighttpd server

That's all there is to it. Well, strictly speaking there's a step 4a: install a certificate; but that's arguably not a part of the configuration process.
(for reference: openssl req -new -x509 -keyout /etc/lighttpd/selfcert.pem -out /etc/lighttpd/selfcert.pem -days 365 -nodes will generate a self-signed certificate)

Filip Van Raemdonck: PHP and SSL with Lighttpd on Debian Etch

First, a question: dear lazyweb, how do I completely disable non-SSL access with lighttpd? I can't seem to find how to have a lighttpd SSL-only configuration. (and only binding port 80 on localhost does not count for an answer)

On to the subject. While it's easy to add SSL to lighttpd and enable PHP (through fastcgi) and Debian makes it even easier with it's lighty-enable-mod tool if you only do it once in a blue moon then it's not exactly resident knowledge. So here are the steps to do it, on Debian Etch:
  1. apt-get the lighttpd, php4-cgi or php5-cgi, and openssl packages
  2. lighty-enable-mod fastcgi
  3. if using php5, update the path to the cgi binary in /etc/lighttpd/conf-available/10-fastcgi.conf (it's preconfigured for php4)
  4. lighty-enable-mod ssl
  5. update the path to the SSL certificate in /etc/lighttpd/conf-available/10-ssl.conf
  6. restart the lighttpd server

That's all there is to it. Well, strictly speaking there's a step 4a: install a certificate; but that's arguably not a part of the configuration process.
(for reference: openssl req -new -x509 -keyout /etc/lighttpd/selfcert.pem -out /etc/lighttpd/selfcert.pem -days 365 -nodes will generate a self-signed certificate)

Filip Van Raemdonck: PyGTK exception handler

A little utility that has been collecting dust on my harddrive over the past two years is an enhanced version of a PyGTK exception handling module that was originally posted to the PyGTK mailing list by Gustavo Carneiro. I've now uploaded it to the sysfs download area; it is essentially unlicensed, considered public domain by Gustavo according to his email message.

Besides fixing a API incompatibility with recent PyGTK releases, there are two main differences with the original functionality.
First, I've modified the traceback formatting to include two lines of context to each line in the traceback, one before and one after the called line. Also included is a printout of the identifiers referenced in the traceback lines variables, usually. On my personal wishlist was also syntax coloring in the debug window, but this was both non-trivial to implement, and it would likely add considerably to the complexity of the error handler, thus increasing the chances that the error handler itself would fail.
The other main functionality change is possibility to email feedback to a predefined address mainly meant for deployment and debugging of company-internal applications. To enable this feature, two identifiers feedback and smtphost must be set on the module. This can be either by modifying the code, or, better, by adding them after module import:
import gtkexcepthook
gtkexcepthook.feedback = 'valid@email.address.here'
gtkexcepthook.smtphost = 'relay.smtp.hostname'

Bugfixes, enhancements and feedback welcome at mechanix on rack66.net.

Filip Van Raemdonck: PyGTK exception handler

A little utility that has been collecting dust on my harddrive over the past two years is an enhanced version of a PyGTK exception handling module that was originally posted to the PyGTK mailing list by Gustavo Carneiro. I've now uploaded it to the sysfs download area; it is essentially unlicensed, considered public domain by Gustavo according to his email message.

Besides fixing a API incompatibility with recent PyGTK releases, there are two main differences with the original functionality.
First, I've modified the traceback formatting to include two lines of context to each line in the traceback, one before and one after the called line. Also included is a printout of the identifiers referenced in the traceback lines variables, usually. On my personal wishlist was also syntax coloring in the debug window, but this was both non-trivial to implement, and it would likely add considerably to the complexity of the error handler, thus increasing the chances that the error handler itself would fail.
The other main functionality change is possibility to email feedback to a predefined address mainly meant for deployment and debugging of company-internal applications. To enable this feature, two identifiers feedback and smtphost must be set on the module. This can be either by modifying the code, or, better, by adding them after module import:
import gtkexcepthook
gtkexcepthook.feedback = 'valid@email.address.here'
gtkexcepthook.smtphost = 'relay.smtp.hostname'

Bugfixes, enhancements and feedback welcome at mechanix on rack66.net.

Filip Van Raemdonck: Read between the lines

Recently I've been debugging a SQL Server 2005 replication setup, where the "Distribution clean up" job for the distributor database was failing. The error message in the agent history was:
Executed as user: <sqlagent_serviceuser>. Could not remove directory <UNC_path_to_snapshot_directory>.
Check the security context of xp_cmdshell and close other processes that may be accessing the directory.
[SQLSTATE 42000] (Error 20015).  The step failed.

The <sqlagent_serviceuser> was the Windows user that the SQL Server Agent service was running under, while the <UNC_path_to_snapshot_directory> was the network path to the directory where snapshots where created.

Looking around on some discussion forums, I found the same message reported several times but without any real solution; at least no solution that would work when I tried to apply it to this particular setup. Most answers to the problem focused on the xp_cmdshell procedure mentioned in the error, and how it would require certain configuration at the server end.

However, one answer on the MSDN forums did give a useful clue it pointed to the SQL Books Online article about Securing the Snapshot Folder (which I should've read right away, really). In a note, this page reads:
If a publication is dropped, replication attempts to remove the snapshot folder under the security context of the SQL Server service account. [...]

It's the SQL Server service account reference which is essential: even though the SQL Agent service account may be the one mentioned in the error message, the actual account that is used to try and delete the snapshot directories is the SQL Server service account instead. Giving that service account the necessary access rights fixed the problem; as in the Task Scheduler case, accurate error reporting on Microsoft's side might go a long way towards people disliking their software less.

Filip Van Raemdonck: Read between the lines

Recently I've been debugging a SQL Server 2005 replication setup, where the "Distribution clean up" job for the distributor database was failing. The error message in the agent history was:
Executed as user: <sqlagent_serviceuser>. Could not remove directory <UNC_path_to_snapshot_directory>.
Check the security context of xp_cmdshell and close other processes that may be accessing the directory.
[SQLSTATE 42000] (Error 20015).  The step failed.

The <sqlagent_serviceuser> was the Windows user that the SQL Server Agent service was running under, while the <UNC_path_to_snapshot_directory> was the network path to the directory where snapshots where created.

Looking around on some discussion forums, I found the same message reported several times but without any real solution; at least no solution that would work when I tried to apply it to this particular setup. Most answers to the problem focused on the xp_cmdshell procedure mentioned in the error, and how it would require certain configuration at the server end.

However, one answer on the MSDN forums did give a useful clue it pointed to the SQL Books Online article about Securing the Snapshot Folder (which I should've read right away, really). In a note, this page reads:
If a publication is dropped, replication attempts to remove the snapshot folder under the security context of the SQL Server service account. [...]

It's the SQL Server service account reference which is essential: even though the SQL Agent service account may be the one mentioned in the error message, the actual account that is used to try and delete the snapshot directories is the SQL Server service account instead. Giving that service account the necessary access rights fixed the problem; as in the Task Scheduler case, accurate error reporting on Microsoft's side might go a long way towards people disliking their software less.

Gunnar Wolf: German and APT::Acquire::Translation

Rhonda,
The webinterface for it doesn't require any authentication at all, leading technically to anonymous translations all over the place. The so-called "review" process consists of the same not-existing authentication, leading to a situation where unknown people can put in whatever they like and have other (or potentially the same) unknown people acknowledge that.
The language team has actively chosen that way because it was said that bad translations simply won't happen and that the review (three people opening the page and clicking onto a button) will not let that happen. Well, it happened. And is happening all over the place.
Hmmm... That sounds quite like a definition of Wiki in my book. Just add a version-control layer underneath, and...
Oh, you didn't? Umh... Tough luck! :-(

Jan Wagner: bit nagios-plugin bugsquashing, stalling policyd-weight and my first perl module package

Last week I did again some work on nagios-plugins. After the announcement of Dann Frazier to upload NMU to fix a trivial bug, I thought it’s time again to give some extra care to the package. So I prepared 1.4.11-2 fixing the important bugs and uploaded it. I also commited some minor fixes to the svn, so these issues will get fixed by the next upload. Since the development of policyd-weigh stalled and unfortunately maybe get stuck, I was looking for an alternative, which maybe found with postfwd. It’s quite flexible but it also will take more time (and care!) to get a reliable configuration, which maybe effective as policyd-weight (still) is right now. While checking the dependencies for postfwd I noticed that Net::DNS::Async isn’t available in Debian (yet). So I decided to create a package starting with dh-make-perl, join the Debian Perl Group and let it review. Damyan Ivanov was so kind to review and upload it, Gregor Herrmann did also give some much useful hints. Thanks to both! And yes, I also found time to step forward with NM, since I was overloaded the last weeks with usual work and life. Thank to my AM to be so appreciative.

Christian Perrier: Samba Sunday

I spent part of my Sunday on samba yesterday. After all, that ankle tendinite I have for nearly two weeks now has some benefits for Debian: I don't waste hours running on week-ends. Samba 3.0.28a was announced by upstream and I worked to package it. Not really difficult and the package is already ready. It again minimizes the numer of Debian patches: we're slowly converge back towards upstream. Meanwhile, Steve uploaded a new release of 3.0.28, introducing the use of ucf to manage smb.conf changes. He slightly messed up in the update and, therefore got 3 RC bugs in a row for the same problem (#470138, #470139, #470140...and even #470142 to complete the picture). Good score, Steve. One beer for me next Debconf...:-)...The breakage was fixed a few hours later. So, conclusion: we apparently have active users who are committed to reports errors. Good...:-) As soon as 3.0.28-4 makes its way to unstable *and* the automated Ubuntu merge-o-matic, I'll probably upload 3.0.28a, not really waiting for 3.0.28-4 to enter testing (we already have 3.0.28 in testing). Another work in the pipe is the preparation of samba 3.2.0. Upstream released RC2 last week and I did early work to package it (for experimental as of now). However, that release incorporates most parts of our "FHS" patch, for better compliance to the FHS, as well as several other patches we pushed to them. And, as these weren't applied as is, some checks have to be done. Moreover, some other changes seem to be needed to get the package to compile. And, finally, we need to merge back recent changes from the trunk branch (such as the ucf support). All this is a way too high barrier for me and I'll need Steve to take that load, which he promised to do (and so *will* do, I know him enough....). When all this will be settled down, it will be time to jump in the BTS and fight with some old bugs of the package.

Christian Perrier: Bug #470000

Pierre Habouzit reported bug #470000 on Saturday March 8th instead of taking care of Habouzit Jr. Shame on him. Double shamre: that was an RC bug. He really should hijack that gromacs package which sounds to me as a special version of EMacs for the Groland country (fr_FR joke). As bug #460000 was reported as of January 11th 2008, we're still keeping the pace of 2 months for 10,000 bugs, so 60,000bugs a year. Bug #500000 should then be reported around Sept 10th 2008. As a consequence, the candidates for winning the 500000th bug contest are still Miguel Gea or Kartik Mistry. I still plan some MBF to keep chances of winning the contest myself. I also expect the lenny release to speed that up. See you around May 10th for bug #480000! PS: has anyone tried to plot compute the number of bugs we *close* in the same amount of time?

Kartik Mistry: Lecture at RVCE


* I was called to take small session on Debian at RVCE (Rashtriya Vidhyalaya College of Engineering, Mysore Road, Bangalore). Me, Praveen and Srijit went there by somewhat long journey by changing two buses. The college building is awesome and faculty who arranged all day, Renuka Prasad is more awesome than that. Shyam was already there and he came down from Kerala to take session. Vikram Vincent was also there and he talked about translation of Kannada (I don’t understand why Kannada translation is so lagging behind as even I took inspiration of Kn-OO.o team!). Well, event was kicked off by Praveen with Google Summer of Code presentation. Meanwhile, I prepared slides ;) My session was good (Ah!). And people were more interested in Compiz-Fusion on my laptop. I tried my best to show all cool things in Debian. We are planning to have one full day session on Debian+Localization+Kn Aspell Dictionary Sprint. * I am optimistic for this college and yeah I missed ‘Welcome Lunch’ arranged for me by #linux-india freaks due to this event, but I don’t have any regret ;)

David Welton: A new kind of spam?

Lately, I've seen multiple comments like the first one here: http://journal.dedasys.com/articles/2008/03/09/bypassing-androids-resources#comments It seems like spam, in that the comment is kind of off topic and irrelevant. However... it doesn't link to obvious spam topics like viagra, porn, etc... and nor does the actual site that it links to. Or it doesn't seem to at least. Just someone trying to promote their site, or is there a trick to it?

Peter Makholm: The virtual RMS and GNU-documentation

Debian includes a package called “vrms - virtual Richard M. Stallman” which report the non-free packages you have installed on your Debian system. Running vrms on my workstations gives the following output:
makholm@makholm:~$ vrms
              Non-free packages installed on makholm
gcc-4.2-doc               documentation for the GNU compilers (gcc, gobjc, g++)
gcc-doc-base              several GNU manual pages
sun-java6-bin             Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-jre             Sun Java(TM) Runtime Environment (JRE) 6 (architecture
sun-java6-plugin          The Java(TM) Plug-in, Java SE 6
xsnow                     Brings Christmas to your desktop
  6 non-free packages, 0.4% of 1487 installed packages.
makholm@makholm:~$
Sun Java is a know evil and somebody really ought to reimplement xsnow, but having the virtual RMS declare GNU documentation non-free is a nice touch. Yeah, I know about the problems with GFDL. Update: Known problem: #221807, #297506, and #364971

Rob Taylor: Having fun and getting distracted

On saturday I decided to have a bit of fun hacking, so I got out my wiimote and decided to hack on some 3d gesture recogition.. There’s a great little library called libcwiid that allows an application to talk to a wiimote, with full access to the accelerometer (x,y,z force, roll, yaw) and the ir sensor. It also comes with a nice gui (wmgui) that shows you everything in real time. So far so cool. There’s also a nice project called wiigee that was written in conjunction with a paper (ACM access required) by a group at the University of Oldenburg. This uses a k-mean quantizer, a left-right hidden Markov model and a Baysian classifier to recognize and classify gestures in a 3d space. Downside is that it’s in Java, and I want something small and fast in C. So, I decide, lets see how hard it is to port some java code to vala… and yeah, takes me about an hour (including learning vala…) to covert the HMM. I then noticed some slight inefficiencies in vala’s generated code for accessing field members, so hacked a patch to vala for that. The HMM code also uses a lot of multidimensional arrays, and vala doesn’t yet support getting the array dimensions of an existing array, so today I finished a patch to add support to vala for this. All in all vala is a pretty nice language and valac itself is not hard to hack on! Next up, I’m gonna finish porting wiigee to vala and come up with some fun demos ;)

Martin F. Krafft: Customer support farce

There are plenty of reasons why a company might provide a web form as the only means for customers to get in touch with their customer support department: for instance, the web form compels the customer to send along important information with the first request, therefore saving time (and money) for the customer service department. Even though I hate web forms, I sometimes do fill them in and usually get an answer back; it works. Every once in a while, however, I ll encounter a form designed by people without any form of understanding of the role of a customer for any business (it s the most important asset ). Such is the case when the form limits the message to a certain number of characters. Obviously, no customer service agent wants to read novel-length prose when fielding incoming requests, but a few hundred characters may also not be enough to get the point across. Star Alliance, for instance, expects you to get your point across in 300 characters. I find it hard to imagine that people write lengthy texts into web forms, unless they have more information to get across. I also see no technical reason for limiting the length of the text which can be submitted. The only logical explanation I have is that those companies give a flying food about customers and would much rather not have them contact the support department. NP: The Flower Kings: Back in the World of Adventures

Martin-&#201;ric Racine: Estonian ICT conference, March 18th 2008, TOBB Plaza, Istanbul, T rkiye

I previously wrote about my visits to Turkey to develop our export market in the Middle-East and how I ended up representing the whole Estonian business world in bilateral negotiations with Turkey. I'm going there again for two weeks, this time accompanied by a whole business delegation headed by Estonian prime minister Andrus Ansip. Asides from various official events organized by our Turkish hosts to present Turkey to their Estonian guests, the crux of the visit is a conference hosted by DEIK and the Estonian embassy, on Tuesday, March 18th. The goal of this conference is to present Estonia's extremely advanced use of ICT technology in E-Business and E-Governance. Speakers from several private and public sector organizations will explain how they benefited from Estonia's hyper-connected lifestyle and, most of all, how this has made every Estonian's life more pleasant, because it offers a convenient way of performing a broad range of online transactions not just with businesses, but also with governmental organizations. Yours truly will speak about the advantages Estonia offers to investors and technology freaks alike, from the perspective of an industry insider who, given the opportunity of choosing his first pick for a liberal high-tech nation, dropped the Nokiaesque lands of Suomi to go Eesti. The morning of conference will end with a business lunch where interested Turks can network with their Estonian counterparts and create lucrative bilateral opportunities. Space in the TOBB Plaza auditorium is limited so those interested in attending should promptly contact DEIK to get their name added to the guest list. Turks interested in learning more about Estonia in their own language should visit estonya.net.

9 March 2008

William Pitcock: Resignation as atheme.org project lead

In case you didn’t know, I’ve decided to resign as atheme project lead. This is for a few reasons: However, just because I’m resigning as project lead doesn’t mean that I will stop working on projects I care about inside atheme, like audacious, mowgli, and mcs. These projects are critical components of the modern FOSS desktop, and I intend to continue working on them. This is purely an administrative change, so that any mistakes or stupidity I do have no effect on atheme.org’s overall health. I hope to see many other Atheme members step up and try to become project lead. Under the right leadership, atheme’s projects could become a much more notable platform in FOSS development within a short amount of time. Update: Due to popular demand, I have changed my mind. I’m no longer resigning as project lead of atheme.

Next.

Previous.