Find the answer to your Linux question:
Results 1 to 5 of 5
NOTE : if you read the tutorial and are still experiencing difficulties and would like help, you are asked to start a new topic on the forums . Please do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2004
    Location
    Manchester, England
    Posts
    165

    Running X programs as root


    NOTE: if you read the tutorial and are still experiencing difficulties and would like help, you are asked to start a new topic on the forums.
    Please do NOT reply to this thread to ask a technical question. Replies to THIS thread should be corrections and enhancements on the tutorial/howto only.
    Thanks in advance for your co-operation.
    LinuxForums.org

    ------------------------------------------

    I am sure there are many who have this same problem. Not being able to run X programs as root because you don't have authority to use X server.
    There are always many suggestions regarding the xhost + commands but there is an easier way to get around this (works every time for me)
    Run the program as your normal user like so
    Code:
    su "-c <program>"
    You then give root password and away you go

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    or for all you kde users out there:
    Code:
    kdesu <program>
    -lakerdonald

  3. #3
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,630
    Or for all you SuSE users out there...

    Code:
     sux -l root


    Linux Mint + IceWM Registered: #371367 New Members: click here

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    If you have the GNU Network Object Model Environment installed, use:
    Code:
    gnomesu <command>

  6. #5
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    If you are in a root shell already and the X credentials weren't transferred over, then you can use the $DISPLAY variable to tell it where your X server is running:

    DISPLAY=unix:0.0
    or
    DISPLAY=127.0.0.1:0.0

    The unix one may be a little faster if your kernel supports it.

Posting Permissions

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