Sven Arvidsson said the following on 15.10.2006 00:20:
> On Fri, 2006-10-13 at 23:13 +0200, Tobias Niemann wrote:
>> I'd like to change the default character encoding from nautilus for
>> creating files or directories. If I create a directory with (for
>> example) a German Umlaut (e.g. testdatö) in nautilus, outside nautilus
>> (here in aterm) it looks like this:
> [...]
>> If I create such a directory (with ö) in my shell, nautilus displays
>> everything fine, too. It's just while creating, nautilus uses a
>> different character encoding (I guess it's UTF-8?), while reading
>> nautilus seems to use iso8859-15, too (besides the UTF-8).
>>
>> I already tried to set G_FILENAME_ENCODING environment variable to
>> @locale or [EMAIL PROTECTED] in my /etc/profile but although the variable
>> definitely is being set ("env" displays the variable being set) nautilus
>> seems to ignore it.
>>
>> Does anybody have any idea how to change this behaviour?
> 
> I could be wrong, but I don't think that GNOME reads that file until
> after Nautilus is started if you're running GDM. Instead, try creating a
> custom .xsession and select it before logging in.


Thanks for the tip. I searched the internet for "gdm session startup"
and found [1] that gdm only uses the ~/.xsession (or the ~/.xinitrc) if
you select the default session. If you for example select Gnome as the
desired session, GDM uses the ~/.gnomerc and none of the above.
Therefore my .gnomerc now looks like this:

$ cat .gnomerc
export [EMAIL PROTECTED]
export G_BROKEN_FILENAMES=1

with the locale set to de_DE ([EMAIL PROTECTED]). Works like a charm.

A different approach would be making your own GDM-selectable session by
copying the /usr/share/xsessions/gnome.desktop to for example
/usr/share/xsessions/gnome_test.desktop and editing it afterwards.
Replace the appropiate (xx equals your language) Name[xx]=GNOME with a
different name (for example GNOME-test) so you know what session to
choose (or you'll get two "GNOME" sessions). Afterwards you've got to
replace the Exec=/usr/bin/gnome-session with your own script in which
you first set the G_FILENAME_ENCODING and the G_BROKEN_FILENAMES
variables and afterwards execute /usr/bin/gnome-session. After a restart
of GDM you should be able to select your newly created GDM-session. But
I haven't tested this one, I consider the first solution to be way more
elegant and thus sufficient...


> Also, try setting G_BROKEN_FILENAMES to true. 


Good hint. Setting it to 1 equals true (see above).


> In the long run, I think it's simply easier to embrace UTF-8 and take
> the time to convert your filenames.


True but with the solution above I was able to postpone that for a few
month (or even longer) into the future... :-)

Tanks a lot again,
Tobias


[1] http://www.togaware.com/linux/survivor/GDM_Startup.html


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to