Dear J_Szucs: before using my script below consider whether it is in fact necessary for you to use kwrite. There are many text-only replacements (e.g.
editor) which support basic text editing too.
newbieME: i am sorry, but your suggestion to logon KDE directly as root is among the worst as this completely exposes the system when most of the time a simple
su will do.
personal recommended solution: below you find a shell script which is fairly simple and does not compromise on your system security. I named it
mysu to make it clear that it is not the simple
su command, though one could alias it to replace the
su command. The script has to be placed in any directory included in
$PATH and must me marked executable (e.g.
chmod a+x mysu)
# /usr/local/bin/mysu
# script allowing su to access X-server from logged-in non-root user
# for feedback (i am really a newbie) mischa.delete-this-part@altmann.at
# point $XAUTHORITY to current user's .Xauthority file
# .Xauthority stores authorization keys for X-system of current user
# $XAUTHORITY is an environmental variable pointing to the file
# containing keys. If it doesnt exist X defaults to $HOME/.Xauthority
XAUTHORITY=$HOME/.Xauthority
# let new processes inherit environment variable $XAUTHORITY
export XAUTHORITY
# login as superuser (su)
su
# remove "export attribute" from $XAUTHORITY
export -n XAUTHORITY
I hope this helps,
. Mischa Altmann