Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from X / IceWM to Wayland / Gnome shell #1868

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion live/root/.xinitrc

This file was deleted.

69 changes: 69 additions & 0 deletions live/root/etc/sysconfig/displaymanager
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Path: Desktop/Display manager
## Description: settings to generate a proper displaymanager config
## Type: yesno
## Default: no
#
# Allow remote access (XDMCP) to your display manager (xdm/kdm/gdm). Please note
# that a modified kdm or xdm configuration, e.g. by KDE control center
# will not be changed. For gdm, values will be updated after change.
# XDMCP service should run only on trusted networks and you have to disable
# firewall for interfaces, where you want to provide this service.
#
DISPLAYMANAGER_REMOTE_ACCESS="no"

## Type: yesno
## Default: no
#
# Allow remote access of the user root to your display manager. Note
# that root can never login if DISPLAYMANAGER_SHUTDOWN is "auto" and
# System/Security/Permissions/PERMISSION_SECURITY is "paranoid"
#
DISPLAYMANAGER_ROOT_LOGIN_REMOTE="no"

## Type: yesno
## Default: yes
#
# Let the displaymanager start a local Xserver.
# Set to "no" for remote-access only.
# Set to "no" on architectures without any Xserver (e.g. s390/s390x).
#
DISPLAYMANAGER_STARTS_XSERVER="yes"

## Type: yesno
## Default: no
#
# TCP port 6000 of Xserver. When set to "no" (default) Xserver is
# started with "-nolisten tcp". Only set this to "yes" if you really
# need to. Remote X service should run only on trusted networks and
# you have to disable firewall for interfaces, where you want to
# provide this service. Use ssh X11 port forwarding whenever possible.
#
DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN="no"

## Type: string
## Default:
#
# Define the user whom should get logged in without request. If string
# is empty, display standard login dialog.
#
DISPLAYMANAGER_AUTOLOGIN="root"

## Type: yesno
## Default: no
#
# Allow all users to login without password, but ask for the user, if
# DISPLAYMANAGER_AUTOLOGIN is empty.
#
DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"

## Type: yesno
## Default: no
#
# Display a combobox for Active Directory domains.
#
DISPLAYMANAGER_AD_INTEGRATION="no"
## Path: Desktop/Display manager
## Type: string(Xorg)
## Default: "Xorg"
#
DISPLAYMANAGER_XSERVER="Xorg"
24 changes: 0 additions & 24 deletions live/root/etc/systemd/system/x11-autologin.service

This file was deleted.

9 changes: 0 additions & 9 deletions live/root/root/.icewm/startup

This file was deleted.

19 changes: 19 additions & 0 deletions live/root/root/.local/bin/gnome-kiosk-script
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
# Start a browser to connect to Agama's web user interface skipping the authentication.
# This script is invoked as a part of gnome-kiosk startup procedure. See /usr/bin/gnome-kiosk-script
# which is at the end of the chain and invokes this script.

TOKEN_FILE=/run/agama/token
TOKEN=$(cat $TOKEN_FILE)
PREFS=$HOME/.mozilla/firefox/profile/user.js

sed -e "s/__HOMEPAGE__/http:\/\/localhost\/login?token=$TOKEN/" $PREFS.template > $PREFS
firefox --profile $HOME/.mozilla/firefox/profile
# Here, we would like to see
#
# firefox --kiosk --profile $HOME/.mozilla/firefox/profile
#
# But sadly firefox currently ends with black screen on wayland when run with --kiosk

sleep 1.0
exec "$0" "$@"
1 change: 0 additions & 1 deletion live/root/root/.xinitrc

This file was deleted.

13 changes: 13 additions & 0 deletions live/root/usr/bin/X/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This file is just placeholder for creating content in /usr/bin/X/ directory.

The directory is used to trick display-manager.service (script) to think that
xorg-x11-server is installed. If the directory is not existing the above
script/service ends with error reporting status=6/NOTCONFIGURED. We want to
use Wayland (only), there is no sense in installing X11 server too. As it is
not mentioned as direct dependency in any gnome and wayland related packages
and kind of dependency happens only due to that check, we trick it by creating
the directory.

This is status at time of initial Wayland / GNOME Shell deployment in Agama's
live iso. If the check is removed in the future feel free to drop whole
/usr/bin/X from the image.
2 changes: 2 additions & 0 deletions live/root/var/lib/AccountsService/users/root
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[User]
Session=gnome-kiosk-script-wayland
8 changes: 3 additions & 5 deletions live/src/agama-installer.kiwi
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,9 @@
<package name="rubygem(agama-yast)"/>
<package name="rubygem(byebug)"/>
<package name="microos-tools"/>
<package name="icewm-lite"/>
<package name="xinit"/>
<package name="xorg-x11-server"/>
<package name="xorg-x11-fonts-core"/>
<package name="xf86-input-libinput" />
<package name="patterns-base-basesystem"/>
<package name="patterns-gnome-gnome"/>
<package name="gnome-kiosk"/>
<package name="psmisc"/>
<package name="joe"/>
<package name="checkmedia"/>
Expand Down
4 changes: 3 additions & 1 deletion live/src/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ systemctl enable live-password-iso.service
systemctl enable live-password-random.service
systemctl enable live-password-systemd.service
systemctl enable setup-systemd-proxy-env.path
systemctl enable x11-autologin.service
systemctl enable spice-vdagentd.service
systemctl enable zramswap

Expand Down Expand Up @@ -202,3 +201,6 @@ rm -f /lib/modules/*/vmlinux*.[gx]z

# Remove generated files (boo#1098535)
rm -rf /var/cache/zypp/* /var/lib/zypp/AnonymousUniqueId /var/lib/systemd/random-seed

# gnome-kiosk startup script, executable rights not preserved during copying
chmod +x /root/.local/bin/gnome-kiosk-script
Loading