XWM permissions problems
I'm not sure whether to post this in the Newbie area, or the Slackware area, so I will gladly repost in the appropriate place if this is not it.
With that being said, I have recently installed Slackware 13 on my system and have encountered a problem I seem to be unable to solve on my own. My problem is that when starting and exiting the XWM (I have had the same issue using KDE and XFCE, though I haven't tried the others) I encounter permissions errors unless I am logged in as the root user. A more major problem among these are that, when attempting to logout, rather being brought back to a command line, I am met with a flashing black and white screen with random lines of text scrolling across the top of my monitor. However, the machine is still perfectly functional, as retyping 'startx' will in the flashing screen will bring me right back to the XWM. At first, I thought this may be a hardware issue, but, as earlier mentioned, this problem only occurs when I am running a XWM as anything but the root user. When running as the root user, I encounter no problems what-so-ever. In addition, I sometimes encounter this same issue when trying to shutdown or restart my machine (which must be done by opening terminal, changing to the root user and performing the shutdown command as all other users do not have the permission to shutdown the machine), although sometimes when shutting down/restarting, I am brought back to a command line, and there is consistently a message displayed saying something about a permission error and the screensaver, but "I'm not logging in as root, which is good", which reinforces my belief that this is a permissions problem (I would put actual message here, but the frequency between 'random flashing screen before shutdown' and 'command line before shutdown' is rather random and, unfortunately, I haven't gotten the command line or the message to appear in a while). Going further, this wasn't such a huge deal at first as I could still log in to my XWM as any user, and perform command line tasks through terminal if need be, rather than switching back to the command prompt (Crtl+Alt+F6 from XWM also produces the same flashing screen when operating as anything but root, with Alt+F7 bringing me safely back to X), however when I decided to give one of my users (well, my second personality, really) 'sudo' privileges, X stopped working for that user altogether, which created a problem. At first I would be with a black screen even after several minutes of letting X start (which generally happens within seconds on my machine), with absolutely no functionality. Crtl+Alt+F6 would return me to the flashing screen, which is not at all helpful. Experimenting, I tried invoking 'sudo startx', and that seemed to temporarily allow me to use X, though that, one day, randomly stopped working (I'm sure there is some reason for this, probably something I did unknowingly, but I have no idea what), and I was again met with a black screen when trying to start X. And that leads me to where I am now, running the system as root when using X because that is the only account I can seem to get X to working properly with. This is obviously not preferable, but not such a huge deal as I have kept my system rather 'clean' knowing there would be a large learning curve to Slackware, and that I probably screw everything up about twenty times before I figured it out. Oh, a final afterthought: everything I have read in regards to X has pointed me in the direction of /usr/X11R6/lib/X11/doc or /var/X11/lib/xinit or some variant of those directories for documentation, configuration, etc, of X, but I can't seem to find the files (for example /usr/X11R6 has a vim text file 'lib@', while /var has another vim text file 'X11@', however, I cannot find a usr/X11R6/lib or /var/X11 directory). Any help on this issue is appreciated, and thank you to anyone who can even get through the whole post. :D |
According to what I had understood, Just change the permissions of the file.
You can done this with 'chmod' command |
Quote:
|
Alex, are you running in runlevel 3 or runlevel 4? What you describe might happen if you were running in runlevel 4 and were trying to use startx as the xserver would already be in use by root/kdm.
Slackware doesn't rely on sudo (most slackers will never use it, prefering 'su' when the occasion calls for it), so I doubt that that's part of the problem, unless you've caused some damage while using sudo somehow. Anyway, I'd suggest the following. Check/change /etc/inittab to run in runlevel 3 if it isn't already. It's the line with 'initdefault' on it near the top. Be careful editing inittab, get this one wrong and you'll have to boot from your install cd/dvd to fix it. Reboot, so that you've not got any Xserver processes running. Login as root at the console prompt Run 'xorgsetup'. This'll create an X11 config file for you /etc/X11/xorg.conf. Make sure your non-root user is in all the right groups Code:
usermod -g users -G floppy,audio,video,cdrom,plugdev,power,netdev yourusername You'll need to stop/start messagebus/hal for the group changes to take effect, but it's easier just to reboot again. Login as your non-root user. Run xwmconfig and choose xfce as your environment. Run startx. Does it start/work ok? and do you get any permissions problems? If everything looks ok then try a ctrl-alt-f6. Does that still give your the blinking/scrolling text at the top? |
First, thank you for the response.
I Doubled-checked inittab to make sure it was on run level three (it was) Rebooted Logged-on as root, ran xorgsetup. Did # usermod -g users -G floppy, etc... Rebooted Logged-on with my non-root account #xwmconfig Chose xfce #startx Blank screen However, crtl+alt+f6 does now bring me back to the command prompt rather than a flashing screen. On another note, when xfce started up there was a new message in the command prompt. I managed to catch part of it with crtl+s: xauth: error in locking authority file /home/username/.xauthority There was some more also, but I couldn't get that. Isn't there a way to print messages displayed in the command prompt from a certain time period? Aha! I discovered the magic of crtl-alt-f1 The output is as follows: xauth: error in locking authority file /home/username/.xauthority followed by a message about X (the version, etc) then: No protocol specified .. repeating over and over again Update: It seems a number of files in my /home/user directory were owned by root (now why would that be?), so I executed #chown -hR user /home/user to correct that little error (which I hope wasn't a really stupid thing to do). Anyway, I still can't start X with my non-root user, however I am getting a new output: xauth: (same as listed above) Message about X then: Setting master Invalid MIT-MAGIC-COOKIE-1 key (repeating) Waiting for X server to begin accepting connections .Dropping master |
removed: I see you already did the chown I suggested.
The MIT-MAGIC_COOKIE stuff is also xauth related. If you kill your xserver, delete ~/.Xauthority and ~/.ICEauthority and clear out the similar files/directories shown by a "ls -al /tmp" that ought to clean everything up. |
Quote:
The problem was, apparently, that although I in runlevel 3, there was a comment "x1:4:respawn:etc/rc.d/rc.4" at the end of the file that was, I presume, throwing the system into run level 4 when I tried to start X (and I guess giving me the level 4 error you mentioned in your last post). Or maybe that's not it at all, I honestly don't know. The exact comment at the end of the inittab file was this: #Runlevel 4 used to be far an X window only system, until we discovered that it throws init into a loop that keeps your load avg at least 1 all the time. Thus, there is now one getty opened on tty6. Hopefully no one will notice. #It might not be bad to have one text console anyway, in case something happens to X. x1:4:respawn:etc/rc.d/rc.4 So, googling "x1:4:respawn:etc/rc.d/rc.4", I found a thread in another forum from someone having trouble starting their system, with another person telling him to delete the comment. I did the same. And... Tada! No problems. X works fine and I can switch between X and the command prompt without any errors. Thank you for your help!:hattip: |
Weird, the x1:4:respawn:etc/rc.d/rc.4 line isn't normally commented out. Here's that section of mine, which is as shipped in Slackware 13.0 and works fine in both runlevel 3 and 4.
Code:
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100 Anyway, glad you got it sorted, but I don't pretend to understand why it was happening. That line shouldn't get run in rl 3 no matter what. |
Quote:
|
No longer solved!
It worked and worked and worked until it didn't. Now when I start X as a non-root sometimes I get X, sometimes I get a blank screen, sometimes I get the flashing screen and text. Same with my shortcuts to a command prompt. Also, many file permissions in my /home/user directory were assigned back to root(???). I tried 'chown' again, but that didn't help. This problem seems absolutely random and nonsensical. Unless there are any other ideas, I'm just going to back up my files and try a fresh install of Slack. |
Unless you can see something obvious in a 'ps ax' then a reinstall is probably the easiest option. The things you're describing simply shouldn't happen.
|
Re-installed. I've been running/testing for a while now. It seems to be fine now, but I have been deceived before :p. If no problems crop up by the end of tomorrow, I will go ahead and make this thread as solved.
Thank you, GazL, for your help on this very strange problem. |
All times are GMT -5. The time now is 10:39 PM. |