When I use su rootand then use gnome-terminalI get warning ** (gnome-terminal:2677): WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supportedand new terminal window does not opens.But when I usesu -and then use gnome-terminalnew window opens without any warning . Why is it so ?
New Terminal not works when we use su root
linux mint;root;gnome terminal;su
The environment setup when providing - is much more complete. From the man page:The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly.In particular SESSION_MANAGER is missing if you do su root.You can output the environments by using env | sort > /var/tmp/XXX.env with XXX being different for the - and root invocation, and then compare the output using diff. In my setup (Ubuntu 12.04) this results in about twice as many lines in the su - case (53 vs. 27).