[Portland-bugs] [Bug 14367] New: xdg-utils should provide a standard way for accessing localized through xdg-usr-dirs user directories

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 4 05:12:03 PST 2008


           Summary: xdg-utils should provide a standard way for accessing
                    localized through xdg-usr-dirs user directories
           Product: Portland
           Version: unspecified
          Platform: All
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
        AssignedTo: portland-bugs at lists.freedesktop.org
        ReportedBy: ktogias at math.upatras.gr

Created an attachment (id=14136)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=14136)
xdg-cd shell script for changing to localized user dirs giving their original
english name

As I found out using ubuntu 7.10 with Greek local user dirs (Desktop,
Documents, etc) are renamed to greek equivalent names (eg. Επιφάνεια
Εργασίας, Έγγραφα, etc). Although most applications can access
those localized dirs through XDG_.*_DIR XDG environment variables, there is not
a standard/uniform/trivial way for the user to access them through console. 

The greek (or any other non-latin language) directory names may be pleasant
when using the GUI but cause problems when trying to access them (eg. change
to) from console, or terminal. The most trivial inconvenience is thet one has
to switch the keyboard layout to greek in order to type the localized dir name
and then back to latin in order to continue typing the command. Furthermore,
localized dirs can be completely inaccessible when working form a console where
the proper keyboard layout switching is not set up, and/or the font is not
capable for displaying greek characters or the system does not use unicode. The
above issues raise frequently when using plain console (no X), or accessing a
localized machine remotely through ssh, telnet, ftp from an other system that
is not set up for greek. It also hinders users of localized machines to get
help or follow howtos in english that suggest using terminal commands that
involve accessing some of the folders that are localized. (eg. the directions:
"Download through firefox this_link, open a terminal and type cd Desktop && sh
this_file" will fail because the DOWNLOAD directory is not named Desktop but
Επιφάνεια Εργασίας at the user's system.)

For the reasons above I think that it would be useful to have a script (or make
cd xdg aware???) that would allow changing to user dirs using the default
english names whether those dirs are localized or not. As an
example/proposition I attach a small shell script I have written that creates a
command named "xdg-cd". xdg-cd functions as following:

The user can change from everywhere in the filesystem to the ~/Desktop
equivalent directory with:

$ xdg-cd Desktop

For example, if xdg-dirs are set to greek the above command is equivalent to

$ cd ~/Επιφάνεια\ Εργασίας

but with xdg-cd you don't have to switch layout and type greek characters. You
don't even care how Desktop dir is named in greek or if the system is set up to
greek or Japanese or any other layout. You just type xdg-cd Desktop and you are
taken to your Desktop dir. The xdg-cd command works similarly for the other
user dirs (Download, Documents, Music, etc). I think that such functionality
should be added to xdg-utils in order to have a standard way to access
localized user dirs regardless of the language to which they are translated. 

In order to try the attached script put the attached file somewhere (eg.in 
~/.xdg/) and add the following line to your ~/.bashrc :

alias xdg-cd='source ~/.xdg/xdg-cd'

Then open a new terminal or log in again, and you will be able to use xdg-cd
command as described above.

Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Portland-bugs mailing list