this post was submitted on 23 Oct 2025
164 points (97.7% liked)

Linux

59202 readers
419 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

Hello, I am writing this because this topic was at first a question I had and I couldn't find an answer to it, information about it online is scarce and outdated so here I am to share what I have figured out; so

Let's establish things

  • Remote Machine = The device processing the program/audio and holding the files, streaming them over to the Local Machine
  • Local Machine = The device which initiates the connection to the Remote Machine, hears the audio, interacts with the programs and receives the files requested

What we'll be using (L/R means Local or Remote respectively)

  • SSH (openSSH) L&R
  • waypipe L&R
  • pipewire, pipewire-pulse and wireplumber L
  • sshfs L
  • Any wlroots based Compositor L
  • Any Terminal Emulator L
  • FUSE L

In my case my compositor of choice will be Labwc, keep in mind all of the components used have a lot of options and you could benefit from checking out whats hot in each of them, I will only cover settings up to things WORKING

First things first install the packages and on the Local Machine make sure you have your sound system running for your User, if you hear audio already you should be okay otherwise review your specific distro documentation on how to start the services

For example on Arch: systemctl start pipewire pipewire-pulse wireplumber --user

Next is to start your Compositor of choice and open up a terminal emulator, you should first make a connection from the Local Machine to the Remote Machine with SSH and your credentials so

For example: ssh -p 7777 -l user 192.168.100.2

Managed to connect to your Remote Machine? Great now we'll need to do the set-up, we're going to need to make an environment variable set automatically on each SSH login

This variable has to set-up on SSH LOGIN ONLY as to not disturb the Remote Machine's local audio playing for when it is used locally, there might be many ways to setup this, in my case I'm gonna add this line to ~/.bash_profile

For example: if ! [ "x${SSH_TTY}" = "x" ]; then export PULSE_SERVER=localhost:4713; fi

This will automatically execute on login, evaluating if it's an SSH login, and adding the environment variable PULSE_SERVER=localhost:4713 which will tell applications running locally (On the Remote Machine) that the audio socket is the SSH socket we will open, which sends it back to your Local Machine's audio service (Encrypting it)

When this is done, we can exit the Remote Machine's shell and everything is basically ready on the Remote Machine

Now on our Local Machine we have to modify our SSH command to create the audio socket we have mentioned prior

For example: ssh -p 7777 -l user -R 4713:localhost:4713 192.168.100.2

The important part is -R 4713:localhost:4713 which is creating the socket on both ends and redirecting through your localhost and onto your audio server's default listening port (4713), now we just have to make the Audio server listen to your localhost loading it's Remote sound module

For example: pactl load-module module-native-protocol-tcp listen=127.0.0.1

This needs to be run each time the Local Machine's audio server restarts, but don't worry about that adding complexity you won't need to remember this

Next up we should set-up waypipe, this application allows forwarding both Wayland native applications AND wayland compositors themselves, so if there is an X11 only application you can't forward through Waypipe, you can start a compositor instead and use it from there (Wine games, to say my use case) just like a Remote Desktop

For example: waypipe --video h264 ssh -p 7777 -l user -R 4713:localhost:4713 192.168.100.2

In my example command, I use hardware accelerated video encoding which greatly increases performance, you may just want to use waypipe alone however which uses default settings, I highly recommend reading waypipe documentation for achieving the best performance for your setup and test it with your application of choice

For example: WLR_RENDERER=gles2 Labwc (executed on the Remote Machine Shell, will open it on your Local Machine's Compositor)

Finally, for setting up Remote File Access we use sshfs prior to connecting to the Remote Machine, this utility mounts a Remote Filesystem on a local directory through SSH and FUSE using the sftp protocol which is all encrypted

For example: sshfs -p 7777 user@192.168.100.2:/home/user/RemoteDirectory/ /home/user/LocalDirectory/

Nice, now we have it all set up and ready to work, we can finally make it convenient to use, in my case I prefer to run all of this as a script easily accessible on my terminal as a single command that executes the script located on my scripting environment, and we add two more commands that just unload the Audio Server module and the Remote Filesystem mount when we're done

For an example script:

pactl load-module module-native-protocol-tcp listen=127.0.0.1
sshfs -p 7777 user@192.168.100.2:/home/user/RemoteDirectory/ /home/user/LocalDirectory/
waypipe --video h264 ssh -p 7777 -l user -R 4713:localhost:4713 192.168.100.2
pactl unload-module module-native-protocol-tcp
umount /home/user/LocalDirectory/

Let's say we create this script and it's saved in our home folder, we just have to make it executable (chmod +x scriptdir) and run it from our Terminal Emulator

For example: ./Remote\ Machine1.sh

And it will automatically set up everything for us and ask for our Credentials, we have a perfect workspace that imitates that of a remote desktop experience, on Wayland (may not be exclusive to this but that's what I'm doing here)

Did I miss anything? Have suggestions? Let me know what can be done better and I'll update this post, thanks for reading and have a good one

all 23 comments
sorted by: hot top controversial new old
[–] beeng@discuss.tchncs.de 2 points 1 day ago (1 children)

Dream is lite client in lounge and beefy server in cupboard.. This gonna help there or should I still look into moonlight and sunshine etc?

[–] Coki91@lemmy.world 1 points 1 day ago

I'm having a hard time understanding your comment, do you mean your goal is to have a light client on the Local Machine and a dependable (sturdy/not crashing) Server on the Remote Machine? If so this isn't quite it

Besides the SSH server, all components used initialize on demand and there is no other responsible for stability than the SSH Daemon, so that's for you to judge, other components may error or crash at their own leisure, just like the applications you would execute within them may

I have only heard of Moonlight and Sunshine, you should totally check them out, using them was also a consideration before I managed to do what I posted here, with this "much" configuration and for my case it is completely dependable with no admin intervention

[–] petrichornetrainfall@piefed.social 20 points 3 days ago (1 children)

You have no idea how grateful I am to you right now.

This has been on my personal project backlog for awhile now. I have run into so many issues and headaches with possible rdp or vnc solutions for my desired use case, especially with wayland being a must have.

I have recently fell in love with ssh and was planning on looking more into waypipe as a possible route to take as I kept seeing it recommended, but the examples and documentation i found was always "generic" or surface level and didn't have enough of the pieces I needed to scrape together.

I've been putting it off due to only having surface level knowledge about all the pieces, and you merged like 10 of them in one go.

My biggest question to you is what is performance like? Like picture quality, audio delay, and latency/responsiveness around mouse and keyboard inputs? How does it compare to using something like an ipkvm, rdp, rust desktop, etc?

[–] Coki91@lemmy.world 2 points 3 days ago* (last edited 3 days ago) (1 children)

Right, so as I mentioned in the post, hardware accelerated encoding for waypipe greatly increases performance and that's the one thing I can tell you makes the night and day of this setup

In my experience, my two devices are low-end on my local network, one of them 10 years old (The Local PC) on Ethernet and the other (The "Remote" PC) is in 5G Wi-fi, audio is 1:1 I can barely tell if there's delay, except when it stutters due to the Wi-fi being wi-fi, for video it's clearly compressed with h264 so colors are a bit off but otherwise it doesn't struggle either, latency and responsiveness feel right, like I mentioned in the post WINE Games is my use case for this, and playing Games has a high bar for that, maybe at some point my processor gets jacked to 100% due to the games and it struggles but it has never crashed, and it recovers once intensity tones down

Compared to other systems, I have only used Xrdp and Microsoft's RDP on Windows; and I don't feel any different besides the lack of additional features like drag and drop between devices that aren't a dealbreaker for me

[–] petrichornetrainfall@piefed.social 1 points 3 days ago (1 children)

I'll definitely have to take advantage of the hardware acceleration.

In regards to gaming, what kinds of games have you typically used this for? I'm not thinking about using this for competitive shooters or something like that where every ms counts, but what about games like a souls like where timing a parry or something matters, have you tried anything like that?

Lacking those features is perfect fine for me, I'm looking more for a remote display and input implementation anyway.

One last question, have you experimented with any compression or "enhanced" encryption for the ssh connection? If so, has that impacted the responsiveness at all?

[–] Coki91@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

There's actually some issues with games that make the Mouse Cursor stick to the center and turn the camera with movement (like most FPS do) which also happened on Windows to me, the Mouse has like x10 the sensitivity and is hardly controllable, other games that don't do that (like point and click games where the Cursor is free) don't present this issue

Besides that, I have played mostly keyboard centric games, a fighting-game style MMO that I have engaged in both PvE and PvP Gameplay and besides the bullshit moments in PvP where the Wi-fi turned on me, I really can't complain of performance, haven't played Souls games OR games using a joystick controller, it's probably something that needs testing

If you mean the compression that waypipe offers with -c, I used for the longest time "-c none" thinking it would free my CPU of all overhead possible, that's probably the right play on a local network environment but I have since some time ago rid of that to see and I again don't notice a difference, so if you plan to go out and connect back through a private LAN like Tailscale you may want to keep it on the default compression algorithm

[–] AnarchistArtificer@slrpnk.net 7 points 2 days ago (2 children)

This isn't useful to me at the moment, but nonetheless, I really appreciate when people like you take the time to share knowledge in this way.

There is a special place in heaven for the people who do this, just as there's a special place in hell for people who reply to their own forum post about a complex technical problem.

(Side note: I tried the find the xkcd where he is yelling at his computer after finding a forum post from someone who has the exact same computer problem as he does, but the original poster hasn't updated it. Alas, I couldn't. If anyone knows which one I mean, I'd appreciate you pointing me to it, because it'll drive me mad until I remember how to find it)

[–] strlcpy@lemmy.sdf.org 2 points 2 days ago (1 children)

Thanks for reminding me of that comic! Took me some time to find it though

[–] AnarchistArtificer@slrpnk.net 1 points 1 day ago (1 children)

Do you have a link? Because if you tell me you found it but don't tell me where, then that may put you at risk of being in the same ring of hell as people who comment "nvm, solved it" to their tech forum posts.

[–] strlcpy@lemmy.sdf.org 1 points 1 day ago* (last edited 1 day ago)

That was the joke 😅

But here it is (I think?): https://xkcd.com/979/

[–] astro@leminal.space 2 points 2 days ago (1 children)

Hey, thanks for the write-up, this is cool. Do you have any latency issues with the video? If so, or you want to lower the bitrate for responsiveness over WAN, you might want to look into integrating gst-wayland-display and gstreamer.

[–] Coki91@lemmy.world 1 points 2 days ago

I have wrote up another comment in more detail of this, but to briefly summarize there isn't any outrageous latency that isn't present on other remote control applications (Xrdp for example)

I'm not well versed into Gstreamer, in my mind it is a new ffmpeg and in fact, ffmpeg is what waypipe uses for it's video backend, so perhaps it's also possible to extend the waypipe code to add a bitrate switch on the ffmpeg calls, though there's nothing of that right now, would be a nice suggestion to the project

[–] StrangeAstronomer@lemmy.ml 1 points 2 days ago (1 children)

Just mount the 'remote' file system via NFS (or samba, if you must) and play the media on the 'local' machine as if it were a local file. Done. What am I missing?

[–] Coki91@lemmy.world 4 points 2 days ago

I think in the context of the post, you're missing everything else that's not remote file sharing