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

Unable to move or resize certain electron js apps #3816

Closed
rmatte opened this issue Apr 5, 2023 · 9 comments
Closed

Unable to move or resize certain electron js apps #3816

rmatte opened this issue Apr 5, 2023 · 9 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@rmatte
Copy link

rmatte commented Apr 5, 2023

Describe the bug
Unable to move or resize electron js apps (tested with Termius)

To Reproduce
Steps to reproduce the behavior:

  1. On an x86_64 Ubuntu Server, install the latest version of xpra.
  2. Install Termius on x86_64 Ubuntu Server host using the deb file from their website: Termius.deb from https://termius.com
  3. Install a dependency which Termius requires but doesn't seem to get installed automatically via apt when installing the deb: apt-get install libasound2
  4. Install xpra on Windows 11 client.
  5. Start termius with xpra on the server: xpra start :100 --start=termius-app
  6. Create a shortcut on the windows host with the following and run it then authenticate with the host: "C:\Program Files\Xpra\Xpra_cmd.exe" attach ssh/USERNAME@HOSTNAME:22/100 --window-close=ignore --opengl=yes --session-name=termius --title=Termius
  7. Notice that you can't move or resize the app with xpra once it's open. It can be successfully maximized but no movement or size changes are possible beyond that.

System Information (please complete the following information):

  • Server OS: Ubuntu Server 22.10
  • Client OS: Windows 11
  • Xpra Server Version 4.4.4-r0-1
  • Xpra Client Version 4.4.4-r1

Additional context
Electron js apps don't have window decorations around them, they manage their own window movement and sizing. It would be nice if there were a way to either handle this within xpra automatically or provide an option to add a window border on the client side to allow movement and resizing.

Another good example of an app suffering from the same issue is Tabby https://tabby.sh. Both Tabby and Termius are popular graphical terminal clients with a modern feature set and it would be very nice to be able to use them with xpra. As it stands unless they are being used in maximized mode they are basically unusable.

@rmatte rmatte added the bug Something isn't working label Apr 5, 2023
@rmatte rmatte changed the title Unable to resize electron js apps Unable to move or resize electron js apps Apr 5, 2023
@totaam
Copy link
Collaborator

totaam commented Apr 6, 2023

3.1 is not a supported version, please try something newer, ideally 4.4.x

This does work fine with newer versions.

@rmatte
Copy link
Author

rmatte commented Apr 7, 2023

3.1 is not a supported version, please try something newer, ideally 4.4.x

This does work fine with newer versions.

I've installed 4.4.4-r0-1 on the server instead and the same issue occurs. I have updated the version info in this bug to reflect that. I'm unable to move or resize either Termius or Tabby while running 4.4.4-r0-1 on the server side and 4.4.4-r1 on the windows 11 client side.

You said this works fine with newer versions, is there some trick to getting this working if that's the case? I've tried everything that I can think of at this point.

@totaam
Copy link
Collaborator

totaam commented Apr 8, 2023

Are there any applications in the Ubuntu standard repositories that I can use for testing?
(not downloading untrusted applications from random URLs)

totaam added a commit that referenced this issue Apr 8, 2023
@rmatte
Copy link
Author

rmatte commented Apr 9, 2023

Are there any applications in the Ubuntu standard repositories that I can use for testing? (not downloading untrusted applications from random URLs)

There don't tend to be any electron js apps hosted in apt, unless you add third party repos. Canonical hosts them in snapcraft: https://snapcraft.io/store

There are plenty of other electron apps including some very popular / well known ones such as slack, discord, skype, signal, whatsapp, vscode, tidal, github desktop, etc... I would wager that you'd see the same problem that I'm describing with any of those.

https://en.wikipedia.org/wiki/List_of_software_using_Electron

@totaam
Copy link
Collaborator

totaam commented Apr 9, 2023

I really don't have time to try random applications that aren't easily installable, sorry.

If your desktop is running Wayland, you may want to try with Xorg instead.

@rmatte
Copy link
Author

rmatte commented Apr 9, 2023

The xpra host is an Ubuntu Server install that I only interract with over ssh. Any X11 related dependencies installed are whatever ones the xpra .deb file told apt to install as dependencies when I installed it. I see that xpra has an xorg.conf file that it uses to create a dummy xorg session. I do see some wayland libs installed but I'm not sure if xpra is configured to make use of those by default or what. There's no xserver or window manager running on the server itself other than whatever xpra is doing. The client side is a windows box with the windows xpra package installed.

I've checked other electron apps and all of the ones I've tested so far seem to draw in such a way that I can move or resize them in xpra. The only two I'm not able to do that in are Tabby (https://tabby.sh) and Termius (https://termius.com) which are the main packages that I wanted to use via xpra. They both work fine in a normal Xorg or Wayland session when I've tested them in the past.

The only way I've found to install one of these from the built in ubuntu package managers is to use snap to install Termius in Ubuntu (snap install termius), but then because of how snap bundles it's packages they don't play nicely at all with xpra, so that's a no go. The reason it's not in apt is because it's already in snap so Canonical aren't going to bother putting it in both places. Termius is a commercial app so it's not like it's some random project on github.

I have to install the .deb file from the Termius website using apt (apt install ./Termius.deb) to get it to display via xpra. I've tried to find other packages in apt which have the same move/resize issue but I haven't been able to find any. In any case, it sounds like you're not really interested in installing Termius even inside of a sandbox to try to track down what's going on here so I'm just going to close this out as I don't have the energy to jump through these hoops just to get this looked at.

@rmatte rmatte closed this as completed Apr 9, 2023
@rmatte rmatte changed the title Unable to move or resize electron js apps Unable to move or resize certain electron js apps Apr 9, 2023
@totaam totaam added the help wanted Extra attention is needed label Apr 10, 2023
@totaam
Copy link
Collaborator

totaam commented Apr 10, 2023

There are plenty of other electron apps including some very popular / well known ones ...

Then later:

I've checked other electron apps and all of the ones I've tested so far seem to draw in such a way that I can move or resize them in xpra. The only two I'm not able to do that in are Tabby and Termius.

This right here is why I had asked for specific and reproducible installation instructions.
In the end, it's only a tiny subset of electron apps that have this problem so I could have wasted quite a bit more time on this ticket already.

The only way I've found to install one of these from the built in ubuntu package managers is to use snap ...

That's not encouraging for debugging purposes.

Termius is a commercial app so it's not like it's some random project on github.

Commercial apps are usually more problematic than open-source ones due to their reinvent the wheel attitude.

In any case, it sounds like you're not really interested in installing Termius even inside of a sandbox to try to track down what's going on here

Let's keep this ticket open since the issue still exists.
All I am saying is that I don't have time to spend on this issue, someone else might.

@totaam totaam reopened this Apr 10, 2023
@totaam
Copy link
Collaborator

totaam commented Feb 6, 2024

@rmatte There were some window geometry fixes in 5.0.5 - does that help?

@totaam
Copy link
Collaborator

totaam commented Mar 20, 2024

There were more major geometry fixes in 5.0.7.

Not heard back, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants