Skip to content
Make Tech Easier
  • Sign In
    My Favorites

    login to view your favorites!

    Forgot your password?
  • How-To
    • Categories
    • Windows
    • Linux
    • Mac
    • Mobile
    • Android
    • iOS
    • Web
    • Browsers
    • WordPress
    • Gadgets
    • Hardware Guides
    • How Things Work
    • All Categories
    • Series
    • Understanding Android ROM
    • Apache Server Guide
    • Hardware Buying Guide
    • iOS Beginner Guide
    • Windows Alternative Apps
    • Linux Desktop Themes
    • Mastering WordPress
    • Mastering RAID
    •  All Series
  • Software
  • ebooks
  • Deals
  • Giveaway
  • More
    • About Us
    • About Us
    • RSS Feed Terms
    • Contact Us
    • Privacy Policy
    • Advertise with us
    • Terms of Service
    • Follow Us
    • RSS
    • Facebook
    • Twitter
    • Google+
    • Instagram
    • Pinterest
    • Youtube
  • Section
  • Windows
  • Linux
  • Mac
  • Mobile
  • Android
  • iOS
  • Internet
  • Browsers
  • WordPress
  • Gadgets
  • Hardware Guides
  • How Things Work
  • All Categories
  • Sites
  • MTE Premium
  • Software Discovery
  • Ebooks
  • Deals
  • About Us
  • About Us
  • Advertise with us
  • Contact Us
  • Privacy Policy
  • Terms of Service
  • RSS Feed Terms

How to Customize the GDM Sessions List

Joshua Price 8th Aug 2010 Linux 3 Comments

  • Share
  • Tweet
  • Email

Have 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.

Is this article useful?

Related Ebooks

The Beginner's Guide to KDE
The Beginner's Guide to KDE
The Beginner's Guide to Linux Command Line
The Beginner's Guide to Linux Command Line
The Complete Beginner's Guide to Ubuntu 16.04
The Complete Beginner's Guide to Ubuntu 16.04

3 comments

  1. Ali Shahbaz says

    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…

    Aug 9, 2010 at 9:05 am

  2. JoshPrice says

    Great suggestion, thanks!

    Aug 9, 2010 at 7:52 pm

  3. Moc Reisaehcetekam says

    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?

    Feb 17, 2012 at 12:02 am

Comments are closed.

Popular Posts

10 Free Linux Productivity Apps You Haven't Heard Of
How to Easily Remember Linux Commands
How to Fix the 'No Space Left on Device' Error on Linux
LibreOffice vs. WPS Office: Which Office Suite Should You Use on Linux
10 Games You Can Play on Linux with Wine
How to Play Hearthstone on Ubuntu Linux

Get more stuff like this in your inbox

we respect your privacy and take protecting it seriously

  • About
  • Contact
  • Advertise
  • Write For Us
  • Terms of Use
  • Privacy Policy
  • RSS Feed Terms
© 2007 - 2018 Uqnic Network Pte Ltd. All rights reserved.
Make Tech Easier is a member of the Uqnic Network.