Thank you both for your responses! I was able to get the desired results by invoking "mutter" followed by the script that calls my java app. So, it was indeed the lack of a window manager that was causing my issue.
On Tue, Feb 4, 2025 at 1:02 PM Kaminski, Thomas <[email protected]> wrote: > Hello, > > yes we do it very often with guacamole. We connect from guacamole to > docker linux container with rdp. Inside the container we start a java > binary in a gnome environment. Not a tomcat or web application. > > The container is a pod inside k8s. A simple container inside a docker host > is possible too. > > > > The container is prepared with the gnome processes. I use supervisord for > this. There are three processes needed and configured in supervisord.conf: > > > > [program:dbus] > > command=/usr/bin/dbus-daemon --system --nofork --nopidfile > > numprocs=1 > > autostart=true > > autorestart=true > > > > [program:xrdp] > > command=/usr/sbin/xrdp --nodaemon > > numprocs=1 > > autostart=true > > autorestart=true > > > > [program:xrdp-sesman] > > command=/usr/sbin/xrdp-sesman -n > > numprocs=1 > > autostart=true > > autorestart=true > > > > > > Inside the Dockerfile I wrote the startscript into the .xsession file: > > RUN echo '#!/usr/bin/env bash' > /home/user/.xsession > > RUN echo '/usr/bin/mutter --x11 --replace /usr/local/script.sh' >> > /home/user/.xsession > > > > Or xterm for debugging: > > RUN echo '/usr/bin/mutter --x11 --replace /usr/bin/xterm' >> > /home/user/.xsession > > > > In result we have a old single user desktop application available like a > modern web application. With borders, drag, resize etc. . > > Regards > Thomas > > > > *Von:* Nick Couchman <[email protected]> > *Gesendet:* Dienstag, 4. Februar 2025 17:03 > *An:* [email protected] > *Betreff:* Re: xrdp - initial program - window border issue > > > > *WARNING: This email originated outside of the company. DO NOT CLICK links > or attachments or enter any information into forms unless you trust the > sender and know the content is safe.* > > On Mon, Feb 3, 2025 at 4:32 PM Sooth Sayuh <[email protected]> wrote: > > - using guacamole to connect to a linux backend running xrdp. > > - using the "initial program" option to kick off a short shell script. > > - the shell script runs a java app that uses gnome (gdm) to display an > interactive window. > > > > problem 1: > > this window does not have any window borders (cannot drag, resize, etc.) - > normally it would on a full gnome desktop. > > > > > > If you're using the "initial program" option to run a shell script that > starts the application, you have to make sure that this shell script also > kicks off a window manager (gnome, xfce, fluxbox, blackbox, etc.). It's > quite likely that you're running an application in xrdp but no window > manager, which is what handles all of the handles, sizing, etc. Your shell > script can launch the window manager in the background (& at the end of > that line) and then the application you're wanting to run, and that should > do the trick. If you're wanting to just launch a particular application, I > highly suggest that you find a really light-weight window manager - > something like fluxbox or blackbox, even twm - that doesn't add a bunch of > extra stuff (side panels, settings, menus, etc.) that you are trying to > avoid people seeing, anyway. > > > > certain functions in this app will open a second window (e.g. an xterm > window) > > problem 2: > > the new window(s) can never be focused on or typed in. the new window(s) > display over the original app window but the focus always remains in the > original app window (behind the new windows) > > > > are these 2 problems expected behavior or are there settings/options to > address them? > > > > > > I suspect that both of these issues have the same root cause of the window > manager not running. > > > > -Nick > > > > KION Information Management Services GmbH > Sitz der Gesellschaft | Registered Office: Frankfurt am Main (Germany) > Registergericht | Court of Registration: Frankfurt am Main (Germany), HRB > 110454 > USt-Id-Nr. | VAT No. DE 254777238 > Geschäftsführung | Managing Director: Hansjörg Heinrich > >
