unable to autostart 2 Chromium Windows with nodm on 2 Monitors

KDE, Gnome, Windowmanager, X11, Grafiktreiber und alles was dazu notwendig ist. Schau auch in den "Tipps und Tricks"-Bereich.
Antworten
Baefisch
Beiträge: 2
Registriert: 21.03.2023 10:55:29

unable to autostart 2 Chromium Windows with nodm on 2 Monitors

Beitrag von Baefisch » 21.03.2023 10:57:36

i am creating a autosteel dart environment. There are two monitors. I wan´t to start an Chromium session in kiosk mode on each of them. I do not wan´t to install an Graphical environment, so i decided to use nodm. I am able to autologin and start one chromium window. Because i was not able to start chrome on the second monitor i was testing to start one xterm by adding the startup to ~/.xsession. If i add an second entry. only the first is executed.

## 1. xterm on 1. monitor
/usr/bin/xterm -geometry 1920x1200+0+0
## 2. xterm on 2. monitor
/usr/bin/xterm -geometry 1920x1200+1920+0
Is there also a way to start chromium on a defined monitor? --geometry was not working. I am using Debian 11.

Here is the output from xrandr command.

DVI-I-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95*+
1920x1080 60.00
1680x1050 59.95
1600x900 60.00
1280x1024 75.02 60.02
1440x900 59.89
1280x720 60.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
720x400 70.08
DP-1 connected 2560x1440+1920+0 (normal left inverted right x axis y axis) 597mm x 336mm
2560x1440 59.95*+
1920x1200 59.95
1920x1080 60.00 60.00 50.00 50.00 59.94
1920x1080i 60.00 50.00 59.94
1600x1200 60.00
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 74.98 59.89
1280x720 60.00 50.00 59.94
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
Here is my nodm config.

cat /etc/X11/default-display-manager
/usr/sbin/nodm



cat /etc/default/nodm

NODM_ENABLED=true
NODM_USER=root
NODM_FIRST_VT='7'
NODM_XSESSION=/etc/X11/Xsession
NODM_OPTIONS=
NODM_X_OPTIONS='-nolisten tcp'
NODM_MIN_SESSION_TIME=60
NODM_X_TIMEOUT=300

Benutzeravatar
hikaru
Moderator
Beiträge: 13559
Registriert: 09.04.2008 12:48:59

Re: unable to autostart 2 Chromium Windows with nodm on 2 Monitors

Beitrag von hikaru » 22.03.2023 09:13:46

Baefisch hat geschrieben: ↑ zum Beitrag ↑
21.03.2023 10:57:36
I do not wan´t to install an Graphical environment
Does that also mean, you don't run any window manager?
Handling window geometries is a task for the WM, so I believe if you don't run a WM, there is no way to place windows at dedicated coordinates.
You could verify that by trying to move windows around via Debianwmctrl.


Baefisch
Beiträge: 2
Registriert: 21.03.2023 10:55:29

Re: unable to autostart 2 Chromium Windows with nodm on 2 Monitors

Beitrag von Baefisch » 22.03.2023 11:21:15

Sorry, hab die Frage von nem anderen Forum nur kopiert. Hier in Deutsch weiter.
Ich nutzte nodm als Display Manager. Dann kann man aber wmctrl nicht nutzen.
Hab mich jetzt tiiiiiiiiief eingelesen und probiert.

Letzendlich bin ich bei ner Neuinstallation gelandet und nutze jetzt gnome. Die Bootzeit verglichen zu nodm sind maginal.
Ziel war es 2 Monitore mit einem Browser zu betanken und dem User möglichst keine Einstellungsmöglichkeiten zu geben. Ich kann zb. auch nicht 2. Chrome mit systemd starten. Weiß das jemand?

wmctlr ist auch hier wieder ein Problem, weil der mit dem Kiosk mode von Firefox und Chromium nichts anfangen kann.

Mein Startscript sieht nun so aus:
Komischerweise kann ich ohne diesen sleep keine Verbindung zum xserver aufbauen. So klappts nun aber.

Code: Alles auswählen

dart@steel:~# cat /home/dart/start.sh
#!/bin/bash

sleep 5s
export DISPLAY=:0
Environment=XAUTHORITY=/home/dart/.Xauthority

/usr/bin/firefox --kiosk  https://autodarts.io &

sleep 5s
chromium --window-position=0,0 --password-store=basic --kiosk http://steel:3180


Und mein System File.

Code: Alles auswählen

dart@steel:~$ cat ~/.config/systemd/user/dart.service
[Unit]
Description=Start Autodart

[Service]
Type=oneshot
ExecStart=/home/dart/start.sh 2>&1 | tee /tmp/log.log

[Install]
WantedBy=graphical.target

Antworten