View Full Version : [ubuntu] Running Bash Perl scripts on desktop click

November 8th, 2010, 06:46 AM
I wanted to run bash and perl scripts which requires SU privileges by clicking on dektop
Terminal window opens and closes fast without knowing what happened.

scripts work on terminal window by telling
sudo perl file.pl
sudo bash file.sh

Perl has this header
#!/usr/bin/env perl
#!usr/bin/perl -w

Bash has header

How can I run them with desktop shortcuts with SU privilege
so, the terminal will not close after execution?

should not the scripts work without telling perl or bash,
since they have the header?

November 8th, 2010, 06:31 PM
Perhaps you can use gksudo, a graphical front end for sudo.