├── LICENSE.md ├── README.md ├── curl_install.sh ├── force-steamos-on-next-boot.service └── img └── Select.png /LICENSE.md: -------------------------------------------------------------------------------- 1 | # DON'T BE A DICK PUBLIC LICENSE 2 | 3 | [Source](https://github.com/philsturgeon/dbad) 4 | 5 | > Version 1.2, February 2021 6 | 7 | > Copyright (C) 2022 scawp 8 | 9 | Everyone is permitted to copy and distribute verbatim or modified copies of this license document. 10 | 11 | > DON'T BE A DICK PUBLIC LICENSE 12 | > TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 13 | 14 | 1. Do whatever you like with the original work, just don't be a dick. 15 | 16 | Being a dick includes - but is not limited to - the following instances: 17 | 18 | 1a. Outright copyright infringement - Don't just copy the original work/works and change the name. 19 | 1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. 20 | 1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. 21 | 22 | 2. If you become rich through modifications, related works/services, or supporting the original work, 23 | share the love. Only a dick would make loads off this work and not buy the original work's 24 | creator(s) a pint. 25 | 26 | 3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes 27 | you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back or submit a [bug report](https://www.chiark.greenend.org.uk/~sgtatham/bugs.html). 28 | 29 | 4. If you use code, calling it your own would make you a ROYAL dick. [How to cite a repo](https://academia.stackexchange.com/questions/14010/how-do-you-cite-a-github-repository). Alternatively, even just a comment giving attribution to where you found the code would be OK. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Steam-Deck.Force-SteamOS-On-Boot 2 | When Dual Booting, This Script will Force SteamOS to Boot back into SteamOS when Powering on rather than Windows 3 | 4 | The Script can also be manually configured to Boot into other OSes from the install script as such: 5 | 6 | 7 | 8 | # How Does this work? 9 | 10 | A systemd service is installed that tells the system to launch SteamOS on the next boot (as seen in `efibootmgr`). 11 | 12 | Updated Script will now set `BootNext` (the next OS to boot) to `CurrentBoot` (the OS you are currently in aka SteamOS) 13 | 14 | # Install (via Curl) 15 | 16 | In Konsole type `curl -sSL https://raw.githubusercontent.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/main/curl_install.sh | bash` 17 | 18 | 19 | # Uninstall 20 | 21 | Simply Delete the service 22 | 23 | `sudo rm /etc/systemd/system/force-steamos-on-next-boot.service` 24 | 25 | 26 | # Found a Bug? 27 | 28 | Please add to the `issues` tab! https://github.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/issues 29 | 30 | # "This is cool! How can I thank you?" 31 | ### Why not drop me a sub over on my youtube channel ;) [Chinballs Gaming](https://www.youtube.com/chinballsTV?sub_confirmation=1) 32 | 33 | ### Also [Check out all these other things I'm making](https://github.com/scawp/Steam-Deck.Tools-List) 34 | -------------------------------------------------------------------------------- /curl_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #Steam Deck Force-SteamOS-On-Boot by scawp 3 | #License: DBAD: https://github.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/blob/main/LICENSE.md 4 | #Source: https://github.com/scawp/Steam-Deck.Force-SteamOS-On-Boot 5 | # Use at own Risk! 6 | 7 | #curl -sSL https://raw.githubusercontent.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/main/curl_install.sh | bash 8 | 9 | #stop running script if anything returns an error (non-zero exit ) 10 | set -e 11 | 12 | repo_url="https://raw.githubusercontent.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/main" 13 | 14 | tmp_dir="/tmp/scawp.SDFSOB.install" 15 | 16 | service_install_dir="/etc/systemd/system" 17 | 18 | zenity --question --width=400 \ 19 | --text="Read $repo_url/README.md before proceeding. \ 20 | \nDo you want to install the Force-SteamOS-On-Boot service?" 21 | if [ "$?" != 0 ]; then 22 | #NOTE: This code will never be reached due to "set -e", the system will already exit for us but just incase keep this 23 | echo "bye then! xxx" 24 | exit 0; 25 | fi 26 | 27 | echo "Making tmp folder $tmp_dir" 28 | mkdir -p "$tmp_dir" 29 | 30 | echo "Downloading Required Files" 31 | curl -o "$tmp_dir/force-steamos-on-next-boot.service" "$repo_url/force-steamos-on-next-boot.service" 32 | 33 | set +e 34 | 35 | zenity --question --width=400 \ 36 | --text="Configuration Type:" \ 37 | --cancel-label="Auto (SteamOS)" \ 38 | --ok-label="Manual" 39 | 40 | if [ "$?" = 0 ]; then 41 | IFS=$'[\t|\n]'; 42 | selected_boot=$(zenity --list --title="Select Default Boot Devive" \ 43 | --width=400 --height=400 --print-column=2 --separator="\t" \ 44 | --ok-label "Save" --cancel-label="Auto (SteamOS)" \ 45 | --radiolist --column="check" --column="Boot No." --column="Name" \ 46 | $(efibootmgr | grep -Po "Boot[0-9].*\t" | sed -e "s/*/\t/" -e "s/^/FALSE\t/")) 47 | unset IFS; 48 | 49 | if [ "$?" = 0 ] && [ "$selected_boot" != "" ]; then 50 | replace="(efibootmgr | grep BootCurrent | sed -e 's/BootCurrent://')" 51 | sed -i "s&\$$replace&$(echo $selected_boot | sed -e "s/Boot//")&g" "$tmp_dir/force-steamos-on-next-boot.service" 52 | fi 53 | fi 54 | 55 | echo "Copying $tmp_dir/force-steamos-on-next-boot.service to $service_install_dir/force-steamos-on-next-boot.service" 56 | sudo cp "$tmp_dir/force-steamos-on-next-boot.service" "$service_install_dir/force-steamos-on-next-boot.service" 57 | 58 | echo "Starting Service" 59 | sudo systemctl enable force-steamos-on-next-boot.service 60 | sudo systemctl start force-steamos-on-next-boot.service 61 | 62 | if [ "$selected_boot" != "" ]; then 63 | sudo efibootmgr -n$(echo $selected_boot | sed -e "s/Boot//") 64 | else 65 | sudo efibootmgr -n$(efibootmgr | grep BootCurrent | sed -e 's/BootCurrent://') 66 | fi 67 | 68 | echo "Done." -------------------------------------------------------------------------------- /force-steamos-on-next-boot.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Force SteamOS on next Boot 3 | 4 | [Service] 5 | Type=oneshot 6 | RemainAfterExit=true 7 | ExecStart=/bin/bash -c "sudo efibootmgr -n$(efibootmgr | grep BootCurrent | sed -e 's/BootCurrent://')" 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /img/Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scawp/Steam-Deck.Force-SteamOS-On-Boot/673cd29ee5bbfc226a12a460a995765a73057143/img/Select.png --------------------------------------------------------------------------------