• Make Tech Easier
  • Videos
  • Downloads
  • Articles
    • Windows
    • Linux
    • Mac
    • Android
    • Firefox
    • Chrome
    • Web
    • Google
    • WordPress
    • All Categories
  • Search

How to Customize the GDM Sessions List

Joshua Price 8th Aug 2010 Linux 3 Comments
  • 5
    Facebook 3 Twitter 2
    Google Plus 0 Pinterest 0
    Stumbleupon 0 Reddit 0
    Pocket Instapaper
  • Next
  • Prev

sessions-smallHave you ever installed a new Linux window manager or desktop environment, only to find that it doesn’t show up on the Sessions list in GDM? Have you ever wanted to remove items from that list? How about create a new list item so that you can boot into a custom desktop environment? It sounds like it should be simple, but many people are surprised by the fact that this small task is actually a bit tricky, and there’s very little documentation to help. We hope to resolve that today with a quick and simple guide to editing your GDM Sessions menu.

/usr/share/xsessions

The list is populated by looking at the contents of the /usr/share/xsessions directory. In here you’ll find files with the .desktop extension (extension hidden in some file managers). As these files are in a system folder, you will need root privileges to change or delete them.

sessions-files

These .desktop files contain basic information on what this menu item will launch. Removing (or renaming) one of these files will take it off the Sessions list.

Modifying an Item

As noted above, you’ll need root privileges to modify any of the files in /usr/share/xsessions. Ubuntu users, for exaple, can hit Alt+F2 to open the command box and enter

gksu gedit

to run the gedit text editor as root. Open any .desktop file in the /usr/share/xsessions directory that you wish to edit.

sessions-openbox

Creating a New Entry

Using the above screenshot as a template, you can design your own entry for the menu.

The Encoding line is referring to the character encoding used in the file, and can safely be left at UTF-8 for nearly all purposes.

The Name is what will be displayed on GDM’s Sessions list, followed by a brief description in the Comment line.

The Exec line is probably the most important in the list. This is the section where you specify the command to run when the menu item is clicked. It will accept command line arguments as well (ie gnome-session -f). This line can also be set to a custom script that you have made.

Next is the Icon line, which in some circumstances can be used to specify the icon for an application, but it is not mandatory for the launchers in the session list.

Since .desktop files have uses beyond just GDM, they include a Type field to specify what the file represents. It can be left at Application for these purposes.

sessions-custom

A complete list of the properties and their meanings can be found here.

Once your files is saved, you’ll now see it listed on the Sessions list when GDM starts up. You also have the option of setting it as the default desktop session. To do from within Gnome, click System -> Administration -> Login Screen. In the dropdown box, select your new custom entry.

sessions-setdefault

Conclusion

With knowledge of how to control the GDM session options, you’re now in a place where you can create your own custom desktop environment by piecing together the individual components you like. As it so happens, that is the subject of an upcoming article – “How to Create Your Own Custom Desktop Environment”. Check back in a few days or follow us on RSS, Facebook or Twitter for that and more MTE goodness.

Do you like what you read here?

Receive the latest update in your inbox.

Similar Articles

Using Juju Charms to Easily Deploy Services in Ubuntu
How to Audit Your Linux Security With Lynis
How to Enable Two-Factor Authentication for SSH Connection

3 Comments

  • Ali Shahbaz

    can someone post an updated guide to add a virtualbox session to the GDM session like the one that was applicable on older Ubuntu sessions on this link
    http://www.quicktweaks.com/2008/10/14/run-your-…

    thanks…

    9th August 2010 09:05:18 Reply

  • JoshPrice

    Great suggestion, thanks!

    9th August 2010 07:52:14 Reply

  • Moc Reisaehcetekam

    Thanks for this post.  Unfortunately, on my machine I don’t have a “System” panel in Gnome.  I don’t know if our admin messed this up or whether that’s a “feature” of the new Ubuntu version that was installed recently.  Anyway: does anyone know what the actual application you reach via “System -> Administration -> Login Screen” is called?

    17th February 2012 12:02:00 Reply

  • About
  • Contact Us
  • Advertise
  • Privacy Policy
  • RSS Feed Terms

© 2007 - 2013 Make Tech Easier. All rights reserved.



Receive Daily Update in your Inbox

Quick Tips

Simple Trick to Make Firefox Run Faster

There are tons of ways to make Firefox runs faster. One of the ways is to turn off the tabs animation so the opening and closing of tabs will be immediate and doesn't take up much memory.

In Firefox, open a new tab and type "about:config" in the address bar.

Search for "browser.tabs.aimate" and double click to change the value to "false".

Close the tab. That's it.

Poll
Best Posts
  • Use Instametrogram to View, Comment And Get Geo-tagged Instagram Photos in Windows 8
  • 2 Websites To Generate Invoices Online for Free
  • Can You Survive Using a Chromebook as Your Only Computer?
  • How to Enable Two-Factor Authentication For Your Microsoft Account
  • Analyze Writing Errors with SlickWrite for Firefox and Chrome
  • Quickly Change the Default Browser on Mac From the Menu Bar
  • Change the Background Image of Windows 8 Start Screen
  • Monitor Your Website Uptime With Monitive + Giveaway (Contest Closed)
  • MTE Explains: How File Recovery Works on a PC
  • Make a Pretty Résumé with LaTeX: The Easy Way