Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:AndnoVember:LXQt
lxqt-live
config.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File config.sh of Package lxqt-live
#!/bin/bash #================ # FILE : config.sh #---------------- # PROJECT : openSUSE KIWI Image System # COPYRIGHT : (c) 2006,2007,2008,2017 SUSE Linux GmbH. All rights reserved # : # AUTHOR : Marcus Schaefer <ms@suse.de>, Stephan Kulow <coolo@suse.de>, Fabian Vogt <fvogt@suse.com> # : # LICENSE : BSD #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile set -euox pipefail exec | tee /var/log/config.log exec 2>&1 #-------------------------------------- # Set a user environment variables _USER=linux _HOME=/home/linux _GROUP=users #-------------------------------------- # enable and disable services for i in langset NetworkManager firewalld spice-vdagentd; do systemctl -f enable $i done for i in sshd cron purge-kernels; do systemctl -f disable $i done cd / # Import keys for installation touch /installkey.gpg gpg --batch --homedir /root/.gnupg --no-default-keyring --ignore-time-conflict --ignore-valid-from --keyring /installkey.gpg --import /usr/lib/rpm/gnupg/keys/* mkdir -p /pubkeys for i in /usr/lib/rpm/gnupg/keys/*.asc ; do rpm --import $i || true ln -s "$i" "/pubkeys/${i##*/}.key" done for i in /rpmkeys/*.key ; do rpm --import $i || true done rm -rf /rpmkeys # Craft license.tar.gz used by YaST (cd /usr/share/licenses/openSUSE-release; tar -cvzf /license.tar.gz *) # Remove netronome firmware (part of kernel-firmware): this sums up to 125MB # Save 50 MiB by removing this, not very useful for lives rm -rf /lib/firmware/{liquidio,netronome,qed,mrvl,mellanox,qcom,cypress,dpaa2,bnx2x,cxgb4} # Remove some large locales to save space #rm -rf /usr/share/locale/{ca,cs,da,de,es,fr,it,ja,nl,pl,pt_BR,sv,uk,vi,zh_CN} find /usr/lib/locale/* -maxdepth 0 -type d -not -name 'C' -not -name 'en_US*' -not -name 'ru_RU*' | xargs rm -rf find /usr/share/locale/* -maxdepth 0 -type d -not -name 'ru' -not -name 'ru_RU' | xargs rm -rf find /usr/share/help/* -maxdepth 0 -type d -not -name 'C' -not -name 'ru' -not -name 'ru_RU' | xargs rm -rf for i in $(find /usr/share/ -type d -name 'translations') ; do find $i -type f -not -name '*_ru.qm' -not -name '*ru_RU.qm' -exec rm -f {} \; done #find /usr/share/qt5/translations/qtwebengine_locales/ -type f -not -name 'en-US.pak' -not -name 'ru.pak' | xargs -r rm -f find /usr/lib*/firefox/browser/extensions/ -type f -not -name 'langpack-ru*' -delete # Remove duplicate licenses _target=""; fdupes -q -p -n -H -o time -r /usr/share/licenses/ | while read _file; do if test -z "$_target" ; then _target="$_file"; else if test -z "$_file" ; then _target=""; continue ; fi ; ln -f "$_target" "$_file"; fi ; done # Some packages really exaggerate here rm -rf /usr/share/doc/ghostscript/* rm -rf /usr/share/doc/packages/* # Not needed rm -f /boot/vmlinux*.[gx]z # Decompress kernel modules, better for squashfs (boo#1192457) find /lib/modules/*/kernel -name '*.ko.zst' -exec zstd --rm -d {} + for kernel_version in $(basename -a /lib/modules/*) ; do depmod $kernel_version done # Add repos from /etc/YaST2/control.xml eval $(xsltproc /geturls.xsl /etc/YaST2/control.xml) rm /geturls.xsl zypper ar -f -n "LXQt-Tumbleweed" http://download.opensuse.org/repositories/home:/AndnoVember:/LXQt/openSUSE_Tumbleweed/ lxqt zypper ar -f -n "LXQt6-Tumbleweed" http://download.opensuse.org/repositories/home:/AndnoVember:/LXQt:/Qt6/openSUSE_Tumbleweed/ lxqt6 zypper ar -f -n "Packman-Tumbleweed" http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman zypper ar -f -n "libdvdcss-Tumbleweed" http://opensuse-guide.org/repo/openSUSE_Tumbleweed/ libdvdcss #====================================== # /etc/sudoers hack to fix #297695 # (Installation Live CD: no need to ask for password of root) #-------------------------------------- #sed -i -e "s/ALL\tALL=(ALL) ALL/ALL ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers #chmod 0440 /etc/sudoers echo "linux ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/50-livecd # mkpasswd -m help # mkpasswd -m sha-512 -S `pwgen -s1n 16` # mkpasswd -m md5 -S `pwgen -s1n 8` # Password: [Enter] /usr/sbin/useradd -m -u 1000 $_USER -c "Live-CD User" -p '$1$s0sUhpLo$ADZGuj393N8sdzXiUGfjS1' #/usr/sbin/usermod -p '$6$lN2kEqjPYu9JF0wW$E1rOwqyQR3D9kcOAMAv6QO6sLPsMbaH5fqnkEuZKPUNR.AQ/tsJMiUs0MDSdI.w5wHcl2s.iJPIDXpsG.t7W/.' root # delete passwords passwd -d root #passwd -d $_USER # empty password is ok pam-config -a --nullok : > /var/log/zypper.log # Add Installation icon to desktop folder mkdir -p $_HOME/.config $_HOME/Desktop echo 'XDG_DESKTOP_DIR="$HOME/Desktop"' > $_HOME/.config/user-dirs.dirs #cp /usr/share/applications/installation.desktop $_HOME/Desktop/ #cp /usr/share/applications/upgrade.desktop $_HOME/Desktop/ #chmod a+x $_HOME/Desktop/installation.desktop #chmod a+x $_HOME/Desktop/upgrade.desktop chown -R $_USER:$_GROUP $_HOME chkstat --system --set ln -s /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN $_USER baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE us.map.gz baseUpdateSysConfig /etc/sysconfig/keyboard YAST_KEYBOARD "english-us,pc104" baseUpdateSysConfig /etc/sysconfig/keyboard COMPOSETABLE "clear latin1.add" baseUpdateSysConfig /etc/sysconfig/language RC_LANG "" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_FONT "eurlatgr.psfu" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_SCREENMAP trivial baseUpdateSysConfig /etc/sysconfig/console CONSOLE_MAGIC "(K" baseUpdateSysConfig /etc/sysconfig/console CONSOLE_ENCODING "UTF-8" _CURSOR=Adwaita baseUpdateSysConfig /etc/sysconfig/windowmanager X_MOUSE_CURSOR $_CURSOR echo -e "\nXCURSOR_THEME=$_CURSOR" >> /etc/environment baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm #baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER sddm #update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager default-displaymanager \ # /usr/lib/X11/displaymanagers/sddm 30 baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM lxqt update-alternatives --install /usr/share/xsessions/default.desktop default-xsession.desktop /usr/share/xsessions/lxqt.desktop 30 plymouth-set-default-theme breeze #Disable journal write to disk in live mode, bug 950999 echo "Storage=volatile" >> /etc/systemd/journald.conf # Remove generated files (boo#1098535) rm -rf /var/cache/zypp/* /var/lib/zypp/AnonymousUniqueId /var/lib/systemd/random-seed # Настройка локали cat >> /usr/sbin/langset.sh <<-EOF if [ \$lang == "ru_RU" ] ; then localectl set-locale LANG=ru_RU.UTF-8 localectl set-x11-keymap us,ru pc105 ,winkeys terminate:ctrl_alt_bksp,grp:ctrl_shift_toggle,grp_led:scroll localectl --no-convert set-keymap ruwin_alt-UTF-8 fi EOF #======================================>% _ICON="breeze-dark" _THEME_GTK="Breeze-Dark" _STYLE="kvantum" _THEME="system" _THEME_OB="Arc-Dark" _THEME_KV="KvCyan" _SDDM_THEME="clairvoyance" _WALLPAPER="/usr/share/wallpapers/openSUSEdefault/contents/images/1920x1080.png" _SDDM_WALLPAPER="$_WALLPAPER" if rpmqpack sddm && [ -f /usr/share/sddm/themes/$_SDDM_THEME/theme.conf ] ; then cp /usr/share/sddm/themes/$_SDDM_THEME/theme.conf /usr/share/sddm/themes/$_SDDM_THEME/theme.conf.user sed -i "s|\(background=\).*|\1$_SDDM_WALLPAPER|" /usr/share/sddm/themes/$_SDDM_THEME/theme.conf.user if [ -f /usr/lib/sddm/sddm.conf.d/00-general.conf ]; then cat >> /usr/lib/sddm/sddm.conf.d/00-general.conf <<-EOF [Theme] Current=$_SDDM_THEME CursorTheme=$_CURSOR EOF fi fi if rpmqpack lightdm-qt5-greeter ; then #mkdir -p /var/lib/lightdm/lightdm-qt5-greeter #touch /var/lib/lightdm/lightdm-qt5-greeter/state #chmod 444 /var/lib/lightdm/lightdm-qt5-greeter/state # Для открытия формы входа, последовательно нажать цепочку клавиш: # Up Down Left Right Shift sed -i '/^\;loginform-show-input-chain=/s/^\;//' /etc/lightdm/lightdm-qt5-greeter.conf sed -i '/greeter-background-image/s/jpg/png/' /etc/lightdm/lightdm-qt5-greeter.conf fi sed -i "s/^\(theme=\).*/\1$_THEME/" /etc/xdg/lxqt/lxqt.conf sed -i "s/^\(icon_theme=\).*/\1$_ICON/" /etc/xdg/lxqt/lxqt.conf sed -i "s/^\(style=\).*/\1$_STYLE/" /etc/xdg/lxqt/lxqt.conf sed -i '/\[General\]/s/$/\nwindow_manager=openbox/' /etc/xdg/lxqt/session.conf sed -i 's/\(BROWSER=\).*/\1firefox/' /etc/xdg/lxqt/session.conf sed -i "s|^\(Wallpaper=\).*|\1$_WALLPAPER|" /etc/xdg/pcmanfm-qt/lxqt/settings.conf sed -i "s/\(gtk-icon-theme-name = \).*/\1\"$_ICON\"/" /etc/gtk-2.0/gtkrc sed -i "s/\(gtk-icon-theme-name = \).*/\1$_ICON/" /etc/gtk-3.0/settings.ini sed -i "s/\(gtk-cursor-theme-name = \).*/\1$_CURSOR/" /etc/gtk-3.0/settings.ini sed -i "s/\(gtk-theme-name = \).*/\1\"$_THEME_GTK\"/" /etc/gtk-2.0/gtkrc sed -i "s/\(gtk-theme-name = \).*/\1$_THEME_GTK/" /etc/gtk-3.0/settings.ini if [ -d /usr/share/themes/$_THEME_OB ]; then sed -i "s/Clearlooks/$_THEME_OB/" /etc/xdg/openbox/rc.xml sed -i '/<number>4</s/4/2/' /etc/xdg/openbox/rc.xml #sed -i "s/Onyx/$_THEME_OB/" /etc/xdg/openbox/lxqt-rc.xml fi # 0 - из темы, 1 - окружность, 2 - окружность с процентами, # 3 - батарея с процентами и фоном, 4 - батарея с процентами cat > /etc/xdg/lxqt/lxqt-powermanagement.conf <<-EOF [General] iconType=0 EOF cat >> /etc/xdg/lxqt/globalkeyshortcuts.conf <<-EOF [Alt%2BF11.1] Comment=Skippy-XD Enabled=true Exec=skippy-xd [Super_L.2] Comment=Main menu keyboard shortcut Enabled=true path=/panel/mainmenu/show_hide EOF sed -i "/background = #/!s|^\(background =\).*|\1 $_WALLPAPER|" /etc/xdg/skippy-xd.rc sed -i 's/^\(show = \).*/\1false/' /etc/xdg/skippy-xd.rc if [ -f /etc/clearine.conf ]; then menu="/etc/xdg/openbox/menu.xml" sed -i -e 's/Exit/Execute/' \ -e '/prompt/s|yes|clearine|' \ -e 's/prompt/command/g' $menu fi echo -e 'xscreensaver -no-splash &\nidesk &\ntint2 &\npicom &\nnm-applet &\n' >> \ /etc/xdg/openbox/autostart echo -e 'pnmixer &\ngxkb &\nclipit &\nlxqt-policykit-agent &\n' >> \ /etc/xdg/openbox/autostart cat >> /etc/X11/Xresources <<-EOF Xcursor.theme: $_CURSOR Xcursor.size: 22 xterm*faceName: Monospace:size=11 xterm*rightScrollBar: true EOF echo -e '\nexport QT_QPA_PLATFORMTHEME=lxqt\nexport XDG_CURRENT_DESKTOP=LXQt' >> /etc/skel/.profile cp /etc/skel/.profile /root/ cp /etc/skel/.profile $_HOME/.profile mkdir -p $_HOME/Desktop if [ -f "/usr/share/applications/firefox.desktop" ]; then cp -f /usr/share/applications/firefox.desktop $_HOME/Desktop/ sed -i '/Desktop Entry/s|^|#!/usr/bin/env xdg-open\n|' $_HOME/Desktop/firefox.desktop chmod 0744 $_HOME/Desktop/firefox.desktop fi # Kvantum themes if [ -f /etc/xdg/Kvantum/kvantum.kvconfig ]; then sed -i "s/\(theme=\).*/\1$_THEME_KV/" /etc/xdg/Kvantum/kvantum.kvconfig fi #if [ -f /etc/xdg/tint2/tint2rc ]; then # sed -i 's/\(panel_background_id = \).*/\13/' /etc/xdg/tint2/tint2rc #fi mkdir -p $_HOME/.config cat > $_HOME/.config/lxqt-mimeapps.list <<-EOF [Default Applications] inode/directory=pcmanfm-qt.desktop EOF if rpmqpack rsvg-convert ; then mkdir -p /usr/share/icons/Adwaita/48x48/{devices,places} rsvg-convert -a -w 48 /usr/share/icons/Adwaita/scalable/devices/computer.svg -o /usr/share/icons/Adwaita/48x48/devices/computer.png rsvg-convert -a -w 48 /usr/share/icons/Adwaita/scalable/places/user-home.svg -o /usr/share/icons/Adwaita/48x48/places/user-home.png rsvg-convert -a -w 48 /usr/share/icons/Adwaita/scalable/places/user-trash.svg -o /usr/share/icons/Adwaita/48x48/places/user-trash.png fi if [ -x /usr/bin/idesk ]; then mkdir -p $_HOME/.config/idesktop cat > $_HOME/.config/idesktop/computer.lnk <<-EOF table Icon Caption: Computer Command: /usr/bin/pcmanfm-qt computer:/// Icon: /usr/share/icons/Adwaita/48x48/devices/computer.png Width: 48 Height: 48 X: 30 Y: 30 end EOF cat > $_HOME/.config/idesktop/home.lnk <<-EOF table Icon Caption: Home Command: /usr/bin/pcmanfm-qt $_HOME Icon: /usr/share/icons/Adwaita/48x48/places/user-home.png Width: 48 Height: 48 X: 30 Y: 120 end EOF cat > $_HOME/.config/idesktop/browser.lnk <<-EOF table Icon Caption: Web Browser Command: /usr/bin/firefox Icon: /usr/share/icons/hicolor/48x48/apps/firefox.png Width: 48 Height: 48 X: 30 Y: 210 end EOF cat > $_HOME/.config/idesktop/trash.lnk <<-EOF table Icon Caption: Trash Command: /usr/bin/pcmanfm-qt trash:/// Icon: /usr/share/icons/Adwaita/48x48/places/user-trash.png Width: 48 Height: 48 X: 30 Y: 300 end EOF sed -i '/Background\.File/s/jpg/png/' /usr/share/idesk/dot.ideskrc cp /usr/share/idesk/dot.ideskrc $_HOME/.ideskrc fi if [ -x /usr/bin/pnmixer ]; then mkdir -p $_HOME/.config/pnmixer cat > $_HOME/.config/pnmixer/config <<-EOF [PNMixer] SystemTheme=true VolumeControlCommand=pavucontrol-qt [(default)] Channel=Master EOF fi if [ -x /usr/bin/clipit ]; then mkdir -p $_HOME/.config/clipit cat > $_HOME/.config/clipit/clipitrc <<-EOF [rc] save_history=false EOF fi mkdir -p $_HOME/.config/jgmenu cat > $_HOME/.config/jgmenu/append.csv <<-EOF ^sep() Exit,clearine,system-shutdown EOF cat > $_HOME/.config/jgmenu/prepend.csv <<-EOF Web Browser,firefox,firefox File Manager,pcmanfm-qt,system-file-manager Terminal,qterminal,qterminal ^sep() EOF ln -s applications-utilities.svg /usr/share/icons/breeze-dark/categories/32/applications-accessories.svg chown -R $_USER:$_GROUP $_HOME chkstat --system --set mkdir -p /etc/zypp/vendors.d cat > /etc/zypp/vendors.d/packman <<-EOF [main] vendors = openSUSE,http://packman.links2linux.de EOF #======================================>%
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor