<span style='font-family:Verdana'><span style='font-size:12px'> <p style="margin:0px; padding:0px;" > </p><blockquote style="border-left: 1px solid #CCC; padding-left: 5px; margin-left: 5px; margin-bottom: 0px; margin-top: 0px; margin-right: 0px;" type="cite"><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">----- Original Message -----</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">From: John Hupp</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">Sent: 09/18/13 11:19 PM</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">To: Lubuntu Users</span></span></p><p style="margin:0px; padding:0px;" ><span style="font-family:Verdana"><span style="font-size:12px">Subject: Creating a desktop shortcut</span></span></p> <div><div><pre style="white-space: pre-wrap; word-wrap: break-word; font-size:11;pre">I want to create a desktop shortcut for a command that I ordinarily run in an lxterm window thus: 

sudo ltsp-update-image --cleanup / 

I tried a standard desktop shortcut with the relevant line: 

Exec=sudo ltsp-update-image --cleanup / 

but running the shortcut produces no results. 

I also tried modifying that to: 

Exec=gksudo ltsp-update-image --cleanup / 

But likewise running that produces no results. 

----------------------------------------------- 

I also tried creating a bash script with the contents: 

#!/bin/bash 
sudo ltsp-update-image --cleanup / 

And alternatively with line 2: 

gksudo ltsp-update-image --cleanup / 

and simply also with line 2: 

ltsp-update-image --cleanup / 

Trying to run any of those versions, it prompts to Execute or to Execute in Terminal, but none of those choices runs the update program or even prompts 
for a password. 

What am I doing wrong? 


</pre></div></div></blockquote><p style="margin:0px; padding:0px;" >Tell to the system that this is an application .desktop file. Take as an example the contents of one file inside /usr/share/applications/ . Also you have to invoke an lxterminal in order to execute the command</p><p style="margin:0px; padding:0px;" > </p><p style="margin:0px; padding:0px;" >Try this</p><p style="margin:0px; padding:0px;" > </p><p style="margin:0px; padding:0px;" >[Desktop Entry]<br />Version=1.0<br />Type=Application<br />Name=ltsp-update<br />Comment=update ltsp<br />Exec=lxterminal --command="sudo ltsp-update-image --cleanup /"</p><p style="margin:0px; padding:0px;" >Icon=<br /> </p>save above contents in a .desktop file, eg: update-ltsp.desktop<br /><br />You can either save the file inside /usr/share/applications/ (global = root privileges needed for saving) or .local/share/applications/ (only for you, no root privileges needed). If the .local/share/applications/ path does not exist, create it.<br /><br />For easy of use, you can add a path to the Icon= , of an icon either .jpeg or .png . (64x64)<br /><br /><span id="editor_signature"><span style="font-family:Verdana; font-size:12px">Regards <br />NikTh <br /><br />-- https://wiki.ubuntu.com/NikTh -- </span></span></span></span>