Home » Questions » Computers [ Ask a new question ]

Linux/GTK+: Change preview text (permanently) in font selection dialog

Linux/GTK+: Change preview text (permanently) in font selection dialog

Every time I want to change the font (in various applications), the default preview text is "abcdefghijk ABCDEFGHIJK", I can change it but the changes only live for the lifetime of the dialog. They're forgotten immediately afterwards.

Asked by: Guest | Views: 28
Total answers/comments: 1
Guest [Entry]

"Xfce means your font dialog is from GTK. This is important, because now we know what to modify.

1. This might be a bit windowsese, but try hexediting /usr/lib/libgtk-x11-2.0.so and changing that string into whatever you like (as long as the length of new string is the same as the old one).

2. This string is locale-dependant, so you can modify your locale's translation of this string. This file is probably /usr/share/locale//LC_MESSAGES/gtk20.mo.

Firstly unpack it with unmsgfmt (I don't know where can you find this program in ubuntu), or take the original .po file from gtk source package. Make your change, compile with msgfmt, put the resulting file in the original directory.

Both modifications will probably go away during update. I don't thing there's a setting somewhere to set this string. Therefore...

3. It might be a good idea to ask GTK developers to implement this as a kind of settings. I guess there is no proper place in any graphical environment to set this kind of stuff, so I think the most probable way is to set this in .gtkrc. The proper place to file a bug is bugzilla.gnomedotorg."