View previous topic :: View next topic |
Author |
Message |
razamatan Apprentice
Joined: 28 Feb 2003 Posts: 160
|
Posted: Tue Mar 30, 2004 3:57 am Post subject: [HOWTO] get text previews working in nautilus (2.4) |
|
|
for the longest time, i couldn't stand the fact that i was seeing screencaps of gnome desktops sporting text previews in nautilus... so i went off and did research.
the fix is pretty straightforward.
first, make sure your gnome setup can actually do text previews by enabling it in nautilus's preferences, and check that you have gedit installed, too. from here, check that you can do text previews by switching your icon theme from whatever you're using to the default "gnome" icon theme. when you switch to the "gnome" icon set, you should see the text previews in the icons. if you don't get this working, then there's some other problem beyond the scope of this howto. if you're in this unfortunate situation, try re-emerging gedit and/or nautilus.
the icon theme that you use, as it turns out, is the main culprit of why text previewing isn't working. the big nugget that i found was from freedesktop.org's description of *.icon files which gnome uses (ref). the themes that have text previews working with them (like gnome) have a gnome-fs-regular.icon file in the filesystems/ branch of the iconset.
in order for text previews to work, you need to have this gnome-fs-regular.icon file!
i actually use a modified nuvola svg icon set from the gnome-themes-extra package. i used the information from freedesktop.org specification to construct my gnome-fs-regular.icon file. this file should be placed in the directory where the gnome-fs-regular icon is. if you're using a non-svg iconset, you'll have to specify a gnome-fs-regular.icon file for every path that has a gnome-fs-regular icon.
here's the cat of the gnome-fs-regular.icon file (omit the prompt line):
Code: | [Icon Data]
EmbeddedTextRectangle=200,120,800,850
AttachPoints=160,700|800,700|800,80|160,80
|
the main thing is the EmbeddedTextRectangle specification. Use the reference to learn all about what the numbers mean. again, i have a svg icon set, so the numbers i specify will range from 0 to 1000, and will be scaled off of this.
to fit your given icon theme, you just need to play around with these numbers. while fitting the numbers for your given gnome-fs-regular icon, it's handy to keep your theme details dialog open so you can switch off to a different theme and back to your intended theme to quickly apply the changes to your gnome-fs-regular.icon file(s).
hope this helps a lot of you out there. _________________ a razamatan doth speaketh,
"Never attribute to malice, that which can be adequately explained by stupidity" |
|
Back to top |
|
|
verbatim Apprentice
Joined: 13 Mar 2003 Posts: 223
|
Posted: Tue Mar 30, 2004 4:13 am Post subject: |
|
|
Uh... but.. doesn't it work automatically out of the box?
Mine did, and I didn't setup anything... |
|
Back to top |
|
|
razamatan Apprentice
Joined: 28 Feb 2003 Posts: 160
|
Posted: Tue Mar 30, 2004 4:15 am Post subject: |
|
|
it does work "out of the box" if you use a icon theme that has these gnome-fs-regular.icon files correctly setup.
however, if you use a new theme where the themer hasn't gotten around to it, you can hurry the process up. _________________ a razamatan doth speaketh,
"Never attribute to malice, that which can be adequately explained by stupidity" |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Wed Aug 25, 2004 11:49 am Post subject: |
|
|
Great "hack"! Thanks for the tip! I was wondering why this wasn't working for other themes. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|