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}
This commit is contained in:
Doomsdayrs 2020-11-18 15:31:13 -05:00 committed by GitHub
parent 415dec37ad
commit 7b39b93bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,39 +12,52 @@ Sunshine is a Gamestream host for Moonlight
### Requirements: ### Requirements:
Ubuntu 20.04: Ubuntu 20.04:
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 ```
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: ### Compilation:
- `git clone https://github.com/loki-47-6F-64/sunshine.git --recurse-submodules` - `git clone https://github.com/loki-47-6F-64/sunshine.git --recurse-submodules`
- `cd sunshine && mkdir build && cd build` - `cd sunshine && mkdir build && cd build`
- `cmake ..` - `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: ### Setup:
sunshine needs access to uinput to create mouse and gamepad events: sunshine needs access to uinput to create mouse and gamepad events:
- Add user to group 'input': "usermod -a -G input username - Add user to group 'input':
- Create a file: "/etc/udev/rules.d/85-sunshine-input.rules" `usermod -a -G input $USER`
- The contents of the file is as follows: - Create udev rules:
KERNEL=="uinput", GROUP="input", mode="0660" - Run the following command:
- assets/sunshine.conf is an example configuration file. Modify it as you see fit and use it by running: "sunshine path/to/sunshine.conf" `nano /etc/udev/rules.d/85-sunshine-input.rules`
- path/to/build/dir/sunshine.service is used to start sunshine in the background: - Input the following contents:
- `cp sunshine.service $HOME/.config/systemd/user/` `KERNEL=="uinput", GROUP="input", mode="0660"`
- Modify $HOME/.config/systemd/user/sunshine.conf to point to the sunshine executable - Save the file and exit
- `systemctl --user start sunshine` 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: ### Trouleshooting:
* If you get "Could not create Sunshine Gamepad: Permission Denied", ensure you are part of the group "input": - If you get "Could not create Sunshine Gamepad: Permission Denied", ensure you are part of the group "input":
* groups - `groups $USER`
* If Sunshine sends audio from the microphone instead of the speaker, try the following steps:
* pacmd list-sources | grep "name:" - If Sunshine sends audio from the microphone instead of the speaker, try the following steps:
* Copy the name to the configuration option "audio_sink" 1. pacmd list-sources | grep "name:"
* restart sunshine 2. Copy the name to the configuration option "audio_sink"
3. restart sunshine
## Windows 10 ## Windows 10