wa4chq Posted April 18, 2017 Share Posted April 18, 2017 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 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted April 18, 2017 Share Posted April 18, 2017 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? 1 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted April 18, 2017 Share Posted April 18, 2017 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 1 Quote Link to comment Share on other sites More sharing options...
wa4chq Posted April 18, 2017 Author Share Posted April 18, 2017 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 but this is what I got instead How about the way I am posting "quotes" and "code"..... is that correct? Thanks Quote Link to comment Share on other sites More sharing options...
wa4chq Posted April 18, 2017 Author Share Posted April 18, 2017 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! 1 Quote Link to comment Share on other sites More sharing options...
wa4chq Posted April 18, 2017 Author Share Posted April 18, 2017 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 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted April 18, 2017 Share Posted April 18, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted April 18, 2017 Share Posted April 18, 2017 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. 2 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted April 18, 2017 Share Posted April 18, 2017 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. 2 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted April 18, 2017 Share Posted April 18, 2017 Sometimes code will not show up correctly if you post it as quotes. 1 Quote Link to comment Share on other sites More sharing options...
wa4chq Posted April 19, 2017 Author Share Posted April 19, 2017 OK you guys, thanks again for help and info.....really appreciate it. 2 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted April 19, 2017 Share Posted April 19, 2017 Hey! New avatar. COOL! 1 Quote Link to comment Share on other sites More sharing options...
wa4chq Posted April 20, 2017 Author Share Posted April 20, 2017 Mifune in blue I calls it.... 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted April 20, 2017 Share Posted April 20, 2017 Yeah, that'll work. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.