Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linux headless ssh docs with new findings #2094

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

e-dong
Copy link
Contributor

@e-dong e-dong commented Feb 3, 2024

Description

  • Replace uinput sudoers hack with better udev rules (user needs to be in input group)
  • Added some info how to configure the DPI to better scale the streamed virtual display on the client device.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if some of this should be changed in our code (udev rules), and others added back to our instructions (add user to input group)...

@@ -206,6 +206,9 @@ Changing Resolution and Refresh Rate
| | Undo: ``xrandr --output HDMI-1 --mode 3840x2160 --rate 120`` |
+----------------------+------------------------------------------------------------------------------------------------------------------------------------+

.. warning::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. warning::
.. attention::

A warning may be a bit extreme.

Comment on lines +257 to +259
reference:
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reference:
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/
**reference:**
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/

@@ -12,7 +12,8 @@ This is a guide to setup remote SSH into host to startup X server and sunshine w
The virtual display is accelerated by the NVidia GPU using the TwinView configuration.

.. attention::
This guide is specific for Xorg and NVidia GPUs. I start the X server using the ``startx`` command.
This guide is specific for Xorg and NVidia GPUs. This guide assumes the host is not using a desktop environment and only a barebones windows manager.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a "barebones" window manager? Can you provide an example?

Comment on lines +265 to +266
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"' | \
sudo tee /etc/udev/rules.d/85-sunshine.rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just update our rules so they work in this situation as well?

Here -> https://github.com/LizardByte/Sunshine/blob/nightly/src_assets/linux/misc/85-sunshine.rules

And anywhere it occurs in the docs?

To enable root login over SSH edit your SSHD config, and add ``PermitRootLogin yes``, and restart the SSH server.

#. First make a backup of your ``/etc/sudoers.d/${USER}`` file.
#. Add the user running sunshine to the `input` group.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be part of our instructions... not sure when or why it got removed.

These changes allow the script to use sudo without being prompted with a password.

e.g. ``sudo $(pwd)/sunshine-setup.sh``
sudo udevadm control --reload-rules && sudo udevadm trigger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I didn't know about these commands... always just rebooted.

.. code-block:: bash

xrdb -merge ~/.Xresources
...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the ... literal? If not someone will take them literally.

.. code-block:: bash

#!/bin/bash

ssh_args="<user>@192.168.X.X" # Or use alias set in ~/.ssh/config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the comment removed?

Comment on lines +511 to +513
DPI References:
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DPI References:
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/
**DPI reference:**
- https://wiki.archlinux.org/title/xorg
- https://winaero.com/find-change-screen-dpi-linux/

@@ -522,5 +522,5 @@ If you have any feedback and any suggestions, feel free to make a post on Discor

.. seealso::
Now that you have a virtual display, you may want to automate changing the resolution
and refresh rate prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate
and refresh rate on the host prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and refresh rate on the host prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate
and refresh rate, on the host, prior to connecting to an app. See :ref:`Changing Resolution and Refresh Rate

@ReenigneArcher ReenigneArcher self-assigned this Feb 9, 2024
@e-dong e-dong marked this pull request as draft February 15, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants