Maui Forums
[Solved] - How to create a desktop shortcut or launcher for sudo bash scripts? - Printable Version

+- Maui Forums (https://forums.mauilinux.org)
+-- Forum: Maui Support (https://forums.mauilinux.org/forumdisplay.php?fid=74)
+--- Forum: Plasma Desktop (https://forums.mauilinux.org/forumdisplay.php?fid=84)
+--- Thread: [Solved] - How to create a desktop shortcut or launcher for sudo bash scripts? (/showthread.php?tid=24178)



[Solved] - How to create a desktop shortcut or launcher for sudo bash scripts? - kdemeoz - 19th December 2016

Hi. Is Plasma5 different for this? Nothing i tried worked, despite lots of [old, not Plasma5] supposed methods i followed. My bash scripts run just fine when i run them manually directly in Konsole, but the comparative elegance of simply double-clicking a desktop icon [which would launch Konsole itself, then run my script in it automagically, pausing only for me to input my password] appeals to me. Thanks.


RE: How to create a desktop shortcut or launcher for sudo bash scripts? - leszek - 19th December 2016

Right Click -> New -> Link to application. Fill in a name. On the third tab enter the url to the script and a name. Under advanced options tick the run in terminal. If you like to also keep terminal open after command run.
If your script now uses sudo it should work just fine open up the terminal and ask for your password.


RE: How to create a desktop shortcut or launcher for sudo bash scripts? - kdemeoz - 20th December 2016

Excellent, thank you! I had already tried to do this, but clearly i made some error earlier, as now it does work for me. Much appreciation.