SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am aware that slackware wont let you connect to X server as root for security reasons.
eg # kwrite /etc/X11/xorg.conf
will output the error 'cannot connect to X server'.
But my question is this; I am am using a terminal as root and then i issue
# su - david
and i still cannot use a command like the eg given above, the error 'cannot connect to X server' appears again. Is there a way around this? At the moment i open another tab in Konsole and this works, but would like to know the correct way to su.
type su then enter then password. Or kdesu and the program you want to run kde su kwrite. now if you do this a couple times and then you cant use kwrite as super user then log out of the user then log in as root then log back out it will remove the stale lock file for the ICE.auth
if you have a full install and are not using 3 party nvidia drivers. type xorgsetup then after your done setting it up type kdm. then sign in as a user.
My problem is not really with xorg.conf, or any file in particular. If I su from user -> root -> user, i cannot connect to X server as user any more. Can this be fixed somehow?
My problem is not really with xorg.conf, or any file in particular. If I su from user -> root -> user, i cannot connect to X server as user any more. Can this be fixed somehow?
If you include a minus sign when 'su'ing, the environment is switched to that of the new user. The problem with running X programs is that the $DISPLAY environment variable is lost. If you make note of what its value is before switching (it is typically ":0.0") then you can reset it after switching users (e.g., "DISPLAY=:0.0 kwrite").
When using 'su', you could omit the minus sign and thus retain the original user's environment. Alternately, when switching to root using 'su', the "-s" switch will cause retention of the $DISPLAY value (and the current working directory) but other environment variables (such as $PATH) will be updated.
try it. or alt + F2 then type kdesu and the name of the program you want to run as root.
this has been a nice security feature for the kde4 desktop and the kdesu is set up to work in xffce4 also.
the original ones that other distro's use are su- and that does not work in Slackware.
just keeping the back door closed. So you use the kdesu program to run as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.