Open Containing Folder in Firefox under Linux

Posted by flori Tue, 11 Sep 2007 19:09:00 GMT

After Downloading a file in firefox and right-clicking on the filename in the download manager, you can choose the popup menu entry "Open Containing Folder". This should open a filebrowser for the directory this file was saved in. I have to admit, that this never worked for me under Linux, only under MacOS X and under Windows. I assume the reason for this is, that you have a lot of options under Linux, but no general default for a file manager. Firefox did never show a very smart reaction (and only displays an error) if no filebrowser could be found: Perhaps asking me what to do would be a good idea?

I finally couldn't take it anymore and researched how to configure this feature. I wanted XFCE4's file manager Thunar to be opened, so this is what you have to do: Open the about:config dialog in you location toolbar (or pick it from the Help menu). Now right click onto the configuration entry list, and choose New -> Boolean from the popup menu. Create the following two entries and set them both to true:

network.protocol-handler.expose.file = true (Boolean) network.protocol-handler.external.file = true (Boolean)

Now choose New -> String from the popup menu, and set the value to thunar:

network.protocol-handler.app.file = thunar (String)

This will start thunar with containing directory (with a file:// url) as an argument. You can as well use nautilus or konqueror or whatever here. Another possibility is to use open, which would cause firefox itself to open the directory as a file:// url.

Now type network.protocol-handler into the about:config filter. The resulting filtered list should now include these entries:

Configuration Entries in about:config

Now try it with a downloaded file, I hope it works for you.

Tags , , , ,  | 3 comments

Automatically changing Background Wallpaper in XFCE4

Posted by flori Fri, 31 Aug 2007 13:41:00 GMT

I recently switched from the good, old trusty WindowMaker to XFCE4 as a window manager/desktop environment.

Before the switch I used xsetbg in the crontab to change my background from the standard wallpaper of my theme to another image every hour. Now I configured Desktop Preferences -> Image -> New list to create a list of desktop images to choose from. But how to swtich every hour or at all? xsetbg stopped to work under XFCE4 for some reason. It's also strange, that you can configure a list in XFCE4, but it is only used once after login in.

The solution

Put this line into your crontab:

0 * * * * killall -USR1 xfdesktop

This will reload xfdesktop's configuration and also switch to a new backdrop image. Yeah, it's that easy, but it took me a while to figure it out.

There is also the xfdesktop -reload command, but I had some problems to connect to the X server from the crond. Maybe this is caused by my paranoid X configuration, though.

Tags , , ,  | no comments

Weird subversion hangs using svnserve?

Posted by flori Sat, 12 Aug 2006 09:04:00 GMT

I had those hangs, that from time to time occured without any discernible pattern to them. They usually only happened once, when I started to access my repository. After the first hang none would occur for a while.

Now i finally got enough of it, and straced the program. It hang while reading from /dev/random. WTF? They shouldn't use random for regular use, because it depends on fresh randomness from harware entropy pools. This leads to blocking until enough new entropy was generated by keypresses, io operations, mouse movements, etc. And I definetely don't want to sit next to my server and move the mouse in all directions everytime I want to work with subversion via the internet.

So I started googling and came up with this issue (aka bug) report. Obviously I am not the only one, that had that problem. Be sure to read the comments on this bug report. The subversion developers closed the bug by pointing out, that the apr library does this if it isn't compiled with a special config option. Great: Too lazy to fix a bug, just blame the 3rd party library (which we choose to use in the first place) and be done with it. (Bug was reopened by someone more interested in delivering good software.)

Ok, now I checked the apr library on my Gentoo system, and someone already had made a USE flag "urandom". Yeah, this must be a work around for exactly my problem. Why didn't they configure apr to use urandom in general? WTF^2? Open source leads to the discovery of bugs so fast, that everyone can easily work around them, but nobody is willing to fix them once and for all. I wonder how many people concluded from that experience, that subversion is just crap, because it doesn't work? I don't think many people are inclined to dig into this error deep enough to find out, that someone else is to blame...

Tags , ,  | 3 comments