4

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?

3 Answers 3

4

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.
3

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

1
  • 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. May 11, 2012 at 16:34
0

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"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .