12 ms·
Use a laptop as a 2nd display on Linux using FreeRDP
- 1MachineElf 4y agoThis far, FreeRDP has always required me to logout of the local X session of whatever server I'm connecting to. In order for this to be possible, it seems that logout requirement can be avoided. I'm intrigued.
- rcarmo 4y agoThey set up additional virtual displays, and older Xrdp servers also used to mirror the hardware framebuffer, so no need to logout.
- iforgotpassword 4y agoHas freerdp gotten so much better? About 5 years ago, tigervnc was much smoother than freerdp when I did the same thing. It almost felt like freerdp was just a translation layer on top of vnc.
- weare138 4y agoOP mentions that at the end of the article: In my testing, VNC is not a suitable replacement for FreeRDP in this setup--it's too slow.
- jacob019 4y agoAs a protocol RDP is way ahead of VNC. The latest versions support H264 video encoding and AAC audio. With a beefy Windows server and FreeRDP as a client, I can stream 1080P YouTube from a remote desktop over the Internet at 60FPS. RFX progressive encoding isn't bad either. The trouble with FreeRDP, at least the older versions, is that you have to explicitly enable these features. I tested VNC in this setup, and it was unusable, about 1s frame rate. Something about this multi-monitor setup just doesn't play well with the VNC software that I tested--x11vnc server and tigervnc client, and I have used those often in other scenarios.
- iforgotpassword 4y agoProtocol-wise I'm aware, but it seems a better fit technically for windows than x11. Making a performant client for linux should be doable, but creating a server that takes advantage of all the protocol features sounds like a much greater effort. And yes, it seems in general something was wrong in your vnc setup. I was doing fullhd back then and typing or moving smaller Windows was near instant, maybe 100ms delay if the window was larger or the screen busy. Even video playback in YouTube was smooth (with occasionally dropped frames) as long as I kept it at the default size, which was surprising. On another note, a few days ago for reasons I had to access a machine at work running xfce. Used VNC via SSH tunnel and didn't expect too much, since last I checked the protocol was very sensitive to latency, but it was a pretty smooth experience still. Maybe those tigervnc folks are still busy tweaking it. Will try freerdp next time :-)
- jacob019 4y agoFreeRDP3 supports H264 video encoding. FreeRDP2 has RemoteFX (non-progressive). Microsoft is using a customized libfreerdp, weston, and pulseaudio stack in WSL, to allow Linux apps to run in Windows. Xrdp supports H264 and audio. Performant Linux RDP servers and client components are available now, but you have to compile from source. Nothing wrong with VNC for remote maintenance, I still use it for that too.
- rcarmo 4y agoEr, no. You just need to install xorgxrdp on modern Fedora and Ubuntu. On Fedora 37, you can also install xorgxrdp-glamor for GPU acceleration. Only thing I had to add was the pulse audio plugin, but I think that’s being packaged now.
- any1 4y agohttps://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rs... I feel that the VNC protocol gets a bad reputation because of bad implementations. There's really nothing in the protocol itself that keeps it back. What I like about VNC is that you can actually read the RFC and get fairly a good understanding of it in less than a day. I'm not sure if the same can be said for RDP. Microsoft has this page where you can access a bunch of PDF documents that describe RDP in some sense, but I've no idea where I would even start and/or what's even relevant for any given problem that you might want to solve.
- razemio 4y agoYes, it is my goto choice if I want near real time display support for vms and docker. It even has gpu driver support enabling 2D/3D acceleration. VNC is SO much slower. Funny enough I thought the same thing. RDP has to be slower on Linux compared to VNC. It was just by accident that I discovered how freakishly fast it is.
- rcarmo 4y agoHere’s a video of GPU accelerated Xrdp on a Fedora machine being used with Remmina on a Raspberry Pi: https://twitter.com/rcarmo/status/1584627462939492354?s=61&t=j_sTW3aMCOBcAlZ39QR55A https://twitter.com/rcarmo/status/1584627462939492354?s=61&t... It was already pretty fast with plain xorgxrdp, but using xorgxrdp-glamor made the server side _way_ faster. RDP as a protocol blows VNC out of the water, and can use x264 as well.
- gsich 4y agoI tried it recently, it still felt like x11vnc wrapped in RDP.
- 2Gkashmiri 4y agocan... this "dummy monitor" be used in windows by some other method? not exactly the same command obviously but a way to expose display on a headless system without using those dummy hdmi plugs?
- gigatexal 4y agoProbably. That’s worth a shot. Any idea where the base64 stuff came from in the guide?
- jacob019 4y agoThat is the EDID data for the dummy monitor, it a small binary that contains resolutions and timings pulled from a real monitor.
- 2Gkashmiri 4y agoi mean windows is notorious for having a physical monitor attached. those dummy plugs help but not everyone has one...
- franga2000 4y agoI haven't yet found a production-ready open source virtual display driver for Windows, but there are a lot of "code samples" out there that work, you just need to go through the painful process of compiling and installing them. There's a big thread about this on the deskreen repo [0], maybe they've found something new since I last checked it. There is, however, a very good remote virtual monitor solution called Spacedesk [1], which has a windows server (with virtual display driver included) and a JavaScript client that runs in any browser (it refuses to run in Firefox, but if you just comment out that line of code it works perfectly fine). [0] https://github.com/pavlobu/deskreen/discussions/86 https://github.com/pavlobu/deskreen/discussions/86 [1] https://www.spacedesk.net/ https://www.spacedesk.net/
- zeusk 4y agoYou can write an IndirectDisplay class driver to expose virtual monitors
- 4y ago
- Dunedan 4y agoAs USB-C becomes more and more ubiquitous, I'd love to see every device with a USB-C port and a display to support incoming DisplayPort alternate mode. That would be a worthy successor to Apples target display mode and would offer a great way for using devices like tablets as secondary displays.
- amstan 4y agoThat would be super expensive from an electrical BOM point of view. Laptops and phones are simply not designed to input video. Closest you might get is USB gadget (also pretty tricky) and do display over that (ala displaylink).
- Nextgrid 4y agoI wonder if reconfigurable FPGAs could be the answer? They could be reprogrammed at runtime to hardware-accelerate whatever the host system wants without having to waste space on discrete hardware around for use-cases that may never be required by the host system.
- LoganDark 4y ago> Laptops and phones are simply not designed to input video. OK, but you get PCIe passthrough with Thunderbolt, so you can put a capture card in an eGPU enclosure, assuming you have TB.
- jeroenhd 4y agoFor many displays you can buy relatively simple controller boards from AliExpress that take HDMI or similar. They can be a great for reusing old laptop hardware that you no longer use. I don't think manufacturers will bother implementing extra hardware just in case their devices die on you. It'd be great, but it's very much a niche use case.
- rubatuga 4y agoAnybody have tests of the latency? I haven't found anything better than parsec that is free and open source. Parsec uses their own UDP protocol, and makes use of hardware encoder/decoder.
- ndsipa_pomu 4y agoKasmVNC would be worth trying as that is pretty fast and low latency https://github.com/kasmtech/KasmVNC https://github.com/kasmtech/KasmVNC
- 867-5309 4y agoKasm is linux-only. Parsec for linux, android, windows, etc.
- ndsipa_pomu 4y agoThe FA is specifically about using Linux, so I didn't see any requirement for non-Linux being mentioned (until your comment). I had a quick look at Parsec and was surprised at how expensive it is - starts at $8.33 a month.
- 867-5309 4y agostill, worth mentioning when comparing the frictionless RD side of Parsec is completely free. you only pay if you require >60fps, extra monitors, teams, etc.
- ndsipa_pomu 4y agoOh yeah - I didn't scroll down far enough to see the Personal Use option for free
- ElectricalUnion 4y ago> Parsec for linux, android, windows, etc. linux/android client only, last time I checked. Can't host on those platforms. > Linux does not support hosting at this time and any computers on this operating system will not be listed. https://support.parsec.app/hc/en-us/articles/4422939258893-Parsec-App-for-Linux https://support.parsec.app/hc/en-us/articles/4422939258893-P...
- jbd 4y agoThe author of TurboVNC conducted a study (2014) on using H.264: https://turbovnc.org/About/H264 https://turbovnc.org/About/H264
- villgax 4y agoTailScale powered Sidecar anyone?
- 2Gkashmiri 4y agoi have geographically separated machines in my office that use zerotier and have flawlessly for the last 2 years to a point i stopped using a physical LAN because the upkeep is too much.... i have a high speed internet so the performance is on par and i personally spend my work hours on rustdesk (almost 750-80 hours a week).... my only problem with tailscale has been the oath login which is significantly different than what zerotier does. (i just create the account, use the key on any random computer and authorize from the login, meaning no auth from user side).... i know headscale but that has to be selfhosted... eh tailscale looks good tech without that imo
- GlassOwAter 4y agoI don’t know anything about all this. Is there a way to do something similar on a Raspberry Pi hooked to a monitor as a second screen for a Windows laptop?
- rcarmo 4y agoYes. You can follow the instructions and use Remmina as a client. Here’s my Pi 3 as a thin client: https://twitter.com/rcarmo/status/1584627462939492354?s=61&t=j_sTW3aMCOBcAlZ39QR55A https://twitter.com/rcarmo/status/1584627462939492354?s=61&t...
- imwillofficial 4y agoThis is an insanely janky, ugly mess of a solution.
- jkepler 4y agoDo you have a more elegant solution to share?
- okamiueru 4y agoNo the person you asked, but. I sort of feel like straight up using the second laptop is fine with Synergy. Mouse and clipboard transitions seamlessly. It's of course something different, and has it's pros and cons.
- rejectfinite 4y agoSynergy, or the open source fork or https://www.microsoft.com/en-us/download/details.aspx?id=35460 https://www.microsoft.com/en-us/download/details.aspx?id=354...
- Tade0 4y agoIt's why it's so fascinating.
- Minimax22 4y agoNice hack but 'Single head is all you need'. It's more comfortable and efficient and there's a nice suckless Video in that on yt.
- seltzered_ 4y agoSee also https://news.ycombinator.com/item?id=31409010 https://news.ycombinator.com/item?id=31409010 -> https://tuxphones.com/howto-linux-as-second-wireless-display-for-linux/ https://tuxphones.com/howto-linux-as-second-wireless-display... which does a decent amount of thought around optimizing latency. Worth noting gnome 42+ also has an extend display over vnc setting , it may be hidden by default.
- jacob019 4y agoNice, he's using pipewire and gstreamer to send a video feed. Come to think of it, ffmpeg is capable of recording the xsession and streaming output via HTTP. It should be possible to connect to that with VLC or maybe even a web browser. Will try that.
- Tade0 4y agoI was meaning to find a method of correcting excessive clouding on my laptop screen and RDPing to the same device sounded like a good idea. Alternatively there's ShaderGlass, but I would have to modify it to work with an image mask. If anyone has a better idea for Windows that doesn't involve hardware changes I would be much obliged.
- OtmaneBenazzou 4y agoI tried the same thing. The performance is a LOT better using Parsec, it's free for personal use
- jmakov 4y agoAren't only clients aupported for Parsec on Linux?
- OtmaneBenazzou 4y agoI'm not sure sorry, I was using my macbook from my linux, so maybe
- alexvoda 4y agoI get that you can do it using FreeRDP, but why?? This should be done via MiraCast. And then the same system would be compatible with smart tvs, smartphones, Samsung Dex and Windows. For Linux the project implementing the protocol is called MiracleCast. There is a GTK Gui to send your screen. But there is no GUI to receive a screen. Unfortunately this gets little love. Also, to my understanding, Wayland is still not ready for such a use case.
- MayeulC 4y agowhat use case? Miracast, or TFA use-case? Under sway, it's very easy to: * add a virtual screen of specified resolution (The command is `swaymsg create_output`, then adjust its position and resolution if the default 1080p on the right are not to your liking) * start a vnc server for that screen (`wayvnc -o HEADLESS-1`) * start a vnc client on the laptop Regarding screencast, xdg portals and pipewire streams are a thing (including zero-copy DMA-BUF access, and hardware encoding).
- LeonM 4y agoit's very easy to [complex list of tasks] This is the typical HN fallacy. Go try to explain your mother over the phone how to edit a sway configuration to 'add a virtual screen of specified resolution'. Compare that to clicking on the cast icon and selecting a TV.
- okasaki 4y agoIt's doable. Not over the phone but you can write a shell script and put an icon on the desktop. source: spent years supporting Linux for my tech-illiterate parents.
- dsr_ 4y agoI've been supporting my father's computer for about 15 years now. It's the only machine he uses. He doesn't have root. He doesn't use a command line. I used to have an autossh connection for his machine to talk to one of my servers, and now we use Wireguard instead, for the rare occasions (about once a year) that he needs something looked at. Support is basically zero these days. He uses Chrome and Firefox and LibreOffice. He occasionally fires up the Simon Tatham Portable Puzzles collection. I have uBlock Origin installed on both browsers. I installed XFCE on day one, spent a couple of hours demonstrating things, and then left. Every five or six years I buy a new tiny, NUC-like machine, configure it up, pull his home directory across, and then send him the replacement. There's more work on the phone getting him to plug the cables in properly than anything else. Year of the Linux desktop? It's been more than a decade.
- el_snark 4y agoThere's a slightly different approach with a similar outcome: sharing the keyboard and mouse between two machines. Software used to be called Synergy, but that went commercial, so there's a fork called barrier. https://github.com/debauchee/barrier https://github.com/debauchee/barrier
- throwaway742 4y agoI helped my friend set this up back in the day so he could have WoW running on one computer and the wiki open on the other. IIRC he didn't have enough RAM on his main computer so running FireFox in the background tanked his FPS.
- nanna 4y ago> Compatibility. We use more than one operating system and you probably do, too. Windows, OSX, Linux, FreeBSD... Barrier should "just work". We will also have our eye on Wayland when the time comes. Wow that sounds handy indeed.
- prmoustache 4y agoNote: Wayland already works for the "server" (the machine sharing the keyboard and mouse).
- robmccoll 4y agoIt's great. I run a desktop running Windows with WSL2 for Linux and a MacBook Pro beside it. With some combination of a shared mouse, keyboard, clipboard, SSH, and SSHFS / NFS the experience is pretty seamless.
- alsobrsp 4y agoI have been using Barrier or its predecessor Synergy for 20 years. Fantastic stuff.
- LocalPCGuy 4y agoBeen using Synergy and recommending it for many years, paid for it a long time ago as I thought it was worth supporting given how much use I've gotten from it. Besides being OS, what are the advantages of Barrier? Worth the (probably small amount of) time to switch?
- AstixAndBelix 4y agoThis, like many other projects trying to emulate AirDrop or AirPlay or whatever, will unfortunately never reach Apple's levels of polish because Apple actually uses the WiFi chip to seamlessly create a direct connection between the devices, whereas all these solutions need the local network to work
- guenthert 4y agoAnd being wireless it is of course a nightmare in congested areas like apartment complexes and offices. A wireless access network over which the user has no administrative control -- what were they thinking?
- teddyh 4y agoPeople used to use x2x for this: https://github.com/dottedmag/x2x https://github.com/dottedmag/x2x
- davidy123 4y agoI am surprised no one has mentioned the new Gnome sharing Extend feature[1]. It also uses RDP, but you enable it and it "just works," including input events from the remote device onto the virtual screen. I've used Synergy/Barrier/Waynergy for years, but this is a good way to add a screen anywhere that supports RDP (Android, ChromeOS, etc). My main reason to explore it is to extend to a nice high resolution OLED tablet. Latency is quite low, as long as you don't try to watch a high resolution video. 1. https://www.reddit.com/r/gnome/comments/uz5as7/gnome_has_made_it_super_simple_to_extend_your/ https://www.reddit.com/r/gnome/comments/uz5as7/gnome_has_mad... (discussion)
- acomjean 4y agoThis sounds great! Will give this a try. I feel like all the parts of linux are there for an amazing desktop(its already great), its just sometimes the discoverability/documentation/usability need a little push.
- jeppesen-io 4y agoI was very excited to read this but was it removed in Gnome 43.x? > gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend > No such schema “org.gnome.desktop.remote-desktop.rdp”
- davidy123 4y agoI think it might have been renamed, that seems like a feature flag.
- empyrrhicist 4y agoI've had trouble accessing Ubuntu over Gnome RDP sharing, except from a Windows machine. I can access Windows machines via RDP using e.g. Remmina, but accessing an Ubuntu host only seems to work for me from Windows regardless of the client I use.
- davidy123 4y agoHmm I've tried it from an Ubuntu and Android (Samsung) client, both seemed to work fine. Maybe a network thing?
- bennysonething 4y agoIs there a way to do this in windows?
- betimsl 4y agoWhy would you only use it as a second screen when instead you can double your processing power too?
- emj 4y agoImagine a Beuwolf cluster of all your devices then you can get lots of processing power esily! Running a process on multiple computers is something that has almost become extinct, we did a lot of optimizing to get that to work in the early 2000. Lone computers just got so fast and interconnect speed is too slow. RDP/VNC/HTML on a second screen it is, I use my sever witha connected screen.
- faust93 4y agoThere's an experimental TurboVNC server fork with h264 encoding support: https://github.com/faust93/turbovnc https://github.com/faust93/turbovnc But it has to be used in pair with TigerVNC viewer only, because AFAIK there're no other viewer implementations with h264 decoding support
- jacob019 4y agoFreeRDP and Microsoft Remote Desktop both support H264, but the RDP protocol is complex and it's easy to break compatibility between clients.
- rcarmo 4y agoActually, I have zero issues across Jump Desktop, MS RDP (iOS or Android), mstsc.exe, the new Modern RDP client, and, of course, Remmina (which is actually how I'm typing this on a Raspberry Pi connected to a Fedora GPU-accelerated server...)
- jrm4 4y agoCurious, seems like this is a good "Raspberry Pi + big tv" use case, and except possibly Miracast (wireless only? weird) is this one of the few projects to pull this off? Anyone know of other solutions here?
- mixedmath 4y agoThe top image is an excellent choice of image. Perhaps I've become too used to seeing a random visually appealing SVG at the top of articles --- but the top image here shows two laptops forming an obviously shared desktop.
- cjtrowbridge 4y agoThere are a lot of approaches to this across all platforms including Windows; https://alternativeto.net/software/maxivista/ https://alternativeto.net/software/maxivista/
- rvdginste 4y agoIs there a solution to use an old Android 4.4 tablet as an external screen for a linux machine? The mentioned aFreeRDP seems to require at least Android 5.0.