Skip to content

Instantly share code, notes, and snippets.

@C7YPT0N1C
Last active January 10, 2023 14:38
Show Gist options
  • Save C7YPT0N1C/5625ef6a40a558ed6584b6ed62a66419 to your computer and use it in GitHub Desktop.
Save C7YPT0N1C/5625ef6a40a558ed6584b6ed62a66419 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo pacman -Syyu # Update repos and packages
sudo pacman -Syu mesa-amber # Install mesa-amber as mesa causes visual artifacts
sudo pacman -Syu polkit # Installs polkit
sudo pacman -Syyu # Reupdates repos and packages just in case, also to prep for potential steamos-update
sudo steamos-update check # Checks for SteamOS updates
sudo steamos-update now # Updates SteamOS is an update is found
sudo holoiso-grub-update # Updates holoiso grub configuration just to be safe
# The file "/root/.steam/root/config/SteamAppData.vdf" for some reason is required to exist for gamescope to properly initialise, however, it seems that this file is by default not created.
# The following section will check to see if it exists, and if it doesn't, creates it.
# Whilst in desktop modem this file is not written to, so I assume it gets written to whilst in gamemode, or whilst playing a game in or out of gamemode?
if [ -e /root/.steam/root/config/SteamAppData.vdf ] # Checks if file exists
then
echo "File "/root/.steam/root/config/SteamAppData.vdf" exists. Skipping file creation."
else
echo "File "/root/.steam/root/config/SteamAppData.vdf" does not exist. Creating file."
cd /
cd root
if [ -d /root/.steam ]
then
echo "Directory "/root/.steam" exists. Skipping directory creation."
cd .steam
else
echo "Directory "/root/.steam" does not exist. Creating directory."
sudo mkdir .steam
cd .steam
echo "Directory "/root/.steam" created"
fi
if [ -d /root/.steam/root ]
then
echo "Directory "/root/.steam/root" exists. Skipping directory creation."
cd root
else
echo "Directory "/root/.steam/root" does not exist. Creating directory."
sudo mkdir root
cd root
echo "Directory "/root/.steam/root" created"
fi
if [ -d /root/.steam/root/config ]
then
echo "Directory "/root/.steam/root/config" exists. Skipping directory creation."
cd config
else
echo "Directory "/root/.steam/root/config" does not exist. Creating directory."
sudo mkdir config
cd config
echo "Directory "/root/.steam/root/config" created"
fi
sudo touch SteamAppData.vdf
echo "Created file: /root/.steam/root/config/SteamAppData.vdf."
fi
# The variable "XDG_RUNTIME_DIR" seems to not be set properly, causing incorrect system permissions for the users, and seemingly making gamescope fail to initialise.
# The following section will set the variable to the correct value.
echo "export XDG_RUNTIME_DIR=/run/user/1000" >> ~/.pam_environment # Default user ID
echo "export XDG_RUNTIME_DIR=/run/user/1000" >> ~/.bashrc
source ~/.bashrc
sudo holoiso-enable-sessions # Re-enables sessions just in case the user decides to reboot.
sudo holoiso-grub-update # Updates holoiso grub configuration once more, just to be safe
echo "The script has finished running and sessions have been enabled. Try rebooting to test if holoiso now works."
@C7YPT0N1C
Copy link
Author

C7YPT0N1C commented Jan 4, 2023

THIS SCIPT WILL NO LONGER BE UPDATED. UPDATES WILL BE FOUND HERE: https://github.com/C7YPT0N1C/HoloISO-Hotfix
Full Documentation: https://github.com/users/C7YPT0N1C/projects/4

NOTES:

- THIS HAS ONLY BEEN TESTED ON INSTALLATIONS THAT USED THE HOLOISO 4.1 ISO

- THIS SCRIPT MUST BE RUN USING SUPERUSER / SUDO SU. IT WILL NOT WORK OTHERWISE.


After a bit of tinkering, I've got it to work to a decent level. If this does not work for you, please tell me what happens! Testers are appreciated.


Instructions:

- Boot into Holoiso Desktop Mode

- At this point, Steam Desktop will boot up. You may sign in, but this will skip the SteamOS OOBE. I do recommend to sign in, but if you want / need the OOBE, don't sign in.

- Open a web browser and download the script above.

- Extract download.

- Open folder, right click empty space, and click "Open Terminal Here"

- In the terminal that appears, run:

sudo su

then

sudo bash ./HoloISO-4.1-Hotfix.sh

- When the script has finished running, reboot, as "return to game mode" seems to be hella buggy.


Notices:

- You may have to reboot a few times to fully boot up. If a kernel doesn't work, try a different one.

- I may update this script if I find a better hotfix. If I do, please redownload and re-run the script. I will code the script to ensure nothing breaks and no useless files are kept.

- Please keep in mind that when the script runs, mesa-amber will be installed to replace mesa, mesa and mesa-amber both being the 3d graphics library Holoiso / SteamOS use. You can switch to any version of mesa, and see if that works better for you.

- Please keep in mind that this script may have unintended side effects if you have more than 1 user on your system (?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment