Results 1 to 10 of 10

Thread: How to open GUI app. as root?

  1. #1
    Associate
    Join Date
    Apr 2002
    Posts
    39

    How to open GUI app. as root?

    This 'ere newbie is having trouble trying to extract a file. From a command line, I was able to 'su' and create the /usr/lib/win32 directory in which I am supposed to place some win32 codecs for compiling into the mplayer application. I also was able to place the w32codec-0.60.tar.bz2 file (as read only) in this new directory. Yea!

    My problem is, after reading the 'tar --help' text, I can't seem to figure out the syntax to extract the .bz2 file (I'm sure a more lengthy Google search will provide me THIS answer). So, while I'm logged in as a standard user, I thought there might be a way to open an application like 'Ark' (a GUI archive extracter/compressor) as the root user!?

    Is there a common way to be logged in as a typical 'restricted rights' user, but open another program as root (after providing the password, of course), similar to the 'Run as..' function in Windows NT OS??

    I'm a Windows to Linux conversion in progress, in case you haven't noticed ... :-\

  2. #2
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:How to open GUI app. as root?

    yeah you want to use sudo. sudo is like a one time su. for example if you want to do an ifdown and an ifup of eth1, you can go like this:

    sudo ifdown eth1
    {enter YOUR password}
    {it does that command as root or whoever you are allowed to sudo as}

    sudo ifup eth1
    {it remembers you from before and continues}


    as root, run

    visudo /etc/sudoers

    and look at whats in there. That is sudo's configuration file. Its pretty self explanatory. I dont even use su andymore on any of my boxes, since sudo is SOOO much safer (never need to back out of a sudo, where an accidental command in su, can make life hell if you think you are joe, but are really joe su'ed in as root).

    sudo is the UNIX's anwer to "run as". You can set it up to do pretty much whatever. Plus if you are running a production server, it logs all of this. Never need to worry who really did what -- the logs say

  3. #3
    Associate
    Join Date
    Apr 2002
    Posts
    39

    Schotty! Re:How to open GUI app. as root?

    Thanks a ton! I'll have to try it ... unfortunately, I wasn't sure how to call the 'Ark' program from the command line using 'sudo' or otherwise (not sure where the 'Ark' files are located), but I discovered both the -j option of the 'tar' command for working with bzip2 files and found/learned the bunzip2 syntax (b4 dicovering the 'j option), so I was able to bunzip2, then tar -xf the .tar.bz2 file.

    I have to learn this Linux 'patience' thing ...

    PS - I like the God/beer sig ... I fancy the NewCastle Brown Ale and Kronenburg when I can find it (Royal Oak is very nice Euro strong-pop, too!)

    ~ Cheers!

  4. #4

    Re:How to open GUI app. as root?

    Some distros restrict (for good reason) other users, including root, from accessing your XFree86 servers. From the command line you can use the following command to allow localhost connections.....

    Code:
    [user@localhost]$ xhost +localhost
    localhost being added to access control list
    [user@localhost]$

  5. #5
    Associate
    Join Date
    Apr 2002
    Posts
    39

    Still wondering: How to open GUI app. as root?

    OK - tried understanding Schotty's directions regarding 'sudo' and running the 'visudo' command (see below). I read the man page on visudo and also tried 'visudo -c /etc/sudoers'. I don't recognize the command return as sudo's config file ... is it?

    24-216-5-161:/etc # ls -all sudoers
    -rw-r----- 1 root root 580 Mar 23 13:15 sudoers
    24-216-5-161:/etc # visudo /etc/sudoers
    usage: visudo [-c] [-f sudoers] [-q] [-s] [-V]
    24-216-5-161:/etc #

    And, is Ashcrow's response somehow related to my original question? If so, I'm really confused.

    I guess I could still use some enlightening ...

  6. #6

    Re:How to open GUI app. as root?

    I think you are after a simpler answer than those already given.

    All you need to do is su to root, enter the root password and type the command to lauch the app.

    'gedit' for Gedit etc.

    The only difficult part is finding out what the command is as it is not always as simple as that. I think it is 'ark' for Ark. If that fails try

    ar[tab][tab]

    that'll bring up a list of all commands begining with ar skim down it and see if anything looks right.

    Be careful though and do look at the man page before running a command you don't know because you are logged in as root.

    If all esle fails you may learn some new commands! ;D

    Dizzy

  7. #7
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Still wondering: How to open GUI app. as root?

    [quote author=Phaete link=board=2;threadid=4189;start=0#41678 date=1026877531]
    OK - tried understanding Schotty's directions regarding 'sudo' and running the 'visudo' command (see below). I read the man page on visudo and also tried 'visudo -c /etc/sudoers'. I don't recognize the command return as sudo's config file ... is it?

    24-216-5-161:/etc # ls -all sudoers
    -rw-r----- 1 root root 580 Mar 23 13:15 sudoers
    24-216-5-161:/etc # visudo /etc/sudoers
    usage: visudo [-c] [-f sudoers] [-q] [-s] [-V]
    24-216-5-161:/etc #

    And, is Ashcrow's response somehow related to my original question? If so, I'm really confused.

    I guess I could still use some enlightening ...
    [/quote]

    Actually I owe you a beer for fucking up :-[

    I think I missed the -f option :

    visudo -f /etc/sudoers

    on my BSD box, all I gotta do is run visudo as root and it will edit the config. Linux may need the -f option, but the most current man page doesnt specify the need to do more than (as root of course)

    visudo


    Sorry ;D

    And thanks for the compliment. I was drunk and god spoke directly to me. He wanted me to share that quoute.... and my body with all large breasted babes for sexual encounters. But thats beside the point.... beer is sacred and holy.

  8. #8
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:How to open GUI app. as root?

    ARK is the KDE Archive Handling Tool and it can be called as just "ark" in the terminal as normal user or root. The complete path to the program is /usr/bin/ark . If you are in GUI desktop and type in " ark & " in your terminal, the GUI program should pop up.

    HTH ....

  9. #9
    Associate
    Join Date
    Apr 2002
    Posts
    39

    Re:How to open GUI app. as root?

    Very helpful posts! I have learned much, in both my errant AND purposeful exploits. I appreciate the help ... and have found that heeding Schotty's God-given beer advice, the 'patience with Linux' endeavor is much less frustrating ;D

  10. #10
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:How to open GUI app. as root?

    I just spoke to the girl from St. Pauli, and she said that it was your destiny to use linux. ;D

Similar Threads

  1. Replies: 4
    Last Post: 07-08-2007, 07:15 AM
  2. VFS: Cannot open root device
    By c4rdinal in forum Redhat / Fedora
    Replies: 1
    Last Post: 08-18-2006, 12:02 PM
  3. Possible root kit
    By trommaster in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 11-08-2002, 09:22 PM
  4. How do I log in as root?
    By dragon5 in forum Suse
    Replies: 7
    Last Post: 09-02-2002, 07:49 AM
  5. Root vs su?
    By LearninLinux in forum Linux - General Topics
    Replies: 6
    Last Post: 05-03-2002, 11:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •