Please note that right now, most of the information contained below is outdated and cannot be updated. Be careful, most of this won't work on Ubuntu 12.04 and newer.
Creating a custom launcher for Unity is simple. Quicklists provide an easy and efficient way to quickly access commonly used tasks for a specific application.
NOTE: Starting with Ubuntu 11.10, this popup option has vanished. Launchers can now only be created by editing text files in your home folder.
Creating a custom launcher is easy.
- Right-click on your desktop and click create a launcher.
- Edit the .desktop file using a text editor. (More information can be found here and here.)
So, which custom launchers do you use on Unity?
Note: Please limit yourself to one custom launcher per answer. Also, please provide a screenshot of it in action.
046 Answers
12 NextHome Icon Quicklist
Copy 'Home Folder' launcher file to your home directory:
mkdir ~/.local/share/applications cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applicationsOpen the file for editing in gedit:
gedit ~/.local/share/applications/nautilus-home.desktopDelete the following line from the file:
OnlyShowIn=GNOME;Add this text to the bottom of the file, then close and save:
X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads [Videos Shortcut Group] Name=Videos Exec=nautilus Videos TargetEnvironment=Unity [Documents Shortcut Group] Name=Documents Exec=nautilus Documents TargetEnvironment=Unity [Music Shortcut Group] Name=Music Exec=nautilus Music TargetEnvironment=Unity [Pictures Shortcut Group] Name=Pictures Exec=nautilus Pictures TargetEnvironment=Unity [Downloads Shortcut Group] Name=Downloads Exec=nautilus Downloads TargetEnvironment=UnityLog out and log in again to see the changes.
SSH Launcher
Access of list of your favorite SSH servers quickly.
Create a new file with gedit, in the Terminal type:
gedit ~/.local/share/applications/ssh-launcher.desktopCopy & Paste this text into the above file:
[Desktop Entry] Version=1.0 Name=Remote Servers Comment=Login to my servers Exec=gnome-terminal --disable-factory --sm-client-disable --class=remoteserver -x ssh -t minibox.local Terminal=false X-MultipleArgs=false Type=Application Icon=utilities-terminal StartupNotify=true StartupWMClass=RemoteServers X-Ayatana-Desktop-Shortcuts=Server1; [Server1 Shortcut Group] Name=SSH into minibox.local Exec=gnome-terminal --disable-factory --sm-client-disable --class=remoteserver -x ssh -t minibox.local TargetEnvironment=Unity Comment=You can create more of these. Just add to X-Ayatana-Desktop-Shortcuts a "Server2", "Server3" etc, then change the domain name (in this case, "minibox.local") to the name of your server. You'll also notice that the default action (When you just click the icon in the launcher) is to SSH into minibox.local - you'll need to change that to your most used server.
Drag and Drop onto the launcher by navigating to ~/.local/share/applications/ in Nautilus.
Ubuntu Software Center Quicklist
Quickly add PPAs through the software-properties UI and update sources as well.
Copy the original .desktop file to your home folder using Terminal:
cp /usr/share/applications/ubuntu-software-center.desktop ~/.local/share/applications/Open the file for editing with gedit:
gedit ~/.local/share/applications/ubuntu-software-center.desktopAdd the following at the bottom of the file. This should be entered after the line X-Ubuntu-Gettext-Domain=software-center
.
X-Ayatana-Desktop-Shortcuts=SoftwareUpdates;SoftwareProperties;Synaptic;
[SoftwareUpdates Shortcut Group]
Name=Update Manager
Exec=update-manager -c
OnlyShowIn=Unity
[SoftwareProperties Shortcut Group]
Name=Add/Edit PPAs
Exec=gksu software-properties-gtk %u
OnlyShowIn=Unity
[Synaptic Shortcut Group]
Name=Synaptic Software Manager
Exec=gksu synaptic %u
OnlyShowIn=Unity 5 Home Icon Quicklist (auto-update from bookmarks)
Here is a small shell script that updates your Home-Quicklist with all your bookmarks. No manual manipulation. It reads your bookmark file and creates the menu items from it. It also adds the "Root Filemanager" menu entry.
- Copy the script listed below into an empty file and put it in your scripts-folder (we will assume that is
~/bin/and the script name you choose isunityhome.bash). Run the script once to add the entries:
bash ~/bin/unityhome.bashOptionally you may have cron run the script for you every once in a while. To add it to cron, type the follwing command into a shell:
crontab -eAn editor will open. There add a line like:
@reboot /bin/bash/ $HOME/bin/unityhome.bash > /dev/null 2>&1If you don't do this step, you'll have to run the script by hand every time you change your nautilus bookmarks if you want the quicklist updated.
Changes only take effect on your next login or after you Alt+F2
unity --replaceSo do that. Note: Don't run
unity --replacein a terminal. If you close that terminal, it will kill unity with it.Enjoy and have a look at the similar script for gnome-terminal that parses your ssh bookmarks (in
~/.ssh/config).
Script:
Here is the script:
#!/bin/bash
# tabsize: 4, encoding: utf8
#
# © 2011 . Use permitted under MIT license:
#
#
# CONTRIBUTORS: Chris Druif <>
# Scott Severance <
# jacopoL <>
#
# This script updates the unity quicklist menu for nautilus to contain the user
# bookmarks. The updates will have efect after unity is restarted (either on
# the next login or by invoking 'unity --replace').
# location of template and unity bar launchers
nautempl="/usr/share/applications/nautilus-home.desktop"
target="$HOME/.local/share/applications/nautilus-home.desktop"
bookmarks="$HOME/.gtk-bookmarks"
# backup if file already exists
if [ -e "$target" ]; then echo "Creating backup of: $target." mv -n "$target" "$target.bak"
fi
# copy template
cp "$nautempl" "$target"
if ! grep -q 'OnlyShowIn=.*Unity' "$target"; then # add only if not already present sed -i "s/\(OnlyShowIn=.*\)/\1Unity;/" "$target"
fi
# due to a bug in Unity (Ubuntu 11.10+) we will have to completely remove the OnlyShowIn line:
#
sed -i '/^OnlyShowIn=/d' "$target"
if ! grep -q 'X-Ayatana-Desktop-Shortcuts=' "$target"; then # add only if not already present echo -e "\nX-Ayatana-Desktop-Shortcuts=\n" >> "$target"
else echo >> "$target"
fi
bmcount=0
while read bmline; do bmcount=$(($bmcount+1)) # number of current bookmark bmname=${bmline#*\ } # name of the bookmark bmpath=${bmline%%\ *} # path the bookmark leads to # deal with bookmarks that have no name if [ "$bmname" = "$bmpath" ]; then bmname=${bmpath##*/} fi # fix spaces in names and paths bmname="$(echo "$bmname" | sed 's/%20/ /g')" bmpath="$(echo "$bmpath" | sed 's/%20/ /g')" # fix accents in names and paths (for french users) bmname="$(echo "$bmname" | python -c 'import sys,urllib;sys.stdout.write(urllib.unquote(sys.stdin.read()))')" bmpath="$(echo "$bmpath" | python -c 'import sys,urllib;sys.stdout.write(urllib.unquote(sys.stdin.read()))')" # extend shortcut list with current bookmark, prepending a ; if needed sed -i "s/\(X-Ayatana-Desktop-Shortcuts=\(.*;$\|$\)\)/\1Scg${bmcount};/ t s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1;Scg${bmcount};/" "$target" # write bookmark information cat - >> "$target" <<EOF
[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF
done < "$bookmarks"
# Add a root file manager entry
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1RootFM;/" "$target"
cat - >> "$target" <<EOF
[RootFM Shortcut Group]
Name=Root
Exec=gksudo nautilus
TargetEnvironment=Unity
EOF
exit 0Improvement: Do not duplicate "Home folder" and "username"
If you don't want to have two items targeting your Home folder ("Home Folder" at the bottom of the quicklist and the clickable username), you can replace the following code:
# write bookmark information cat - >> "$target" <<EOF
[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF
done < "$bookmarks"by the following code:
# write bookmark information if [ "file://$HOME" != "$bmpath" ]; then cat - >> "$target" <<EOF
[Scg$bmcount Shortcut Group]
Name=$bmname
Exec=nautilus "$bmpath"
TargetEnvironment=Unity
EOF fi
done < "$bookmarks" 7 LibreOffice Quicklist
This creates a quicklist for the LibreOffice Start Center launcher.
Copy your original .desktop file into your home directory for editing:
cp /usr/share/applications/libreoffice-startcenter.desktop ~/.local/share/applicationsOpen in gedit:
gedit ~/.local/share/applications/libreoffice-startcenter.desktopEdit the MimeType line:
Find the following line:
MimeType=application/vnd.openofficeorg.extension;Replace with:
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;Highlight and copy the text below, then paste it at the bottom of the .desktop file:
X-Ayatana-Desktop-Shortcuts=Writer;Impress;Calc;Math;Draw [Writer Shortcut Group] Name=Writer Exec=libreoffice -writer %U TargetEnvironment=Unity [Impress Shortcut Group] Name=Impress Exec=libreoffice -impress %U TargetEnvironment=Unity [Calc Shortcut Group] Name=Calc Exec=libreoffice -calc %U TargetEnvironment=Unity [Math Shortcut Group] Name=Math Exec=libreoffice -math %U TargetEnvironment=Unity [Draw Shortcut Group] Name=Draw Exec=libreoffice -draw %U TargetEnvironment=UnityNote: For LibreOffice 3.4 and 3.4.1: in Exec;
libreofficemust be replaced with `libreoffice3.4', but it seems in Oneiric we don't need to add the version number. I'm testing it from Oneiric and leaving default just run well, adding the verison number make the quicklist unusableNavigate to ~/.local/share/applications and drag'n'drop the LibreOffice Start Center desktop file onto the launcher.
A similar modification can be made to the LibreOffice Writer launcher.
3Firefox Quicklist
Add handy Firefox options to the launcher.
Copy your original .desktop file into your home directory for editing:
cp /usr/share/applications/firefox.desktop ~/.local/share/applicationsOpen in gedit:
gedit ~/.local/share/applications/firefox.desktopFind and edit the following line:
X-Ayatana-Desktop-Shortcuts=NewWindow;to match this line:
X-Ayatana-Desktop-Shortcuts=NewWindow;SafeMode;ProfileManager;Add this text to the bottom of the .desktop, then save the file:
[SafeMode Shortcut Group] Name=Open Firefox in safe mode Exec=firefox -safe-mode TargetEnvironment=Unity [ProfileManager Shortcut Group] Name=Firefox Profile Manager Exec=firefox -ProfileManager TargetEnvironment=Unity
Terminal Quicklist
Copy original Terminal launcher into your home directory using Terminal:
cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applicationsOpen the file with gedit still using Terminal:
gedit ~/.local/share/applications/gnome-terminal.desktopFind the following line from the file:
OnlyShowIn=GNOME;Replace the above line with:
OnlyShowIn=GNOME;Unity;Add this text to the bottom of the file then Save & Close it:
X-Ayatana-Desktop-Shortcuts=NewWindow;NewTab;Top;Root; [NewWindow Shortcut Group] Name=New Window Exec=gnome-terminal --window TargetEnvironment=Unity [NewTab Shortcut Group] Name=New Tab Exec=xdotool windowfocus gnome-terminal key ctrl+shift+t TargetEnvironment=Unity [Root Shortcut Group] Name=Root Terminal Exec=gksudo gnome-terminal TargetEnvironment=Unity [Top Shortcut Group] Name=Top Exec=gnome-terminal --command top TargetEnvironment=UnityTo enable the 'New Tab' option you need to install
xdotoolfrom Ubuntu Software Centre
Close all Terminal windows, right-click on its launcher icon and untick 'Keep In Launcher'
Open Dash, run
Terminaland the new launcher with quicklist will appear.
Google Services Launcher
A custom launcher for common services like gmail, calendar, composing a new message.
Create a new file by opening Text Editor and paste the following text into it:
[Desktop Entry] Version=1.0 Name=Google Services Exec=xdg-open Terminal=false X-MultipleArgs=false Type=Application Icon=chrome-https___docs.google.com_ Categories=Network;WebBrowser; StartupNotify=true StartupWMClass=docs.google.com X-Ayatana-Desktop-Shortcuts=Plus;Inbox;Compose;Voice;Contacts;Calendar;Documents;Photos;Maps;Sites;Reader;Bookmarks Name[en_US]=Google Services (Gmail) [Plus Shortcut Group] Name=Plus Exec=xdg-open ' TargetEnvironment=Unity [Inbox Shortcut Group] Name=InBox Exec=xdg-open ' TargetEnvironment=Unity [Compose Shortcut Group] Name=Compose Exec=xdg-open ' TargetEnvironment=Unity [Voice Shortcut Group] Name=Voice Exec=xdg-open ' TargetEnvironment=Unity [Contacts Shortcut Group] Name=Contacts Exec=xdg-open ' TargetEnvironment=Unity [Calendar Shortcut Group] Name=Calendar Exec=xdg-open ' TargetEnvironment=Unity [Documents Shortcut Group] Name=Documents Exec=xdg-open TargetEnvironment=Unity [Photos Shortcut Group] Name=Photos Exec=xdg-open ' TargetEnvironment=Unity [Maps Shortcut Group] Name=Maps Exec=xdg-open ' TargetEnvironment=Unity [Sites Shortcut Group] Name=Sites Exec=xdg-open ' TargetEnvironment=Unity [Reader Shortcut Group] Name=Reader Exec=xdg-open ' TargetEnvironment=Unity [Bookmarks Shortcut Group] Name=Bookmarks Exec=xdg-open ' TargetEnvironment=UnitySave the file with this folder location and name:
~/.local/share/applications/google-services-launcher.desktopDrag and Drop this file onto the launcher by navigating to
~/.local/share/applications/in File Manager.
You can download the icon here.
2Banshee Quicklist
Copy the Banshee launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/banshee.desktop ~/.local/share/applicationsOpen this new file for editing:
gedit ~/.local/share/applications/banshee.desktopHighlight and copy the text below, then paste this at the bottom of the file.
X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;Preferences [Play Shortcut Group] Name=Play Exec=banshee --play TargetEnvironment=Unity [Pause Shortcut Group] Name=Pause Exec=banshee --pause TargetEnvironment=Unity [Stop Shortcut Group] Name=Stop Exec=banshee --stop TargetEnvironment=Unity [Previous Shortcut Group] Name=Previous Exec=banshee --previous TargetEnvironment=Unity [Next Shortcut Group] Name=Next Exec=banshee --next TargetEnvironment=Unity [Preferences Shortcut Group] Name=Preferences Exec=banshee --show-preferences TargetEnviroment=Unity
Google Docs Quicklist
Create a new file with this command:
gedit ~/.local/share/applications/gdocs.desktopPaste in the text below:
[Desktop Entry] Version=1.0 Name=Google Docs Exec=xdg-open Terminal=false X-MultipleArgs=false Type=Application Icon=chrome-https___docs.google.com_ Categories=Network;WebBrowser; StartupNotify=true StartupWMClass=docs.google.com X-Ayatana-Desktop-Shortcuts=Doc;Spreadsheet;Presentation;Drawing [Doc Shortcut Group] Name=New Document Exec=xdg-open TargetEnvironment=Unity [Spreadsheet Shortcut Group] Name=New Spreadsheet Exec=xdg-open TargetEnvironment=Unity [Presentation Shortcut Group] Name=New Presentation Exec=xdg-open TargetEnvironment=Unity [Drawing Shortcut Group] Name=New Drawing Exec=xdg-open TargetEnvironment=UnityNote that this opens in your default browser. For chrome/ium fullscreen apps, find and replace
xdg-openwithchromium-browserandhttps:with--app=https:.Drag the gdocs.desktop into the launcher from ~/.local/share/applications/
Quicklist to Add/Remove workspaces rows/columns
Easily add or remove virtual desktops or workspaces with a Unity icon/quicklist, an option sourly missed in Ubuntu currently. Only option seems to be going into gconf-editor and changing them manually.
Ideally this would make it's way into the Workspace Switcher.
It relies on a script to pull in the current number of rows and columns and add or subtracts one before setting it again. It also checks that it doesn't go below one row or column.
Create a new .desktop file with gedit, in the Terminal type:
gedit ~/.local/share/applications/workspaces.desktopCopy & Paste this text into the newly created file:
[Desktop Entry] Version=1.0 Name=Workspaces Comment=Change Workspace Numbers GenericName=Workspace Editor Terminal=false Type=Application Icon=desktop X-Ayatana-Desktop-Shortcuts=AddRow;RmRow;AddColumn;RmColumn; [AddRow Shortcut Group] Name=Add Row Exec=workspaces-shortcuts rows + TargetEnvironment=Unity [AddColumn Shortcut Group] Name=Add Column Exec=workspaces-shortcuts cols + TargetEnvironment=Unity [RmRow Shortcut Group] Name=Remove Row Exec=workspaces-shortcuts rows - TargetEnvironment=Unity [RmColumn Shortcut Group] Name=Remove Column Exec=workspaces-shortcuts cols - TargetEnvironment=UnityCreate a new script with gedit, in the Terminal type:
gksudo gedit /usr/bin/workspaces-shortcutsNOTE: gksudo is used because of the location we'll be saving it and because it's a graphical application.
Copy & Paste this text into the newly created file:
#!/bin/bash case $1 in rows)t=v;; cols)t=h;; esac; check=`gconftool-2 --get /apps/compiz-1/general/screen0/options/${t}size` if [[ ! ($2 = - && $check < 2 ) ]] then [[ $2 = [-+] ]] && gconftool-2 --set /apps/compiz-1/general/screen0/options/${t}size --type int $(( $check $2 1 )) fiToo make the script executable, in the Terminal type:
sudo chmod a+x /usr/bin/workspaces-shortcutsDrag and Drop onto the launcher by navigating to ~/.local/share/applications/ in Nautilus.
Sorting can be easily done by changing in the .desktop-file the line from:
X-Ayatana-Desktop-Shortcuts=AddRow;RmRow;AddColumn;RmColumn;to
X-Ayatana-Desktop-Shortcuts=AddRow;AddColumn;RmRow;RmColumn;for example.
Chromium Quicklist
Copy the Chromium launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/chromium-browser.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/chromium-browser.desktopHighlight and copy the text below, then paste it at the bottom of the file.
X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito; [NewWindow Shortcut Group] Name=New Window Exec=chromium-browser TargetEnvironment=Unity [Incognito Shortcut Group] Name=New incognito window Exec=chromium-browser --incognito TargetEnvironment=Unity
Gedit Quicklist
Copy 'Gedit' launcher file to your home directory using Terminal
cp /usr/share/applications/gedit.desktop ~/.local/share/applicationsOpen the file for editing in gedit :
gedit ~/.local/share/applications/gedit.desktopAdd this text to the bottom of the file and replace the
<username>text to match your home folder username then save & close:X-Ayatana-Desktop-Shortcuts=OpenDoc;OpenDocRoot; [OpenDoc Shortcut Group] Name=Open file... Exec=/home/<username>/.local/share/applications/scripts/gedit-shortcuts normal-mode TargetEnvironment=Unity [OpenDocRoot Shortcut Group] Name=Open file as root... Exec=/home/<username>/.local/share/applications/scripts/gedit-shortcuts root-mode TargetEnvironment=UnityCreate a 'scripts' folder in ~/.local/share/applications folder:
mkdir ~/.local/share/applications/scriptsCreate the script file 'gedit-shortcuts' with gedit:
gedit ~/.local/share/applications/scripts/gedit-shortcutsAdd this text to the file then save and close:
#!/bin/bash case $1 in normal-mode) gedit $(zenity --title='Open file...' --file-selection);; root-mode) gksudo -u root -m "Running Gedit as user root allow you to modify some essential files of your system" "bash -c 'gedit \$(zenity --title=\'Open file as user root...\' --file-selection)'";; esacMake the file executable:
chmod +x ~/.local/share/applications/scripts/gedit-shortcutsDrag & Drop the gedit.desktop file from ~/.local/share/applications in nautilus to the Unity Launcher Bar
Filezilla FTP Quicklist
Quickly access your favourite FTP servers with from the Filezilla launcher.
There is two options of making a FileZille quicklist. You can link to sites in the Site Manager (the safe option); or you can enter connection info directly in the .desktop file (the option without the Site Manager).
Link to Site Manager (the safe option)
Copy the Filezilla launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/filezilla.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/filezilla.desktopAppend the text below at the bottom of the .desktop file, adding a "Shortcut Group" for each site you want to link. In the Exec parameter you should put the path of your FTP site in Site Manager. The 2° shortcut directly open the Filezilla Site Manager.
X-Ayatana-Desktop-Shortcuts=Server1;sitemanager [Server1 Shortcut Group] Name=Site Name Exec=filezilla -c "0/Folder Name/Site Name" TargetEnvironment=Unity [sitemanager Shortcut Group] Name=Site Manager Exec=filezilla -s TargetEnvironment=Unity
For details, you should look at the Command-line arguments page on Filezilla wiki.
Directly enter connection details (the quick but unsafe option)
Note: There is a security problem with this option in that you will be storing your password in plain text. Do this only if you know the risk, this is a very "hackish" way of doing things. If you use the Site Manager in FileZilla, do use the option above which uses the info already stored in Filezilla Site Manager configuration.
Copy the Filezilla launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/filezilla.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/filezilla.desktopHighlight and copy the text below, then paste it at the bottom of the .desktop file. Edit the FTP server details to match your own, then save the file.
X-Ayatana-Desktop-Shortcuts=Server1; [Server1 Shortcut Group] Name=FTP into test server Exec=filezilla ftp://test::21 TargetEnvironment=UnityYou'll want to change the "test:test" with your username/password respectively, and the "ftp.secureftp-test.com" with the domain of your ftp server.
LAMP Quicklist
Open a new file:
gedit ~/.local/share/applications/lamp.desktopCopy the text below
[Desktop Entry] Name=LAMP GenericName=LAMP X-GNOME-FullName=LAMP Comment=Open services of your LAMP server Exec=gksu service apache2 start && gksu service mysql start Icon=emblem-web Terminal=false Type=Application StartupNotify=true X-Ayatana-Desktop-Shortcuts=Start;Stop;Restart [Start Shortcut Group] Name=Start Exec=gksu service apache2 start && gksu service mysql start TargetEnvironment=Unity [Stop Shortcut Group] Name=Stop Exec=gksu service apache2 stop && gksu service mysql stop TargetEnvironment=Unity [Restart Shortcut Group] Name=Restart Exec=gksu service apache2 restart && gksu service mysql restart TargetEnvironment=UnityDrag and Drop onto the launcher by navigating to ~/.local/share/applications/ in Nautilus.
Rhythmbox Quicklist
Copy the Rhythmbox launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/rhythmbox.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/rhythmbox.desktopHighlight and copy the text below, then paste it at the bottom of the file:
X-Ayatana-Desktop-Shortcuts=Play;Pause;Previous;Next;Stop [Play Shortcut Group] Name=Play Exec=rhythmbox-client --play TargetEnvironment=Unity [Pause Shortcut Group] Name=Pause Exec=rhythmbox-client --pause TargetEnvironment=Unity [Previous Shortcut Group] Name=Previous Exec=rhythmbox-client --previous TargetEnvironment=Unity [Next Shortcut Group] Name=Next Exec=rhythmbox-client --next TargetEnvironment=Unity [Stop Shortcut Group] Name=Stop Exec=rhythmbox-client --stop TargetEnvironment=UnitySave the file.
Google Chrome Quicklist
Copy the Google Chrome launcher to your home directory, in Terminal paste the following:
cp /opt/google/chrome/google-chrome.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/google-chrome.desktopHighlight and copy the text below, then paste it at the bottom of the file.
X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito; [NewWindow Shortcut Group] Name=New Window Exec=google-chrome TargetEnvironment=Unity [Incognito Shortcut Group] Name=New incognito window Exec=google-chrome --incognito TargetEnvironment=Unity
Thunderbird Quicklist
Copy the launcher file to your home directory:
cp /usr/share/applications/thunderbird.desktop ~/.local/share/applications/thunderbird.desktopOpen the file with Text Editor
gedit ~/.local/share/applications/thunderbird.desktopAdd the text at the bottom of the file and save it.
X-Ayatana-Desktop-Shortcuts=Compose;AddressBook;ProfileManager;[Compose Shortcut Group] Name=Compose Exec=thunderbird -compose TargetEnvironment=Unity [AddressBook Shortcut Group] Name=Address Book Exec=thunderbird -addressbook TargetEnvironment=Unity [ProfileManager Shortcut Group] Name=Profile Manager Exec=thunderbird -ProfileManager TargetEnvironment=Unity
Mines Quicklist
Quickly launch new games of Mine from the launcher.
Copy the Mines launcher to your home directory, in Terminal paste the following:
cp /usr/share/applications/gnomine.desktop ~/.local/share/applicationsOpen this file for editing:
gedit ~/.local/share/applications/gnomine.desktopHighlight and copy the text below, then paste it at the bottom of the .desktop file.
X-Ayatana-Desktop-Shortcuts=Small;Medium;Large; [Small Shortcut Group] Name=New Game (Small) Exec=gnomine -f 0 TargetEnvironment=Unity [Medium Shortcut Group] Name=New Game (Medium) Exec=gnomine -f 1 TargetEnviroment=Unity [Large Shortcut Group] Name=New Game (Large) Exec=gnomine -f 2 TargetEnviroment=Unity
Déjà Dup Quicklist
Copy Déjà Dup launcher file to your home directory with Terminal:
cp /usr/share/applications/deja-dup.desktop ~/.local/share/applicationsOpen the file for editing in Text Editor:
gedit ~/.local/share/applications/deja-dup.desktopAdd this text to the bottom of the file, then close and save:
X-Ayatana-Desktop-Shortcuts=BackupNow; [BackupNow Shortcut Group] Name=Backup Now Exec=deja-dup --backup TargetEnvironment=UnityRemove Déjà Dup Icon from Launcher (untick Keep In Launcher) then open the application from Dash, the new quicklist should appear and you can re-tick Keep In Launcher.
Opera Quicklist
Copy your original .desktop file into your home directory for editing:
cp /usr/share/applications/opera-browser.desktop ~/.local/share/applicationsOpen terminal and enter the following:
gedit ~/.local/share/applications/opera-browser.desktopAt the bottom of the file, add the following lines, then save and close:
X-Ayatana-Desktop-Shortcuts=NewTab;NewPrivateTab;NewWindow;Mail; [NewTab Shortcut Group] Name=New Tab Exec=opera -newtab TargetEnvironment=Unity [NewPrivateTab Shortcut Group] Name=New Private Tab Exec=opera -newprivatetab TargetEnvironment=Unity [NewWindow Shortcut Group] Name=New Window Exec=opera -newwindow TargetEnvironment=Unity [Mail Shortcut Group] Name=Mail Exec=opera -mail TargetEnvironment=UnityAdd the icon to your launcher if it is not already and your quicklists should now be working.
Tips:
You can also make Mail open a new tab at a specific address if you want by replacing its Exec command to be (for example):
Exec=opera -newtab "" 2 Ubuntu One Quicklist
Connect to the server, disconnect from the server and stop the Ubuntu One syncdaemon quickly.
Copy the original Ubuntu One Control Panel icon to your home directory for editing:
cp /usr/share/applications/ubuntuone-control-panel-gtk.desktop ~/.local/share/applications/Open the file for editing with gedit:
gedit ~/.local/share/applications/ubuntuone-control-panel-gtk.desktopHighlight and copy the text below, then paste it at the bottom of the .desktop file:
X-Ayatana-Desktop-Shortcuts=Connect;Disconnect;Quit [Connect Shortcut Group] Name=Connect Exec=u1sdtool --connect TargetEnvironment=Unity [Disconnect Shortcut Group] Name=Disconnect Exec=u1sdtool --disconnect TargetEnvironment=Unity [Quit Shortcut Group] Name=Stop Ubuntu One Exec=u1sdtool --quit TargetEnvironment=Unity
Transmission Quicklist
Copy the global
transmission-gtk.desktopfile to your home directory:cp /usr/share/applications/transmission-gtk.desktop ~/.local/share/applicationsEdit the file:
gedit ~/.local/share/applications/transmission-gtk.desktopPaste the following code to the bottom of the file:
X-Ayatana-Desktop-Shortcuts=Pause All;Start All; [Pause All Shortcut Group] Name=Pause All Exec=transmission-remote -tall --stop TargetEnvironment=Unity [Start All Shortcut Group] Name=Start All Exec=transmission-remote -tall --start TargetEnvironment=Unity
You may also show number of downloading torrents and total progress indicator using script from
Firefox Quicklist Alternative
Puts a list of your favourite websites in the Firefox Quicklist.
Copy firefox.desktop to home.
cp /usr/share/applications/firefox.desktop ~/.local/share/applicationsOpen for editing
gedit ~/.local/share/applications/firefox.desktopAdd to the bottom, edit the websites to your favorites
X-Ayatana-Desktop-Shortcuts=OMGUbuntu;WebUpd8;UbuntuForums;AskUbuntu;UbuntuLaunchpad;NewWindow [OMGUbuntu Shortcut Group] Name=OMG! Ubuntu Exec=firefox -new-window ' TargetEnvironment=Unity [WebUpd8 Shortcut Group] Name=WebUpd8 Exec=firefox -new-window ' TargetEnvironment=Unity [UbuntuForums Shortcut Group] Name=Ubuntu Forums Exec=firefox -new-window ' TargetEnvironment=Unity [AskUbuntu Shortcut Group] Name=Ask Ubuntu Exec=firefox -new-window ' TargetEnvironment=Unity [UbuntuLaunchpad Shortcut Group] Name=Ubuntu Launchpad Exec=firefox -new-window ' TargetEnvironment=Unity [NewWindow Shortcut Group] Name=Open a New Window Exec=firefox -new-window about:blank TargetEnvironment=Unity
Gnome-Terminal Quicklist (auto-update from ssh config)
Here is a small shell script that updates your Gnome-Terminal-Quicklist with all your server entries in your ~/.ssh/config file. No manual manipulation is required. It reads your ~/.ssh/config file and creates the menu items from it. It also adds the "Root Terminal" menu entry.
- Copy the script listed below into an empty file and put it in your scripts-folder (we will assume that is
~/bin/and the script name you choose isunityterm.sh). Run the script once to add the entries:
/bin/bash ~/bin/unityterm.shOptionally you may have cron run the script for you every once in a while. To add it to cron, type the follwing command into a shell:
crontab -eAn editor will open. There add a line like:
@reboot /bin/bash/ $HOME/bin/unityterm.sh > /dev/null 2>&1If you don't do this step, you'll have to run the script by hand every time you change your
~/.ssh/configif you want the quicklist updated.Changes only take effect on your next login or after you Alt+F2ing
unity --replaceSo do that. Note: Don't run
unity --replacein a terminal. If you close that terminal, it will kill unity with it.Enjoy and have a look at the similar script for nautilus that parses your nautilus bookmarks.
Script:
Here is the script:
#!/bin/bash
# indent-mode: spaces, tabsize: 4, encoding: utf8
#
# © 2011 . Use under the MIT license:
#
#
# CONTRIBUTORS: jacopoL <>
#
# This script updates the unity quicklist menu for gnome-terminal to contain
#+the user's bookmarks. The updates will have efect after unity is restarted
#+(eigther after the next login or by invoking 'unity --replace').
# location of template, unity bar launchers and ssh config file
tertempl="/usr/share/applications/gnome-terminal.desktop"
target="$HOME/.local/share/applications/gnome-terminal.desktop"
bookmarks="$HOME/.ssh/config"
# backup if file allready exists
if [ -e "$target" ]; then echo "Creating backup of: $target." mv -n "$target" "$target.bak"
fi
# copy template
cp "$tertempl" "$target"
if ! grep -q 'OnlyShowIn=.*Unity' "$target"; then # add only if not already present sed -i "s/\(OnlyShowIn=.*\)/\1Unity;/" "$target"
fi
# add entries to template
if ! grep -q 'X-Ayatana-Desktop-Shortcuts=' "$target"; then # add only if not already present echo -e "\nX-Ayatana-Desktop-Shortcuts=\n" >> "$target"
else echo >> "$target"
fi
bmcount=0 # number of current bookmark
while read bmline; do # walk lines in ssh config file # when a new host is found, write the data collected in previous loops test=$(echo "$bmline" | grep -oE 'Host[[:space:]]') if [ -n "$test" ]; then ishost=$(echo "$bmline" | sed -e 's/[ ^I]*Host[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1/g') fi if [ -n "$ishost" ]; then if [ -n "$hostname" ]; then # write bookmark information cat - >> "$target" <<____________EOF [Scg$bmcount Shortcut Group] Name=SSH into $oldhost Exec=gnome-terminal -x ssh $sshuser$hostname TargetEnvironment=Unity
____________EOF # extend shortcut list with current bookmark, prepending a ; if needed sed -i "s/\(X-Ayatana-Desktop-Shortcuts=\(.*;$\|$\)\)/\1Scg${bmcount};/ t s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1;Scg${bmcount};/" "$target" bmcount=$(($bmcount+1)) fi hostname="" sshuser="" oldhost="$ishost" ishost="" fi # collect data: hostname test=$(echo "$bmline" | grep -oE 'HostName[[:space:]]') if [ -n "$test" ]; then hostname=$(echo "$bmline" | sed -e 's/[ ^I]*HostName[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1/g') fi # collect data: ssh user test=$(echo "$bmline" | grep -oE 'User[[:space:]]') if [ -n "$test" ]; then sshuser=$(echo "$bmline" | sed -e 's/[ ^I]*User[ ^I]\+\([-_\.A-Za-z0-9]\+\).*/\1@/g') fi
done < "$bookmarks"
# write bookmark information of last bookmark
#+and add a root file manager entry
cat - >> "$target" <<EOF [Scg$bmcount Shortcut Group] Name=SSH into $oldhost Exec=gnome-terminal -x ssh $sshuser$hostname TargetEnvironment=Unity [RootTM Shortcut Group] Name=Root Terminal Exec=gksudo gnome-terminal TargetEnvironment=Unity
EOF
# extend shortcut list with last bookmark and root file manager
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1Scg${bmcount};/" "$target"
sed -i "s/\(X-Ayatana-Desktop-Shortcuts=.*\)/\1RootTM;/" "$target"
# Cleanup extra whitespaces
sed -i 's/^[[:space:]]\+//g' "$target"
exit 0 Opera Launcher & Quicklist (Part 2)
Tab counter
The total number of tabs you have open appears on the Launcher icon and is updated in real time as you open and close tabs;
Urgency
When Opera is not in focus and a new tab is opened, the Opera icon in the Launcher now enters urgency mode and wiggles once;
Quicklist
With (at the moment) limited support for Opera’s built in Mail client (M2).
Installation
Extract the script from this zip into your home folder.
Open Startup Applications and add an entry using the above script as follows:
Command:
python unity-opera.py
Kudos go to Kyle Baker!
DeaDBeeF Quicklist
Copy launcher file to your home directory:
cp /usr/share/applications/deadbeef.desktop ~/.local/share/applicationsOpen the file for editing in gedit:
gedit ~/.local/share/applications/deadbeef.desktopAdd this text to the bottom of the file, then close and save:
X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Next;Prev [Play Shortcut Group] Name=Play Exec=deadbeef --play TargetEnvironment=Unity [Pause Shortcut Group] Name=Pause Exec=deadbeef --pause TargetEnvironment=Unity [Stop Shortcut Group] Name=Stop Exec=deadbeef --stop TargetEnvironment=Unity [Next Shortcut Group] Name=Next Exec=deadbeef --next TargetEnvironment=Unity [Prev Shortcut Group] Name=Prev Exec=deadbeef --prev TargetEnvironment=UnityOptional: Change the drag & drop function of the launcher so it appends files to the playlist instead of clearing it:
Find
Exec=deadbeef %Fand Replace withExec=deadbeef --queue %F
There are a few other commands available in deadbeef -h but these are the only ones that seem useful in a quicklist.
Custom Scripts Quicklist with GUI
Create Quicklist launcher for your scripts. Embedded GUI with automatic and manual option for adding entries. The automatic option can only add, with the manual you can modify the file directly.
1. Create custom .desktop file for launcher
gedit ~/.local/share/applications/my_scripts.desktop2. Paste the following code and edit following:(line 5 is the way to folder with your scripts, in this example, this is folder with the name Scripts, you need to change it for your location. You can change also the line 6 which is an icon. And at the end change <username> text to match your home folder username.
[Desktop Entry]
Name=My Scripts Folder
Comment=Open your scripts folder
TryExec=nautilus
Exec=xdg-open /home/<username>/Scripts
Icon=ibus-engine
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-Ubuntu-Gettext-Domain=nautilus
X-Ayatana-Desktop-Shortcuts=AddScript
[AddScript Shortcut Group]
Name=Add New Script
Exec=/home/<username>/.local/share/applications/scripts/addscript
TargetEnvironment=Unity3. Create a 'scripts' folder (if not exist) in ~/.local/share/applications folder:
mkdir ~/.local/share/applications/scripts4. Create the script file 'addscript' with gedit (this is the GUI for adding entries to your quicklist):
gedit ~/.local/share/applications/scripts/addscript5. Add this text to the file,then save and close
#!/bin/bash
menuitem=`zenity --list --title="My Scripts Launcher Manager" \
--width=300 --height=150 \
--text="Select action" \
--column="Pick" --column="Action" \
--radiolist TRUE Add-Script-Automatically FALSE Add/Edit/Delete-Manually`
case $menuitem in
Add-Script-Automatically )
hkey=$(zenity --entry --text "Set name for your script" --entry-text "" --title "Set name")
if [ -z "$hkey" ]; then
zenity --error --title "Set name for your script " --text="The script name is empty. Exiting ..."
exit 0
fi
ay=$(sed -n '/X-Ayatana-Desktop-Shortcuts/p' /$HOME/.local/share/applications/my_scripts.desktop)
shortname2=$(echo "$hkey" | sed 's/\///g')
shortname=$(echo "$shortname2" | sed 's/ /_/g')
hkey3=$(zenity --entry --text "Set command for your script" --entry-text "" --title "Set command")
if [ -z "$hkey3" ]; then
zenity --error --title "Set command " --text="The command is empty. Exiting ..."
exit 0
fi
sed -i "s/$ay/$ay;$shortname/g" /$HOME/.local/share/applications/my_scripts.desktop
echo "" >> /$HOME/.local/share/applications/my_scripts.desktop
echo "[$shortname Shortcut Group]" >> /$HOME/.local/share/applications/my_scripts.desktop
echo "Name=$hkey" >> /$HOME/.local/share/applications/my_scripts.desktop
echo "Exec=$hkey3" >> /$HOME/.local/share/applications/my_scripts.desktop
echo "TargetEnvironment=Unity" >> /$HOME/.local/share/applications/my_scripts.desktop
zenity --info --title "New entry added" --text "Changes only take effect on next login"
;;
Add/Edit/Delete-Manually)
zenity --text-info --filename=/$HOME/.local/share/applications/my_scripts.desktop > /tmp/my_scripts.desktop.edited --title "Add/Edit/Delete Script" --editable --width 850 --height 480
cp /tmp/my_scripts.desktop.edited /$HOME/.local/share/applications/my_scripts.desktop
rm /tmp/my_scripts.desktop.edited
zenity --info --title "New entry added" --text "Changes only take effect on next login"
;;
esac6. Make the file executable:
chmod +x ~/.local/share/applications/scripts/addscript7.Drag & Drop the my_scripts.desktop file from ~/.local/share/applications in nautilus to the Unity Launcher Bar
8. You can start adding entries to your quicklist with clicking on "Add New Script" menu item
Extended Home Icon Quicklist
Copy 'Home Folder' launcher file to your home directory with Terminal:
cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applicationsOpen the file for editing in gedit:
gedit ~/.local/share/applications/nautilus-home.desktopDelete the following line from the file:
OnlyShowIn=GNOME;Add this text to the bottom of the file, then close and save:
X-Ayatana-Desktop-Shortcuts=Amazon;Backgrounds;CD Covers;Documents;Downloads;Dropbox;DVD Projects;Google Earth;Listings;Music;Notes;Photographs;Podcasts;Public;Templates;Themes;Transmission;Videos [Amazon Shortcut Group] Name=Amazon Exec=nautilus Amazon TargetEnvironment=Unity [Backgrounds Shortcut Group] Name=Backgrounds Exec=nautilus Backgrounds TargetEnvironment=Unity [CD Covers Shortcut Group] Name=CD Covers Exec=nautilus CDCovers TargetEnvironment=Unity [Documents Shortcut Group] Name=Documents Exec=nautilus Documents TargetEnvironment=Unity [Dropbox Shortcut Group] Name=Dropbox Exec=nautilus Dropbox TargetEnvironment=Unity [Downloads Shortcut Group] Name=Downloads Exec=nautilus Downloads [DVD Projects Shortcut Group] Name=DVD Projects Exec=nautilus DVDProjects TargetEnvironment=Unity [Google Earth Shortcut Group] Name=Google Earth Exec=nautilus GoogleEarth TargetEnvironment=Unity [Listings Shortcut Group] Name=Listings Exec=nautilus Listings TargetEnvironment=Unity [Notes Shortcut Group] Name=Notes Exec=nautilus Notes TargetEnvironment=Unity [Photographs Shortcut Group] Name=Photographs Exec=nautilus Photographs TargetEnvironment=Unity [Podcasts Shortcut Group] Name=Podcasts Exec=nautilus Podcasts TargetEnvironment=Unity [Public Shortcut Group] Name=Public Exec=nautilus Public TargetEnvironment=Unity [Templates Shortcut Group] Name=Templates Exec=nautilus Templates TargetEnvironment=Unity [Themes Shortcut Group] Name=Themes Exec=nautilus Themes TargetEnvironment=Unity [Transmission Shortcut Group] Name=Transmission Exec=nautilus Transmission TargetEnvironment=Unity [Videos Shortcut Group] Name=Videos Exec=nautilus Videos TargetEnvironment=UnityLog out and log in again to see the changes.
VirtualBox Quicklist
This adds a quicklist entry for your Virtualbox virtual machines. The following example uses 'Windows XP' so will require editing to match your own VM details.
Copy the file to your home directory
cp /usr/share/applications/virtualbox.desktop ~/.local/share/applications/virtualbox.desktopOpen the file with Text Editor
gedit ~/.local/share/applications/virtualbox.desktopAdd the text at the bottom of the file and save it.
X-Ayatana-Desktop-Shortcuts=WindowsXP [WindowsXP Shortcut Group] Name=Start Windows XP Exec=/usr/lib/virtualbox/VirtualBox --comment "Windows XP" --startvm "Windows XP" TargetEnvironment=UnityDrag & Drop the virtualbox.desktop file from ~/.local/share/applications in nautilus to the Unity Launcher Bar