HNHacker News
TopNewBestAskShowJobs

fiddyschmitt

254 karma · joined April 13, 2016

submissionscomments
fiddyschmitt··on Two computers, one monitor, zero fiddling (2025)
:) yes. For Windows, that's exactly what SimpleKVM does

https://github.com/fiddyschmitt/SimpleKVM

fiddyschmitt··on Two computers, one monitor, zero fiddling (2025)
You could use SimpleKVM to detect the USB change, and trigger the monitor input change.

https://github.com/fiddyschmitt/SimpleKVM

fiddyschmitt··on Two computers, one monitor, zero fiddling (2025)
For Windows, I wrote SimpleKVM. I'm proud of the little monitor diagram it shows. Keen to hear your thoughts if you get to try it.

https://github.com/fiddyschmitt/SimpleKVM

fiddyschmitt··on Two computers, one monitor, zero fiddling (2025)
For Windows:

https://github.com/fiddyschmitt/SimpleKVM

If you only have two computers, you just need one instance of SimpleKVM to switch between the computers.

fiddyschmitt··on Two computers, one monitor, zero fiddling (2025)
Nice write-up! I wrote https://github.com/fiddyschmitt/SimpleKVM which makes the process easy on Windows.

As others have mentioned, you can use a cheap USB switch if you don't have an in-built KVM.

DDC/CI is quite interesting. Most OEMs seem to implement it just fine. But some (like LG) need special handling.

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Haha!
fiddyschmitt··on Show HN: Tunnelling TCP through a file
That's awesome!
fiddyschmitt··on Show HN: Tunnelling TCP through a file
Cool. I think rdp2tcp uses virtual channels for tunneling:

https://rdp2tcp.sourceforge.net/

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Woah!
fiddyschmitt··on Show HN: Tunnelling TCP through a file
Yes exactly. One file in each direction made arbitration easier.

In the future I will implement a single file to handle both directions.

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Hi Andrew, there's just one writer (which can tunnel multiple TCP connections).

Arbitration was indeed one of the trickiest bits. Originally I pre-reallocated the full file size (10 MB). Then used an integer at the beginning of the file to signal to the other side that a block was ready. The other side repeatedly read that int, and read the corresponding part of the file. But writing twice (once for the data, once for the int) had a significant performance impact.

In the end, what worked best was not pre-allocating the file. Rather letting the file grow whenever the writer writes to it. The reader knows when data is available by doing a PeekChar() in a tight loop. It's surprisingly fast, and accurately reflects the state of the file.

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Hi Bawolff! Yes that's a great combo. I guess File Tunnel provides a couple of things that makes the tunnel maintenance a bit easier.

1. It gracefully supports each side of the tunnel turning on and off.

2. It accepts any number of clients, and forwards them through the tunnel.

3. It recycles the shared file.

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Thanks J :) Absolutely! I did try various flags to optimise performance. For CreateFile (which in .NET is wrapped by the FileStream class) I tried FILE_WRITE_THROUGH (which is FileOptions.WriteThrough in .NET), and found it impacted performance quite a lot.

The key to high performance as you rightly pointed out was preventing flushing. In the end, what worked best was reducing the number of writes to disk (which is the bottleneck). I did that by buffering 10-50 ms worth of TCP data, coupled with only flushing explicitly (using a large buffer so that neither BinaryWriter or FileStream flush automatically).

fiddyschmitt··on Show HN: Tunnelling TCP through a file
Nice! It's so good when you can cobble together various tools to achieve something like that.
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Thanks! Even just one instance running on Windows can be used for a Windows+Linux setup
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Correct
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Nice!!
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Yes I know exactly what you mean - I've experienced the same. I haven't tried a mechanical one before. I'll have to try it out
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Yep HDMI works well. It also works on DisplayPort, DisplayPort Mini, VGA and DVI.
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
For sure :)
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Yes Barrier is very nice. I would use it except for the fact that my work laptop is VPN'd and therefore on a different network to my home LAN.
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
I think it should. When you do the setup it asks you to unplug and replug the device, and choose it out of the list. So it should trigger the change.
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Nice one!
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
If you only have two PCs, you only need to run the program on one of them.

When it detects a USB device being plugged in, it changes the monitor input to this computer. When a USB device is removed, it changes the monitor input to the other computer.

fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Display Data Channel... it's the signal that your video card uses to communicate with yours monitors to do things like adjust brightness.

https://en.wikipedia.org/wiki/Display_Data_Channel

fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Love it.

Unfortunately I can't install it on my work computer due to policy & VPN.

The benefit of SimpleKVM is that I just have to run it on my home PC, and I can switch between work and home.

fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
oooh, not sure. I suspect Thunderbolt has very specific requirements, and switches would be consequently expensive.
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Cool setup. Is it all working nicely with the Stream Deck & associated bindings?
fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
Yes only one computer needs to have Windows and run the program.

If it detects the USB device being inserted, it changes monitor inputs to the Windows computer. If it detects the USB device being removed, it changes monitor inputs to the Linux computer.

fiddyschmitt··on Show HN: Multi-monitor KVM using just a USB switch
That is so cool!!

Yes I noticed prices had increased a bit over the last couple of years. Perhaps there's a market for yours.

Interesting to hear that some USB switchers don't quite work in Linux. I had assumed they were just very basic USB hubs so no special drivers required. I know some USB switches have fancier things like inter-PC file transfer or mouse sharing like this one (https://www.aliexpress.com/item/1005006202631772.html), and that often requires special software and drivers.

Page 1 of 2Next →