Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Switch to desktop #3

Open
Mohandevir opened this issue Jan 15, 2019 · 3 comments
Open

Switch to desktop #3

Mohandevir opened this issue Jan 15, 2019 · 3 comments

Comments

@Mohandevir
Copy link

Mohandevir commented Jan 15, 2019

It's not an issue it's just a remark (might have posted at the wrong place?).

You might already know it, but I discovered that the "Switch to Desktop" (BPM feature) works with lightdm instead of GDM3, on Ubuntu 18.04. I'm not a programmer so I don't have the skills to tell you why, but that's the workaround I personally use. You must add the desktop user (required) to the nopasswdlogin group though.

Have you found a way to make it work with GDM3?

Thanks for this project; I'm doing all of that on my own and with my limited skills. I was looking to create a minimal "Steambuntu.iso" with distroshare when I stumbled upon this. :)

@andreashuetter
Copy link

What is necessary to use lightdm instead of GDM?

@Mohandevir
Copy link
Author

Mohandevir commented Dec 27, 2019 via email

@Mohandevir
Copy link
Author

Mohandevir commented Jan 13, 2020

Ok... Let's do this from the start...

1- Install Ubuntu 18.04. Create your admin account (must be named desktop and nothing else);
2- Personally, I use this script which is a modified version of the script supplied on this github:

#!/bin/bash

Set the defaults. These can be overridden by specifying the value as an

environment variable when running this script.

NON_INTERACTIVE="${NON_INTERACTIVE:-false}"

Configure the default versions of the SteamOS packages to use. These generally

don't ever need to be overridden.

STEAMOS_COMPOSITOR_VER="${STEAMOS_COMPOSITOR_VER:-1.35+bsos1_amd64}"
STEAMOS_MODESWITCH_VER="${STEAMOS_MODESWITCH_VER:-1.10+bsos1_amd64}"
STEAMOS_PLYMOUTH_VER="${STEAMOS_PLYMOUTH_VER:-0.17+bsos2_all}"

Ensure the script is being run as root

if [ "$EUID" -ne 0 ]; then
echo "This script must be run with sudo."
exit
fi

Confirm from the user that it's OK to continue

if [[ "${NON_INTERACTIVE}" != "true" ]]; then
echo "This script will configure a SteamOS-like experience on Ubuntu."
read -p "Do you want to continue? [Yy]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Starting installation..."
else
echo "Aborting installation."
exit
fi
fi

Create 'steam' user account.

echo "Creating the steam user account..."
adduser steam

Replace GDM3 with Lightdm and configure the desktop user.

Required to make the BPM "Switch to desktop" feature work.

apt remove gdm3 -y
apt install lightdm -y
usermod -a -G nopasswdlogin desktop
usermod -a -G nopasswdlogin steam
dpkg-reconfigure lightdm

Install steam and steam device support.

echo "Installing steam..."
apt update
apt install steam steam-devices -y

Download the packages we need. If we fail at downloading, stop the script.

set -e
echo "Downloading SteamOS packages..."
wget "http://repo.steamstatic.com/steamos/pool/main/s/steamos-compositor/steamos-compositor_${STEAMOS_COMPOSITOR_VER}.deb"
wget "http://repo.steamstatic.com/steamos/pool/main/s/steamos-modeswitch-inhibitor/steamos-modeswitch-inhibitor_${STEAMOS_MODESWITCH_VER}.deb"
wget "http://repo.steamstatic.com/steamos/pool/main/p/plymouth-themes-steamos/plymouth-themes-steamos_${STEAMOS_PLYMOUTH_VER}.deb"
set +e

Install the steamos compositor, modeswitch, and themes

echo "Configuring the SteamOS boot themes..."
dpkg -i ./*.deb &>/dev/null
apt install -f -y
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/steamos/steamos.plymouth 100
update-alternatives --set default.plymouth /usr/share/plymouth/themes/steamos/steamos.plymouth

Enable automatic login on steam user and default to SteamOS BPM UI.

echo "Enabling automatic login..."
echo '[SeatDefaults]' > /etc/lightdm/lightdm.conf
echo 'autologin-user=steam' >> /etc/lightdm/lightdm.conf

echo '[InputSource0]' > /var/lib/AccountsService/users/steam
echo 'xkb=ca' >> /var/lib/AccountsService/users/steam
echo ' ' >> /var/lib/AccountsService/users/steam
echo '[User]' >> /var/lib/AccountsService/users/steam
echo 'XSession=steamos' >> /var/lib/AccountsService/users/steam
echo 'SystemAccount=false' >> /var/lib/AccountsService/users/steam

Change desktop wallpaper

gsettings set org.gnome.desktop.background picture-uri "file:////usr/share/plymouth/themes/steamos/steam.png"

Update the grub theme.

cp /usr/share/plymouth/themes/steamos/steam.png /boot/grub

Updating grub for splash screen resolution issue

echo 'GRUB_GFXMODE=1920x1080' >> /etc/default/grub
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
update-initramfs -u
update-grub

echo ""
echo "Installation complete! Press ENTER to reboot or CTRL+C to exit"
read -r
reboot

That's it. This way, the switch to desktop option in steamos-compositor should now work as expected. At least, on my 2 setups, it does.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants