WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: xhosts on picore ?  (Read 2427 times)

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
xhosts on picore ?
« on: May 12, 2022, 06:25:14 AM »
Hello guys,

I want to have an x11 access control form my pi to my computer but i don't see the command xhost to be able to do that and when I tried to connect to a server using X :1
And the try to execute a command like
Code: [Select]
xterm --display I get an error that say
cannot display.
I also remove the line -nolisten tcp from my .Xsession file in /home/tc.
Is there a substitue of this command for tiny core or am I not doing it in the right way?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14534
Re: xhosts on picore ?
« Reply #1 on: May 12, 2022, 08:44:28 AM »
Are the x11vnc or remmina extensions of any use?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: xhosts on picore ?
« Reply #2 on: May 12, 2022, 09:19:42 AM »
Hi MrToga
... I want to have an x11 access control form my pi to my computer ...
Are you connecting with ssh? If you are, then you might want to try X forwarding like this:
Code: [Select]
ssh -X ....

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: xhosts on picore ?
« Reply #3 on: May 13, 2022, 02:54:43 AM »
Hello guys,


I just want to control my pi with other server and I want to control it only with x11 (because my server doesn't handle tunneling ssh) using this command for example :

Code: [Select]
xterm -display my.adress.ip:0.0
But I get an error :
Code: [Select]
aterm: can't open display 192.168.3.16:0.0
I also try to install xhost from source but it doesn't seem to work ( link : https://www.x.org/archive//individual/app/ )
Because when I use
Code: [Select]
xhost + I get a return :
Code: [Select]
access control disabled, clients can connect from any host but the previous command still have the same error.
« Last Edit: May 13, 2022, 02:59:42 AM by MrToga »
It's fine

Offline CNK

  • Full Member
  • ***
  • Posts: 235
Re: xhosts on picore ?
« Reply #4 on: May 13, 2022, 07:41:01 PM »
have you tried adding an /etc/Xn.hosts file instead of using xhost? I believe that's read by the X server directly, so you shouldn't need xhost if using that.

The format is simply a newline-separated list of allowed host names (or IP addresses). The "n" in the file name is for the display number. eg. /etc/X0.hosts

I think putting "ALL" in there disables access restrictions entirely but my memory is very buggy and I can't find confirmation of that anywhere now. Other methods are described here though.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: xhosts on picore ?
« Reply #5 on: May 16, 2022, 12:35:01 AM »
Hello guys,

Maybe my network port are closed ? Because when tried to do my xterm with the localhost ip adress I still can't open my display so I tried to put a file in /home/tc/.X.d

That said :
Code: [Select]
DisallowTCP=falseBut still doesn't work.
I also found something here (https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml) in the section Fontpath but I don't know how to use it.
Any toughts on how to open all my port?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14534
Re: xhosts on picore ?
« Reply #6 on: May 16, 2022, 02:40:55 AM »
Are you sure X is running on your RPi?

Can you ssh into it and run x11vnc?

Offline CNK

  • Full Member
  • ***
  • Posts: 235
Re: xhosts on picore ?
« Reply #7 on: May 16, 2022, 04:11:40 AM »
I also found something here (https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml) in the section Fontpath but I don't know how to use it.
Any toughts on how to open all my port?

From the computer that you're trying to run the X client program on, you can use nmap to show whether port 6000 is open. That's the port that the Xorg server listens at for client connections:
Code: [Select]
n map -Pn -p 6000 192.168.3.16
(remove the space between 'n' and 'map' - the forum is playing its "server error" tricks with me again and it's decided that program's name is a dirty word)
(assuming that 192.168.3.16 is still the IP address of the computer you want the window to display on, based on your earlier post)

xorg.conf shouldn't have anything to do with it, unless as Juanito suggests X isn't starting up in the first place. It's unclear to me whether you're trying to display programs running on your 'computer' on the Pi, or programs running on the Pi on your 'computer' though.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: xhosts on picore ?
« Reply #8 on: May 16, 2022, 05:00:53 AM »
Hi juanito,

After installing x11vnc the vnc connection worked fine with my ip adress.
And after checking my port tcp6000 with nmap like CNK say it show me that this port is closed.
How can I open it?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14534
Re: xhosts on picore ?
« Reply #9 on: May 16, 2022, 05:06:56 AM »
I wonder if the problem is here:
Code: [Select]
ssh -X tc@192.168.1.101
tc@192.168.1.101's password:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated

Code: [Select]
cat ~/.ssh/ssh_config
Host *                 
ForwardX11 yes
ForwardX11Trusted yes
XAuthLocation /usr/local/bin/xauth

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14534
Re: xhosts on picore ?
« Reply #10 on: May 16, 2022, 05:09:00 AM »
..and:
Code: [Select]
ssh -Y tc@192.168.1.101
tc@192.168.1.101's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14534
Re: xhosts on picore ?
« Reply #11 on: May 16, 2022, 05:11:09 AM »
As mentioned earlier, I can run x11vnc on an RPi3 and use vinagre on an RPi4 to access its gui remotely.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: xhosts on picore ?
« Reply #12 on: May 16, 2022, 05:17:09 AM »
When I try :
Code: [Select]
ssh -X tc@192.168.3.16It worked so I don't know where's the problem.
I still can't use
Code: [Select]
xterm -display 192.168.3.16:0.0
It's fine

Offline CNK

  • Full Member
  • ***
  • Posts: 235
Re: xhosts on picore ?
« Reply #13 on: May 17, 2022, 12:49:15 AM »
Quote
And after checking my port tcp6000 with nmap like CNK say it show me that this port is closed.
How can I open it?

That means it's not a host permissions problem, but Xorg either isn't running, is running with TCP disabled, or perhaps there's a firewall blocking it.

Actually I now see the problem there in your first post (which I should have noticed earlier really because I'm aware of this trap):

Quote
I also remove the line -nolisten tcp from my .Xsession file in /home/tc.

Xorg since version 1.17 changed the default of enabled listening for TCP connections. Now the "-nolisten tcp" argument does nothing but you need to add the new "-listen tcp" argument if you want to enable remote connections. So in the first line of ~/.xsession, you want:

Code: [Select]
/usr/local/bin/Xorg -listen tcp &

Instead of:

Code: [Select]
/usr/local/bin/Xorg -nolisten tcp &

(the latter now acting the same as if Xorg was started with no arguments)

When I try :
Code: [Select]
ssh -X tc@192.168.3.16It worked so I don't know where's the problem.
I still can't use
Code: [Select]
xterm -display 192.168.3.16:0.0

Juanito is suggesting that you use SSH X port forwarding, in which case you don't use the "-display 192.168.3.16:0.0" bit. He also assumes that you want xterm running on the pi to display on your 'computer', but from what you've posted it seems to me that it could be the other way round. You may need to explain what you're trying to do more clearly if you still have problems.

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: xhosts on picore ?
« Reply #14 on: May 17, 2022, 01:16:33 AM »
Hi CNK,

After I've tried what you told me it works !
I also needed xhost +
Thanks a lot and sorry for my bad explanation, my english is not really good.
« Last Edit: May 17, 2022, 01:24:24 AM by MrToga »
It's fine