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.
Since it is a very bad idea to run X under root. Is there a way to run X under a regular user and open xterm and su to root and type in the program (any X based application that requires root privledges) and have it show up on the non-root user's screen? I keep getting errors, from can't connect to display:0.0 and invaild MIT_MAGIC_COOKIE.
Also if this is possible is it a security risk ( besides leaving the xterm with root logged on)?
I just don't want to shutdown X and sign back on with root!!
Can't think of too much I need to do but access file manager and editor as root. Other han accessing gui config ap for kernel compile boot then that can be done as a regular user.
MC handy enough if ls isn't enough gun. I use mcedit but many folks use pico, vi and the like.
No application in particular, but sometimes I run into needing a X program that needs root access (like a GUI port scanner). I just want to be able to run X under a regular user and open a xterm,su to root and type in the program and have it show up on the users screen. Is this possible and/or a security risk?
I don't really understand why it's considered to be a security risk to run x as root. Sure it's a bad idea to go online while logged in as root but that is a totally different issue. There is no reason that just running a 'window manager' or a gui application as root should make your system less secure.
I do this all the time. I regularly use KDE apps as root, most frequently Konqueror, Kate. I have icons for these on the desktop setup to run as root using KDE's 'run as a different user' setting.
with dropline, a lot of the gui apps under gnome, like login screen manager and stuff give you that x su screen, and let you type in the root pass to run the app.
distros like redhat do it out of the box, so i knwo there is a way to set it up
Originally posted by CrashedAgain I don't really understand why it's considered to be a security risk to run x as root. Sure it's a bad idea to go online while logged in as root but that is a totally different issue. There is no reason that just running a 'window manager' or a gui application as root should make your system less secure.
I do this all the time. I regularly use KDE apps as root, most frequently Konqueror, Kate. I have icons for these on the desktop setup to run as root using KDE's 'run as a different user' setting.
I was as puzzled too, seemingly the root thingy is always get into our ways. But if we recall the root(pun not intended) of linux, which is unix, then we will understand why it is so. it is a networked OS, it is meant to be running servers, where users are all log inned and uptime is crucial. So the security risk is that a server can be comprised if a non system/network admin mess with it. So IMO, Linux is like a server based OS trying to also act as an Desktop, and MS is a desktop OS trying to act as an server. They have their historical baggages, but both are making progress towards their goal.
You may not be worried about security and want the convenience of a gui root and it's your choice but there will be no messages saying you do not have permission when you start doing things you didn't intend to do to your system and deleting things you didn't mean to.
Root also makes you stop and think "yeah what am I doing here?" and when your root on a terminal your looking at what you intend to do as you type the command and hit enter. In an xsession your just one click away (intentional or not intentional) from blowing away all your hard work or a network with clients on it.
I used to install SuSe a couple times a week when I first started cause I I was always in root and didn't know the first thing about half of what I was thinking I was doing.
Yes there are still some times when I might logon as root in kde but after three years plus messing around with linux I now stop and think about whether I really need to and many times I don't. I can do it as su in konsole while logged in as a normal user.
assuming the program is in your sudoers file (/etc/sudoers). This approach is far more secure than changing the permissions of your programs and/or using the 'su' command. Passing the command 'man sudoers' in a terminal will give you a document pertaining to the syntax of the sudoers file. And btw, the help file says that you have to use the 'visudo' command to edit the file. But as long as you understand the syntax of the file you can use your favourite editor (such as jed!). Cheers!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.