mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-23 13:29:33 +00:00
Added Light display manager as build option: DISPLAY_MANAGER="yes"
This commit is contained in:
parent
2d37a1ec3e
commit
2c382cd3c3
6 changed files with 36 additions and 3 deletions
|
@ -116,7 +116,7 @@ PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools dosfstools hddtemp iotop iozone3
|
|||
hdparm rfkill vlan sysstat bluez bluez-tools bash-completion hostapd git ethtool network-manager unzip ifenslave lirc \
|
||||
libpam-systemd iperf3 software-properties-common libnss-myhostname f2fs-tools avahi-autoipd iputils-arping"
|
||||
|
||||
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-video-fbdev gvfs-backends gvfs-fuse xfonts-base xinit nodm x11-xserver-utils xfce4 lxtask xterm mirage thunar-volman galculator hexchat \
|
||||
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-video-fbdev gvfs-backends gvfs-fuse xfonts-base xinit x11-xserver-utils xfce4 lxtask xterm mirage thunar-volman galculator hexchat \
|
||||
gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf libgtk2.0-bin gcj-jre-headless xfce4-screenshooter libgnome2-perl gksu bluetooth \
|
||||
network-manager-gnome xfce4-notifyd gnome-keyring gcr libgck-1-0 libgcr-3-common p11-kit pasystray pavucontrol pulseaudio \
|
||||
paman pavumeter pulseaudio-module-gconf pulseaudio-module-bluetooth blueman libpam-gnome-keyring libgl1-mesa-dri mpv \
|
||||
|
|
|
@ -49,8 +49,17 @@ install_desktop ()
|
|||
sed "s/load-module module-udev-detect$/& tsched=0/g" -i $SDCARD/etc/pulse/default.pa
|
||||
fi
|
||||
|
||||
# Choose display manager
|
||||
if [[ $DISPLAY_MANAGER == yes ]]; then chroot $SDCARD /bin/bash -c "apt-get install -qq -y --no-install-recommends lightdm-gtk-greeter lightdm"; \
|
||||
else chroot $SDCARD /bin/bash -c "apt-get install -qq -y --no-install-recommends nodm"; fi
|
||||
|
||||
# Disable desktop mode autostart for now to enforce creation of normal user account
|
||||
sed "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=false/g" -i $SDCARD/etc/default/nodm
|
||||
[[ -f $SDCARD/etc/default/nodm ]] && sed "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=false/g" -i $SDCARD/etc/default/nodm
|
||||
[[ -d $SDCARD/etc/lightdm ]] && chroot $SDCARD /bin/bash -c "systemctl disable lightdm.service >/dev/null 2>&1"
|
||||
|
||||
# install logo for login screen
|
||||
cp $SRC/packages/blobs/desktop/icons/armbian.png $SDCARD/usr/share/pixmaps
|
||||
cp -R $SRC/packages/blobs/desktop/lightdm $SDCARD/etc
|
||||
|
||||
# Compile Turbo Frame buffer for sunxi
|
||||
if [[ $LINUXFAMILY == sun* && $BRANCH == default ]]; then
|
||||
|
|
BIN
packages/blobs/desktop/icons/armbian.png
Normal file
BIN
packages/blobs/desktop/icons/armbian.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
6
packages/blobs/desktop/lightdm/lightdm-gtk-greeter.conf
Normal file
6
packages/blobs/desktop/lightdm/lightdm-gtk-greeter.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
[greeter]
|
||||
user-background=false
|
||||
theme-name=Numix
|
||||
icon-theme-name=Vibrancy-Colors-Full-Dark
|
||||
default-user-image=/usr/share/pixmaps/armbian.png
|
||||
indicators=~power;~language
|
|
@ -0,0 +1,5 @@
|
|||
[SeatDefaults]
|
||||
user-session=ubuntu
|
||||
greeter-show-manual-login=true
|
||||
greeter-hide-users=true
|
||||
allow-guest=false
|
|
@ -72,7 +72,7 @@ if [ -f /root/.not_logged_in_yet ] && [ -n "$BASH_VERSION" ] && [ "$-" != "${-#*
|
|||
echo -e "\nThis image is provided \e[0;31mAS IS\x1B[0m with \e[0;31mNO WARRANTY\x1B[0m and \e[0;31mNO END USER SUPPORT!\x1B[0m.\n"
|
||||
fi
|
||||
echo "Creating a new user account. Press <Ctrl-C> to abort"
|
||||
[ -f "/etc/init.d/nodm" ] && echo "Desktop environment will not be enabled if you abort the new user creation"
|
||||
[ -f "/etc/init.d/nodm" ] || [ -d "/etc/lightdm" ] && echo "Desktop environment will not be enabled if you abort the new user creation"
|
||||
trap check_abort INT
|
||||
while [ -f "/root/.not_logged_in_yet" ]; do
|
||||
add_user
|
||||
|
@ -108,6 +108,19 @@ if [ -f /root/.not_logged_in_yet ] && [ -n "$BASH_VERSION" ] && [ "$-" != "${-#*
|
|||
sleep 1
|
||||
service nodm start
|
||||
fi
|
||||
elif [ -d "/etc/lightdm" ] && [ -n "$RealName" ] ; then
|
||||
systemctl enable lightdm.service 2>/dev/null
|
||||
if [[ -f /var/run/resize2fs-reboot ]]; then
|
||||
# Let the user reboot now otherwise start desktop environment
|
||||
printf "\n\n\e[0;91mWarning: a reboot is needed to finish resizing the filesystem \x1B[0m \n"
|
||||
printf "\e[0;91mPlease reboot the system now \x1B[0m \n\n"
|
||||
elif [ -z "$ConfigureDisplay" ] || [ "$ConfigureDisplay" = "n" ] || [ "$ConfigureDisplay" = "N" ]; then
|
||||
echo -e "\n\e[1m\e[39mNow starting desktop environment...\x1B[0m\n"
|
||||
sleep 1
|
||||
service lightdm start 2>/dev/null
|
||||
# logout if logged at console
|
||||
[[ -n $(who -la | grep root | grep tty1) ]] && exit 1
|
||||
fi
|
||||
else
|
||||
# Display reboot recommendation if necessary
|
||||
if [[ -f /var/run/resize2fs-reboot ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue