{"id":81,"date":"2023-11-28T04:35:15","date_gmt":"2023-11-28T04:35:15","guid":{"rendered":"https:\/\/nocoffei.com\/?p=81"},"modified":"2023-11-28T04:35:16","modified_gmt":"2023-11-28T04:35:16","slug":"rustdesk-with-tailscale-on-arch-linux","status":"publish","type":"post","link":"https:\/\/nocoffei.com\/?p=81","title":{"rendered":"RustDesk with Tailscale on Arch Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/rustdesk.com\/\">RustDesk<\/a> is an interesting new remote desktop platform. It&#8217;s open-source, self-hostable, and seems to be fairly performant to boot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to run it for myself. I use <a href=\"https:\/\/tailscale.com\/\">Tailscale<\/a> to connect my devices together, a truly wonderful piece of software that magically connects everything in a private VPN.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesks documentation makes no reference to Tailscale. It also makes no reference to the <a href=\"https:\/\/aur.archlinux.org\/packages\/rustdesk-server-bin\">AUR package<\/a> for the RustDesk server that was apparently put up. So I&#8217;m providing my simple instructions that I discovered through trial and error to run the RustDesk server on an Arch Linux host with KDE Plasma.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">On Wayland<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m happy to be proven wrong about this\u2014 please hit me up in the comments below\u2014 but after a few years of daily driving Wayland, I found that remote desktop is simply not possible with it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I tried a couple different applications:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.nomachine.com\/\">NoMachine<\/a> advertises support for Wayland, but I got a black screen and\/or lockups when I tried to use it.<\/li>\n\n\n\n<li><a href=\"https:\/\/apps.kde.org\/krfb\/\">KRFB<\/a> managed to connect and display a single frame, but cannot display subsequent frames.<\/li>\n\n\n\n<li><a href=\"https:\/\/quantumproductions.info\/articles\/2023-08\/remote-desktop-using-rdp-protocol-plasma-wayland\">KRDP<\/a> is an in-development RDP server that intends to ship with Plasma 6, but it&#8217;s not done yet. Additionally, it has <a href=\"https:\/\/discuss.kde.org\/t\/remote-desktop-using-the-rdp-protocol-for-plasma-wayland\/3616\/11\">no plans to support unattended access.<\/a> If I&#8217;m reading that right, it means that you&#8217;ll always need to be physically present to connect.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/LizardByte\/Sunshine\">Sunshine<\/a> has a long-standing bug that makes it unusable on Wayland because <a href=\"https:\/\/github.com\/LizardByte\/Sunshine\/issues\/93\">the mouse cursor is invisible<\/a>.<\/li>\n\n\n\n<li>RustDesk itself has promising Wayland support, but when you open it under a Wayland session it reports the following:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"424\" height=\"401\" src=\"https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/Screenshot_20231127_220853.png\" alt=\"\" class=\"wp-image-82\" srcset=\"https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/Screenshot_20231127_220853.png 424w, https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/Screenshot_20231127_220853-300x284.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">While it&#8217;s possible to successfully connect to RustDesk under Wayland, you must be physically present, as it opens a confirmation window asking which screen you&#8217;d like to share.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m optimistic that RustDesk will improve their Wayland support (and\/or Wayland will implement the necessary protocols to handle this use case), Sunshine will fix their bug, and KRDP will hopefully ship as being usable, but after many attempts of my own at making this functional it&#8217;s clear that we just aren&#8217;t there yet in 2023. So for now I&#8217;ll begrudgingly switch back to X11.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What we&#8217;ll be doing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk is composed of two parts\u2014 a client, which all devices run, and connect to each other to create remote desktop connections, and a server, which all clients talk to to negotiate connections.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk has two <a href=\"https:\/\/github.com\/rustdesk\/rustdesk?search=1#free-public-servers\">free servers<\/a> but the app strongly recommends that you run your own server, so that&#8217;s what we&#8217;ll do. I can confirm that self-hosting the server massively improves my quality of service. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installing the client on each device is trivial, but installing the server is a bit trickier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">On to the content<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These were the steps I took to get RustDesk working with Tailscale. Ideally they&#8217;ll work for you, but if they don&#8217;t, please don&#8217;t start a mob. I&#8217;m just a guy on the internet writing what worked for me.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On both host and client:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yay -S rustdesk<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I found some bug or another with the binary package, I don&#8217;t remember what it was, so we&#8217;ll build from source. This takes a while so get comfortable!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On the host only:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yay -S rustdesk-server-bin\nsudo systemctl enable rustdesk-server-hbbr\nsudo systemctl enable rustdesk-server-hbbs\nsudo systemctl start rustdesk-server-hbbr\nsudo systemctl start rustdesk-server-hbbs<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There don&#8217;t seem to be AUR packages for building the server from source.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On both host and client:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open RustDesk and set the ID server to the <strong>name of your Tailscale node of your host<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the key part that I don&#8217;t think anyone else has jotted down yet. <strong>You must do this on both the client <em>and the host!<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My desktop is named <code>glados<\/code> in Tailscale, so I&#8217;ll set it accordingly on both the host and the client:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"371\" src=\"https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/image.png\" alt=\"\" class=\"wp-image-83\" srcset=\"https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/image.png 781w, https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/image-300x143.png 300w, https:\/\/nocoffei.com\/wp-content\/uploads\/2023\/11\/image-768x365.png 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Optional:<\/em> Set a permanent password in the Security tab of settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, take the RustDesk ID of the host, plug it in to the guest, and you should be connected! Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Marginally improving documentation for a remote desktop program.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/nocoffei.com\/index.php?rest_route=\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nocoffei.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nocoffei.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nocoffei.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nocoffei.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=81"}],"version-history":[{"count":0,"href":"https:\/\/nocoffei.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"https:\/\/nocoffei.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nocoffei.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nocoffei.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}