1 | =head1 GTK+ BASH FILE CHOOSER |
1 | =head1 GTK+ BASH FILE CHOOSER |
|
|
2 | |
|
|
3 | Gtk+ is a nice toolkit, but ever since the new file chooser was introduced |
|
|
4 | in version 2, it became less and less usable. Not only is tab completion |
|
|
5 | gone (at least in a useful form), quickly entering a path has become |
|
|
6 | impossible due to many extra keys one has to press and due to the extreme |
|
|
7 | slowness of the file chooser itself. |
|
|
8 | |
|
|
9 | As an example, when firefox finds a new filetype (e.g. a pdf) and I use |
|
|
10 | its file chooser to select F</usr/bin/xpdf>, here is what happens: After |
|
|
11 | typing F</usr/bin> the app freezes for around 40 seconds. Then it has |
|
|
12 | loaded F</usr/bin> (this is on a typical debian install, F<ls -l /usr/bin> |
|
|
13 | is much faster). Then after pressing return to select it, the window |
|
|
14 | again freezes for about 30 seconds. In the gtk+ 1.0 file selector this |
|
|
15 | took less than a second. As another example, when I save an image in |
|
|
16 | the GIMP to F</tmp>, I can actually see the Gtk+ file chooser accessing |
|
|
17 | other, automounted, paths such as F</fs/cdrom>, or F</fs/doom>, which |
|
|
18 | are my dvd drive and an nfs fs on anoher machine. Mounting those takes |
|
|
19 | additional time to the time required scanning F</tmp> (which again is |
|
|
20 | about a minute). |
|
|
21 | |
|
|
22 | Clearly, this makes the Gtk+ file chooser completely |
|
|
23 | unusable. Unfortunately, despite many people having opened bug reports |
|
|
24 | about these problems, they are either getting ignored, or fixed in an |
|
|
25 | half-assed attempt just to come back in the next gtk+ release. |
2 | |
26 | |
3 | B<gtkbfc> is a hack that replaces the dreaded, slow and hard-to-use GTK+ |
27 | B<gtkbfc> is a hack that replaces the dreaded, slow and hard-to-use GTK+ |
4 | file chooser by a rxvt-unicode window with a little script that you to use |
28 | file chooser by a rxvt-unicode window with a little script that you to use |
5 | readline tab-completion to enter filenames. |
29 | readline tab-completion to enter filenames. |
6 | |
30 | |
7 | Again, its a dire hack and will not work with all programs. It does work |
31 | Again, its a dire hack and will not work with all programs. It does work |
8 | for gimp, firefox, gedit at least, though. |
32 | for gimp, firefox, gedit at least, though. Most importantly, it does work |
|
|
33 | for me, which really is all that counts. |
|
|
34 | |
9 | |
35 | |
10 | =head2 INSTALLATION |
36 | =head2 INSTALLATION |
11 | |
37 | |
12 | Install rxvt-unicode. Then copy the F<gtkbfc-helper> to F</etc/> and make |
38 | Install rxvt-unicode. Then copy the F<gtkbfc-helper> to F</etc/> and make |
13 | sure its executable and opens a window where you can enter a filename when |
39 | sure its executable and opens a window where you can enter a filename when |
… | |
… | |
24 | alias gimp='LD_PRELOAD=/path/to/gtkbfc.so gimp' |
50 | alias gimp='LD_PRELOAD=/path/to/gtkbfc.so gimp' |
25 | |
51 | |
26 | Or by putting it into your F</etc/ld.so.preload> (not really recommended |
52 | Or by putting it into your F</etc/ld.so.preload> (not really recommended |
27 | for performance reasons). |
53 | for performance reasons). |
28 | |
54 | |
|
|
55 | |
|
|
56 | =head2 BUGS |
|
|
57 | |
|
|
58 | You want to use readline, so you are some kind of guru anyways, so if you |
|
|
59 | have a bug report, better attach a patch or a very thorough analysis of |
|
|
60 | what goes wrong to your e-mail. Thank you very much. |
|
|
61 | |
|
|
62 | |
29 | =head2 AUTHOR |
63 | =head2 AUTHOR |
30 | |
64 | |
31 | Marc Lehmann <gtkbfc@schmorp.de>. |
65 | Marc Lehmann <gtkbfc@schmorp.de>. |