Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-19-2005, 01:20 AM
|
#1
|
|
Member
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114
Rep:
|
How to run GUI program as root
In Slackware 10.1, I do it as follow:
$ xhost +<host name>
$ su
# <run it>
But now in Slackware 10.2, I found this way does not work, it says: cannot connect to xxx server. Who can tell me why?
Thanks!
|
|
|
|
09-19-2005, 01:22 AM
|
#2
|
|
Senior Member
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549
Rep:
|
I'm not sure why that's broken but assuming you're using KDE you can just run: You can do the same thing by going menu->Run Command and under 'Options' setting 'Run as a different user'
|
|
|
|
09-19-2005, 01:27 AM
|
#3
|
|
Member
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114
Original Poster
Rep:
|
I use KDE, but the GUI program that I want to run is not a KDE program, will it work?
|
|
|
|
09-19-2005, 01:39 AM
|
#4
|
|
Member
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770
Rep:
|
Just tried it and the answer is YES.
Ethereal is one example of a gui program that needs root rights.
|
|
|
|
09-19-2005, 03:28 AM
|
#5
|
|
Member
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114
Original Poster
Rep:
|
Yes, it works!
But if I don't use KDE, will it work? If not, what can I do?
|
|
|
|
09-19-2005, 03:47 AM
|
#6
|
|
Senior Member
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549
Rep:
|
Quote:
|
But if I don't use KDE, will it work?
|
Yes it will work as long as you have KDE installed - I just tried it then in GNOME.
Also have you tried:
Code:
su -
<run application>
It works on my system (Mandriva 2005LE). The - option means to create a login shell, ie. a shell with all the environment variables set as though you'd logged in as root.
|
|
|
|
09-19-2005, 10:55 PM
|
#7
|
|
Member
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114
Original Poster
Rep:
|
Quote:
Originally posted by tkedwards
Also have you tried:
Code:
su -
<run application>
It works on my system (Mandriva 2005LE). The - option means to create a login shell, ie. a shell with all the environment variables set as though you'd logged in as root.
|
When I use Red Hat 7.2 and Red Hat 9, this method used to work, but it doesn't work in Slackware.
|
|
|
|
09-19-2005, 11:08 PM
|
#8
|
|
Member
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496
Rep:
|
Hmm, what window manager are you running? If I do a "su root" it allows me to run X applications. Maybe try "su -c command".
EDIT: This is using Windowmaker 0.9.2 and Slackware 10.2 btw.
|
|
|
|
09-20-2005, 02:24 PM
|
#9
|
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
here I can run any app with any user just login the user in the terminal and them typing the app I want to run.
You can open GTK app on KDE if you have the GTK libraries and KDE app on Gnome if you have the QT libraries, is just a matter of the right libs and files.
if I type:
$su
#./runLime.sh
it runs on KDE without problems
or even
$su
#kview
it runs on Gnome without noproblems too ...
or I can just short the command line with a
$su -c "kview"
[ ]īs
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:42 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|