Solved How to get x11forwarding from vm to host?

Entirely different way. What you have is a graphics console you can access through VNC.

With remote X you connect from system A to system B, run the application on B and get the actual window/widgets/whatnot of that application on system A. The upshot of this is that you do not need to have a "full" or "complete" X environment on B.
It is, but I didn't see the OP specifying that X forwarding being essential or anybody asking if other options would be acceptable. There are a few situations where literal X forwarding is the solution, but it hasn't been established that any of them apply here If VNC isn't an option, I was expecting that the post would just get ignored. But, given the amount of posts and people involved, it seemed to be prudent to try to find out whether X forwarding really was actually required, or if there as more of a hyperfixation on the thing the OP was trying.

Plus, there are no-install VNC clients, so that's potentially an option while the rest of this gets sorted out.
 
1000042685.png
 
I trid waypipe just not, and it is able to work. But the middle of the xterm opened by xwayland-satellite is slightly blurry, and I'm not particularly fond of xwayland.
1000042687.png
 
It is, but I didn't see the OP specifying that X forwarding being essential or anybody asking if other options would be acceptable. There are a few situations where literal X forwarding is the solution, but it hasn't been established that any of them apply here If VNC isn't an option, I was expecting that the post would just get ignored. But, given the amount of posts and people involved, it seemed to be prudent to try to find out whether X forwarding really was actually required, or if there as more of a hyperfixation on the thing the OP was trying.
Please, go use wayland and do not mix in discussions about X11. It is not your business.
 
I trid waypipe just not, and it is able to work. But the middle of the xterm opened by xwayland-satellite is slightly blurry, and I'm not particularly fond of xwayland.
Perhaps there is the problem, perhaps you have wayland installed and running X11 as xwayland on top of the wayland crap.
 
but I didn't install xwayland both on guest or on host. And wayland is a dependency of xorg
Perhaps not consciously, but wayland seems to be there:
1) you used waypipe
2) xwayland is an X server that runs on top of wayland.

wayland is meant to substitute X11 (like substituting apples with sausages), and since those that have wayland cannot run anymore the omnipresent X clients, they must install an X server on top of wayland, for that is xwayland.

Wayland is really fantastic! It must be obligatory to install it!

(BTW: Perhaps you are using a so called "Desktop" that run on wayland. Wayland is sure not a dependency of Xorg.)
 
Perhaps not consciously, but wayland seems to be there:
1) you used waypipe
2) xwayland is an X server that runs on top of wayland.

wayland is meant to substitute X11 (like substituting apples with sausages), and since those that have wayland cannot run anymore the omnipresent X clients, they must install an X server on top of wayland, for that is xwayland.

Wayland is really fantastic! It must be obligatory to install it!

(BTW: Perhaps you are using a so called "Desktop" that run on wayland. Wayland is sure not a dependency of Xorg.)
I was using startx to start a desktop before, and I didn't install any wayland compositor. I asked the AI and it said that I can use waypipe, so I installed a wayland wm on host and xwayland-satellite in the guest.
wayland is really a dependency of xorg, if you pkg ins xorg, the wayland will be installed at the same time
 
Perhaps not consciously, but wayland seems to be there:
1) you used waypipe
2) xwayland is an X server that runs on top of wayland.

wayland is meant to substitute X11 (like substituting apples with sausages), and since those that have wayland cannot run anymore the omnipresent X clients, they must install an X server on top of wayland, for that is xwayland.

Wayland is really fantastic! It must be obligatory to install it!

(BTW: Perhaps you are using a so called "Desktop" that run on wayland. Wayland is sure not a dependency of Xorg.)
Actually, I think waypipe is not bad, but most of apps on my guests are just X11, and having each one go through Xwayland is too tupid, and the windows also get blurry.
 
Please, go use wayland and do not mix in discussions about X11. It is not your business.
Kindly take your own advice here. Hopefully some kind mod can just delete my posts from in here because it's just not a valuable use of my time responding to people that can't be bothered to read, or understand what I've posted. The first reference I see to Wayland is after my posts were made. The solution I proposed gets a GUI out of it. It's more or less how I get GUI access to my VMs, and I fail to see why using an SSH tunnel from that point is going to break that method any more than anything else.
 
Settle down folks.

hedwards nothing wrong with your suggestions, and the graphics console/VNC connection is a fine way to access the GUI of a VM. But we're dealing with SSH and X-Forwarding here.
 
One quirk I noticed running Xwayland, the captive X server under wayland, is that $DISPLAY is set to :1 by default, not :0 as is normal for non-wayland X11. It's easy to miss if you have scripts or aliases that set DISPLAY to :0. And a lot of web wikis and howtos will usually specify :0 in command examples. At least, it came up as :1 on my box. You can check what it is on your system by just saying 'echo $DISPLAY' in any X terminal. That's the kind of thing that could break X forwarding, perhaps.
 
I finally knew why I couldn't use X11 forwarding. Previously, both the host and the remote had empty hostnames. After I set different hostnames for them, it is working now.
 
But it takes quite a while to open xterm, but I don't know why
Surprising, especially when everything is on the same physical machine.

Opening an xterm on a remote machine over the LAN (with pubkey authentication) takes about 1 second here, going over gigabit ethernet.
$ ssh -X hostname xterm

Opening slow might be caused by a long time spent negotiating the ssh authentication rather than opening the xterm itself. If you add a '-v' option to ssh you will get some trace from the negotiation between the two sides, eg try
$ ssh -v -X hostname xterm
You might be able to spot in the trace if it's hanging for some time at any particular place... which may give a clue about why it's slow.
 
I found quite a good description here of how X11 forwarding over ssh works. It's quite a complicated process. There must be something different happening in the way you are doing forwarding from a VM, because I use this all the time between different machines over the LAN and haven't seen any real problems for years; the only real gotcha I see sometimes is when someone forgets to allow ssh through a firewall. Otherwise it's very dependable, works well and nice and fast.
 
Back
Top