Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to 'enclose' more than one application in a single Unity icon/button? In order to keep under control the number of buttons on launcher, it will be very useful to me to store some applications of the same type (e.g. small accessory applications like take screenshot or web application etc. ) in a single button as that is possible with the xfce panel...

enter image description here

share|improve this question
1  
Can you confirm Ubuntu 11.10 and Unity (3D), vs. some other variant. –  david6 Nov 24 '11 at 20:30
    
yes Ubuntu Oneiric & Unity 3D –  Gingalone Nov 28 '11 at 13:52

7 Answers 7

Yes, you can use Launcher quicklists to add applications to the right click menu of a launcher icon. Look at this question:

Specifically the libreoffice example can be modified to just run whatever applications you want under the same icon.

share|improve this answer
    
Thanx Jorge, but in my Ubuntu Oneiric there is not any *.desktop file in /usr/share/applications/ moreover I can't follow the LibreOffice example because it has a starting centre while I'd like to create a new botton in launcher (with a chosen icon) which contains some useful 'small' applications (Screenshot, Dictionary, Calculator, Force quit ecc.)... Is that possible? –  Gingalone Nov 24 '11 at 15:52
    
If you're looking at that folder with Nautilus, the names displayed are different than the file names for .desktop files. On the CLI the ls command will show the real file names which you need to edit those files. –  fragos Nov 25 '11 at 3:02

For Ubuntu 11.10 (Oneiric) and Unity (3D)

Example: "Ubuntu Toolbox" multi-purpose icon

Description: A single 'toolbox' icon, replacing multiple Unity launcher icons, for: Systems Settings (default), Ubuntu Tweak, Ubuntu Software Center, and Software Updates.

enter image description here

Comments: I did make some compromises on icons (not custom), file naming, and the default item. Other alternatives might clash or could be confused with existing items. (be warned)

mkdir ~/.local/share/applications  (if required)

gedit ~/.local/share/applications/toolbox.desktop &

Note: The ampersand '&' releases the command line immediately.

My custom 'toolbox.desktop' file: (can be easily edited)

[Desktop Entry]
Name=Ubuntu Toolbox
Comment=System Settings
Exec=gnome-control-center --overview
Icon=redhat-tools
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=shell
X-GNOME-Bugzilla-Version=3.2.1
X-Ubuntu-Gettext-Domain=gnome-control-center-2.0

X-Ayatana-Desktop-Shortcuts=UbuntuTweak;SoftwareCenter;SoftwareUpdates;

[UbuntuTweak Shortcut Group]
Name=Ubuntu Tweak
Exec=ubuntu-tweak
TargetEnvironment=Unity

[SoftwareCenter Shortcut Group]
Name=Ubuntu Software Center
Exec=software-center
TargetEnvironment=Unity

[SoftwareUpdates Shortcut Group]  
Name=Update Manager  
Exec=update-manager -c  
TargetEnvironment=Unity
share|improve this answer

Overview

This answer gives two potential answers - Drawers and Quicklists

Drawers

Drawers is available via a PPA for 12.04:

enter image description here

sudo add-apt-repository ppa:ian-berke/ppa-drawers 
sudo apt-get update
sudo apt-get install drawers

Launch Drawers from Dash. For you drawer, drag and drop the created icon from ~/.local/share/applications.

Launch your drawer - then you can drag and drop your favourite applications from the Dash onto the drawer.

Graphical Quicklists

The default unity method to launch multiple options is through the use of quicklists - right-click a launcher icon to show a menu of options for that launcher icon.

enter image description here

The creation of quicklist using a graphical method for 12.04 is available using MyUnity

myunity Install myunity

enter image description here

This option allows you to create quicklists - quicklists are a submenu that are displayed when you right-click a launcher icon.

The creation of quicklist using a graphical method for 11.04 is work-in-progress - for example - the Unity Launcher Editor

enter image description here

This works in Natty (ubuntu 11.04) - but due to the python version change, does not work (as at the time of writing this) in oneiric (ubuntu 11.10)

to install

cd ~/Downloads
sudo apt-get install bzr
bzr branch lp:unity-launcher-editor

to run

cd ~/Downloads/unity-launcher-editor
./ule

Manual creation of quicklists

Fortunately, it is simple to create quicklists manually as well. A quicklist is a .desktop file containing at the minimum the following:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=adressbook
Name=Sample Menu
Exec=example_application1

X-Ayatana-Desktop-Shortcuts=example_app2;

[example_apps Shortcut Group]
Name=Name of Application 2
Exec=example_application2
TargetEnvironment=Unity

Let's break this down to the areas you should change (working from top to bottom of the example).

  • Icon=: this is the graphical picture file found in /usr/share/icons
  • Name=: this is the tooltip you see when you hover over the launcher icon
  • Exec=: this is the default executable run when you left click the launcher icon
  • X-Ayatana-Desktop-Shortcuts=: this is a semi-colon separated list of groups.

Each group is a quick-list menu option under the entry [group_name Shortcut Group]

  • example_apps this is the name of the group in the X-Ayatana-Desktop-Shortcuts field
  • Name=: this is the quicklist menu text
  • Exec=: this is the executable run when choosing the quicklist entry

.desktop files should exist in the local folder ~/.local/share/applications

If it doesn't already exist create this folder:

mkdir -p ~/.local/share/applications

Create a file in the folder - for example myquicklist.desktop and drag-and-drop this file from Nautilus into the Unity Launcher.

mimic XFCE launcher

The default XFCE action when clicking on the launcher button is to run an executable. For our launcher you could default to the calculator

Name=My Quicklist
Exec=gcalctool

The other action possible in the XFCE launcher is to just display the list of launcher items. Unfortunately in Unity you cannot do this - it must be a right-click.

The default Exec= must run something - for example you could use this to display a quick pop-up dialog reminding you to right click:

Name=My Quicklist
Exec=zenity --title="action" --info --text="Right-Click for quicklist" --height=50 --width=275 --timeout=2

Example

You gave the following examples that you wanted:

  • Screenshot: Exec=gnome-screenshot -i
  • Dictionary: Exec=xfce4-dict
  • Calculator: Exec=gcalctool

enter image description here

Thus your example .desktop file would look like:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=addressbook
Name=My Quicklist
Exec=zenity --title="action" --info --text="Right-Click for quicklist" --height=50 --width=275 --timeout=2

X-Ayatana-Desktop-Shortcuts=screenshot;dictionary;calculator

[screenshot Shortcut Group]
Name=Gnome Screenshot
Exec=gnome-screenshot -i
TargetEnvironment=Unity

[dictionary Shortcut Group]
Name=XFCE Dictionary
Exec=xfce4-dict
TargetEnvironment=Unity

[calculator Shortcut Group]
Name=Gnome Calculator
Exec=gcalctool
TargetEnvironment=Unity
share|improve this answer
    
Ubuntu 12.04 LTS - package drawers not found after adding given repository. This is $3 at Software Center. –  Esamo Feb 5 at 6:06

I think both david6 & fossfreedom's answers are quite good, this is just to show you a variation of the same.

In this case it's a 'Utility' icon I have for various actions, it uses standard app's, some shell scripts & commands. Because I use synaptic the most i've set the left click on the icon to run synaptic, everything else is off of the right click quicklists.

One additional point of interest - in custom .desktops with quicklists the 'X-Ayatana-Desktop-Shortcuts=' line determines what is shown in the quicklist & the order shown.

Ex. - You could have 10 [whatever Shortcut Group] entries but only show some of them by what's in the 'X-Ayatana-Desktop-Shortcuts=' line

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=synaptic-pkexec
Name=Utilities
Icon=/usr/share/icons/Humanity/categories/48/applications-other.svg
X-Ayatana-Desktop-Shortcuts=UpdateManager;CompizConfig;Htop;GetUpdates;NautilusActions;DconfEditor;GconfEditor;ForceQuit;ScreenShot;SeachFiles;Gksu;

[UpdateManager Shortcut Group]
Name=Update Manager
Exec=/usr/bin/update-manager
TargetEnvironment=Unity

[Htop Shortcut Group]
Name=Htop
Exec=htop1
TargetEnvironment=Unity

[GetUpdates Shortcut Group]
Name=Update Sources
Exec=update1
TargetEnvironment=Unity

[NautilusActions Shortcut Group]
Name=Nautilus Actions
Exec=nautilus-actions-config-tool
TargetEnvironment=Unity

[CompizConfig Shortcut Group]
Name=Compiz Settings
Exec=ccsm
TargetEnvironment=Unity

[GconfEditor Shortcut Group]
Name=Gconf Editor
Exec=gconf-editor
TargetEnvironment=Unity

[ForceQuit Shortcut Group]
Name=Force Quit
Exec=xkill
TargetEnvironment=Unity

[ScreenShot Shortcut Group]
Name=Screen Shots
Exec=gnome-screenshot --interactive
TargetEnvironment=Unity

[SeachFiles Shortcut Group]
Name=Search For Files
Exec=gnome-search-tool
TargetEnvironment=Unity

[DconfEditor Shortcut Group]
Name=Dconf Editor
Exec=dconf-editor
TargetEnvironment=Unity

[Gksu Shortcut Group]
Name=Root Nautilus
Exec=gksudo nautilus
TargetEnvironment=Unity

To give Ex. of small scripts, Exec=htop1 is just a file named htop1 in a bin in my $PATH (~/bin

#!/bin/bash
gnome-terminal --command  htop 

Exec=update1 is one named update1

#!/bin/bash
gnome-terminal --command "sudo apt-get update"

In a .desktop with extensive quicklists if one wanted to save space on the X-Ayatana-Desktop-Shortcuts= line you could name your shortcut groups in a simpler fashion, using something like Scg1;Scg2;Scg3; ect, so

X-Ayatana-Desktop-Shortcuts=Scg1;Scg2;Scg3; ect.

As an example taking my first entry

[Scg1 Shortcut Group]
Name=Update Manager
Exec=/usr/bin/update-manager
TargetEnvironment=Unity

Lots of things & variations of how you can do with your launcher icons, quicklists, ect.,

share|improve this answer

I know that this is not an answer to your question, but i think it is the same as launcher do(or simply alternatives).

1) try Gnome-Pie (an application launcher with some really cool effects) Gnome-Pie


2) Using docks, such as Glx-Dock/Cairo-Dock(such as dock in mac) and docky(they are in the software-center).

Cairo-Dock


3) Using shortcuts to open programs(write keyboard in the dash and open it >> go to shortcuts tap >> go to custom shortcuts >> press the + button >> write the program you want to open with the shortcut >> apply >> assign a shortcut to it)

shortcuts

share|improve this answer

Check out a new application: Drawers enter image description here http://www.iloveubuntu.net/how-easily-group-items-featuring-their-own-mini-dash-unity-launcher-drawers

http://www.iloveubuntu.net/create-bundles-files-and-folders-unity-launcher-fancy-drawers-ppa-available

you can add the ppa by doing

sudo add-apt-repository ppa:ian-berke/ppa sudo apt-get update && sudo apt-get install drawers

Just type Drawers into the Dash to get started. It'll create a drawer launcher in ~/.local/share/applications which you can place on the launcher/dock. Then drag and drop anything you want to it (documents, folders, applications, web-urls). Left-Clicking opens up a mini-dash with icons for each file, while right-clicking opens up a quicklist. Right clicking items in the open drawer allows you to edit their name or execution command. Left clicking launches them with their default application.

share|improve this answer

Drawers are a perfect way to group applications in the Unity Laucher.

As of now, it is not available in the repos but you can still install it from the ppa.

sudo add-apt-repository ppa:ian-berke/ppa-drawers
sudo apt-get update
sudo apt-get install drawers

Some screenshots to show the use of drawers

enter image description here

enter image description here

Once you create a new drawer, you can drag & drop applications from the Dash.

You can even store files and folders in your drawer, providing a way of quickly accesing commonly used files.

enter image description here

Sources:
http://maketecheasier.com/group-apps-together-in-unity-launcher/2012/08/10
http://www.iloveubuntu.net/how-easily-group-items-featuring-their-own-mini-dash-unity-launcher-drawers

share|improve this answer
1  
Just released a new version today (12/10/12) with new configuration options and bug fixes... Hope you like it! –  Ian B. Dec 10 '12 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.