Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: .desktop files, Launchers, and Quicklists in 12.04

  1. #21
    Join Date
    Dec 2007
    Location
    Central CA
    Beans
    459
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: .desktop files, Launchers, and Quicklists in 12.04

    Okay, check this out:

    Here is a desktop file that provides a menu for selecting different Firefox programs via script:

    Code:
    [Desktop Entry]
    Version=1.0
    Name=Firefox Web Browser
    Comment=Browse the World Wide Web
    GenericName=Web Browser
    Exec=firefox -no-remote -P default
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=firefox
    Categories=GNOME;GTK;Network;WebBrowser;
    MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;
    StartupWMClass=Firefox
    StartupNotify=true
    X-Ayatana-Desktop-Shortcuts=Default;Daily;Dngrlog;Roaming
    
    Name[en_US]=FFmenu
    
    [Default Shortcut Group]
    Name=Default Browser
    Exec=/home/dngrsone/.local/share/applications/scripts/FFmenu default
    OnlyShowIn=Unity
    
    [Daily Shortcut Group]
    Name=Daily
    Exec=/home/dngrsone/.local/share/applications/scripts/FFmenu Daily
    OnlyShowIn=Unity
    
    [Dngrlog Shortcut Group]
    Name=Dngrlog
    Exec=/home/dngrsone/.local/share/applications/scripts/FFmenu Dngrlog
    OnlyShowIn=Unity
    
    [Roaming Shortcut Group]
    Name=Roaming
    Exec=/home/dngrsone/.local/share/applications/scripts/FFmenu Roaming
    OnlyShowIn=Unity
    Of course, one might need to change the user directory...

    Here is the accompnaying script:

    Code:
    #!/bin/bash
    
    case $1 in
    default)
    firefox -no-remote -P default
    ;;
    Daily)
    firefox -no-remote -P Daily
    ;;
    Dngrlog)
    firefox -no-remote -P Dngrlog
    ;;
    Roaming)
    firefox -no-remote -P Roaming
    ;;
    esac
    Both files have to be executable, of course. If you right-click on the icon, you have the choice of four profiles. Pick the profile and it will launch an instance of Firefox under that profile.

    There is a slight problem I haven't solved yet, though-- the new window does not have an icon on the launchbar.

  2. #22
    Join Date
    Dec 2007
    Location
    Central CA
    Beans
    459
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: .desktop files, Launchers, and Quicklists in 12.04

    OH! I think I have figured out part of my problem-- the property Name[en_US]= will set the visible name of the .desktop file when you make it executable.

    So that's why I was ending up with a bunch of .desktop files named Firefox!

  3. #23
    Join Date
    Dec 2007
    Location
    Central CA
    Beans
    459
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: .desktop files, Launchers, and Quicklists in 12.04

    I cannot use the script to call a .desktop file from the script.

    It looks like the instance window is captured by the regular Firefox icon; but only in the current desktop...

Page 3 of 3 FirstFirst 123

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
  •