LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-11-2003, 08:40 PM   #1
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
user can't startx


i just installed Slack 9, and everthing went pretty well so far. the problem is i can <startx> as root, but when i change to a user, i get a weird error over and over, with a pause each time:

xauth: timeout in locking authority file //.Xauthority

if i hit control + c a couple times it will get out of that and log into KDE. but then KDE stops right away and can't load because it says it doesn't have write access to $HOME directory (/).

i control+alt+bkspaced and (not really understanding file permissions yet, so just taking a guess) did this:

# chmod +rwx /home

i guess that was wrong, though, because it didn't work.

how come i can't startx as a user? i thought when i made the user linux set up a home directory with all the /home permissions and everything set for it automatically? anyone have any ideas as to what i need to do to get X working as user?
 
Old 07-11-2003, 09:03 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Good God, what have you done...

I'd suggest changing back the /home permissions as it was before... i think it's chmod 755 /home.

After that just do chown <USERNAME>:users -R /home/<USERNAME> ...where <USERNAME> is the user which is having problems with his/her home dir.
 
Old 07-11-2003, 09:28 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by Azmeen
Good God, what have you done...
?? was it totally wrong? i just reasoned that the error message said it couldn't write to the home directory, so i thought i was changing the permission so it could read, write and execute from there (+rwx) ? no?

anyway, there is nothing in the /home directory except an empty /ftp and /lost+found directory, so i thought it was no big deal. but that is confusing to me, also, b/c i thought a /home/<USER> directory should have been created when i added the user. ? (edit to add: $ cd <backspace> returns the user to /, not to /home/<user> as it does on my red hat box. as i said, there isn't even a /<user> directory in /home, just /ftp and /l+f. did i forget to switch on an option when setting up the user? )

i changed it back as you suggested, and followed the chown step, but it still does not work. this time it seems to hang w/out doing anything, and then after ctrl+c it says:

cat: //.Xauthority: No such file or directory.

i haven't done anything else except: stock installation, xf86config, useradd, and startx. actually i added the user before xf86config, but xf86config would not run as the user, so i switched back to root to run it. was that wrong?

thanks for your help so far.

Last edited by synaptical; 07-11-2003 at 09:32 PM.
 
Old 07-12-2003, 01:07 AM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
Quote:
?? was it totally wrong? i just reasoned that the error message said it couldn't write to the home directory, so i thought i was changing the permission so it could read, write and execute from there (+rwx) ? no?
It's not actually wrong, it's more towards dangerous. Why? Because then *anybody* can write/modify/execute files in /home.

You should use adduser instead to create accounts. The script will automate everything regarding user management including creation of home directory.

Tip: adduser synaptical
 
Old 07-12-2003, 02:33 AM   #5
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
It's interesting that after creating a user, you don't have a <user> dir in /home. Do you have a separate partition/drive that is mounted as /home? If so, try umount'ing /home, then cd to /home and see if the <user> dir is there. If that's the case, then you'll have to copy/move that <user> dir elsewhere, then re-mount /home, and finally copy/move the <user> dir to /home. I suspect that somehow your /home partition was unmounted when you created the user account.

Enjoy!
--- Cerbere
 
Old 07-12-2003, 12:46 PM   #6
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by Cerbere
It's interesting that after creating a user, you don't have a <user> dir in /home. Do you have a separate partition/drive that is mounted as /home? If so, try umount'ing /home, then cd to /home and see if the <user> dir is there. If that's the case, then you'll have to copy/move that <user> dir elsewhere, then re-mount /home, and finally copy/move the <user> dir to /home. I suspect that somehow your /home partition was unmounted when you created the user account. Enjoy!
--- Cerbere
thanks! i did not need to unmount the /home directory (which is on its own partition, btw), but it turns out slack was creating the user directory and Desktop in /root. (??) i just moved it all to /home and everything is working now. a few minor things like font adjustments and getting my mouse wheel working and i will be good to go. and thanks also for the tips, Azmeen.

it's not really a big deal at this point, but if anyone would care to take the time to explain why slack is creating the user folders in /root, i would appreciate it. i installed everything by default (~2GB) just to get slack up and running, but after checking it out i plan to start over with a custom install, and i would like to understand what might be going on with that. tia.
 
Old 07-12-2003, 01:15 PM   #7
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
Quote:
xauth: timeout in locking authority file //.Xauthority
ok in your user home, you should have a file called ".Xautority".
The file should be read-write only to your user and be owned by your user and the group users.

to make sure it works, you can also remove the file so your XServer will create a new one. You probably only has a slight right problem.
 
Old 07-12-2003, 02:45 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
When I added my user I ended up with one file in my home directory. Looking in /etc/skel, there was just that one file. So I guess Slack wants you to fill out /etc/skel as admin or just do your own files once you get your user account going. Though if user is correctly configured, the various apps will dump their various config files in the right places. Mostly.

As far as why it's writing files to /root, it sounds like you're logged in as root. I have no idea why it would do it otherwise, so that's pretty weird.

And how'd you get a lost+found dir in home?

Oh. My brain finally clicked through what Cerbere was saying. Yeah, if you had your /home directory unmounted at any point, there'd be nowhere to write to, so your account would get screwed. And how did you add that account, anyway? Might try creating another account and seeing if the same stuff happens.
 
  


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
Cannot startx as non-root user paul.nel Linux - General 1 04-07-2005 02:51 PM
Why can I startx with user. whutxuan Linux - Software 0 11-16-2004 03:41 AM
startx doesn't startx for user vdemuth Mandriva 10 11-08-2004 07:41 PM
Can't run startx as user. ifunniest Linux - Software 5 09-19-2003 12:14 AM
startx won't work as user Mega Man X Slackware 6 07-25-2003 08:51 AM

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

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