Skip to content

Instantly share code, notes, and snippets.

@rodhfr
Last active May 2, 2023 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodhfr/a93bb367a7c529a7d2794dd66001d168 to your computer and use it in GitHub Desktop.
Save rodhfr/a93bb367a7c529a7d2794dd66001d168 to your computer and use it in GitHub Desktop.
Setup Chrome-Remote-Desktop with sound on Debian based distros

Setup Chrome-Remote-Desktop with sound on Debian based distros

Finally i got to setup chrome remote desktop on debian based distros working with sound

I'm no expert and it took me a whole day to figure out this process, because it's not straightforward at all.

install google chrome (i don't know if really needed)

go to https://remotedesktop.google.com

setup via ssh

next

download the .deb Debian Linux: https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb

install remote desktop .deb present in the downloads folder via

$ sudo apt install ./chrome-remote-desktop_current_amd64.deb

next

auth

copy the Debian Linux Command and paste to terminal press enter

Now should be working but without sound and maybe can't login if not disconnected to your user x server (at this point you have to logout from the "physical machine" THEN log in via the remote)

So let's fix the audio and this login issue. There is info about these steps here: https://overbrace.com/bernardparent/viewtopic.php?t=1491

You should create a text file in the home folder to start pulseaudio and tell remote desktop which user you want to cast

Add a specific group to chrome remote desktop

$ sudo groupadd chrome-remote-desktop

Then add your user inside the group now created

$ sudo usermod -a -G chrome-remote-desktop yourusername

Check that you are part of the newly created group by

$ groups yourusername

Now there's some configuration files to create

$ touch ~/.chrome-remote-desktop-session

Open this file with some text editor (nano, vim, etc) and append the following based on YOUR settings

/usr/bin/pulseaudio --start

startxfce4 :1000

this 1000 is the id relative to the user you want to login remotely. Maybe this xfce4 will change too if you're using another desktop environment. Note that you can create multiple users to multi-login.

To check the id:

$ id

Now restart the service

I didn't had any problems concerning resolution but there is a fix:

the resolution can be set by adding the following to ~/.profile:

export CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES=1920x1280

Here you replace with any screen resolution that you have, for laptops sometimes these values are different.

$ sudo service chrome-remote-desktop restart Now everything should probably be working...

Unless you have pipewire instead of pulseaudio installed in your system. The following measures are not advisable CAN BREAK YOUR SYSTEM. If you don't know what are you doing the best advice is not to mess with this. BUT, is possible to remove pipewire and install pulseaudio with the subsequent steps.

$ systemctl --user unmask pulseaudio

$ systemctl --user --now disable pipewire pipewire-pulse pipewire-media-session.service

$ sudo apt remove pipewire-audio-client-libraries pipewire libspa-0.2-bluetooth libspa-0.2-jack

$ sudo apt install pulseaudio pavucontrol

$ systemctl --user --now enable pulseaudio.service pulseaudio.socket

$ systemctl --user restart pulseaudio.service

The first three commands are to uninstall and disable pipeware the last three are for installing and enabling pulseaudio

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