mviereck / dockerfile-x11docker-deepin

3D desktop deepin from China
MIT License
33 stars 11 forks source link

Discuss again about the X server options which will trigger the desktop-window-size-too-large problem. #29

Closed hongyi-zhao closed 4 years ago

hongyi-zhao commented 4 years ago

I noticed that you told the following here:

With x11docker default X server option --xephyr the desktop window size is too large, deepin does some odd resizing. Try --nxagent, --xpra or --weston-xwayland instead. These options allow to resize the window.

We have discussed this problem here. But based on my further tries, the results are still different from your above conclusion. To be simple, the phenomenon I observed is as follows:

--nxagent, --xpra: don't trigger the problem.
--xephyr, --weston-xwayland: trigger the problem.

EDIT:

  1. The testing host environment:
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 20.04 LTS
    Release:    20.04
    Codename:   focal
  2. The testing is done by a self-built docker image created by the Dockerfile forked from yours with slight modification.
mviereck commented 4 years ago

My observation is a bit different so far:

hongyi-zhao commented 4 years ago

Very strange. What's your host OS?

mviereck commented 4 years ago

What's your host OS?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bullseye/sid
Release:    testing
Codename:   bullseye

Maybe this partially depends on speed. The X server is starting up, and the container system is booting. Maybe at some point of the container system boot the X server is ready to accept a resize request, or it is not. I wouldn't worry to much about this. It would be rather interesting if the Gnome 3 desktop could be configured not to resize the X server on its own.

mviereck commented 4 years ago

It is possible to resize the window with xrandr from package x11-xserver-utils. The last entry is the one originally set by x11docker:

$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 160 x 160, current 1600 x 1200, maximum 1824 x 1200
default connected primary 1600x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1600x1200      0.00* 
   1400x1050      0.00  
   1280x960       0.00  
   1280x1024      0.00  
   1152x864       0.00  
   1024x768       0.00  
   832x624        0.00  
   800x600        0.00  
   720x400        0.00  
   480x640        0.00  
   640x480        0.00  
   640x400        0.00  
   320x240        0.00  
   240x320        0.00  
   160x160        0.00  
   1824x984       0.00 

It can be set with:

xrandr --output default --mode 1824x984
hongyi-zhao commented 4 years ago

It is possible to resize the window with xrandr from package x11-xserver-utils. The last entry is the one originally set by x11docker:

$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 160 x 160, current 1600 x 1200, maximum 1824 x 1200
default connected primary 1600x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1600x1200      0.00* 
   1400x1050      0.00  
   1280x960       0.00  
   1280x1024      0.00  
   1152x864       0.00  
   1024x768       0.00  
   832x624        0.00  
   800x600        0.00  
   720x400        0.00  
   480x640        0.00  
   640x480        0.00  
   640x400        0.00  
   320x240        0.00  
   240x320        0.00  
   160x160        0.00  
   1824x984       0.00 

See the results of mine:

$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 525mm x 297mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1280x1024     75.02    72.00    70.00    60.02  
   1280x960      60.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)

Why it's very different in form from yours?

It can be set with:

xrandr --output default --mode 1824x984

Do you mean run this command with different --mode on host to resize the deepin container's window size?

mviereck commented 4 years ago

Why it's very different in form from yours?

That is the output for your host. I mean to run within the container.

Do you mean run this command with different --mode on host to resize the deepin container's window size?

I mean to run it in container. Currently I try to add an autostart entry. So far it works for --xephyr that has output name default:

RUN env DEBIAN_FRONTEND=noninteractive apt-get install -y \
        x11-xserver-utils

RUN echo "#! /bin/sh\n\
xrandr --output default --mode \$(xrandr 2>&1 | tail -n1 | awk '{print \$1}')\n\
" > /usr/local/bin/x11docker-xrandr-xephyr && chmod +x /usr/local/bin/x11docker-xrandr-xephyr && \
    mkdir -p /etc/xdg/autostart && \
    echo "[Desktop Entry]\n\
Encoding=UTF-8\n\
Version=0.9.4\n\
Type=Application\n\
Name=x11docker-xrandr-xephyr\n\
Comment=\n\
Exec=/usr/local/bin/x11docker-xrandr-xephyr\n\
" > /etc/xdg/autostart/x11docker-xrandr-xephyr.desktop
hongyi-zhao commented 4 years ago

I mean to run it in container. Currently I try to add an autostart entry.

Can this be done with a newly added x11docker option? If so, it will be more transferable and convenient for using it.

mviereck commented 4 years ago

I've added this to x11docker, always done now without an option. So it fixes x11docker/cinnamon and x11docker/gnome as well. Note that this needs xrandr / package x11-xserver-utils in image.

hongyi-zhao commented 4 years ago

Great. I've added this package into my Dockerfile.