DebianThis forum is for the discussion of Debian 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.
following a good advise, I only log in as root when necessary, and I do so by using the command "su". Sometimes I would like to be able to open emacs with GUI as root, in order to make changes to certain files. However, this request is denied by the X server, since only user myname is allowed to access the X server when I'm logged in as myname. Nobody else uses this computer, so there are only two users: root and myname.
My question is this: is it a security liability to put "xhost +local:" into my .xsession file? This would allow me to access the X server as root too, rather than just as user myname. I've been reading about xhost being unsecure, but I still don't understand why.
Are there better ways of accessing the X server (e.g. opening emacs or xdvi) as root?
I use xhost +local: as well as it only accepts local connections, but if you don't trust it try using sux instead of su to transfer the magic cookie, or if you're a KDE user use kdesu appname.
Where "name" is your username. I am quoting happytux on that one. It is what I did a long time ago to allow myself to open x programs as root, following happytux's suggestion.
Since debian tightened security on X the export XAUTHORITY still needs a xhost +local: from the user running X.
In addition to having xhost +local: in users .profile my roots .profile has export DISPLAY=:0.0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.