mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
start adding gnome wayland support
This commit is contained in:
parent
1b64bf6f0a
commit
6cf028a3ad
5 changed files with 61 additions and 7 deletions
|
@ -6,20 +6,21 @@ _GRUB_CONFIG="/usr/share/archboot/grub/archboot-main-grub.cfg"
|
|||
_GRUB_BACKGROUND="/usr/share/archboot/grub/archboot-background.png"
|
||||
### X defaults
|
||||
# needed full installed packages in environment for X
|
||||
_X_PACKAGES="libunwind libelf libevent python talloc gdbm fuse3 gcc-libs perl glibc libtiff glib2 libcups harfbuzz avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb libmd jansson libsasl pcre2 xorg tigervnc gparted nss-mdns chromium"
|
||||
_X_PACKAGES="libunwind libelf libevent python talloc gdbm fuse3 gcc-libs perl glibc libtiff glib2 libcups harfbuzz avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb libmd jansson libsasl pcre2 tigervnc gparted nss-mdns chromium"
|
||||
# ignore packages to upgrade before X startup eg. kernel and firmware
|
||||
_X_IGNORE="linux linux-firmware linux-firmware-marvell"
|
||||
# VNC password
|
||||
_VNC_PW="archboot"
|
||||
### XFCE defaults
|
||||
# Xfce packages
|
||||
_XFCE_PACKAGES="xfce4 breeze-icons gvfs gvfs-smb thunar-archive-plugin file-roller gnome-keyring mousepad ristretto"
|
||||
_XFCE_PACKAGES="xorg xfce4 breeze-icons gvfs gvfs-smb thunar-archive-plugin file-roller gnome-keyring mousepad ristretto"
|
||||
### GNOME defaults
|
||||
# GNOME packages
|
||||
_GNOME_PACKAGES="gnome-shell gnome-terminal gnome-control-center nautilus gvfs-smb gthumb file-roller gedit"
|
||||
_GNOME_PACKAGES="xorg gnome-shell gnome-terminal gnome-control-center nautilus gvfs-smb gthumb file-roller gedit"
|
||||
_GNOME_WAYLAND_PACKAGES="gnome-shell gnome-terminal gnome-control-center nautilus gvfs-smb gthumb file-roller gedit"
|
||||
### KDE defaults
|
||||
# KDE/Plasma packages
|
||||
_KDE_PACKAGES="plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
||||
_KDE_PACKAGES="xorg plasma-desktop konsole kscreen kate dolphin powerdevil ark gwenview"
|
||||
### Custom X defaults
|
||||
# Custom packages
|
||||
_CUSTOM_XORG=""
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
. /usr/lib/archboot/update-installer.sh
|
||||
. /usr/lib/archboot/xfce.sh
|
||||
. /usr/lib/archboot/gnome.sh
|
||||
. /usr/lib/archboot/gnome-wayland.sh
|
||||
. /usr/lib/archboot/kde.sh
|
||||
|
||||
[[ -z "${1}" ]] && usage
|
||||
|
@ -18,6 +19,7 @@ while [ $# -gt 0 ]; do
|
|||
-latest-image|--latest-image) _G_RELEASE="1" ;;
|
||||
-launch-xfce|--launch-xfce) _L_XFCE="1" ;;
|
||||
-launch-gnome|--launch-gnome) _L_GNOME="1";;
|
||||
-launch-gnome-wayland|--launch-gnome-wayland) _L_GNOME_WAYLAND="1";;
|
||||
-launch-kde|--launch-kde) _L_KDE="1" ;;
|
||||
-custom-xorg|--custom-xorg) _CUSTOM_X="1" ;;
|
||||
-h|--h|?) usage ;;
|
||||
|
@ -105,7 +107,7 @@ if [[ "${_CUSTOM_X}" == "1" ]]; then
|
|||
fi
|
||||
|
||||
# KDE/PLASMA or XFCE launch
|
||||
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" ]]; then
|
||||
if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" || "${_L_GNOME_WAYLAND}" == "1" ]]; then
|
||||
if ! [[ -d /usr.zram ]]; then
|
||||
echo -e "\033[1mStep 1/5:\033[0m Move /usr to /usr.zram ..."
|
||||
_zram_usr "${_ZRAM_SIZE}"
|
||||
|
@ -121,6 +123,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" ]]; then
|
|||
if [[ "${_L_GNOME}" == "1" ]]; then
|
||||
_install_gnome
|
||||
fi
|
||||
if [[ "${_L_GNOME_WAYLAND}" == "1" ]]; then
|
||||
_install_gnome_wayland
|
||||
fi
|
||||
if [[ "${_L_KDE}" == "1" ]]; then
|
||||
_install_kde
|
||||
fi
|
||||
|
@ -134,6 +139,9 @@ if [[ "${_L_XFCE}" == "1" || "${_L_KDE}" == "1" || "${_L_GNOME}" == "1" ]]; then
|
|||
if [[ "${_L_GNOME}" == "1" ]]; then
|
||||
_start_gnome
|
||||
fi
|
||||
if [[ "${_L_GNOME_WAYLAND}" == "1" ]]; then
|
||||
_start_gnome_wayland
|
||||
fi
|
||||
if [[ "${_L_KDE}" == "1" ]]; then
|
||||
_start_kde
|
||||
fi
|
||||
|
|
43
usr/lib/archboot/gnome-wayland.sh
Normal file
43
usr/lib/archboot/gnome-wayland.sh
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
|
||||
_install_gnome_wayland() {
|
||||
if ! [[ -e /usr/bin/gnome-session ]]; then
|
||||
echo -e "\033[1mStep 3/5:\033[0m Installing GNOME desktop now ..."
|
||||
echo " This will need some time ..."
|
||||
_prepare_x "${_GNOME_WAYLAND_PACKAGES}" >/dev/tty7 2>&1
|
||||
echo -e "\033[1mStep 4/5:\033[0m Configuring GNOME desktop ..."
|
||||
_configure_gnome_wayland >/dev/tty7 2>&1
|
||||
systemd-sysusers
|
||||
systemd-tmpfiles --create
|
||||
fi
|
||||
}
|
||||
|
||||
_configure_gnome_wayland() {
|
||||
echo "Configuring Gnome ..."
|
||||
gsettings set org.gnome.shell favorite-apps "['org.gnome.Settings.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Nautilus.desktop', 'chromium.desktop', 'org.gnome.DiskUtility.desktop', 'gparted.desktop', 'archboot.desktop']"
|
||||
echo "Setting wallpaper ..."
|
||||
gsettings set org.gnome.desktop.background picture-uri file:////usr/share/archboot/grub/archboot-background.png
|
||||
echo "Autostarting setup ..."
|
||||
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Archboot Setup
|
||||
GenericName=Installer
|
||||
Exec=gnome-terminal -- /usr/bin/setup
|
||||
Icon=system-software-install
|
||||
EOF
|
||||
cp /etc/xdg/autostart/archboot.desktop /usr/share/applications/
|
||||
_HIDE_MENU="avahi-discover bssh bvnc org.gnome.Extensions org.gnome.FileRoller org.gnome.gThumb org.gnome.gedit fluid vncviewer qvidcap qv4l2"
|
||||
echo "Hiding ${_HIDE_MENU} menu entries ..."
|
||||
for i in ${_HIDE_MENU}; do
|
||||
echo "[DESKTOP ENTRY]" > /usr/share/applications/"${i}".desktop
|
||||
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
||||
done
|
||||
}
|
||||
|
||||
_start_gnome_wayland() {
|
||||
echo -e "Launching GNOME WAYLAND now, logging is done on \033[1m/dev/tty8\033[0m ..."
|
||||
LANG=C.UTF-8 MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland exec dbus-run-session gnome-session >/dev/tty7 2>&1
|
||||
#echo -e "To relaunch GNOME desktop use: \033[92mstartx\033[0m"
|
||||
}
|
|
@ -28,6 +28,7 @@ usage () {
|
|||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3400000 &&\
|
||||
-e /usr/bin/setup && ! -e /var/cache/pacman/pkg/archboot.db ]]; then
|
||||
echo -e " \033[1m-launch-gnome\033[0m Launch Gnome desktop with VNC sharing enabled."
|
||||
echo -e " \033[1m-launch-gnome-wayland\033[0m Launch Gnome desktop with wayland"
|
||||
echo -e " \033[1m-launch-kde\033[0m Launch KDE Plasma desktop with VNC sharing enabled."
|
||||
fi
|
||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 &&\
|
||||
|
@ -88,7 +89,7 @@ _download_latest() {
|
|||
for i in ${BINS}; do
|
||||
[[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}.sh?inline=false" -O "${_BIN}/${i}"
|
||||
done
|
||||
LIBS="common.sh container.sh release.sh iso.sh update-installer.sh xfce.sh gnome.sh kde.sh login.sh"
|
||||
LIBS="common.sh container.sh release.sh iso.sh update-installer.sh xfce.sh gnome.sh gnome-wayland.sh kde.sh login.sh"
|
||||
for i in ${LIBS}; do
|
||||
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}"
|
||||
done
|
||||
|
|
|
@ -6,7 +6,8 @@ build ()
|
|||
map add_file "/etc/archboot/defaults" "/usr/lib/archboot/common.sh" \
|
||||
"/usr/lib/archboot/container.sh" "/usr/bin/archboot-$(uname -m)-create-container.sh" \
|
||||
"/usr/lib/archboot/update-installer.sh" "/usr/lib/archboot/xfce.sh" \
|
||||
"/usr/lib/archboot/kde.sh" "/usr/lib/archboot/gnome.sh" "/usr/lib/archboot/login.sh"
|
||||
"/usr/lib/archboot/kde.sh" "/usr/lib/archboot/gnome.sh" \
|
||||
"/usr/lib/archboot/gnome-wayland.sh" "/usr/lib/archboot/login.sh"
|
||||
add_file "/usr/bin/archboot-update-installer.sh" "/usr/bin/update-installer.sh"
|
||||
add_symlink "/etc/profile.d/zz-archboot-login.sh" "/usr/lib/archboot/login.sh"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue