14 Temmuz 2017 Cuma

How to execute sh script from a desktop shortcut?


  1. /usr/share/applications/ depending upon your system) if you want the launcher shortcut to be available to all users.
    sudo -i gedit /usr/share/applications/name.desktop


  2. Paste below text
    [Desktop Entry]
    Type=Application
    Terminal=true
    Name=unmount-mount
    Icon=/path/to/icon/icon.svg
    Exec=/path/to/file/mount-unmount.sh

    edit Icon= and Exec= and Name=

    Also Terminal=True/false determines whether the terminal opens a window and displays output or runs in the background

  3. put this in unity panel by dragging it from files manager


logic is very simple that unity panel allows *.desktop files as launcher though I haven't tried it because I use Natty.

Hiç yorum yok:

JavaScript

JavaScript Nedir?    JavaScript web tabanlı bir programlama dilidir. Mayıs 1995 yılında Brendan Eich tarafından tasarlanmıştır. Kullanıcı et...