mirror of
https://pagure.io/fedora-kickstarts.git
synced 2025-12-06 11:39:40 +08:00
Switch all live media variants to use livesys-scripts
Reference: https://fedoraproject.org/wiki/Changes/ModernizeLiveMedia
This commit is contained in:
@@ -16,42 +16,8 @@ dracut-config-generic
|
||||
%end
|
||||
|
||||
%post
|
||||
# add initscript
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
|
||||
# set up autologin for user liveuser
|
||||
if [ -f /etc/sddm.conf ]; then
|
||||
sed -i 's/^#User=.*/User=liveuser/' /etc/sddm.conf
|
||||
sed -i 's/^#Session=.*/Session=lxqt.desktop/' /etc/sddm.conf
|
||||
else
|
||||
cat > /etc/sddm.conf << SDDM_EOF
|
||||
[Autologin]
|
||||
User=liveuser
|
||||
Session=lxqt.desktop
|
||||
SDDM_EOF
|
||||
fi
|
||||
|
||||
# show liveinst.desktop on desktop and in menu
|
||||
sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
|
||||
mkdir /home/liveuser/Desktop
|
||||
cp -a /usr/share/applications/liveinst.desktop /home/liveuser/Desktop/
|
||||
|
||||
# set up preferred apps
|
||||
cat > /etc/xdg/libfm/pref-apps.conf << FOE
|
||||
[Preferred Applications]
|
||||
WebBrowser=qupzilla.desktop
|
||||
FOE
|
||||
|
||||
# no updater applet in live environment
|
||||
rm -f /etc/xdg/autostart/org.mageia.dnfdragora-updater.desktop
|
||||
|
||||
dnf -y remove dracut-config-generic
|
||||
|
||||
# make sure to set the right permissions and selinux contexts
|
||||
chown -R liveuser:liveuser /home/liveuser/
|
||||
restorecon -R /home/liveuser/
|
||||
|
||||
EOF
|
||||
# set livesys session type
|
||||
sed -i 's/^livesys_session=.*/livesys_session="lxqt"/' /etc/sysconfig/livesys
|
||||
|
||||
%end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user