Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Creating a desktop file under /root/.gnome-desktop creates the shortcut that I want. However, the problem appears to be that the Exec and Icon entries contain spaces. If I change the paths to something that does not contain a space everything works.
Can some tell me how to properly escape things so that the paths can contain spaces?
Did you already try to use the desktop's way of creating a shortcut (i.e. right-click desktop, create shortcut, fill in information, ...) to a file that in a directory the name of which contains spaces and then viewing the created file with a text editor? I suspect that's the fastest way to find a solution for your problem (sorry, can't do it here -- on Windows atm.)
Can some tell me how to properly escape things so that the paths can contain spaces?
Like this: escape/ some/ spacesor
"Put them in quotes"
Looking at your post of the desktop file, I think it should have worked:
Code:
Exec="/usr/local/abc/my gui/desktop/mygui.sh"
here you have put the spaces inside quotes
Code:
Icon=\"/usr/local/abc/my\ gui/desktop/icon.gif\"
Here you have escaped both the " marks (unnecessary, and I am not sure if this is "bad") and the space.
What happens if you set Terminal=true ?
Maybe you'll see some helpful error messages.
The best thing is not to use spaces in filenames, and use the underscore instead: my_gui
Last edited by tredegar; 07-02-2008 at 11:40 AM.
Reason: lowercase t in true
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.