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.

I'm a heavy user of firefox profiles - a general one, work and one just for facebook so facebook doesn't know where I'm browsing. I have customised my firefox launcher icon to give me access to profiles by right click.

However what I really want is to hit a key and type "face", hit enter and have the Facebook profile launched. Before Unity I had this by having multiple application launchers and then using gnome do to access them.

So how can I set up the same workflow with Unity? Is there a keyboard centric way to access the right click menu of launcher icons? Do I have to set up multiple launcher icons?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

I eventually worked out a way to get what I want using .desktop files in ~/.local/share/applications that allows me to launch specific profiles from the dash.

The process for the facebook launcher is to copy the original firefox launcher into the above directory. Then edit two lines to give it a friendly name that the dash will match against, and a command that will launch firefox with the profile I want.

To copy the file:

mkdir -p ~/.local/share/applications/
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/facefox.desktop

Then you need to edit two lines of the new file - Name= and Exec=. The Name line is near the top, and the Exec line is after lots of translations. Note that there is more than one Exec= line in the file, you want to edit the first one you find.

I edited them to be:

...
Name=Facebook Firefox Web Browser
...
Exec=firefox -P facebook -no-remote %u
...

Just to explain the Exec line, this is what you can type at a terminal to launch firefox, with:

  • %u being arguments that might be added by the desktop environment,
  • the -no-remote flag being required to allow more than one instance of firefox to run, and
  • -P facebook selects the profile to use.
share|improve this answer
add comment

Installing the "Profile Switcher" addon on firefox will do what you want. It more easier than the command line approach.

https://addons.mozilla.org/en-US/firefox/addon/profileswitcher/?src=search

share|improve this answer
    
I like this because the addon adds menu items that can be accessed via the HUD, leading to being able to use the keyboard again. It does mean I need to install it in every firefox profile though, or at least in a firefox profile I'm always going to have open. And I need to focus firefox before using the keyboard. And launch firefox, with whatever profile was last closed, before being able to use the keyboard to select profiles. So it works fairly well, but isn't quite ideal for me. Thanks anyway. –  Hamish Downer May 11 '12 at 16:34
add comment

However what I really want is to hit a key and type "face", hit enter and have the Facebook profile launched

Create file ~/bin/face with

#!/bin/bash

firefox -P <profile_name> -no-remote &

exit 0

Give it "Execute" permission

chmod +x ~/bin/face

Then launch it with "alt+F2" by typing "face"

share|improve this answer
add comment

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.