ghacks Technology News

Create GNOME desktop entries for all users

Linux, being a multi-user system, begs for you to configure it such that all users initially experience exactly what you want them to experience. One option you have, which is very easy to do, is to create specific desktop launchers that are added to all new users upon first login. Naturally those users can then delete those launchers, but it gives you the opportunity to add launchers for things like help documentation or specific links to specific web sites.

But how is this particular task done? There isn’t a specific GUI tool for it so, as you would imagine, you will be using a combination of GUI and command tools to get this process complete. It’s fast, it’s easy, and the end result could save you a lot of time when deploying Linux GNOME desktops.

Create your launchers

Figure 1

The first thing you must do is create the necessary launchers. In order to create a launcher in GNOME right click anywhere on the desktop and select Create Launcher. When you do this a new window will open (see Figure 1) where you enter all of the details for the launcher.

Say you want to create a launcher that will open the default browser to the Ghacks website. For this you would select Location from the “Type” drop down, give the launcher a name, enter the Ghacks URL for the location, and then a comment. You can customize that with a nice icon by clicking the icon button and selecting an image.

Once you have clicked okay the launcher is ready for you to use. But how do you enable this for all new users? Let’s take a look.

Make it available

If you open up a terminal window and then change into the ~/Desktop directory, you will see a file called (in my case) Ghacks.desktop. The contents of this file look like:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Link
Icon[en_US]=gnome-panel-launcher
Name[en_US]=Ghacks
URL=http://www.ghacks.net
Comment[en_US]=Ghacks
Name=Ghacks
Comment=Ghacks
Icon=/home/jlwallen/Pictures/97px-Ubuntu-logo.svg.png

If you know what you are doing, you can edit these (and create them) manually.

Okay, so you have your launcher, what do you do? Simple…from the command line you need to copy the launchers you want added to all new users desktops to the /etc/skel directory. By default, you will see a launcher already in their called examples.desktop. That launcher really doesn’t do anything – it just serves as a model for you to use to create launchers. As you’ve seen here, you don’t really need a sample.

Create as many launchers, and as many types of launchers as you need. When a new user logs in for the first time, those launchers will be copied to their desktop for their use.

Final thoughts

The Linux desktop is a perfect example of real flexibility. You can make the desktop be and do anything you want. And, as an administrator, you can easily set up your new users such that they be greeted by the exact launchers you want them to have on their desktop. By taking advantage of this feature you can help to ensure your Linux desktop users start off on the right foot.

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Add desktop icons to KDE and GNOME
A walk around the GNOME desktop
Get To Know Linux: The GNOME Panel
Desktop Tray Launcher, Open Desktop Shortcuts From The Windows System Tray
Let Cairo-Dock be your Linux desktop dock



About the Author:

Author: , Tuesday November 9, 2010 -
Tags:, , ,


Responses so far:

  1. Vikram says:

    How do i setup a launcher that launches an application/script that is to placed in the user’s $HOME???
    Creating a Launcher with it’s command as /home/`whoami`/application doesn’t work

  2. Vikram …

    Instead of ‘whoami’ use a wildcard ‘$USER’

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us