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.
It's a setting I've only seen on Slackware and I don't know how to change it in the Xorg.conf file. However, there's still a workaroung which is typing "xhost +" in a console before typing your command.
Yes, I am running. $USER returns user, currently running X. So, if user is running X, the command, i issued below should work.
Quote:
Originally Posted by Mark Havel
It's a setting I've only seen on Slackware and I don't know how to change it in the Xorg.conf file. However, there's still a workaroung which is typing "xhost +" in a console before typing your command.
xhost+ should not be used. Instead a magic cookie should be imported. But, I repeat, the $USER is already running X an has the privileges to run graphical programs on X.
It's a setting I've only seen on Slackware and I don't know how to change it in the Xorg.conf file. However, there's still a workaroung which is typing "xhost +" in a console before typing your command.
If the answer to the question appears to be "xhost +" then the question was a very stupid one. Always. Doing so is right up there with simply removing the front door to your house because the doorbell needs new batteries. Never, ever do this on a machine that's connected to a network or has more than one user account.
Not using the dash argument to su should allow the process to change UID without ditching the variables that contain the authentication tokens and information about where the display is.
Then, if xhost + is Evil, what's the solution to launch graphical programs as root on a console under a normal user? It was possible on Mandriva and this was the only solution I found to do the same on a Slackware...
I know my suggestion works because it it the method I use to display icons on a users desktop when usbstorage devices are connected to my system. Connecting devices triggers udev(or hotplug) events which are run as root. That makes it easy for root to start a process on the users desktop. But if the process belongs to root the user cannot control it. By starting the process as the user(using su - $USER), the user can control it.
You can use xauth to get the credentials of the user and apply them to the new process or transfer the credentials of root which is probably very bad. But unsetting XAUTHORITY is much easier and may be safer assuming the root account is safe - the user is already authenticated if he already has a DISPLAY so XAUTHORITY can be ignored.
Some programs may still not do all of what you want unless you discover and export extra environmental variables associated with the desktop being used.
So, as gnashley states, presuming all users have passwords, one could do that. Not that is bulletproof, but it's acceptable for a good reason.
Otherways, couldn't the user have own startup scripts?
Isn't there a way with hall / dbus? how des Bluetooth make it?
We all see that even PV puts HAL in Vanilla-slack.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.