Find the answer to your Linux question:
Results 1 to 5 of 5
I'd like to run an X application, such as Firefox, as another user, for testing purposes. I've tried a couple things. I got a terminal, and tried: Code: su - ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97

    Run X application as another user


    I'd like to run an X application, such as Firefox, as another user, for testing purposes. I've tried a couple things. I got a terminal, and tried:
    Code:
    su - otheruser
    firefox
    But firefox said "Cannot open display". So I tried:
    Code:
    su otheruser
    firefox
    Firefox started up, but it looked like it was being run as the original user. All of the original user's bookmarks were there, and were writable by Firefox.

    How can I do this? I want Firefox to really think it is running as "otheruser".

  2. #2
    Just Joined!
    Join Date
    Jun 2006
    Posts
    12

    try this

    #Open the Run command.
    #Type firefox and Run it as the root And root Password in the options.

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    12

    try this

    #Open the Run command.
    #Type firefox and Run it as the root And root Password in the options.

    Read more : http://www.flynix.profusehost.net/viewtopic.php?t=37

  4. #4
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    That doesn't work for me. Firefox is still running as the original user. I figured out how to do it though:
    Code:
    echo $DISPLAY
    xauth list "$DISPLAY"
    su - otheruser
    xauth add <output from xauth above>
    export DISPLAY="<output from echo $DISPLAY>"
    Bada bing bada boom.
    Here's where I found that method:
    http://www.linux.com/howtos/Remote-X-Apps-7.shtml

  5. #5
    Just Joined!
    Join Date
    Feb 2009
    Location
    Colombia
    Posts
    2

    Smile

    An easier way to do this is, , specially in this case that we're on the same machine is to use the xhost authentication method:
    Code:
    xhost +   (allow everyone to connect to X server, you could use also xhost +otheruser)
    
    su otheruser
    
    firefox

Posting Permissions

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