LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Run a visual application as super user (https://www.linuxquestions.org/questions/linux-newbie-8/run-a-visual-application-as-super-user-598105/)

nightrider 11-08-2007 12:51 PM

Run a visual application as super user
 
I developed a visual front end (using GTK I think, although I have no idea what is the meaning of GTK) for collect data(like list of files to compress and the name of the compressed file) and run TarBall in batch doing a call to bash. I used a Lazarus ( www.lazarus.freepascal.org ) a visual language that runs under linux, Mac OS and windows.

My doubt is: Since I call my application from an icon in the desktop logged in with my own user, how can I run my application as super user without log in as root? Similar to hit the SU command in a console window and run TarBall as root.

If I need to unpack a tar, tar.gz or tar.bz2 in a directory like /usr/lib I need to do it as super user(normally root).

I hope I explained my trouble in a right way since my english is weak. Please, if you have doubts ask me.

Greetings from Sao Paulo - Brazil

Ricardo

AceofSpades19 11-08-2007 01:01 PM

If you unpack a tarball in anywhere outside your $HOME directory, you will need to be root

nightrider 11-08-2007 01:30 PM

Thank you for the information, but please can you, additionally answer my question?

AceofSpades19 11-08-2007 03:51 PM

woops, I thought you said do you need to be root to unpack tarballs in /usr/lib

bryantrv 11-08-2007 05:32 PM

Either running it with the argument "gksu" or "kdesu" should work- it will ask for the root password, but then it will be able to access the user desktop/display.

So- change the command of the application to gksu command or kdesu command.

nightrider 11-09-2007 05:35 AM

I'm running an appliance of Fedora Core 5 under a VMWare player. Fedora is using gnome. And I can't find any gks*.*. I do:

$ su
$ updatedb
$ locate gks*.*

And "locate" shows nothing...

Should Fedora Core 5 a version of linux that doesn't have gksu available?

Should someone show an example of the a real use of gksu, please?

bryantrv 11-09-2007 06:22 AM

Try installing gksu- I see Fedora stopped installing it by default, but depending on the repositories you are using it should be available.
http://www.nongnu.org/gksu/
http://rpm.pbone.net/index.php3?stat...gksu&srodzaj=3

nightrider 11-09-2007 10:27 AM

I downloaded the gksu-1.3.4-1.2.fc5.rf.i386.rpm, libgksu1.2.so.0 and libgksuui1.0.so.1

But when I type gksu in the console command it seems that gksu remains waitng commands... The only way to exit is typing ^Z...

Should someone give me more details/help?

Cheers

bryantrv 11-09-2007 11:01 AM

You should type gksu command- IOW, if I need to run Firefox as root to update itself, I type gksu firefox .
So- whatever command you are wanting to run as root is what you need to type after gksu.


All times are GMT -5. The time now is 07:58 AM.