Jump to content

strange thing happen to "startx" when logging in....


wa4chq

Recommended Posts

Greetings all. I've got a Raspberry pi a few years ago. I have used it for playing with time-lapse photograpy and also learning how to log in to it using SSH. I never had a need for using ssh but enjoyed figuring it out. Later I started messing with VNC. That was interesting because with it I would see Pi's whole desktop. OK, fast forward. I haven't been using pi much but the other day I got it out and started messing with vnc again. I must have been using archbang on the lappy at the time when I first started playing with VNC and I was able to bring up vncviewer on the laptop no problem but I can't do that with Slackware. Googling and trying other things I did:

vncserver -geometry 1024x768 -depth 24

which thinking about it now was wrong and caused a tiny problem. I shutdown the laptop and a few hours later booted slack and after logging in I issued my alias for startx and got this error:

Xauth: file /home/wa4chq/.serverauth.1568 does not exist.

timeout in locking authority file /home/wa4chq/.Xauthority

Luckily I was able to reboot into Archbang and google the error message and found a fix. I had to go into /usr/bin/startx and change

#enable_xauth=1 <<<<< to
enable_xauth=0 <<<<< this

I rebooted and that solved the problem. But what happened when I did the vncserver command on my laptop to cause me not to be able to startx? Also, am I using "code" and "quote" properly in my question? Thanks

Link to comment
Share on other sites

V.T. Eric Layton

Umm...

 

Let's see here. I believe that the VNC server has to create/define and Xauthority file to operate on a client OS. In your case, it created one to run in Slackware. In the process, it overwrote your generic xauth file in your /home/user directory. This is the reason you had to make that small modification in usr/bin/startx. Startx could not find your generic xauth file anymore. Changing to xauth=0 forced X to regenerate another.

 

That's my best guess.

 

As to why the VNC didn't work in Slackware? Your guess is as good as mine. I've never used VNC for anything on any of my systems, so don't know a whole lot about it.

 

So, that wasn't too helpful, huh? :(

  • Like 1
Link to comment
Share on other sites

securitybreach

Umm...

 

Let's see here. I believe that the VNC server has to create/define and Xauthority file to operate on a client OS. In your case, it created one to run in Slackware. In the process, it overwrote your generic xauth file in your /home/user directory. This is the reason you had to make that small modification in usr/bin/startx. Startx could not find your generic xauth file anymore. Changing to xauth=0 forced X to regenerate another.

 

I agree but you should not be running VNC as root and if you are not running it as root, VNC should not be able to edit /usr/bin/startx. I would follow this for VNC if I were you: https://wiki.archlinux.org/index.php/TigerVNC

 

Personally I would run X11Forwarding over ssh if I were you instead of VNC: https://wiki.archlinux.org/index.php/Secure_Shell#X11_forwarding

  • Like 1
Link to comment
Share on other sites

It was helpful. Thanks. I'm sure VNC will work with Slackware. I've changed some setting in Pi so maybe vnc wasn't running on it.... Not a big deal anyway.

This is what I had expected to see when I running "vncviewer" with slack

vnc.jpg

but this is what I got instead

vnc_2.jpg

How about the way I am posting "quotes" and "code"..... is that correct?

Thanks

Link to comment
Share on other sites

Hi Securitybreach.....

When I was using vnc with Pi and lappy, I wasn't running it as root. But this morning with my usual "search and destroy" approach, when nothing happened as user, I thought I'd see what'd happen if I ran it as root! Well, I found out! :)

  • Like 1
Link to comment
Share on other sites

OK, Securitybreach....I looked at your links and saw ssh -X and ssh -Y mentioned.....yes, I have used it. In fact for the first time the other day. That actually seems better because it's running what you want and not the whole desktop. My goal is to be able to physically connect pi to my laptop with an ethernet cable and not have to rely on a router. I don't have internet at the marina and I'd like to mess around with pi but can't unless I use a very tiny lcd touch screen I bought for it....not good for the eyes.

tnx

Link to comment
Share on other sites

V.T. Eric Layton

 

I agree but you should not be running VNC as root and if you are not running it as root, VNC should not be able to edit /usr/bin/startx.

 

 

Well, actually... it didn't edit usr/bin/startx. It edited/overwrote /home/wa4chq/.Xauthority, which it has permission to do as the user of that directory. It was Neil himself who had to edit /usr/bin/startx (as root) in order to cause X to recreate a new .Xauth file in /home/wa4chq.

 

That's not really the prob, though. I think the prob is the either the vnc server that he's using in Slack or Slack's unusual startx methods. I dunno, really. :(

  • Like 1
Link to comment
Share on other sites

V.T. Eric Layton

 

How about the way I am posting "quotes" and "code"..... is that correct?

Thanks

 

Yeah... fine and dandy, as far as I can see. I usually only use quote for quoted material like directions and instructions and such. I use code for anything in a text file (configuration, script, etc.) or in the command line.

  • Like 2
Link to comment
Share on other sites

securitybreach

I agree but you should not be running VNC as root and if you are not running it as root, VNC should not be able to edit /usr/bin/startx.

 

 

Well, actually... it didn't edit usr/bin/startx. It edited/overwrote /home/wa4chq/.Xauthority, which it has permission to do as the user of that directory. It was Neil himself who had to edit /usr/bin/startx (as root) in order to cause X to recreate a new .Xauth file in /home/wa4chq.

 

That's not really the prob, though. I think the prob is the either the vnc server that he's using in Slack or Slack's unusual startx methods. I dunno, really. :(

 

 

Ah sorry, I missed that as I replied via mobile.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...