PDA

View Full Version : opening x programs as su root



m_yates
04-12-2004, 10:27 PM
In Knoppix installed to the hard drive, it is possible to open X programs from a console program automatically as root. For example, if I login to KDE as a user, open Konsole, su to become root, then enter a command like "kwrite", a new window will open up, allowing me to run kwrite as root.

If I install Debian using the official installer, I cannot open X programs as root. Does anyone know how Knoppix does it? In my normal Debian system, I have to enter the command "xhost local:root" to give root permission to open a display. I would like root to automatically have permission from my user account every time I log on. I know it introduces some security issues, but I don't care. It is very convenient to have the ability to open windows as root from a console.

I know this is a little off topic (sorry).

Stephen
04-12-2004, 10:41 PM
If I install Debian using the official installer, I cannot open X programs as root. Does anyone know how Knoppix does it? In my normal Debian system, I have to enter the command "xhost local:root" to give root permission to open a display. I would like root to automatically have permission from my user account every time I log on. I know it introduces some security issues, but I don't care. It is very convenient to have the ability to open windows as root from a console.

I know this is a little off topic (sorry).

Add this line to your /root/.bashrc you would of course change it to your user name.


# Allows me to run an X program as root
export XAUTHORITY=/home/stephen/.Xauthority

m_yates
04-13-2004, 12:52 AM
Thanks Stephen. I'll give this a try.