Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
abisko00,
I'm connecting to X locally, so I guess your comments don't apply. I think I'll just stick with kdesu, like reddazz suggested, at least till I get motivated and skilled enough to check out the source code for kdesu to see what makes it tick.
reddazz,
I never use double quotes when running 'su -c', and I never have any problems (unless root and X are concerned, but that's a different story altogether), so I have no idea what you're talking about (my guess is that double quotes are necessary only if the command contains spaces, as in the following, ' su -c "cmd -a -b -c" ').
I've already tried '$xhost +localhost' without any success. And I know that if I need a GUI, then that's up to ME. That's why I started the thread: to solve MY problem. And why the fixation with nmap? Forget about nmap; what if I were to tell you that there exists an application that requires root and is significantly more usable in GUI (or maybe even non-existant in command mode)? Besides, I just want to learn how to configure my system; supposedly, it's one of Linux's strengths :S
Try running xhost +, then run your app using su or su -c. This will unfortunately accept connections from any host, but it may help your situation. Does your PC have another hostname coz instead of using localhost, try using the host name you gave the pc e.g. xhost +hostname as the user who started the xserver. As for su -c, it works fine without the quotes, but it depends on exactly what you are trying to do, the quotes maybe necessary, so it's out of habit that most people use it with the double quotes. I wasn't getting fixated on "nmap", it's the example you gave, so most people thought it's the application you were attempting to run.
As for running GUI apps as root, nobody said that you couldn't or shouldn't do it, but people are giving you their points of view on the pros and cons of doing this. There are some GUI apps that run as root, mostly configuration utilities such as Mandrake Control Centre, Synaptic etc, but you don't need to use these very often. If you also run GUI desktops such as KDE and GNOME as root, you will be also inviting trouble because anything you do, affects the whole system and if anyone hacked into your system, they would have full root privileges and can wreak havoc on your PC. So by all means go ahead and use a GUI tool if thats what you are comfortable with, but just make sure you are up to scratch with security issues etc.
Try running from a terminal, eg. open konsole and type kppp. Look at the terminal output, post. Perhaps the two Redhat topics in this faq might be helpful: http://ktown.kde.org/~kppp/faq.html.
Not sure, but you could try looking at the security settings (owner, group, permissions) on the affected program files and related files with 'ls -l', to see if your user has the appropriate permissions. This is what I get for kppp on my system (Mepis 3.3, not FC3), for example:
$ls -l /usr/bin/kppp
-rwsr-xr-- 1 root dip 575192 2005-01-26 09:03 /usr/bin/kppp
nazdrowie, if you're still looking for an answer to your original question about running things as root, you could try to look into this little script called sux (really nice name, btw.... you try to google for that....):
nazdrowie, if you're still looking for an answer to your original question about running things as root, you could try to look into this little script called sux (really nice name, btw.... you try to google for that....):
it's a small sh-script that should do what you want
I agree with everything nazdrowie said, I had the same problem with the same program and other GUI front ends. And I tried sux and works like a charm, thanks a lot mathiasb. It looks like all sux does is something with xauth.
Edit: I just realized this thread is like 3 years old lol
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.