LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 05-25-2005, 03:13 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Rep: Reputation: 121Reputation: 121
Unable to run a GUI app as root using su?


I am using KDE and I always log in as a user. However, there are times when I must run my editor Quanta as root (so that I can directly save files in the /var/www folder rather than go through the trouble of saving them in /home/hari and then copying them to /var/www

For this I always used to run su from a terminal window and then run the application.

After quite a while now, I again tried to run Quanta as root.

Code:
su
Password: *********
quanta &
I get this error:
Code:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

quanta: cannot connect to X server :0.0
What could be the reason for this sudden problem? I changed no config files as far as I know and I am in KDE.

This may have something to do with upgrading su and the config file. If anybody knows how to fix this, I would be grateful for an answer.

Last edited by vharishankar; 05-25-2005 at 03:17 AM.
 
Old 05-25-2005, 03:18 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,

something called "xhost +" ...
you need to be allowed to export the display...
before su do the following
Code:
xhost +
and after su...
Code:
export DISPLAY=$HOST:0.0
regards
slackie1000
 
Old 05-25-2005, 03:22 AM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Thanks slackie1000. This works.

Are these options volatile? Will it work after a reboot or must I execute them again?
 
Old 05-25-2005, 03:29 AM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 45
hi there,
nope.. you need to execute again..
but i think, somewhere , somehow, you can make it standard. .. but this is out of my knowledge. sorry.
regards
slackie1000
 
Old 05-25-2005, 03:32 AM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
The big mystery is that it worked earlier without this. It is only recently that it has given me that error.

So it must be a config file issue. Anybody?
 
Old 05-25-2005, 03:46 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
You can always press Alt-F2 to bring up the "run application" pop-up prompt. Fill-in quanta and check the option to run as a different user (root). You can also check the option to remember the root password.
 
Old 05-25-2005, 08:01 AM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Quote:
Originally posted by bathory
You can always press Alt-F2 to bring up the "run application" pop-up prompt. Fill-in quanta and check the option to run as a different user (root). You can also check the option to remember the root password.
This is a good workaround. Thanks. It works.

In the meantime if anybody can suggest a solution to the first problem (regarding su), I'd be very grateful.
 
Old 05-25-2005, 08:08 AM   #8
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
I used kdesu anyway and created a shortcut on the desktop.

Thanks for all suggestions
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't run gui (X) programs as root user nazdrowie Linux - General 25 12-02-2008 01:24 AM
How to run GUI program as root shadkong Slackware 8 09-20-2005 02:24 PM
Run My APP Under a user other than root working2hard Programming 7 10-11-2004 05:48 PM
Can't run gui applications as root vdogvictor Linux - General 26 08-19-2004 08:24 PM
Unable to run app as root ADJenkins Linux - Newbie 6 05-23-2004 05:23 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration