2

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?

merlin2011
  • 599
  • 2
  • 6
  • 17

1 Answers1

2

Generally speaking you use gksu

gksu evince mypdf.pdf

See https://help.ubuntu.com/community/RootSudo#Graphical_sudo

Panther
  • 104,528