Can't a command like "sudo gedit" cause issues with the permissions on e.g. .ICEauthority changing? Or is this not a problem anymore?
oh. I see. Thinks a lot.
]]>When I start a terminal, I enter "su -"
When I try to open any file, or simply enter gedit, I get:
========================================
** (gedit:1216): WARNING **: Could not open X display
Cannot open display:
========================================
Can someone please help?Thank you.
sudo gedit
]]>for god's sake, try gksu...
LOL....
]]>The DISPLAY=:0.0 didn't help.
Thanks in advance.
It should be DISPLAY=:0
Is your problem related to recent dbus update ? , I am not sure but there are some discussions going on . You may take a look at those.
from 'man su'
-, -l, --login
Starts the shell as login shell with an environment similar to a real login:
o clears all environment variables except for TERM
o initializes the environment variables HOME, SHELL, USER, LOGNAME, PATH
o changes to the target user's home directory
o sets argv[0] of the shell to '-' in order to make the shell a login shell
Note the first bullet point. This includes $DISPLAY.
]]>What DE/WM you are using ?
Gnome. Both Metacity and Mutte are installed.
In the past (before systemd), gedit never game me problems when entering su - in a terminal.
The DISPLAY=:0.0 didn't help.
Thanks in advance.
]]>sux? Wuzzat?
Assuming you're not joking:
sux (wrapper around su which will transfer your X credentials)
$ sux root name-of-app
https://wiki.archlinux.org/index.php/Ru … ps_as_root
(edit) snaked again...
]]>Use su (not su -), or sux, or sudo (sudo su, sudo -s, sudo -i).
su > gives you root permissions but it does not change the PATH variable and current working directory
su - > changes the PATH too... and root's home becomes your current working directory
]]>$ su -
# env |grep DISPLAY
# leafpad
leafpad: Cannot open display:
# exit
$ sudo -i
# env |grep DISPLAY
DISPLAY=:0.0
# leafpad
<leafpad opens>
###
I recommend that you use sux
sux? Wuzzat?
]]>