Configure X properly to start GUI programs from SSH session
0
votes
0
answers
2023
views
I've installed
xorg
, xdm
and fluxbox
onto a GUI-less minimal Debian virtual machine instance (on GCP), then I've tried to run an application chromium
or google-chrome
with GUI. The execution of the program fails with the following message:
$ google-chrome
[2631:2631:0905/040834.818761:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[2631:2631:0905/040834.821056:ERROR:env.cc(255)] The platform failed to initialize. Exiting.
If I connect via RDP and open a terminal on GUI then enter the same command, the browser application simply starts as expexted.
If I enter this command from a **putty session**, the program starts in the **RDP session**.
$ DISPLAY=:10.0 google-chrome
I want to be able to launch programs what use GUI from SSH.
I understand that I need to configure a display related variable, but I don't understand exactly where and how.
- should I hardcode this display variable into .xinitrc
or .xsession
script?
- if so, this wouldn't destroy the dynamic display handling behavior of the xorg?
- or is there a more advanced approach how should this work properly?
- isn't there any tutorial (for dummies from scratch) about how this whole xserver should be configured properly?
---
I've copied my .xinitrc
and .xsession
files from the internet (because the installation was not smooth), which is probably is not good for the above requirement:
My .xinitrc
file is:
#!/bin/bash
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec fluxbox
My .xsession
file is:
exec startfluxbox
Asked by elaspog
(111 rep)
Sep 5, 2022, 04:26 AM