fix-startup

This commit is contained in:
simono41 2018-08-26 19:47:05 +02:00
parent b9aa30cede
commit cc55b99ecd

44
startup
View file

@ -9,17 +9,17 @@ date >> /startup.log
startparameter=$(cat /proc/cmdline) startparameter=$(cat /proc/cmdline)
# for-schleife # for-schleife
for wort in ${startparameter} for wort in ${startparameter}
do do
echo "$wort" echo "$wort"
export ${wort%=*}=${wort#*=} export ${wort%=*}=${wort#*=}
echo "Parameter ${wort%=*} = ${wort#*=}" echo "Parameter ${wort%=*} = ${wort#*=}"
done done
if [ -n "${run}" ]; then if [ -n "${run}" ]; then
echo "${run}" echo "${run}"
sleep 5 #sleep 5
${run} ${run}
fi fi
# Disable IPv6 # Disable IPv6
@ -31,46 +31,46 @@ fi
if cat /proc/cmdline | grep "nvidia=y"; then if cat /proc/cmdline | grep "nvidia=y"; then
echo ":: nvidia driver loaded" echo ":: nvidia driver loaded"
mkdir -p -m 755 /etc/X11/xorg.conf.d/ mkdir -p -m 755 /etc/X11/xorg.conf.d/
nvidia-xconfig nvidia-xconfig
fi fi
echo ":: set graphical-desktop!" echo ":: set graphical-desktop!"
mkdir -p -m 755 "/etc/X11/xinit" mkdir -p -m 755 "/etc/X11/xinit"
if cat /proc/cmdline | grep "desktop=gnome"; then if cat /proc/cmdline | grep "desktop=gnome"; then
echo "exec gnome-session" > /etc/X11/xinit/xinitrc echo "exec gnome-session" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=gnomeflash"; then elif cat /proc/cmdline | grep "desktop=gnomeflash"; then
echo "export XDG_CURRENT_DESKTOP=GNOME-Flashback:GNOME" > /etc/X11/xinit/xinitrc echo "export XDG_CURRENT_DESKTOP=GNOME-Flashback:GNOME" > /etc/X11/xinit/xinitrc
echo "exec gnome-session --session=gnome-flashback-metacity" >> /etc/X11/xinit/xinitrc echo "exec gnome-session --session=gnome-flashback-metacity" >> /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=gnomeclassic"; then elif cat /proc/cmdline | grep "desktop=gnomeclassic"; then
echo "export XDG_CURRENT_DESKTOP=GNOME-Classic:GNOME" > /etc/X11/xinit/xinitrc echo "export XDG_CURRENT_DESKTOP=GNOME-Classic:GNOME" > /etc/X11/xinit/xinitrc
echo "export GNOME_SHELL_SESSION_MODE=classic" >> /etc/X11/xinit/xinitrc echo "export GNOME_SHELL_SESSION_MODE=classic" >> /etc/X11/xinit/xinitrc
echo "exec gnome-session --session=gnome-classic" >> /etc/X11/xinit/xinitrc echo "exec gnome-session --session=gnome-classic" >> /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=cinnamon"; then elif cat /proc/cmdline | grep "desktop=cinnamon"; then
echo "exec cinnamon-session" > /etc/X11/xinit/xinitrc echo "exec cinnamon-session" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=mate"; then elif cat /proc/cmdline | grep "desktop=mate"; then
echo "exec mate-session" > /etc/X11/xinit/xinitrc echo "exec mate-session" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=lxde"; then elif cat /proc/cmdline | grep "desktop=lxde"; then
echo "exec startlxde" > /etc/X11/xinit/xinitrc echo "exec startlxde" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=lxqt"; then elif cat /proc/cmdline | grep "desktop=lxqt"; then
echo "exec startlxqt" > /etc/X11/xinit/xinitrc echo "exec startlxqt" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=xfce4"; then elif cat /proc/cmdline | grep "desktop=xfce4"; then
echo "exec startxfce4" > /etc/X11/xinit/xinitrc echo "exec startxfce4" > /etc/X11/xinit/xinitrc
elif cat /proc/cmdline | grep "desktop=kde"; then elif cat /proc/cmdline | grep "desktop=kde"; then
echo "exec startkde" > /etc/X11/xinit/xinitrc echo "exec startkde" > /etc/X11/xinit/xinitrc
else else
echo ":: default graphical-desktop" echo ":: default graphical-desktop"
fi fi