Web lists-archives.com

Re: Emacs in GUI from two different users.

short answer is yes,you can have both emacs displayed in GUI

 i think the problem is when you switch to goo,the auth  to DISPLAY is lost

it depends much on how you switch to goo from foo 

i guess you login to foo with display-manager such as gdm or something alike,and switch to goo with su 

serveral ways
a little tricky but simple to work
1. switch to goo via ssh -X goo@localhost 
2. try to start emacs in this session

the 2nd one is to use xauth to deal with X permission

1. as foo 
echo $DISPLAY (typically you will get :0)
xauth list (remember the hexcode )let's say $hex
2. as goo
export DISPLAY=:0 (or what you actually get in 1)
xauth add :0 . $hex (easiest way is just do a copy-and-paste)
3. try to start emas in this session

you can also use “xauth merge” or “xhost”,but the principle is the same

On Fri, May 3, 2019 at 23:14 aprekates <aprekates@xxxxxxxxxx> wrote:
  hi. in debian 9 i start emacs as user foo from the terminal and the
gui start up. i start emacs from the terminal as another user goo and
the text version comes.

Can both users have their own gui emacs sessions ?


Liu An