One of the useful features in Unity (Ubuntu Natty) is the adding of quicklists to the application icons in the launcher. For example, you can right click on the Google Chrome icon and access the option to open an incognito window, or right click the Gmail icon and select “Compose New Email” option. For those who came from the Windows background, this is very similar to the Windows 7’s taskbar jumplist.
How to add Unity Quicklists?
Ubuntu came out with an API for the Unity launcher and anyone can create their own quicklists with a different modification of the configuration file. Currently there is no easy way to add a quicklist item. The following is the summary of the steps required to add a quicklist item:
1. Copy the desktop configuration file to your home folder.
2. Open the desktop configuration file with gedit.
3. Add the quicklist code to the file. The syntax is as follow:
#adapted from Ubuntu wiki. Example is for gnome-screenshot X-Ayatana-Desktop-Shortcuts=Screen;Window [Screen Shortcut Group] Name=Take a screenshot of the whole screen Exec=gnome-screenshot TargetEnvironment=Unity [Window Shortcut Group] Name=Take a screenshot of the current window Exec=gnome-screenshot -w TargetEnvironment=Unity
The X-Ayatana-Desktop-Shortcuts code refers to the entries that appear when you right click on the app icon. The following [XXX shortcut Group] is the action for each entry.
Some of the most useful Unity Quicklists
1. Add Private/Safe mode, Profile Manager and your frequently accessed site to Firefox icon.
Copy the Firefox desktop configuration file to your home folder.
sudo cp /usr/share/applications/firefox.desktop ~/.local/share/applications
Open the file with gedit.
gedit ~/.local/share/applications/firefox.desktop
Replace the line
X-Ayatana-Desktop-Shortcuts=NewWindow;
with
X-Ayatana-Desktop-Shortcuts=NewWindow;Private;Safe;ProfileManager;MakeTechEasier
#feel free to change the name of your frequently accessed site
Next, add the following code to the end of the file:
[Private Shortcut Group] Name=Private Mode Exec=firefox -private-toggle TargetEnvironment=Unity [Safe Shortcut Group] Name=Safe Mode Exec=firefox -safe-mode TargetEnvironment=Unity [ProfileManager Shortcut Group] Name=Start Profile Manager Exec=firefox -ProfileManager TargetEnvironment=Unity [MakeTechEasier Shortcut Group] Name=Launch MakeTechEasier Exec=firefox "maketecheasier.com" TargetEnvironment=Unity
Save and close the file. Lastly, restart Unity
unity --replace
2. Add New Window and Incognito Mode to Google Chrome
This is assuming that you have installed Google Chrome in your Ubuntu.
Run the command:
sudo cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications gedit ~/.local/share/applications/google-chrome.desktop
Add the following code to the end of the file:
X-Ayatana-Desktop-Shortcuts=NewWindow;Incognito [NewWindow Shortcut Group] Name=Open New Window Exec=google-chrome TargetEnvironment=Unity [Incognito Shortcut Group] Name=Incognito Mode Exec=google-chrome --incognito TargetEnvironment=Unity
Save and close the file. Restart Unity
unity --replace
3. Add Favorite and Bookmarks to Home Folder
This will allow you to access the various folders directly from the launcher.
Run the command:
sudo cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications gedit ~/.local/share/applications/nautilus-home.desktop
Scroll down the file and replace the line:
OnlyShowIn=GNOME;
with
OnlyShowIn=GNOME;Unity;
Add the following code to the end of the file:
X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads;Dropbox [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=Unity [Dropbox Shortcut Group] Name=Dropbox Exec=nautilus Dropbox TargetEnvironment=Unity
Save and close the file. Restart Unity
unity --replace
4. Make the LibreOffice Start Center More Useful
Run the command:
sudo cp /usr/share/applications/libreoffice-startcenter.desktop ~/.local/share/applications gedit ~/.local/share/applications/libreoffice-startcenter.desktop
Add the following code to the end of the 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=Unity
Save and close the file. Restart Unity
unity --replace
5. Add Custom Commands to the Terminal
The terminal is not an application that you will use frequently, but if you do, there will always be a few commands that you use regularly. You can add these commands to the quicklist for quick access.
Run the command:
sudo cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applications gedit ~/.local/share/applications/gnome-terminal.desktop
Scroll down the file and replace the line:
OnlyShowIn=GNOME;
with
OnlyShowIn=GNOME;Unity;
Next, add the following code to the end of the file:
X-Ayatana-Desktop-Shortcuts=UpdateUpgrade;XamppStart;XamppStop; [UpdateUpgrade Shortcut Group] Name=Update and Upgrade System Exec=gnome-terminal --command "sudo apt-get update && sudo apt-get upgrade" TargetEnvironment=Unity [XamppStart Shortcut Group] Name=Xampp Start Exec=gnome-terminal --command "sudo /opt/lampp/lampp start" TargetEnvironment=Unity [XamppStop Shortcut Group] Name=Xampp Stop Exec=gnome-terminal --command "sudo /opt/lampp/lampp stop" TargetEnvironment=Unity
Save and close the file. Restart Unity
unity --replace
6. Create a Google Services Center
If you use Google services as much as I do, this is going to be very useful to you.
Open a text editor and copy/paste the following code:
[Desktop Entry] Version=1.0 Name=Google Services Exec=/opt/google/chrome/google-chrome Icon=/filepath/to/google-icon.png #change this filepath to the actual icon filepath Terminal=false Type=Application Categories=Network;WebBrowser; X-Ayatana-Desktop-Shortcuts=Gmail;Contacts;Calendar;Docs;Reader; [Gmail Shortcut Group] Name=Gmail Exec=xdg-open https://gmail.com TargetEnvironment=Unity [Contacts Shortcut Group] Name=Gmail Contacts Exec=xdg-open https://www.google.com/contacts TargetEnvironment=Unity [Calendar Shortcut Group] Name=Google Calendar Exec=xdg-open https://calendar.google.com TargetEnvironment=Unity [Docs Shortcut Group] Name=Google Docs Exec=xdg-open https://docs.google.com TargetEnvironment=Unity [Reader Shortcut Group] Name=Google Reader Exec=xdg-open https://google.com/reader TargetEnvironment=Unity
Remember to change the icon file path (You can download the Google icon that I used here.) The code above uses Google Chrome. You can change it to use Firefox or your favorite browser.
Save the file with the name “google-services.desktop” in the folder “/home/username/.local/share/applications folder”
Next, drag this file to the launcher.
7. Add Google Shortcut
Instead of accessing the Google services, if what you want is to have quick access to the various tasks in Google, like composing new email, adding a calendar, open a new doc etc, this is how you can do it.
Open a text editor and copy/paste the following code:
[Desktop Entry] Version=1.0 Name=Google Shortcuts Exec=/opt/google/chrome/google-chrome Icon=/filepath/to/google-icon.png #change this filepath to the actual icon filepath Terminal=false Type=Application Categories=Network;WebBrowser; X-Ayatana-Desktop-Shortcuts=Gmail;Calendar;Docs;Spreadsheet;Presentation; [Gmail Shortcut Group] Name=Compose New Mail Exec=xdg-open https://mail.google.com/mail/?shva=1#compose TargetEnvironment=Unity [Calendar Shortcut Group] Name=Create New Event Exec=xdg-open https://www.google.com/calendar/event?action=TEMPLATE TargetEnvironment=Unity [Docs Shortcut Group] Name=Create New Document Exec=xdg-open https://docs.google.com/document/create?hl=en TargetEnvironment=Unity [Spreadsheet Shortcut Group] Name=Create New Spreadsheet Exec=xdg-open https://spreadsheets.google.com/ccc?new&hl=en TargetEnvironment=Unity [Presentation Shortcut Group] Name=Create New Presentation Exec=xdg-open https://docs.google.com/present/create?hl=en TargetEnvironment=Unity
Remember to change the icon file path.
Save the file with the name “google-shortcuts.desktop” in the folder “/home/username/.local/share/applications folder”
Next, drag this file to the launcher.
8. Quick Add PPA in Ubuntu Software Center
Our usual method of adding PPA is via the terminal, but this could be a more efficient way.
Run the command:
sudo cp /usr/share/applications/ubuntu-software-center.desktop ~/.local/share/applications gedit ~/.local/share/applications/ubuntu-software-center.desktop
Add the following code to the end of the file.
X-Ayatana-Desktop-Shortcuts=SoftwareProperties;SoftwareSources; [SoftwareProperties Shortcut Group] Name=Update Manager Exec=update-manager -c %u TargetEnvironment=Unity [SoftwareSources Shortcut Group] Name=Add/Edit PPAs Exec=gksu software-properties-gtk TargetEnvironment=Unity
Save and close the file. Restart Unity
unity --replace
The above are only a small fraction of what you can do with the Unity quicklists. You can also checkout AskUbuntu for more quicklists.
Note: If after adding the quicklist code and it causes problems to your system, you can easily restore your system by deleting the respective .desktop file from /home/username/.local/share/applications folder and restart unity.
23 comments
Comments are closed.
THANK’S
How would one change the Google Shortcuts desktop file to use Chromium instead of Chrome?
Replace the line
Exec=xdg-open https://…
with
Exec=chromium-browser –apps=https://…
This will replace the default browser with chromium browser
It’s just opening a new tab page in a new window in Chromium…
Icon=/filepath/to/google-icon.png #change this filepath to the actual icon filepath
Does not really work for me. I have downloaded the Google icon and stored it.
~/Download/icons/google-icon.png
I replaced the path but it does not work… if I replace any path information by
Icon=evolution
The mail evolution symbol apears… some type of solution
It work for me. You have to use absolute path rather than relative path. Using a ‘~’ to represent home directory doesn’t work. I have to use filepath like “/home/damien/images/google.png” to get it working.
I replaced
Exec
=
/
opt
/
google
/
chrome
/
google-chrome with Exec xdg-open http://www.google.com/ig. That way it will just open in whatever your default browser is and you won’t have to change it manually. You can change the URL to whatever you’d like it to be. This line determines what happens when when you click the launcher.
Yes, this will work as well.
Brill thanks. No need to use sudo though!
DONT USE SUDO WITH GRAPHICAL APPLICATIONS!!
IT IS HARMUL
USE gksu WITH GRAPHICAL APPLCIATIONS UNLESS YOU WANT TO BORK YOUR SYSTEM.
also in this case sudo or gksu is not require since we copied the file to a the local sahre which is owned by the user.
When i use the “Update & Upgrade System” tweak, i get:
E: The update command takes no arguments
Anyone know a fix? I tried running terminal with gksu but didn’t work.
gnome-terminal -t ‘Update and Upgrade System’ -e ‘sudo apt-get update’ -e ‘sudo apt-get dist-upgrade’
Sorry- this doesn’t work. It only does the last command when you pass commands to gnome-terminal like that.
Here’s the real fix:
Exec=gnome-terminal -t ‘Updating & Upgrading System’ -x bash -c “sudo apt-get update ; sudo apt-get dist-upgrade”
hi, i have tried the thrid option of adding more options to the home folder in launcher.. when i did the unity –replace….i lost the launcher, the whiole UI got screwed up…however the UI got restored when i did a restart…
THANK YOU!!! THIS IS SO VERY USEFUL!
It’s great. Isn’t possible in Google Services and Shorcuts to add “default browser’ instead google chrome or something like that?
Yes, you can, just replace the line
Exec=/opt/google/chrome/google-chrome
with
Exec=x-www-browser
Thanks for that…really useful.
One problem I have, in the firefox launcher when I hit “open profile manager” it just opens a new version of the default profile instead of giving me the options of a,b or c.
How to exec .sh file? wht should i write in exec parameter?
to get this work for gnome3 should i just replace unity with gnome ?
—
thanks for the tutorial. there is a easier way to edit the quick-list now. With Ubuntu tweak there is a frond-end now to do this. The end result is the same.
One question, i want a quick-list inside the Thunderbird icon.
Mark all messages as read.
Do you know how to do that.