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.
Hi, I have Slackware 10.0 running on my AMD Duron 1300 box. While logged in as a normal user, I often open up a terminal window and use "su" to become root to run some administrative task. My problem is that I cannot open any GUI application while in this mode. As an example, when I try to run the Guarddog firewall app, I get errors like this:
Code:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
guarddog: cannot connect to X server :0.0
If I log directly into KDE as root, I have no such issues; but I know that running KDE as root is a Very Bad Thing (TM) to do.
Presumably this is due to the configuration of the X server in Slackware. Anyone know how to fix this issue?
probably the $DISPLAY veriable is lost while "su"-ing
either set it manually ( "export DISPLAY=unix:0.0" ) or
use a version of su that supports the DISPLAY variable
(in SUSE i use the "/usr/X11R6/bin/sux" script)
Thanks for the replies, folks. I'm at home now, but will try out your suggestions tomorrow when I'm back in front of the offending PC.
-X-, I downloaded and compiled from source the tarball for the Gnu Nano editor. Nano and FreeBSD's "ee" (easy editor) are the only two command line *nix editors I've run across that are compatible with my brain...my chances of remembering to "esc, shift, colon, w, q" every time I want to save a file are about as good as a snowballs in a lava flow. I actually had no choice other than to use vi for several years back in the early 90's, on Sun Sparkstations running Unix. When X and Solaris came along, a GUI text editor came with it. I have never been happier to stop using any piece of software than I was when I abandoned vi!
Don't get me wrong, I'm glad you enjoy vi. But its not for me - its for people who can mentally map extremely arbitrary key sequences to the simplest tasks a text editor might be asked to perform!
You should try mcedit (the Midnight Commander editor) it's VERY easy to use. Just type: mcedit filename once you're in just edit as you like and hit ESC If you need to do something like search or replaze look at the bottom that you've a list of commands that are executed with the F* keys ie: F2 = Save, F4 = Replace.
Oh and it comes installed with a default Slackware install
Anyway my post is to draw flieslikeabeagl's attention to kdesu. It is X session aware, and helps me out sometimes. (It will start gtk apps as root too).
Thanks, guys! Both the "xhost+" trick and "kdesu" are working for me. Much appreciate the help. I just slapt-got (!) mc, and took a look at mcedit, it certainly seems as user friendly as you can get on the command line (does it use ncurses?).
tobyl, I believe nano is designed to be very close to pico .... something to do with pico not being GPL licensed, I believe.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.