[Xquartz-dev] getlogin() returns wrong user

Richard Tobin richard at inf.ed.ac.uk
Thu Jun 1 05:01:46 PDT 2017


On several occasions - but this is the first when I've had time to
look into it - the first few xterms opened in a new session
have been returning the wrong username from getlogin():

getuid() -> 26013 (correct)
getpwuid(getuid()) -> richard (correct)
getlogin() -> _spotlight (wrong)

The terminal ownership is right:

macaroni$ tty
/dev/ttys001

macaroni$ ls -l /dev/ttys001
crw--w----  1 richard  tty   16,   1 Jun  1 12:58 /dev/ttys001

The xterms are run with "xterm -ls".

Any suggestions as to what to look for?

-- Richard

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the Xquartz-dev mailing list