3

I want to be able to run (just) a program/few programs under a test user named "test" and at the same time benefit of the GUI of the program. I need this because I want to be able to save test settings without conflicting with my own settings. What I found so far is that I can either:

  • use su test to switch to the user, but then I can not run programs with GUI... they complain about not having a display:

    No protocol specified
    

    ** (gedit:17086): WARNING **: Could not open X display No protocol specified

    (gedit:17086): Gtk-WARNING **: cannot open display: :0

  • use the dm-tool switch-to-user test to actually switch over to that user

Any Idea how I can run programs as another user without having to change users and desktops each time?

  • 1
    Google and read about X authorization (xauth, .Xauthority). IIRC Gnome or rather gdm botched this at some stage by hardlinking the MIT "cookies", but I don't remember details. So you may have to look closely. – dirkt Nov 3 '16 at 16:43
  • Please write up your solution and answer your own question, so others with the same problem can profit from your work. – dirkt Nov 4 '16 at 11:46
1

I finally found a solution as provided in this answer

All I had to do was run the following command as root:

xhost si:localuser:test

Apparently this command allows the user to use the display server.

Please edit this answer if you know more about this issue.

| improve this answer | |
-1
xhost +localhost

then su test ..

| improve this answer | |
  • I tried it.. it does not work... I get the same error when running gedit – dasj19 Nov 3 '16 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.