Change the screen resolution for web usage since the latest image
Almaric78 opened this issue Β· comments
Hello since the lastest image I have the impression that the container does not use JWM (the line [supervisor ] loading service 'jwm'... has disappeared) and the screen resolution has changed for use in web mode. How to change resolution for text and smaller screen (not in firefox settings but directly in alpine/linux settings)?
I installed xrandr (with apk add xrandr) but it's tedious to change it with and when the container restarts again the problem comes back.
Thank you very much,
Best regards
Yes, I had to bring back Openbox instead of JWM. This change has been done in v4.3.0. See https://github.com/jlesage/docker-baseimage-gui/releases/tag/v4.3.0
I'm not sure if I fully understand your question, but the (default) screen resolution is still controlled via DISPLAY_WIDTH
/ DISPLAY_HEIGHT
environment variables. Also, the "remote resizing" functionality when using a web browser to access the application still works. No change in these areas.
Thank you for your reply. I want to be able to dynamically change the resolution when I am connected with http. I achieved this with arandr (after : apk add arandr) and put the call directly into the startapp.sh before the exec and it works. Great !!
Another thing: what is the user app password? I want to do "sudo su -" in a xterm and it asks me for password of app to become root and I don't have it..
Do you know also how to dynamically change the dark mode ? is it possible to pass a special parameter to Openbox for it ?
Thanks a lot
I want to be able to dynamically change the resolution when I am connected with http.
You know that the resolution can be automatically adjusted to the browser's window dimensions?
I achieved this with arandr (after : apk add arandr) and put the call directly into the startapp.sh before the exec and it works. Great !!
I don't see/understand your use case, but great if you found a way to achieve it!
Another thing: what is the user app password? I want to do "sudo su -" in a xterm and it asks me for password of app to become root and I don't have it..
There is no password for this user. Where/how are you trying to execute sudo su -
? More details would help provide a better answer.
Do you know also how to dynamically change the dark mode ? is it possible to pass a special parameter to Openbox for it ?
Currently, the dark mode can be adjusted "dynamically" by changing the DARK_MODE
environment variable. When dark mode is enabled, multiple things need to be done because multiple components have to be configured properly: Openbox, the web interface and the application itself.
Hello,
I have put this code in the startapp.sh file :
echo "My-Code"
arandr # (if I had install it before with apk add arandr, in order to change dynamically the resolution)
DISPLAY=:0.0
export DISPLAY
xterm&
A small xterm terminal opens at the init of the container. I am logged in it with app user. I want to become the root user with "sudo su -" but it want a password that I didn't have, and the password empty doen't run..
Where is the best place for this code ?
Where is the code executed for the dark mode at the opening ?
I don't want to use the docker env value because I want to change it dynamically into the app.
Thanks
I have put this code in the startapp.sh file :
echo "My-Code"
arandr # (if I had install it before with apk add arandr, in order to change dynamically the resolution)
DISPLAY=:0.0
export DISPLAY
xterm&
The startapp.sh
is usually the place where to start the main application your container implements. So if it's xterm
, the file would only contain:
#!/bin/sh
exec /usr/bin/xterm
This file is executed as the user app
, which is defined by the USER_ID
and GROUP_ID
environment variables. So if you set these variables to 0
, the xterm
will run as root
.
A small xterm terminal opens at the init of the container. I am logged in it with app user. I want to become the root user with "sudo su -" but it want a password that I didn't have, and the password empty doen't run..
There is no password set for the app
user. So if you really need one, I guess you have to set it via the passwd
command?
Where is the code executed for the dark mode at the opening ?
Here are a few pointers:
- Openbox:
https://github.com/jlesage/docker-baseimage-gui/blob/master/rootfs/etc/cont-init.d/10-openbox.sh#L12 - The web ui:
https://github.com/jlesage/docker-baseimage-gui/blob/master/rootfs/etc/cont-init.d/10-web-data.sh#L33 - Required environment variables for the app:
https://github.com/jlesage/docker-baseimage-gui/tree/master/rootfs/etc/cont-env.d
Thank you for this complete answer π
You know that the resolution can be automatically adjusted to the browser's window dimensions?
Yes, it would be nice if it is possible automatically ?
And do you if is possible with the window manager (X11 or Openbox or another ?) to minify windows and stick them in a application bar at the bottom like Windows or linux GUI ?
@++
Yes, it would be nice if it is possible automatically ?
Yes, it's already supported! The control menu of the web interface allows you to enable remote resizing, meaning that the application's size/resolution is automatically adjusted to the size of the window's browser. This is is done dynamically.
And do you if is possible with the window manager (X11 or Openbox or another ?) to minify windows and stick them in a application bar at the bottom like Windows or linux GUI ?
This baseimage has been designed to implement a single application. In other words, the goal is to have the whole container act as an application. If you need to run multiple applications, like a "normal" desktop, there are probably other projects that are more suitable for this use case. I do know some projects that are actually implementing a whole desktop experience in a container.
Yes, it's already supported! The control menu of the web interface allows you to enable remote resizing, meaning that the application's size/resolution is automatically adjusted to the size of the window's browser. This is is done dynamically.
Very Nice ! I am discovering this fonctionality ! Wonderful ! π
As I'm on this panel :
I don't know how works 'Clip to Window' setting and the 'Move/Drag viewport' ? what is it used for ?
And sometimes it is impossible to clic to 'Clip to Window''..
When I select also "Logging Debug" I don't see any difference in the "docker log" of the container.
I do know some projects that are actually implementing a whole desktop experience in a container.
Yes why not ? you are a great help π₯
I don't know how works 'Clip to Window' setting and the 'Move/Drag viewport' ? what is it used for ?
And sometimes it is impossible to clic to 'Clip to Window''..
These options apply when Scaling Mode
is set to None
. In this mode, no scaling is done, so when the browser's window is smaller than the size of the application, part of it is not visible. When Clip to Window
is enabled, you have to use the hand icon to "move" the visible part of the application.
When Clip to Window
disabled, you will instead see horizontal and vertical scrollbars. Due to some technical limitations, the Clip to Window
option can be disabled only on Window browsers.
When I select also "Logging Debug" I don't see any difference in the "docker log" of the container.
This option affects the logging of the web UI itself. This logging can be seen in the "console" of the browser's developper tool.
Yes why not ? you are a great help π₯
Webtop is good example: https://github.com/linuxserver/docker-webtop
Thanks for these useful informations π
Webtop is good example: https://github.com/linuxserver/docker-webtop
Very Nice β¨
In this image there is :
- a keybord for special keys like Escape, Ctrl, Alt, Tab witch are not possible to send on a phone keyboard
- and a File Manager in order to upload files or delete it into the full webapp
Is it possible to have the same controls in your container ? π
Is it possible to have the same controls in your container ?
I feel like these feature make sense for a full desktop, but I'm not sure they would be useful for a single app.