X11 Forwarding

Post

Posted
Rating:
#1 (In Topic #1379)
Regular
rj71 is in the usergroup ‘Regular’
 Hi All! Can Gambas be ran over X11 Forwarding? I can connect via ssh with the -X switch and run any GUI app on the remote server but not Gambas.
I am supposed to do something else? I've been using Linux for 10 or 11 years now but I'm far from an expert so I'm not sure what to do. Is there something about Gambas that doesn't allow it to be ran over X11? I know I can use remote desktop but I'd much rather use X to do this. Thanks for any input.
Online now: No Back to the top

Post

Posted
Rating:
#2
Regular
rj71 is in the usergroup ‘Regular’
Sorry, I mean the Gambas IDE, not an individual app created with Gambas.
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
rj71 is in the usergroup ‘Regular’
 This is the error I get:


libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/card0: Permission denied


(gambas3:1398): Gdk-ERROR **: 10:57:57.754: The program 'gambas3' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 742 error_code 1 request_code 155 (unknown) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
rj71 is in the usergroup ‘Regular’
 I have been troubleshooting and doing some testing as well.
X11 Forwarding the Gambas IDE:
Works on Debian 11 (Gambas 3.15.2)
Fails on Debian 12 (Gambas 3.18.0) and Ubuntu 22 (Gambas 3.16.3)
I don't have a spare Ubuntu 20 or 24 ready to go so I'll install a quick vm and test that later today.

So with Debian 12 and Ubuntu 22, anyone have any idea why I can't do x11 forwarding?
Googling the error messages didn't get me anywhere.
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
rj71 is in the usergroup ‘Regular’
 Ubuntu 20 -> works!
Be back later with update on ubuntu 24. I have a feeling it's not going to work.
Online now: No Back to the top

Post

Posted
Rating:
#6
Guru
BruceSteers is in the usergroup ‘Guru’
 different systems can set up the main user differently.

I remember one Debian version the main user has to be added to sudo group where as in others they are already added.

going by your errors i would say a permissions problem that is okay on some, not okay on others.

clearly not a bug in gambas though as it works with some configurations. so it must be configuration.
Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
rj71 is in the usergroup ‘Regular’

BruceSteers said

different systems can set up the main user differently.

I remember one Debian version the main user has to be added to sudo group where as in others they are already added.

going by your errors i would say a permissions problem that is okay on some, not okay on others.

clearly not a bug in gambas though as it works with some configurations. so it must be configuration.

Thanks Bruce. I'll start investigating it as a user issue in the OS. I also just tested Ubuntu 24, it's a no-go.
Online now: No Back to the top

Post

Posted
Rating:
#8
Regular
rj71 is in the usergroup ‘Regular’
 I'm not making any progress on this. Something has obviously changed in Debian 12 and Ubuntu 22 & 24 but I don't know what. I think I will give up on this and just use remote desktop even though that was causing me problems before as well.
Online now: No Back to the top

Post

Posted
Rating:
#9
Regular
rj71 is in the usergroup ‘Regular’
 OMG, remote desktop is even more frustrating. Even when it's not disconnecting, which is a lot, it's so slooooooooooow even on my LAN. Typing and scrolling in the Gambas IDE is slow, I have to stop and let it catch up…that is not very productive. Does no one else use the Gambas IDE over ssh with x11 forwarding and Debian 12 or Ubuntu 22/24? Would anyone mind a test with a vanilla Deb 12 VM and Gambas3 installed and try to connect via ssh and -X switch?
Online now: No Back to the top

Post

Posted
Rating:
#10
Guru
BruceSteers is in the usergroup ‘Guru’
 Hmm. the new debian and ubuntu use wayland by default not X11, that's changed.

It may seem a silly question but are they the default wayland desktops translating through xwayland or have you set up x11 desktop sessions on the remote machines?
Online now: No Back to the top

Post

Posted
Rating:
#11
Regular
rj71 is in the usergroup ‘Regular’

BruceSteers said

Hmm. the new debian and ubuntu use wayland by default not X11, that's changed.

It may seem a silly question but are they the default wayland desktops translating through xwayland or have you set up x11 desktop sessions on the remote machines?

I was also thinking if Wayland might have something to do with it too, Bruce. So I checked with "echo $XDG_SESSION_TYPE" and x11 is returned on the target machine. After I ssh into the server with the -X switch, I can run xeyes, xclock, pluma, mate-calc and a few other gui apps on my local machine. Per some info I found on stackexchange, the fact that I can run any of those apps means x11 forwarding is working just fine so there is something (WHAT??  :D ) that x11 doesn't like about the Gambas IDE app. I haven't completely given up on this yet, in my previous posts I allowed my frustration to get to me  :D.  I'll revisit the error message i get and keep digging.
Online now: No Back to the top

Post

Posted
Rating:
#12
Trainee

rj71 said

OMG, remote desktop is even more frustrating. Even when it's not disconnecting, which is a lot, it's so slooooooooooow even on my LAN. Typing and scrolling in the Gambas IDE is slow, I have to stop and let it catch up…that is not very productive. Does no one else use the Gambas IDE over ssh with x11 forwarding and Debian 12 or Ubuntu 22/24? Would anyone mind a test with a vanilla Deb 12 VM and Gambas3 installed and try to connect via ssh and -X switch?

try on terminal:
export LIBGL_ALWAYS_SOFTWARE=1

for me this solution works. Eventually you can use the -C flag to compress the data in the ssh tunnel if you want to use it through the internet.
In my experience it is faster an xrdp server (TLS 1.3) than an ssh tunnel for example in scrolling, but it depends a lot on the machines on which xrdp or ssh runs
Online now: No Back to the top

Post

Posted
Rating:
#13
Regular
rj71 is in the usergroup ‘Regular’

rhoct said

rj71 said

OMG, remote desktop is even more frustrating. Even when it's not disconnecting, which is a lot, it's so slooooooooooow even on my LAN. Typing and scrolling in the Gambas IDE is slow, I have to stop and let it catch up…that is not very productive. Does no one else use the Gambas IDE over ssh with x11 forwarding and Debian 12 or Ubuntu 22/24? Would anyone mind a test with a vanilla Deb 12 VM and Gambas3 installed and try to connect via ssh and -X switch?

try on terminal:
export LIBGL_ALWAYS_SOFTWARE=1

for me this solution works. Eventually you can use the -C flag to compress the data in the ssh tunnel if you want to use it through the internet.
In my experience it is faster an xrdp server (TLS 1.3) than an ssh tunnel for example in scrolling, but it depends a lot on the machines on which xrdp or ssh runs

Sorry for the late reply…holidays and such. Thanks for the tip but the 'export LIBGL_ALWAYS_SOFTWARE=1' do you mean on the local machine BEFORE I try to connect via ssh or execute that on the remote machine?
Online now: No Back to the top

Post

Posted
Rating:
#14
Regular
rj71 is in the usergroup ‘Regular’

rj71 said

rhoct said

rj71 said

OMG, remote desktop is even more frustrating. Even when it's not disconnecting, which is a lot, it's so slooooooooooow even on my LAN. Typing and scrolling in the Gambas IDE is slow, I have to stop and let it catch up…that is not very productive. Does no one else use the Gambas IDE over ssh with x11 forwarding and Debian 12 or Ubuntu 22/24? Would anyone mind a test with a vanilla Deb 12 VM and Gambas3 installed and try to connect via ssh and -X switch?

try on terminal:
export LIBGL_ALWAYS_SOFTWARE=1

for me this solution works. Eventually you can use the -C flag to compress the data in the ssh tunnel if you want to use it through the internet.
In my experience it is faster an xrdp server (TLS 1.3) than an ssh tunnel for example in scrolling, but it depends a lot on the machines on which xrdp or ssh runs

Sorry for the late reply…holidays and such. Thanks for the tip but the 'export LIBGL_ALWAYS_SOFTWARE=1' do you mean on the local machine BEFORE I try to connect via ssh or execute that on the remote machine?

WOW! I ran 'export LIBGL_ALWAYS_SOFTWARE=1' on the remote Deb12 that was the target then ran gambas3 and it worked!! Thank you!! I can now run the Gambas3 IDE over ssh to a Deb12 machine!
I'm going to test this on Ubuntu 22 and 24 later today.
Online now: No Back to the top

Post

Posted
Rating:
#15
Trainee
 yes on the remote machine
it's ok also in ubuntu
Online now: No Back to the top

Post

Posted
Rating:
#16
Regular
rj71 is in the usergroup ‘Regular’

rhoct said

yes on the remote machine
it's ok also in ubuntu

Thanks for that info. I tried that and it did work but unfortunately the Gambas IDE was incredibly slow and often unresponsive over ssh even with the -C switch and after a few weeks it just really annoyed me. Maybe it's my LAN or my old pcs but it was just too slow to use that way. I've moved on to just sharing my Gambas projects with Samba.
Online now: No Back to the top
1 guest and 0 members have just viewed this.