LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-15-2004, 06:43 AM   #1
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Rep: Reputation: 15
Users can't startx


Well after messing around with my system (what good is a system that actually WORKS ???) I've not been able to start X as a user. I get an error like

line 81 ; /dev/null : cannot read from file

Or something the like, 3 times. root can start it alright.

Also, I chose kdm as a login manager. This is kind of annoying because when I try to log in as a user, X doesn't start and I'm back to kdm.

I've tried removing XFree86 and then reinstall it so that scripts would be reinitialized but to no avail.
 
Old 10-15-2004, 07:45 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Look for an xsession.log file; it may contain more information.

You can't read from /dev/null; it's a write-only device. For reading, you want to use something like /dev/zero. Obviously there's some reference to this somewhere in your scripts; your best bet is to find it.

If memory serves, KDM will run a script called XSession in order to log in a user; look for this script and read through it.

You could also try reinstalling the package containing kdm; it's more likely to contain the session scripts than X.
 
Old 10-15-2004, 08:07 AM   #3
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
did you install x-window-system and a window manager?
 
Old 10-15-2004, 03:53 PM   #4
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Original Poster
Rep: Reputation: 15
macondo : yes, I have XFree86 installed as well as KDE and IceWM. None will work as a user.

rjlee : I tried reinstalling KDE, X and both but to no avail. I've looked through Xsession but my limited knowledge of shel scripting didn't help. Heck, I even lost my mouse while tinkering with them and it's back for some reason... anyway.

Here's the error I get at the end of my X output :

/usr/X11/lib/X11/xinit/xinitrc ; line 81 : /dev/null : Permission denied
/usr/X11/lib/X11/xinit/xinitrc ; line 1 : /dev/null : Permission denied
Xsession : unable to create Xsession log/error file ; aborting.

waiting for X server to shut down

/usr/X11/lib/X11/xinit/xinitrc ; line 150 : /dev/null : Permission denied

Last edited by SolarBear; 10-15-2004 at 03:54 PM.
 
Old 10-15-2004, 06:47 PM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
The problem appears to lie in /usr/X11/lib/X11/xinit/xinitrc or (concevably) the permissions of /dev/null.

For the first part, what are the commands on the lines that it's complaining about?

Secondly, what's the output of the command
Code:
ls -l /dev/null
 
Old 10-15-2004, 08:49 PM   #6
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Original Poster
Rep: Reputation: 15
Okay, here goes.

Starting at line 81, the block is the following :
Code:
if touch "$ERRFILE" 2> /dev/null && [ -w "$ERRFILE" ] &&
  [ ! -L "$ERRFILE" ]; then
  chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
  if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
    message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
             "\"$ERRFILE\"; look for session log/errors in" \
             "\"$TMPDIR/xsession-$USER\"."
  fi
else
  errormsg "unable to create X session log/error file; aborting."
fi
We see 2 references to /dev/null...

What's strange is that line 1 is a comment and line 150 does not exist (file ends at 129).

As for the command, here are the permissions :
-rw-r--r-- 1 root src 41 2004-10-15 21:44 /dev/null

EDIT: Seems the problems really is with /dev/null...

I hand-made myself a .xinitrc file for my user and could log into IceWM. Yay.

So I decide to yell "Victory !" on this forum and start mozilla firefox but...
/usr/bin/mozilla-firefox : line 1 : /dev/null : Permission denied
/usr/bin/mozilla-firefox : line 79 : /dev/null : Permission denied
/usr/bin/mozilla-firefox : line 174 : /dev/null : Permission denied
/usr/bin/mozilla-firefox : line 281 : /dev/null : Permission denied


Makes me feel like /dev/null is broken or has incorrect permissions... is it safe to simply chmod 777 it ? And what exactly IS /dev/null ?

Thanks for your help.

EDIT #2: Well not fearing anything more than a fresh install, I decided to chmod 777 /dev/null and right now I'm in KDE as a regular user and everything seems to be fine. Still, I'd like to know if it's dangerous or something...

Last edited by SolarBear; 10-15-2004 at 11:36 PM.
 
Old 10-16-2004, 07:14 AM   #7
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
The problem is your /dev/null is a file and not a device. It should be a character device. You need to use the mknod command to create it.

man mknod

The permissions on mine are
crw-rw-rw- 1 root root 1, 3 Oct 6 23:23 /dev/null

The "c" means it is a character device.
 
Old 10-16-2004, 04:57 PM   #8
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
/dev/null should be the infinite bit-bucket device; anything written to /dev/null is discarded. (/dev/null acts as a zero-length file when you try to read it).

If you have it as a regular file, then anything written to /dev/null will be saved to the file instead; this could easily eat up gigabytes of disk space if you're not careful.

It should be a character-special file, major number 1, minor number 3.

This will usually make /dev/null (as well as a few other special files):
Code:
cd /dev
./MAKEDEV std
 
  


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
gui login failed despite users created. but Text mode + root + startx works OK Emmanuel_uk VectorLinux 2 11-21-2005 03:41 PM
startx works for root but not users aldenfuchs Red Hat 3 04-01-2005 10:28 AM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 08:06 AM
startx doesn't work for all users kpachopoulos Linux - Newbie 1 09-19-2004 06:05 PM
'startx' command unavailable to normal users abs Slackware 13 02-14-2004 09:52 PM

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

All times are GMT -5. The time now is 02:30 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