From 7b39b93bb2cf84f82d37a93e2ac595541c19f759 Mon Sep 17 00:00:00 2001 From: Doomsdayrs <38189170+Doomsdayrs@users.noreply.github.com> Date: Wed, 18 Nov 2020 15:31:13 -0500 Subject: [PATCH] Update README.md - Cleaned things up a bit more - Simplified instructions - make instruction has `-j ${nproc}` to ease up the word count - Use $USER instead of {username} --- README.md | 55 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index fc414370..b71d37ec 100644 --- a/README.md +++ b/README.md @@ -12,39 +12,52 @@ Sunshine is a Gamestream host for Moonlight ### Requirements: Ubuntu 20.04: - - sudo apt install cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev +Install the following +``` +sudo apt install cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev +``` ### Compilation: - `git clone https://github.com/loki-47-6F-64/sunshine.git --recurse-submodules` - `cd sunshine && mkdir build && cd build` - `cmake ..` -- `make`: It is suggested to use the `-j C#` flags with this command, `C#` being the number of cores your PC has +- `make -j ${nproc}` ### Setup: sunshine needs access to uinput to create mouse and gamepad events: -- Add user to group 'input': "usermod -a -G input username -- Create a file: "/etc/udev/rules.d/85-sunshine-input.rules" -- The contents of the file is as follows: - KERNEL=="uinput", GROUP="input", mode="0660" -- assets/sunshine.conf is an example configuration file. Modify it as you see fit and use it by running: "sunshine path/to/sunshine.conf" -- path/to/build/dir/sunshine.service is used to start sunshine in the background: - - `cp sunshine.service $HOME/.config/systemd/user/` - - Modify $HOME/.config/systemd/user/sunshine.conf to point to the sunshine executable - - `systemctl --user start sunshine` +- Add user to group 'input': + `usermod -a -G input $USER` +- Create udev rules: + - Run the following command: + `nano /etc/udev/rules.d/85-sunshine-input.rules` + - Input the following contents: + `KERNEL=="uinput", GROUP="input", mode="0660"` + - Save the file and exit + 1. `CTRL+X` to start exit + 2. `Y` to save modifications +- `assets/sunshine.conf` is an example configuration file. Modify it as you see fit then use it by running: + `sunshine path/to/sunshine.conf` +- Configure autostart service + `path/to/build/dir/sunshine.service` is used to start sunshine in the background. To add it, do the following: + 1. Modify `sunshine.conf` to point to the sunshine executable if nessecary + 2. Copy it to the users systemd, `cp sunshine.service ~/.config/systemd/user/` + 3. Starting + - Onetime: + `systemctl --user start sunshine` + - Always on boot: + `systemctl --user enable sunshine` -- assets/apps.json is an [example](README.md#application-list) of a list of applications that are started just before running a stream +- `assets/apps.json` is an [example](README.md#application-list) of a list of applications that are started just before running a stream ### Trouleshooting: - * If you get "Could not create Sunshine Gamepad: Permission Denied", ensure you are part of the group "input": - * groups - * If Sunshine sends audio from the microphone instead of the speaker, try the following steps: - * pacmd list-sources | grep "name:" - * Copy the name to the configuration option "audio_sink" - * restart sunshine - - +- If you get "Could not create Sunshine Gamepad: Permission Denied", ensure you are part of the group "input": + - `groups $USER` + +- If Sunshine sends audio from the microphone instead of the speaker, try the following steps: + 1. pacmd list-sources | grep "name:" + 2. Copy the name to the configuration option "audio_sink" + 3. restart sunshine ## Windows 10