I am using multiple workspaces. Whenever I click the Firefox icon in the Unity toolbar it takes me to the workspace with Firefox currently open which is a useful feature. However, every time I click the Firefox icon I'd like a new window in Firefox to open. I know it's possible to right click the icon and click "Open a New Window" but I'd like "Open a New Window" to be the default.
Here is a terrible hack that I implemented this morning but I'd like to learn a more elegant solution.
First I created a script called openfirefox and placed it in my home directory /home/user
#!/bin/bash
firefox &
I made the file executable and then used the gnome-desktop-item-edit command to create a .desktop file and placed it on the desktop
$ sudo gnome-desktop-item-edit /home/user/Desktop --create-new
I entered the fields as follows
Name: MyFox
Command: /home/user/openfirefox
This created a .desktop file on my desktop. Now whenever I double click the MyFox.desktop file, a new Firefox window opens everytime.
So, is there a more elegant way to do what I want? Perhaps if I edit /usr/share/applications/firefox.desktop I can change the defaults? Maybe there is a Unity setting I can change?
Note: I am also aware you can simply press the shift key to open a new window but I'm just wondering if there is a way to make it a default. If this is an unrealistic request I'll just make do with shift and MyFox.desktop