You are not logged in.
Pages: 1
Hi all,
I just did a fresh install of kde in Arch, and I cannot open any x server apps, like kwrite, using "sudo kwrite". I tried xhost +localhost and my user name, but that didn't work. Then I tried tweaking the $DISPLAY... I couldn't get anything to happen either. Can anyone give me a few helpful pointers? Thanks!
Last edited by sunnieside-up (2011-09-20 05:56:56)
Offline
Offline
Ah thanks that fixed my su- apps! As for the sudo apps, I found that I had to do:
# export XAUTHORITY=/home/user_with_xauthority/.Xauthority
But I'm wondering, how to you permanantely change an environment variable? I have to set this on each session
Last edited by sunnieside-up (2011-09-18 06:39:53)
Offline
try with "sudo -E gedit"
from sudo manual:
-E The -E (preserve environment) option indicates to the
security policy that the user wishes to preserve their
existing environment variables. The security policy may
return an error if the -E option is specified and the user
does not have permission to preserve the environment.
Offline
Using sudo -E with X apps is a bad idea, cause it may lead to some files in your home dir being switched to root owner, which will produce all sorts of weird errors.
There are applications gksu and kdesu especially designed to use instead of sudo for X apps.
Offline
Thanks for all the tips!
Offline
Pages: 1