2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-09-02 16:28:27 +00:00

Have genesis optionally GUI capable

Have Genesis work with newer distribution base, also support seatd/sway when
genesis contains it.
This commit is contained in:
Jarrod Johnson
2025-03-04 15:12:59 -05:00
parent cea87d012c
commit 02ec40092e
2 changed files with 16 additions and 5 deletions

View File

@@ -1,5 +1,20 @@
#!/bin/bash
if [ ! -x /usr/libexec/platform-python ]; then
ln -s /usr/bin/python3 /usr/libexec/platform-python
fi
export LANG=en_US.utf8
if [ -x /usr/bin/seatd-launch -a -x /usr/bin/sway ]; then
export XDG_RUNTIME_DIR=/run/users/0
mkdir -p $XDG_RUNTIME_DIR
sed -i '/^output /d' /etc/sway/config
echo 'exec foot -t XTERM -T Terminal tmux a' > /etc/sway/config.d/genesis
else
(while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) &
fi
mkdir -p /etc/confluent
if ! grep console= /proc/cmdline >& /dev/null; then
autocons=$(/opt/confluent/bin/autocons)
@@ -9,13 +24,9 @@ if ! grep console= /proc/cmdline >& /dev/null; then
if [ ! -z "$autocons" ]; then
echo "Using $(cat /tmp/01-autocons.conf)"
(while :; do TERM=xterm-256color tmux a <> $autocons >&0 2>&1; done) &
(while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) &
else
(while :; do TERM=linux tmux a <> /dev/console >&0 2>&1; done) &
fi
else
(while :; do TERM=xterm-256color tmux a <> /dev/console >&0 2>&1; done) &
(while :; do TERM=linux tmux a <> /dev/tty1 >&0 2>&1; done) &
fi
(while :; do TERM=linux tmux <> /dev/tty2 >&0 2>&1; done) &
echo -n "udevd: "

View File

@@ -7,7 +7,7 @@ echo PS1="'"'[genesis running on \H \w]$ '"'" >> ~/.bash_profile
mkdir -p /etc/ssh
mkdir -p /var/tmp/
mkdir -p /var/empty/sshd
sed -i '/^root:x/d' /etc/passwd
sed -i '/^root:/d' /etc/passwd
echo root:x:0:0::/:/bin/bash >> /etc/passwd
echo sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin >> /etc/passwd
tmux new-session -d sh /opt/confluent/bin/rungenesis