Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Desktop Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd June 2006, 09:21
geek.de.nz geek.de.nz is offline
Member
 
Join Date: Feb 2006
Posts: 65
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to geek.de.nz Send a message via MSN to geek.de.nz
Default Ubuntu X applications as root

I know, I can load X applications (X apps) as root with 'sudo xappname' and giving the password. But that takes too much time, every time I want to do something as root which involves the X server, I have to type the root password.

But in other distros I was used to logging in as root in a shell (konsole) and typing 'xappname' and it would be displayed on the X server of the current user. But in Ubuntu I get
Code:
Xlib: connection to ":0.0" refused by server
if I start gvim (my favorite editor) for example.

I haven't found this issue on the web yet.

Can anyone tell me, how to change the behoaviour of the X server of Ubuntu somehow, because root should really have every right shouldn't he? This is the only thing that keeps annoying me in Ubuntu.
__________________
Always mention at least your distribution/version! You can add it in your signature if you don't want to always type it. ;-)

Distributions:
Ubuntu 5.10 with custom kernel (2.6.16-suspend2),
Debian Sarge 3.1 and Etch

Please submit your ISP or Webhost to (free)
http://www.ihostnz.com
Reply With Quote
Sponsored Links
  #2  
Old 23rd June 2006, 14:52
chatmoa chatmoa is offline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

gsudo gvim on ubuntu
kdesu gvim on kubuntu

@+
Reply With Quote
  #3  
Old 24th June 2006, 04:36
geek.de.nz geek.de.nz is offline
Member
 
Join Date: Feb 2006
Posts: 65
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to geek.de.nz Send a message via MSN to geek.de.nz
 
Default xauth cookies

That's what I know. It's not what I wanted to do (as I mentioned).

Anyway, I figured it out. If you want to execute X apps as root (logged in as root in konsole or similar) while you are logged in with the user called user, you have two ways:

1. (prefered because more secure)
Log in as root and do
Code:
cp /home/user/.Xauthority ~/
Then you can start an X app as root while user is logged in on the same X server.

2. To allow any user to access the X server while logged in as user, use the xhost command (being user):
Code:
xhost +

Hope that helps someone who has the same problem.
__________________
Always mention at least your distribution/version! You can add it in your signature if you don't want to always type it. ;-)

Distributions:
Ubuntu 5.10 with custom kernel (2.6.16-suspend2),
Debian Sarge 3.1 and Etch

Please submit your ISP or Webhost to (free)
http://www.ihostnz.com
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
monit howto Jamesk5 HOWTO-Related Questions 11 5th August 2008 15:10
Apache - Virtual hosts - ISPConfig Hans Server Operation 8 23rd April 2006 16:29
Problems installing NForce4 sound drivers Wraithfire Installation/Configuration 21 16th April 2006 17:30
cannot connect to ispconfig guidovanh Installation/Configuration 22 3rd March 2006 19:52
Everything owned by root !!! wwparrish Installation/Configuration 6 7th February 2006 21:25


All times are GMT +2. The time now is 17:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.