Jump to content


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


  • Please log in to reply
13 replies to this topic

#1 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 18 April 2017 - 03:11 PM

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:

Quote

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

Posted Image
REGISTERED LINUX USER #547579


#2 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,255 posts

Posted 18 April 2017 - 03:42 PM

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? :(

#3 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,163 posts

Posted 18 April 2017 - 04:25 PM

View PostV.T. Eric Layton, on 18 April 2017 - 03:42 PM, said:

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.archlin...ex.php/TigerVNC

Personally I would run X11Forwarding over ssh if I were you instead of VNC: https://wiki.archlin...#X11_forwarding
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#4 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 18 April 2017 - 04:28 PM

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
Posted Image
but this is what I got instead
Posted Image
How about the way I am posting "quotes" and "code"..... is that correct?
Thanks

Posted Image
REGISTERED LINUX USER #547579


#5 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 18 April 2017 - 04:31 PM

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!  :)

Posted Image
REGISTERED LINUX USER #547579


#6 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 18 April 2017 - 04:38 PM

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

Posted Image
REGISTERED LINUX USER #547579


#7 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,255 posts

Posted 18 April 2017 - 04:42 PM

View Postsecuritybreach, on 18 April 2017 - 04:25 PM, said:


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. :(

#8 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,255 posts

Posted 18 April 2017 - 04:45 PM

View Postwa4chq, on 18 April 2017 - 04:28 PM, said:


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.

#9 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,163 posts

Posted 18 April 2017 - 05:01 PM

View PostV.T. Eric Layton, on 18 April 2017 - 04:42 PM, said:

View Postsecuritybreach, on 18 April 2017 - 04:25 PM, said:

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.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#10 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 23,163 posts

Posted 18 April 2017 - 05:17 PM

Sometimes code will not show up correctly if you post it as quotes.
Posted ImagePosted Image Posted Image
CNI Radio/G+ Profile/Configs/PGP Key/comhack π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#11 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 19 April 2017 - 09:24 AM

OK you guys, thanks again for help and info.....really appreciate it.

Posted Image
REGISTERED LINUX USER #547579


#12 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,255 posts

Posted 19 April 2017 - 10:49 AM

Hey! New avatar. COOL!

#13 OFFLINE   wa4chq

wa4chq

    Message Mogul

  • Members
  • PipPipPipPipPip
  • 433 posts

Posted 20 April 2017 - 09:33 AM

Mifune in blue I calls it....

Posted Image
REGISTERED LINUX USER #547579


#14 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum Admins
  • 21,255 posts

Posted 20 April 2017 - 05:48 PM

Yeah, that'll work. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users