Results 1 to 5 of 5

Thread: control the number instances of a program in Unity

  1. #1
    Join Date
    Nov 2006
    Location
    San Francisco
    Beans
    148
    Distro
    Ubuntu 12.04 Precise Pangolin

    control the number instances of a program in Unity

    I can open multiple instances of some programs, but not of others. I use the little Stopwatch program, and in Gnome I could open as many stopwatches as I wanted. But Unity only allows me to have one of them open at a time.

    For a year or so I've gotten around this by installing another timer called Zeegaree Lite, so then I can have two different timers open at once. But Zeegaree has become unreliable lately (it often stops itself before reaching zero), so I want to start having more than one Stopwatch again.

    How do I change this setting?
    - Pangolin 12.04 on 2012 ZaReason, 460GB HD, 4 GB RAM, 3 GHz dual processor -
    - Maverick Meerkat & Windows XP on 2006 Gateway, 186GB HD, 1GB RAM, 2.1GHz processor -
    - Lucid Lynx on 2003 Sony Vaio laptop, 30GB HD, 1GB RAM, 1.8GHz processor -

  2. #2
    Join Date
    Apr 2005
    Location
    EU - UK
    Beans
    3,323
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: control the number instances of a program in Unity

    Have you already tried middle-clicking on its icon in the launcher? That is the way you typically start new instances/windows in unity, especially for those apps that don't provide such an option in their launcher menu (that appears when you right-click on their icon in the launcher.)

  3. #3
    Join Date
    Nov 2006
    Location
    San Francisco
    Beans
    148
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: control the number instances of a program in Unity

    Okay, just now tried middle-clicking on the icon in the launcher. And then tried it for other program icons. Nothing happened -- it seems the middle-click just gets ignored. I see that Chromium does offer the option of opening another window when I right-click it.

    I've also tried pressing CTRL-N when the Stopwatch window is selected, and nothing happens.
    - Pangolin 12.04 on 2012 ZaReason, 460GB HD, 4 GB RAM, 3 GHz dual processor -
    - Maverick Meerkat & Windows XP on 2006 Gateway, 186GB HD, 1GB RAM, 2.1GHz processor -
    - Lucid Lynx on 2003 Sony Vaio laptop, 30GB HD, 1GB RAM, 1.8GHz processor -

  4. #4
    Join Date
    Jun 2007
    Beans
    13,101

    Re: control the number instances of a program in Unity

    There is a bit of a limitation here as far as opening multiple instances from the unity launcher as it doesn't appear stopwatch has a separate command to open a new instance. (if it did then no problem at all.

    So you could add a desktop action to stopwatch.desktop to open new instances from a right click on the launcher & it would work fine however you'll get cursor spin for about 10 sec's or so (harmless but annoying

    Another option would be to just go alt+F2 > stopwatch
    after doing the above the command once it will be in alt+F2's history so you'll just need to alt+F2 & click on

    A 3rd option would be to browse to /usr/share/applications, find Stopwatch, right click > copy, then back on your Desktop right click > paste

    The last 2 ways will not produce cursor spin

    If the cursor spin isn't an issue, to add an action add the blue to stopwatch.desktop -

    Code:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Encoding=UTF-8
    Name=Stopwatch
    Comment=A virtual stopwatch
    TryExec=/usr/bin/stopwatch
    Exec=/usr/bin/stopwatch
    Categories=Application;Utility
    Icon=/usr/share/pixmaps/stopwatch.xpm
    Actions=Addwatch
    
    [Desktop Action Addwatch]
    Name=Open new
    Exec=/usr/bin/stopwatch
    TargetEnvironment=Unity
    If I find a way around cursor spin in the Desktop action will let you know
    You can either edit stopwatch.desktop in /usr/share/applications with a root text editor (gksudo gedit or sudo nano) or copy to ~/.local/share/applications & edit as user (gedit

  5. #5
    Join Date
    Nov 2006
    Location
    San Francisco
    Beans
    148
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: control the number instances of a program in Unity

    Quote Originally Posted by mc4man View Post
    Another option would be to just go alt+F2 > stopwatch
    after doing the above the command once it will be in alt+F2's history so you'll just need to alt+F2 & click on
    ...
    You can either edit stopwatch.desktop in /usr/share/applications with a root text editor (gksudo gedit or sudo nano) or copy to ~/.local/share/applications & edit as user (gedit
    Thank you, mc4man! The Alt-F2 option works great!

    And thanks also for telling me where those desktop files are located -- that fact will be very useful to me in the future.
    - Pangolin 12.04 on 2012 ZaReason, 460GB HD, 4 GB RAM, 3 GHz dual processor -
    - Maverick Meerkat & Windows XP on 2006 Gateway, 186GB HD, 1GB RAM, 2.1GHz processor -
    - Lucid Lynx on 2003 Sony Vaio laptop, 30GB HD, 1GB RAM, 1.8GHz processor -

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •