Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xpra opens windows as tabs #3723

Closed
nimamox opened this issue Jan 1, 2023 · 7 comments
Closed

Xpra opens windows as tabs #3723

nimamox opened this issue Jan 1, 2023 · 7 comments
Labels
bug Something isn't working client macos

Comments

@nimamox
Copy link

nimamox commented Jan 1, 2023

Describe the bug
Not sure if it's a bug or not. But I've searched a lot and I haven't seen anyone (or the documentation) mentioning this. I use Xpra 4.4 on a remote headless Linux server and my local macOS laptop to have the GUIs of the apps running on Docker containers of the Linux server shown on my macOS laptop, even with streaming audio and OpenGL. Everything works perfectly, but there is an issue that's been bothering me a lot. I run Xpra in the seamless mode, and all windows are shown as tabs of a single window on macOS. Then, I need to detach the tab into a new window manually:

tg_image_1906475866

If it's not clear, what I want is to have each window opened as a separate window, not a new tab. I already have some application running, and I develop some code that I need to respawn regularly, which would be frustrating as each time I have to switch to that tab (for that window) which also mistakenly inherits the size of the previous window (tab) that is already open.

As a side, I have found that the binaries released for macOS can not be run due to an issue with the libcrypto shipped with Xpra. FYI, I resolve this issue by replacing those files with the libcrypto and libssl installed by Homebrew. So, at least this one is a bug!

To Reproduce
Steps to reproduce the behavior:

  1. Server: xpra start --daemon=yes :9898
  2. Client: xpra attach ssh:username@ip:9898 --encoding=h264
  3. Action: Opening any [unrelated] applications
  4. Effect: All windows are shown as new tabs. Need an option to override this so that any window would be result on a new window on the client.

System Information (please complete the following information):

  • Server OS: Headless Ubuntu 22.04.1 LTS (with Ubuntu 20.04 Docker images)
  • Client OS: macOS Ventura 13.0.1
  • Xpra Server Version: v4.4.3-r0
  • Xpra Client Version v4.4-r0
@nimamox nimamox added the bug Something isn't working label Jan 1, 2023
@nimamox nimamox changed the title Xpra seamless mode opens windows as tabs Xpra opens windows as tabs Jan 1, 2023
@totaam
Copy link
Collaborator

totaam commented Jan 2, 2023

I'm going to guess that this is Ventura feature since I have never seen this before.

I've just synced our MacOS build environment with https://github.com/jralls/gtk-osx-build yesterday and there are fixes to GTK, specifically for Ventura - perhaps this will fix things.
I do not have the hardware needed to test this.

@nimamox
Copy link
Author

nimamox commented Jan 2, 2023

You are right. Since I don't have access to a Windows machine or Linux Desktop, to rule out that it's a macOS thing, I had run Xpra client on the Linux server itself which I was accessing through Xpra client (different session) on my macOS, but observed that the tabbing also occurs there! I'd checked the Xpra code and found that while I don't find any code for the tabbing mechanism, there's the very old thread #539 that discusses such mechanism.

Anyways, I just checked on another machine with macOS Monterey (12.5) and apps are not shown as tabs in form of a "merged" window, anymore.

@totaam
Copy link
Collaborator

totaam commented Feb 20, 2023

@nimamox there are updated builds in the MacOS beta area, try 5.0-r32739 or later to get the latest GTK version - which may fix your problem.

You may first need to remove the quarantine to run it until we can figure out the codesign mess Apple created (#3765):

sudo xattr -rd com.apple.quarantine /Applications/Xpra.app

Just be aware that this is a beta release and there are some know issues with it (ie: #3769) so YMMV.

@nimamox
Copy link
Author

nimamox commented Feb 20, 2023

@totaam I was in fact regularly checking your macOS beta releases. I even tried to build Xpra from scratch but I failed.
Thank you for getting back to this issue. I've updated my Linux server and two macOS systems (one Ventura and the other running the older Monterey versions) to the Xpra v5.0, but the situation has not changed at all. Monterey works as expected but Ventura still has the issue.

On my server Ubuntu 22.04:

UBUNTU$ xpra --version
xpra v5.0-r32727 (gf782ffe8f) beta

On my client macOS Ventura 13.2:

macOS$ xpra --version
xpra v5.0-r32739 (ge0ba9f839) beta

Actually, to be thorough, since I run my applications inside docker containers, I modify /etc/xpra/conf.d/55_server_x11.conf to

xvfb = Xvfb +extension GLX +extension Composite -screen 0 \
    8192x4096x24+32 -listen tcp -noreset -auth $XAUTHORITY \
    -dpi 96x96

and add the following line to /etc/xpra/conf.d/60_server.conf

pulseaudio-configure-commands = pactl load-module module-native-protocol-tcp port=34567 auth-ip-acl=172.17.0.0/16

Then, on the server, I run the command below:

UBUNTU$ xpra start --daemon=yes --bind-tcp=0.0.0.0:9898 :9898; sleep 2; export DISPLAY=:9898; xhost +

and run my docker container (with some redaction):

UBUNTU$ sudo docker run --device /dev/dri -v /tmp/.X11-unix:/tmp/.X11-unix --privileged -v $HOME/.Xauthority:/root/.Xauthority -v $HOME/.Xauthority:/home/nima/.Xauthority -e DISPLAY=172.17.0.1:9898 -v $HOME/.ssh:/home/nima/.ssh --rm -it -e PULSE_SERVER=tcp:172.17.0.1:34567 --net=host .....

Then, on macOS:

macOS$ xpra attach tcp://scisrs1:9898/9898

While both my Monterey and Ventura systems run the same Xpra v5.0-r32739, the issue is still only with Ventura:

Ventura:
Ventura

Monterey:
Monterey

In the PyQt app I'm writing, I realized that if I set the window size by issuing QWidget::setFixedSize(w, h), then the my app's window will not be grouped with other windows shown by Xpra as tabs, but a new window! So I assume Xpra should be able to forcefully prevent such undesired tabbing!

@totaam
Copy link
Collaborator

totaam commented Feb 21, 2023

UBUNTU$ xpra start --daemon=yes --bind-tcp=0.0.0.0:9898 :9898; sleep 2; export DISPLAY=:9898; xhost +

Why not just --start="xhost +".
sleep 2 is not going to be reliable.

As for this bug, this is a MacOS feature, try: System Preferences -> Mission Control -> Then untick "Group windows by application".

More details here: Use Stage Manager to organize apps and windows on Mac

Alternatively, you could start an xpra session for each application which would prevent MacOS from seeing these applications as belonging to the same process and therefore ungroup them.

@totaam totaam closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
@nimamox
Copy link
Author

nimamox commented Feb 21, 2023

Thanks for the tip about xhost. It makes sense. As for the grouping, sadly, this doesn't seem to be the case. It's disabled by default on Ventura, and enabling that on Monterey doesn't replicate the issue. Thank you for following up on this. It is not a pressing issue and I guess I'm used to it now. Thank you for your hard work.

@nimamox
Copy link
Author

nimamox commented Oct 18, 2024

Accidentally realized that this is fixed by changing the "Prefer tabs when opening documents" option to "Never".

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client macos
Projects
None yet
Development

No branches or pull requests

2 participants