mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
better logging for xfce
This commit is contained in:
parent
a8b79b2ccc
commit
375964f815
3 changed files with 22 additions and 16 deletions
|
@ -84,7 +84,11 @@ if [[ -n "${_L_XFCE}" || -n "${_L_SWAY}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}
|
||||||
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
[[ -n "${_L_XFCE}" || -n "${_L_PLASMA}" || -n "${_L_GNOME}" ]] && _autostart_vnc
|
||||||
command -v firefox &>"${_NO_LOG}" && _firefox_flags
|
command -v firefox &>"${_NO_LOG}" && _firefox_flags
|
||||||
command -v chromium &>"${_NO_LOG}" && _chromium_flags
|
command -v chromium &>"${_NO_LOG}" && _chromium_flags
|
||||||
[[ -n "${_L_XFCE}" ]] && _start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting Xfce..." 6 75 94
|
if [[ -n "${_L_XFCE}" ]]; then
|
||||||
|
_start_xfce | _dialog --title "${_MENU_TITLE}" --gauge "Starting Xfce..." 6 75 94
|
||||||
|
clear
|
||||||
|
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
|
||||||
|
fi
|
||||||
[[ -n "${_L_GNOME}" ]] && _start_gnome
|
[[ -n "${_L_GNOME}" ]] && _start_gnome
|
||||||
[[ -n "${_L_GNOME_WAYLAND}" ]] && _start_gnome_wayland
|
[[ -n "${_L_GNOME_WAYLAND}" ]] && _start_gnome_wayland
|
||||||
[[ -n "${_L_PLASMA}" ]] && _start_plasma
|
[[ -n "${_L_PLASMA}" ]] && _start_plasma
|
||||||
|
|
|
@ -85,11 +85,11 @@ _prepare_graphic() {
|
||||||
done
|
done
|
||||||
touch /.archboot
|
touch /.archboot
|
||||||
_install_graphic &
|
_install_graphic &
|
||||||
_progress_wait "11" "69" "Running pacman..." "5"
|
_progress_wait "11" "89" "Installing Desktop Environment..." "1"
|
||||||
if [[ ! -e "/.full_system" ]]; then
|
if [[ ! -e "/.full_system" ]]; then
|
||||||
_progress "70" "Removing not used icons..."
|
echo "Removing not used icons..." >"${_LOG}"
|
||||||
rm -rf /usr/share/icons/breeze-dark
|
rm -rf /usr/share/icons/breeze-dark
|
||||||
_progress "80" "Cleanup locale and i18n..."
|
echo "Cleanup locale and i18n..." >"${_LOG}"
|
||||||
find /usr/share/locale/ -mindepth 2 ! -path '*/be/*' ! -path '*/bg/*' ! -path '*/cs/*' \
|
find /usr/share/locale/ -mindepth 2 ! -path '*/be/*' ! -path '*/bg/*' ! -path '*/cs/*' \
|
||||||
! -path '*/da/*' ! -path '*/de/*' ! -path '*/en/*' ! -path '*/el/*' ! -path '*/es/*' \
|
! -path '*/da/*' ! -path '*/de/*' ! -path '*/en/*' ! -path '*/el/*' ! -path '*/es/*' \
|
||||||
! -path '*/fi/*' ! -path '*/fr/*' ! -path '*/hu/*' ! -path '*/it/*' ! -path '*/lt/*' \
|
! -path '*/fi/*' ! -path '*/fr/*' ! -path '*/hu/*' ! -path '*/it/*' ! -path '*/lt/*' \
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
_install_xfce() {
|
_install_xfce() {
|
||||||
if ! [[ -e /usr/bin/startxfce4 ]]; then
|
if ! [[ -e /usr/bin/startxfce4 ]]; then
|
||||||
_progress "1" "Installing XFCE desktop now..."
|
echo "Installing XFCE desktop now..." >"${_LOG}"
|
||||||
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_XFCE_PACKAGES}"
|
_prepare_graphic "${_XORG_PACKAGE} ${_VNC_PACKAGE} ${_STANDARD_PACKAGES} ${_STANDARD_BROWSER} ${_XFCE_PACKAGES}"
|
||||||
_progress "50" "Configuring XFCE desktop..."
|
echo "Configuring XFCE desktop..." >"${_LOG}"
|
||||||
_configure_xfce >/dev/tty7 2>&1
|
_configure_xfce >"${_LOG}" 2>&1
|
||||||
else
|
else
|
||||||
echo -e "\e[1mStep 1/3:\e[m Installing XFCE desktop already done..."
|
echo -e "\e[1mStep 1/3:\e[m Installing XFCE desktop already done..."
|
||||||
echo -e "\e[1mStep 2/3:\e[m Configuring XFCE desktop already done..."
|
echo -e "\e[1mStep 2/3:\e[m Configuring XFCE desktop already done..."
|
||||||
|
@ -14,7 +14,7 @@ _install_xfce() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_configure_xfce() {
|
_configure_xfce() {
|
||||||
_progress "60" "Configuring xfce panel..."
|
echo "Configuring xfce panel..."
|
||||||
cat << EOF >/etc/xdg/xfce4/panel/default.xml
|
cat << EOF >/etc/xdg/xfce4/panel/default.xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ _configure_xfce() {
|
||||||
</property>
|
</property>
|
||||||
</channel>
|
</channel>
|
||||||
EOF
|
EOF
|
||||||
_progress "70" "Setting breeze as default icons..."
|
echo "Setting breeze as default icons..."
|
||||||
sed -i -e 's#<property name="IconThemeName" type="string" value="Adwaita"/>#<property name="IconThemeName" type="string" value="breeze"/>#g' \
|
sed -i -e 's#<property name="IconThemeName" type="string" value="Adwaita"/>#<property name="IconThemeName" type="string" value="breeze"/>#g' \
|
||||||
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
|
||||||
_progress "80" "Setting archboot background image..."
|
_progress "80" "Setting archboot background image..."
|
||||||
|
@ -166,13 +166,13 @@ EOF
|
||||||
</property>
|
</property>
|
||||||
</channel>
|
</channel>
|
||||||
EOF
|
EOF
|
||||||
_progress "85" "Replacing appfinder launcher with gparted..."
|
echo "Replacing appfinder launcher with gparted..."
|
||||||
sed -i -e 's#xfce4-appfinder#gparted#g' /etc/xdg/xfce4/panel/default.xml
|
sed -i -e 's#xfce4-appfinder#gparted#g' /etc/xdg/xfce4/panel/default.xml
|
||||||
_progress "86" "Replacing directory menu launcher with setup..."
|
echo "Replacing directory menu launcher with setup..."
|
||||||
sed -i -e 's#directorymenu#archboot#g' /etc/xdg/xfce4/panel/default.xml
|
sed -i -e 's#directorymenu#archboot#g' /etc/xdg/xfce4/panel/default.xml
|
||||||
_progress "87" "Setting ${_STANDARD_BROWSER} as default browser..."
|
echo "Setting ${_STANDARD_BROWSER} as default browser..."
|
||||||
sed -i -e "s#firefox#${_STANDARD_BROWSER}#g" /etc/xdg/xfce4/helpers.rc
|
sed -i -e "s#firefox#${_STANDARD_BROWSER}#g" /etc/xdg/xfce4/helpers.rc
|
||||||
_progress "88" "Replacing menu structure..."
|
echo "Replacing menu structure..."
|
||||||
cat << EOF >/etc/xdg/menus/xfce-applications.menu
|
cat << EOF >/etc/xdg/menus/xfce-applications.menu
|
||||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||||
|
@ -229,14 +229,14 @@ EOF
|
||||||
|
|
||||||
</Menu>
|
</Menu>
|
||||||
EOF
|
EOF
|
||||||
_progress "89" "Adding gparted to xfce top level menu..."
|
echo "Adding gparted to xfce top level menu..."
|
||||||
sed -i -e 's#Categories=.*#Categories=X-Xfce-Toplevel;#g' /usr/share/applications/gparted.desktop
|
sed -i -e 's#Categories=.*#Categories=X-Xfce-Toplevel;#g' /usr/share/applications/gparted.desktop
|
||||||
_HIDE_MENU="xfce4-mail-reader xfce4-about"
|
_HIDE_MENU="xfce4-mail-reader xfce4-about"
|
||||||
_progress "90" "Hiding ${_HIDE_MENU} menu entries..."
|
echo "Hiding ${_HIDE_MENU} menu entries..."
|
||||||
for i in ${_HIDE_MENU}; do
|
for i in ${_HIDE_MENU}; do
|
||||||
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
echo 'NoDisplay=true' >> /usr/share/applications/"${i}".desktop
|
||||||
done
|
done
|
||||||
_progress "91" "Autostarting setup..."
|
echo "Autostarting setup..."
|
||||||
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
cat << EOF > /etc/xdg/autostart/archboot.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -251,7 +251,9 @@ EOF
|
||||||
|
|
||||||
_start_xfce() {
|
_start_xfce() {
|
||||||
_progress "100" "Launching XFCE now, logging is done on /dev/tty8..."
|
_progress "100" "Launching XFCE now, logging is done on /dev/tty8..."
|
||||||
|
sleep 2
|
||||||
startxfce4 >/dev/tty8 2>&1
|
startxfce4 >/dev/tty8 2>&1
|
||||||
|
clear
|
||||||
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
|
echo -e "To relaunch \e[1mXFCE\e[m desktop use: \e[92mstartxfce4\e[m"
|
||||||
}
|
}
|
||||||
# vim: set ft=sh ts=4 sw=4 et:
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
|
Loading…
Reference in a new issue