LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-20-2005, 12:48 PM   #1
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
can't access kwrite. Xlib problem


Hi folks. Just had to re-install Debian Woody 3.Or2 due to LiLo not playing according to the rules. Unable to mount filesystem it said! Anyway now at last I've got a proper log-in log-out with a shutdown button on it. The problem is. If I log-in as user, open a terminal and su to root, I can get apt-get updates ok so I'm obviously working as root. If I try to open a text editor or even synaptic I get. "Xlib: connection to ":0.0" refused by server.
Xlib: Client is not authorized to connect to Server
kwrite: cannot connect to X server :0.0
If I logout onto my new very much appreciated log-in screen, and then log-in as root, I then can gain access to the text editor. I selected kdm on the re-install, and it was all done rather fast as I was a bit T'd off at having to re-install Debian another time. Perhaps I skipped something I shouldn't have. Doh. Have just finished all the security updates including Xlib but no change. Any suggestions, apart from re-installing, gratefully received.

kernel: 2.2.20-idepci
It was upgrading to kernel 2.4.16-386 to try and get the sounds working that caused all the problems. And now! I've got to install it again. Good Ol LiLo.


Mainly on FC1.FC2,Slackware10.0. But would like to get Debian going, and then onto Roll Your Own Gentoo 2004. (No sounds on that either), but thats for another day. Nigel.aka farpoint.
 
Old 04-20-2005, 12:56 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
don't know whats going on, or what you want.

but, the Xlib message is because you need the X server runing (look at the wiki for info on X if you want), basically, type "startx" to start the server, when its running, xlib connects to it, and programs go thru xlib to get sent to the server, to get drawn on the screen
 
Old 04-20-2005, 01:50 PM   #3
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Original Poster
Rep: Reputation: 30
I'm not sure whats going on here. X is obviously running because I've got the KDE desktop. Right. I su to root at a terminal and type "startx" then get this.

warning: process set to nice value 0 instead of -10 as requested

Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.


When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
Please report problems to submit@bugs.debian.org.



Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
giving up.
xinit: unable to connect to X server
xinit: No such process (errno 3): Server error.
debian:/home/djmons#

Any ideas how to resolve this problem? All I want to do is to run as user, su to root now and again to do necessary stuff in text editors, etc. It seems strange that is I login as user, open a terminal, su to root and try to open a text editor I get denied. But if I login as root and try to open kwrite for instance, it opens with no problems. I mean. It's no big deal. If I've got to logout and log back in as root to use a text editor at least I've got access to them, but is just a bit of a wacky way of doing it. Also it's to easy to login as root and be merrily surfinf away and forget your machine is open to the world. Of course, all I'm really trying to do is get the sounds working with ALSA. That is, if LiLo will let me put the 2.4 kernel on the menu. Nigel.aka farpoint.
 
Old 04-20-2005, 02:38 PM   #4
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
Log in as user
sux to root instead of su
 
Old 04-20-2005, 05:46 PM   #5
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Original Poster
Rep: Reputation: 30
Sorry. No-Go on sux. I'd already tried that having seen it on another post. Now I've re-installed the 2.4.16-386 kernel. Added it to LiLo and added to LiLo initrd=/initrd as advised when I installed the ALSA modules. Run Lilo to set it up, and once again it can't find the filesystem. Ironic really caus there are links to 2 GRUB bootloaders for FC1 and FC2 on LiLo's menu and these work ok. It almost seems like the LiLo.conf that was put in the MBR when I installed Debian is different to the one thats in /etc/lilo.conf now. Really Weird Man! Perhaps I should not have made any changes to LiLo. Just run it on the CLI to see if any changes were made. I had been flying the flag for LiLo but at least Grub just auto adds new kernels to the menu. Nigel. aka farpoint. Not giving up but having to get into Debian from the boot floppy.
 
Old 04-20-2005, 07:39 PM   #6
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
Its a permission thing...transfer x rights to the user and it should work.Though Im just now seeing you have older kernel...so im not sure.
 
Old 04-21-2005, 01:21 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by farpoint

Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
giving up.
xinit: unable to connect to X server
xinit: No such process (errno 3): Server error.
debian:/home/djmons#

Any ideas how to resolve this problem? All I want to do is to run as user, su to root now and again to do necessary stuff in text editors, etc. It seems strange that is I login as user, open a terminal, su to root and try to open a text editor I get denied. But if I login as root and try to open kwrite for instance, it opens with no problems. I mean. It's no big deal. If I've got to logout and log back in as root to use a text editor at least I've got access to them, but is just a bit of a wacky way of doing it. Also it's to easy to login as root and be merrily surfinf away and forget your machine is open to the world. Of course, all I'm really trying to do is get the sounds working with ALSA. That is, if LiLo will let me put the 2.4 kernel on the menu. Nigel.aka farpoint.
Try using export XAUTHORITY=/home/djmons/.Xauthority in the terminal window just before executing the program you want to run. To make it work every time without having to do the export line put this in your /root/.bashrc file.

Code:
# Allows me to run an X program as root when su'ed from normal user
export XAUTHORITY=/home/djmons/.Xauthority
 
Old 04-22-2005, 07:30 AM   #8
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Original Poster
Rep: Reputation: 30
Hi HappyTux. Many thanks Stephen for that bit of code. Its all running like clockwork now. Sorry for being slow replying, but I've been repairing LiLo so that it boots debian without the kernel panics, unable to mount root fs etc. A big thanks to everyone else's help and suggestions. Now its back to tring to get it to pick up the soundcard. Watch out for the new thread. Nigel aka farpoint.
 
  


Reply



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
kwrite cursor problem twisted Linux - Software 3 02-01-2009 01:47 PM
KWrite problem totti10 Linux - Software 2 10-31-2004 02:30 PM
cvscedega > no xlib access as root? xrn0id Linux - Software 2 08-13-2004 01:29 PM
Xlib problem aeruzcar Linux - General 4 10-31-2003 05:57 AM
Kwrite on Man 9.2 rc1 font problem. barrys Mandriva 1 09-05-2003 05:00 PM

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

All times are GMT -5. The time now is 10:36 AM.

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