When I log into gnome in Ubuntu 12.04, I can type the following on the command line to open a pdf:
evince mypdf.pdf
However, the following does not work.
su
evince mypdf.pdf
That gives the following error:
(evince:1368): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported
** (evince:1368): WARNING **: The connection is closed
No protocol specified
No protocol specified
Cannot parse arguments: Cannot open display:
How can I fix it so that changing users on the command line does not break GUI applications?