跳过正文

使用Sunshine优雅地对Windows桌面进行串流

·979 字·
Hiroi
作者
Hiroi
ポジション ゼロ!
目录
远程办公 - 这篇文章属于一个选集。
§ 2: 本文

开始之前
#

串流客户端设备应当

  • 屏幕不小
  • 有键盘和鼠标

这样才会有比较好的体验

1. 安装Sunshine
#

服务端 Sunshine
#

没啥好说的,从GitHub上下载最新版安装包

客户端 Moonlight
#

没啥好说的,从官网下载最新版安装包

2. 虚拟显示器
#

如果不使用虚拟显示器,在串流时物理显示器也会同步显示,并且只能根据物理显示器选择分辨率和刷新率。

下载VDD驱动
#

GitHub仓库上下载最新Virtual Display Driver程序,这里建议选择no HDR版本,相信不会有人用远程桌面串流HDR内容。

配置VDD驱动
#

  1. 打开解压后得到的option.txt文件,添加自定义分辨率和刷新率。这里推荐按照要运行的Moonlight客户端的设备的分辨率和刷新率填写,比如,笔者用平板进行串流,就把平板的分辨率和刷新率填写了进去
  2. option.txt复制到C:\IddSampleDriver\option.txt
  3. 以管理员权限运行*.bat以安装证书
  4. 打开设备管理器,点击任意设备,然后点击操作,选择添加过时硬件
  5. 安装我手动从列表选择的硬件,选择显示适配器下一页,从磁盘安装,选择解压后得到的.inf文件

Download the latest version from the releases page, and extract the contents to a folder. Copy option.txt to C:\IddSampleDriver\option.txt before installing the driver (important!). Right click and run the *.bat file as an Administrator to add the driver certificate as a trusted root certificate. Don’t install the inf. Open device manager, click on any device, then click on the “Action” menu and click “Add Legacy Hardware”. Select “Add hardware from a list (Advanced)” and then select Display adapters Click “Have Disk…” and click the “Browse…” button. Navigate to the extracted files and select the inf file. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Sunshine, your Oculus or VR settings, and should be able to be streamed from. You can enable/disable the display adapter to toggle the monitors. Ps. Make sure that options.txt is accesible for the system at C:\IddSampleDriver\option.txt or the installation will fail.

3. 配置Sunshine
#

如果您已经安装了Sunshine,那么托盘中应当已经出现Sunshine图标。右键Sunshine图标,点击Open Sunshine(如果是首次安装,可能会需要您设置用户名密码)。点击配置(Configuration),在命令准备工作(Command Preparations)中按顺序填入以下内容

config.do_cmd config.undo_cmd 说明
rundll32 user32.dll,LockWorkStation 退出串流时,锁定电脑
DisplaySwitch /external DisplaySwitch /internal 开启串流时,将显示器切换为刚刚配置的虚拟显示器;退出串流时,切换为原来的显示器

点击 保存(Save) 应用(Apply)

4. 开启愉悦的偷税时光
#

使用Moonlight连接到Sunshine主机(首次连接需要先进行PIN配对),开启愉悦的偷税时光吧。如果您的网络环境支持IPv6,那么您无需内网穿透,配合WakeOnLan,可以优雅地实现远程办公甚至游戏。

远程办公 - 这篇文章属于一个选集。
§ 2: 本文