Root Bash Scripting

How do i run bash script as root? Or login as root on the script using either sudo or su? Which is better/easier? I need to run the command avggui as root.

Thanks for any help

su would be better

Andy

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

su -
#enter password
/path/to/avggui

Good luck.

DrEaMeR23 wrote:
> How do i run bash script as root? Or login as root on the script using
> either sudo or su? Which is better/easier? I need to run the command
> avggui as root.
>
> Thanks for any help
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIvXQl3s42bA80+9kRAhLoAJ48S5I898krcQ9OkYV1AjWxD8T2HwCcCJiH
wv1roqwUOAlwf6fIaRqqADY=
=cXQo
-----END PGP SIGNATURE-----

right i have the script:

su
password
.//opt/grisoft/avggui/bin/avggui

is this right? because it doesnt run when i click the icon. or when i use the command ./AVG_Antivirus.sh(thats the filename) wherever the file is situated.
is there a way to run the commands as root without using a terminal? could i run the file as root?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alt+F2
gnomesu /path/to/the/file
or
kdesu /path/to/the/file

Good luck.

DrEaMeR23 wrote:
> right i have the script:
>> su
>> password
>> .//opt/grisoft/avggui/bin/avggui
> is this right? because it doesnt run when i click the icon. or when i
> use the command ./AVG_Antivirus.sh(thats the filename) wherever the file
> is situated.
> is there a way to run the commands as root without using a terminal?
> could i run the file as root?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIvrI23s42bA80+9kRAstaAJ9FK51tq0L1YQrwLdsOUN+wMWFbEwCghu2i
tN4RHxnDwUyEgvHcFRTMhKo=
=Dxvn
-----END PGP SIGNATURE-----

that worked. How do i put it into one file or whatever so i can just click an icon and it runs?

ah ok. ive done that. thanks. is there anyway to do that without having to input my root password?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

right-click on desktop, create launcher, put command in ‘Command’ field,
eat chocolate chip cookies and/or ice cream without caramel,
double-click on new icon, enter password, enjoy.

Good luck.

DrEaMeR23 wrote:
> that worked. How do i put it into one file or whatever so i can just
> click an icon and it runs?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIvsKS3s42bA80+9kRAjcuAJ986Y5WDfrWbJEYyW8olLjI/vvqEwCfRmhA
i0cTLWqC9lMp2OC9Z7INZdg=
=joLU
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

man audo
man sudoers

Good luck.

DrEaMeR23 wrote:
> ah ok. ive done that. thanks. is there anyway to do that without having
> to input my root password?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIvsVk3s42bA80+9kRAhSWAJ47R2pZs9jU4RuH3GMH+U2Ux7ZFBACfSX1A
bRRQa8686Xi9eL23xva7nG8=
=356V
-----END PGP SIGNATURE-----