Search the web with Google

Android install

Android installation weblog


Enter your email address:


Jeroen´s weblog

Ubuntu install

Ubuntu installation weblog


Monday, May 9, 2011

8 Really Useful Ubuntu Unity Quicklists

I read an interesting article on maketecheasier. Its posted here for your convenience.

unity-google-chromeOne 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.

unity-firefox
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.
sudo 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.
unity-google-chrome
Run the command:

sudo cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications sudo 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.
unity-nautilus
Run the command:

sudo cp /usr/share/applications/nautilus-home.desktop ~/.local/share/applications sudo 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

unity-libreoffice
Run the command:

sudo cp /usr/share/applications/libreoffice-startcenter.desktop ~/.local/share/applications sudo 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.
unity-terminal
Run the command:

sudo cp /usr/share/applications/gnome-terminal.desktop ~/.local/share/applications sudo 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.
unity-google-services
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.
unity-google-shortcuts
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.
unity-usc
Run the command:

sudo cp /usr/share/applications/ubuntu-software-center.desktop ~/.local/share/applications sudo 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.

No comments:

Post a Comment