gitpod-io/workspace-images

is `$HOME/.xinitrc` file sourced/executed/needed in `workspace-full-vnc`?

wahabshah opened this issue · 1 comments

Bug description

  • May be it is my wrong understanding of how xfce4 starts the desktop but i dont see the $HOME/.xinitrc X11 dotfile being executed/needed at all in the workspace-full-vnc image. Therefore the question, is it even needed? or is it an artifact from some older setup before?
  • As far as i see /usr/bin/gp-vncsession in $HOME/.bashrc starts the following sequence of processes to start Xfce4 desktop:-
    • $HOME/.bashrc starts /usr/bin/vncserver -> /etc/alternatives/vncserver -> /usr/bin/tigervncserver
    • /usr/bin/tigervncserver starts /etc/X11/Xvnc-session
    • /etc/X11/Xvnc-session starts /etc/X11/Xsession
    • /etc/X11/Xsession then :-
      • writes to $HOME/.xsession-errors
      • loops and source in folder /etc/X11/Xsession.d the following files:-
        • 20dbus_xdg-runtime
        • 20x11-common_process-args
        • 30x11-common_xresources
        • 35x11-common_xhost-local
        • 40x11-common_xsessionrc
        • 50x11-common_determine-startup
        • 55xfce4-session
        • 60x11-common_localhost
        • 60x11-common_xdg_path
        • 75dbus_dbus-launch
          • starts /usr/bin/dbus-launch --exit-with-session --sh-syntax
        • 90gpg-agent
        • 90x11-common_ssh-agent
        • 95dbus_update-activation-env
        • 99x11-common_start
          • /etc/alternatives/x-session-manager -> /usr/bin/startxfce4 read /etc/xdg/xfce4/xinitrc to start xfce4-session
          • xfce4-session reads /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml starts the following :-
            • xfwm4
            • xfsettingsd
            • xfce4-panel
            • Thunar --daemon
            • xfdesktop
  • The whole XFCE4 desktop is loaded without sourcing or symbolic linking to $HOME/.xinitrc
  • According to startxfce4 documentation, if user config is to be used then it need to be put under ~/.config/xfce4/xinitrc, which is also not the case
  • Yes $HOME/.xinitrc can be used by xinit program to start X server but it is also not the case here as there is no such package xorg-xinit installed to contain xinit

Steps to reproduce

  • Open in Gitpod
    • Dockerfile for the repo simply bases from workspace-full-vnc and removes the .xinitrc
      FROM gitpod/workspace-full-vnc:latest
      RUN rm -rf $HOME/.xinitrc                 \
      && sudo sed -i.bkp -e 's|chmod 755 "$HOME/.xinitrc"|# chmod 755 "$HOME/.xinitrc"|g' /usr/bin/gp-vncsession
  • gp-vncsession works even (without .xinitrc) after it opens in gitpod :-
    info[gp-vncsession]: Increased shmem to 4GB
    info[gp-vncsession]: * Starting system message bus dbus ...done.
    info[gp-vncsession]: Starting tigerVNC server on port 5900
    info[gp-vncsession]: Waiting for the desktop to be fully loaded ...
    info[gp-vncsession]: Starting noVNC web client on port 6080
  • Proof that no $HOME/.xinitrc exists after it opens in gitpod:-
    gitpod /workspace $ ls -alh ~/.xinitrc
    ls: cannot access '/home/gitpod/.xinitrc': No such file or directory
  • Xfce4 Desktop loads (without .xinitrc) :-
    image

Expected behavior

Example repository

Anything else?

No response

Hi @wahabshah, that is not used. But kept as a reference.

And xfce4 or other modern DEs don't normally inherit the modifications made to the display server through .xinitrc shell commands but instead overwrite them.