Parcourir la source

update february (autostart)

wareck il y a 3 ans
Parent
commit
6d3452ee4d
1 fichiers modifiés avec 45 ajouts et 1 suppressions
  1. 45 1
      build_cube.sh

+ 45 - 1
build_cube.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-Version=4.3
+Version=4.4
 Cuda=YES
 ZFS=NO
 Drivers=RAW
@@ -479,10 +479,54 @@ if [ -f /home/wareck/NVIDIA-Linux-x86_64-470.74.run ]; then rm /home/wareck/NVID
 if [ -f /home/wareck/NVIDIA-Linux-x86_64-470.82.00.run ]; then rm /home/wareck/NVIDIA-Linux-x86_64-470.82.00.run ;fi
 if [ -f /home/wareck/.pass1 ]; then rm /home/wareck/.pass1 ;fi
 if [ -f /home/wareck/.pass2 ]; then rm /home/wareck/.pass2 ;fi
+rm /home/wareck/.config/autostart/install_os.desktop
 echo "Done."
 }
 
+function autoroot_ {
+echo -e "$(tput setaf 10)\nInit install:(tput sgr0)"
+if [ ! -d /home/wareck/.config/autostart ]
+then
+mkdir /home/wareck/.config/autostart
+fi
+if [ ! -f /home/wareck/.config/autostart/install_os.desktop ]
+then
+cat <<'EOF'>> /home/wareck/.config/autostart/install_os.desktop
+[Desktop Entry]
+# VERSION=3.36.2
+Name=Terminal
+Comment=Use the command line
+Keywords=shell;prompt;command;commandline;cmd;
+TryExec=gnome-terminal
+Exec=gnome-terminal -- bash -c "sudo /home/wareck/Build_Cube/build_cube.sh; exec bash"
+Icon=org.gnome.Terminal
+Type=Application
+Categories=GNOME;GTK;System;TerminalEmulator;
+StartupNotify=true
+X-GNOME-SingleWindow=false
+OnlyShowIn=GNOME;Unity;
+Actions=new-window;preferences;
+X-Ubuntu-Gettext-Domain=gnome-terminal
+
+[Desktop Action new-window]
+Name=New Window
+Exec=gnome-terminal --window
+
+[Desktop Action preferences]
+Name=Preferences
+Exec=gnome-terminal --preferences
+EOF
+chmod +x /home/wareck/.config/autostart/install_os.desktop
+fi
+if ! grep "wareck" /etc/sudoers >/dev/null
+then
+sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
+fi
+echo "Done"
+}
+
 intro_
+autoroot_
 nvidia_driver_
 update_
 download_packs_