LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   script to move desktop icon to desktop/escritorio, how to know language? (https://www.linuxquestions.org/questions/linux-newbie-8/script-to-move-desktop-icon-to-desktop-escritorio-how-to-know-language-696286/)

permalac 01-10-2009 06:18 AM

script to move desktop icon to desktop/escritorio, how to know language?
 
Hello,

when making a script which puts a launcher to the desktop we don't know which language is installed on the workstation.

in english ~/Desktop
in spanish ~/Escritorio
and so on


It is possible to get information about where the 'Desktop' is?


thanks

Vit77 01-10-2009 06:54 AM

Usually this is set up in ~/.config/user-dirs.dirs

Using 'grep' you can get your exact path.

Or use this variable, like

cp 'your launcher' $XDG_DESKTOP_DIR

permalac 01-10-2009 08:23 AM

i do not have the envar you are talking about, but i do have ~/.config/user-dirs.dirs

many thanks.

Vit77 01-10-2009 08:49 AM

Well, may be it's not the best way, but it works for me:
Code:

grep XDG_DESKTOP_DIR ~/.config/user-dirs.dirs | sed 's/.*=//g'


All times are GMT -5. The time now is 12:14 AM.