[Novalug] launch perl script from ubuntu desktop
donjr
djr1952 at hotpop.com
Tue Jun 26 12:02:32 EDT 2007
On Tue, 2007-06-26 at 09:50 -0400, Bonnie Dalzell wrote:
> On Tue, 26 Jun 2007, Ed James wrote:
>
> EJ >Silly question, but have you tried it as root?
> EJ >
>
> Ubuntu does not do root as in there being a root user. When you need to do
> something as root you enter sudo and then the command and then the OS asks
> you for your passowrd and then after you give the password you get to
> execute the thing as root.
There is a ROOT(0) user. Logins are just DISABLED by default.
If you wish to log in as root {HIGHLY NOT recommended} but howto is:
$ sudo -i {opens an interactive root shell see 'man sudo'}
Now at the 'root' prompt run the command:
# passwrd
and follow the prompts to set the 'root' user password.
Now it's possible to "log in a user root"
The next set is to adjust 'gdm' to allow user 'root' to log in from the
Graphic user login screen.
See both 'man gdm' and the files in /usr/share/doc/gdm for how.
IOW
Ubuntu has a 'root' account it is just that logins are DISABLED by
default for some very good reasons.
>
> So I can launch an editor to edit things that root needs to edit by
> typing sudo gedit or sudo pico for example.
>
> My perl scripts launch just fine from the command line with the command:
>
> perl myprogram.pl
>
> It is trying to make a launcher on the desktop that is frustrating me.
In the "launcher's" command line entry place the following:
perl /full/path/to/myprogram.pl
Now do you want to make it simpler to run, both from the command-line
and it's entry in the "launcher"?
{and even make it possible to 'double click' on the file and have it
run from the browser.}
To the top of the file 'myprogram.pl' add the following line:
#!/usr/bin/perl
/\ Note the '#' character must be the very first character of the file.
And then set the file permissions to these:
# chmod =rwxrxrx myprogram.pl
{note you can adjust the permissions somewhat and my want to adjust the
user and group.}
--
--
Don E. Groves, Jr.
$ /usr/games/fortune :
In the first place, God made idiots; this was for practice; then he made
school boards. -- Mark Twain
More information about the Novalug
mailing list