Code:
[Desktop Entry]
Categories=Application;Multimedia;
Comment[en_CA]=Link to VLC
Comment=Link to VLC
Encoding=UTF-8
Exec=/usr/bin/vlc
Icon=
GenericName[en_CA]=Music player
GenericName=Music player
MimeType=
Name[en_CA]=Music player
Name=Music player
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
I've never tried this before, but when I dropped an mp3 on the .desktop above, VLC popped up and played it.
Maybe I'm off here, but the
slgsync -x part should be in the script the .desktop runs. The EXEC= should only point to the script, not pass arguments.
Also, users generally cannot run scrips with root commands on my Debian, I originally did like John and had the .desktop launch a script that would launch another script as sudo with both scripts added to /etc/sudoers file. But then I managed to get rid of one of the scripts by adding sudo to the EXEC= section of the .desktop file. Below are the examples:
Code:
[Desktop Entry]
Categories=Application;Network;
Comment[en_CA]=Connect to Internet
Comment=Connect to Internet
Encoding=UTF-8
Exec=sudo /home/jo/Desktop/net.sh
Icon=
GenericName[en_CA]=Wifi UP
GenericName=Wifi UP
MimeType=
Name[en_CA]=Wifi UP
Name=Wifi UP
Path=
StartupNotify=true
Terminal=true
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
/etc/sudoers entry:
Code:
# User privilege specification
root ALL=(ALL:ALL) ALL
jo ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
jo ALL=(ALL:ALL) NOPASSWD:/home/jo/Desktop/net.sh
I had the net.sh script that would bring up the wifi connection in my /home/jo/Desktop folder with the .desktop file.