LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-20-2005, 01:34 AM   #1
shadkong
Member
 
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114

Rep: Reputation: 15
I can't open gui program in KDE as root


When I use "su" or "su-" to change to root, I can't run GUI program, if I type /opt/kde/bin/kwrite, it shows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kwrite: /opt/kde/bin/kwrite
root@perfect:/home/shad# /opt/kde/bin/kwrite
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kwrite: cannot connect to X server :0.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How can I run GUI program in KDE as root?
 
Old 04-20-2005, 01:43 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Do the following,

Code:
$xhost +hostname (e.g. localhost)
$su
#kwrite
or just
$su -c "kwrite"
You could also just do
Code:
$kdesu kwrite
 
Old 04-20-2005, 02:45 AM   #3
shadkong
Member
 
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114

Original Poster
Rep: Reputation: 15
Thank you!
What's the meaning of "xhost +hostname"?
 
Old 04-20-2005, 06:40 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
The "xhost +hostname" command allows a user who didn't start the X server, to run a gui program in your current X session from the host you specify.
 
Old 04-20-2005, 08:48 AM   #5
shadkong
Member
 
Registered: Apr 2005
Location: Guangzhou, China
Distribution: Slackware 10.2
Posts: 114

Original Poster
Rep: Reputation: 15
Thank you very much!
 
Old 04-20-2005, 12:52 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
i have used xhost..
but i ahven't used that for a display problem on local machine...
also we could ahve cehcked the environment of DISPLAY

env|grep DISPLAY
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run GUI program as root shadkong Slackware 8 09-20-2005 02:24 PM
how can i login as a root in GUI (KDE) linux juggler Fedora 12 08-22-2005 11:07 AM
how can I change to root user in the KDE GUI nicoc Linux - Newbie 3 07-23-2004 12:01 PM
KDE GUI building program nny0000 Linux - Software 3 04-04-2004 03:19 PM
Lost my KDE GUI in root barkingpenguin Red Hat 2 01-21-2004 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration