Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: homemade launcher in lxpanel

  1. #1
    Join Date
    Apr 2009
    Location
    california
    Beans
    38
    Distro
    Ubuntu 11.04 Natty Narwhal

    homemade launcher in lxpanel

    I've managed to make a launcher in /usr/share/applications. (lubuntu 11.4) to open/close optical drive. But it will only work if you open "/usr/share/applications" and click on it. It does not show up in menu and of course I can't choose it in lxpanel. Any help would be great

    this is my launcher
    [Desktop Entry]
    Name=eject
    Type=Application
    Comment=eject close
    Icon=/home/dove/icons/eject.png
    Exec=eject
    Exec=eject -T
    Categories=Utility;
    #NoDisplay=true

  2. #2
    Join Date
    Jun 2011
    Location
    United Kingdom
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: homemade launcher in lxpanel

    http://standards.freedesktop.org/men...egory-registry

    "Utilities" should be "Utility"-should now show up in 'Accessories'.

  3. #3
    Join Date
    Apr 2009
    Location
    california
    Beans
    38
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: homemade launcher in lxpanel

    Quote Originally Posted by MG&TL View Post
    http://standards.freedesktop.org/men...egory-registry

    "Utilities" should be "Utility"-should now show up in 'Accessories'.
    I believe I had that right and it didn't show up in 'Accessories"

  4. #4
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: homemade launcher in lxpanel

    Suggestions:

    Use full path to the executable after "Exec="
    Have only one "Exec=" line.

  5. #5
    Join Date
    Apr 2009
    Location
    california
    Beans
    38
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: homemade launcher in lxpanel

    Quote Originally Posted by Dennis N View Post
    Suggestions:

    Use full path to the executable after "Exec="
    Have only one "Exec=" line.
    would that look like?
    "Exec=eject && eject -T"?

    the launcher works great from "/usr/share/applications" with two "Ejects" it just won't show up in menu

  6. #6
    Join Date
    Apr 2009
    Location
    california
    Beans
    38
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: homemade launcher in lxpanel

    Quote Originally Posted by dawnlove View Post
    would that look like?
    "Exec=eject && eject -T"?

    the launcher works great from "/usr/share/applications" with two "Exec=" it just won't show up in menu
    to get launcher to both open and close I need two Exec='s

  7. #7
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: homemade launcher in lxpanel

    I'm thinking Two Exec lines may not conform to the .desktop file specification, and that possibly is why it's not showing up in the main menu.

    From the specification:

    The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments
    Exec=<path to executable>Name <optional arguments>

  8. #8
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: homemade launcher in lxpanel

    Quote Originally Posted by dawnlove View Post
    to get launcher to both open and close I need two Exec='s
    You did make a shell script, right?

    Exec= should be followed by the path to and name of the shell script.

    The script itself would contain your eject and eject -T commands.

  9. #9
    Join Date
    Apr 2009
    Location
    california
    Beans
    38
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: homemade launcher in lxpanel

    Quote Originally Posted by Dennis N View Post
    You did make a shell script, right?

    Exec= should be followed by the path to and name of the shell script.

    The script itself would contain your eject and eject -T commands.
    a little over my head (shell script) although http://www.freeos.com/guides/lsst/ch02sec01.html
    makes it seem like I could. the problem with this when I make my launcher with only one "Exec=" it still doesn't show in menu ether and my (two Exec)launcher will work from "/usr/share/applications"

  10. #10
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    5,739

    Re: homemade launcher in lxpanel

    Tested this and it shows up in the menu (accessories):

    Code:
    [Desktop Entry]
    Type=Application
    Icon=shellscript
    Name=Ejector
    Comment=Eject a CD	
    Categories=Utility;
    Exec=eject
    StartupNotify=true
    Terminal=false
    and works to open the tray. Adding the second "Exec=" did nothing - it was ignored.

    I saved it as ejector.desktop in ~/.local/share/applications/

    If it was more complex, a shell-script would be in order, but eject is a built in command so it works anyway.

    Good Luck.
    Last edited by Dennis N; April 28th, 2012 at 11:24 PM.

Page 1 of 2 12 LastLast

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
  •