1

i have created custom.desktop in the /usr/share/xsession directory for launching single application. i want to add one or two desktop shortcuts along with the single application.

1
  • FYI The desktop file itself doesn't support shortcuts
    – daisy
    Commented Jun 27, 2013 at 12:57

1 Answer 1

2

creating a custom session for GDM

This blog post, titled: How to Customize the GDM Sessions List covers in pretty good details how to do this.

In general you need to create a .desktop file under here: /usr/share/xsessions, and then populate this file with your custom application so that it launches when this session is selected from GDM.

               ss of custom.desktop

       ss of gdm

creating a .desktop file

Take a look at this blog post, Anatomy of a .desktop File. It covers what you can and can't do with the .desktop files. It doesn't look like their is a way to create shortcuts of any sort within a .desktop file. You can however copy them to a user's desktop and they'll function just like a launcher in the menus.

excerpt from blog post

The second function is the direct shortcut on the desktop itself. In this function, it resides in $HOME/Desktop. The same file fills both functions, so if you want to have an application both in the menu and on your desktop, you’ll need to put the .desktop file in two places.

So you can just copy a .desktop to the desktop and get the functionality you're looking for. For example:

                                                  ss of .desktop before

                          ss of .desktop trust dialog

                                               ss of .desktop after

6
  • @subbarao - if this answer solves your problem please mark it as the accepted answer and upvote it if you found it useful.
    – slm
    Commented Jun 28, 2013 at 13:50
  • still i am having doubt that the way i did is entirely different from your post. i am explaining the way i did. My requirement was i will login as a root then in /usr/share/xsession directory i have created a custom.desktop file. in the file i wriiten these lines. [Desktop Entry]
    – subbarao
    Commented Jun 29, 2013 at 7:45
  • Now i am logging in user mode then i am creating file like ""vi /home/user/.xsession"in that i am writing the application what i want to launch. then i am giving permission to this file as "chmod +x /home/user/.xsession"then logout from root. now if you login in user mode with selection custom desktop option at the status bar then it will lanuch single application(let's say calculator).The output is empty screen with desktop application. first i want to know whether it is right procedure or not? if so then i want to add two or three application shortcuts to my custom desktop.
    – subbarao
    Commented Jun 29, 2013 at 7:56
  • @subbarao - yes this is a correct methodology in using the .xsession file in the user's $HOME directory, you need to make sure that the package xorg-x11-xinit-session is installed. Without it X11 won't load your .xsession file.
    – slm
    Commented Jun 29, 2013 at 11:32
  • @subbarao - I now see what you're trying to do. You're trying something like what's described in this blog post: maketecheasier.com/customize-the-gdm-sessions-list/2010/08/08
    – slm
    Commented Jun 29, 2013 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .