Friday, 28 July 2017

Creating Desktop Launchers in 11 10 Ubuntu Oneiric

Creating Desktop Launchers in 11 10 Ubuntu Oneiric


As you might have already noticed, Oneiric doesnt let you create launchers by right-clicking the desktop. Different people have different needs, but I love to have CCSM and compiz --replace launchers (at least) at my desktop so I can just double-click those whenever disaster strikes. Thankfully, there is a workaround for creating launchers at the desktop in Oneiric.

First of all, make sure that the package gnome-panel is installed. It would do no harm, sitting there quietly. So, get to a Terminal and run:

sudo apt-get install --no-install-recommends gnome-panel

Now from the Alt + F2 run dialog or, even more conveniently, from a Terminal, run:

gnome-desktop-item-edit ~/Desktop/ --create-new

Name your launcher and enter the command to be launched as shown in the screenshot below. Clicking the OK button would immediately create the launcher.


Copying Existing Launchers

The above method you primarily need to create custom launchers that arent already present on your system; for creating launchers based on existing ones, there is a much easier method: simply copying them!

Therefore, navigate in Nautilus to /usr/share/applications, there youll find the vast majority of existing, system-wide launchers, and theyll be presented to you with the names and icons with which they also turn up in the Dash, Unity Launcher, and menus.

Now, you only got to do a simple copy & paste onto your desktop, whether directly on it or into its corresponding directory in your home directory. Done!

The executable bit will be automatically set, making the newly created copy of the concerning .desktop file a working launcher - it isnt set on the files in /usr/share/applications in the first place, since those arent executed, but sourced. Fortunately, Nautilus automatically takes care of that; but if you copy the launcher files via the command line, e.g. the Terminal, youd need to set it yourself!

User-Specific Launchers

User-specific launchers, including those of Wine and your possibly earlier created custom ones, are located in ~/.local/share/applications in your home directory (press Ctrl + H to see the hidden files/directories). Their executable bit also isnt set by default, but unlike the system-wide launchers, they turn up in Nautilus with their actual file names and generic icons (Wine launchers have at least their public names in their file names). Also unlike system-wide launchers, Nautilus wont automatically set the executable bit upon creating the copy, so youd need to set it yourself via Right-Click > Properties > Permissions.
download
alternative link download

Like the Post? Do share with your Friends.