Live data from Hacker News

DeskPad – A virtual monitor for screen sharing

github.com

71–80 of 167 posts

Re: DeskPad – A virtual monitor for screen sharing

#71
post #67
post #31

Earlier quoted context omitted.

This is how I do it under Sway (Wayland): #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p #swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug When I was still in X11 land I used to just use Xephyr.

I just realized formatting is a bit broken. :( Fixed: #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p # swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug

You can do code blocks on HN by prefixing your lines with four spaces.

    #!/bin/bash
    swaymsg create_output
    OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"')
    # No need to reduce res, it defualts to 1080p
    # swaymsg output "$OUTPUT" resolution 1280x720
    wl-mirror "$OUTPUT"
    swaymsg output "$OUTPUT" unplug

Re: DeskPad – A virtual monitor for screen sharing

#73
post #6

The title could clarify it's for MacOS X.

Linux users probably already have some weird workflow with X11 virtual buffers to do this.

Personally I don't bother with a virtual display. I automatically set my display scale to 2x when I start screen sharing. I set that up with exec_before and exec_after hooks in xdg-desktop-portal-wlr[0]. In addition to turning off my notification daemon (so my email/instant message notifications don't pop up), my exec_before/exec_after scripts just run:

    swaymsg output "MY-MONITOR" scale 2 # or 1 for exec_after
With that, everything puffs up big and readable when I'm screensharing and seamlessly shrinks back down when I stop screen sharing. No need to juggle windows around to different displays.

[0] https://man.archlinux.org/man/extra/xdg-desktop-portal-wlr/x...

Re: DeskPad – A virtual monitor for screen sharing

#75
post #67

Earlier quoted context omitted.

I just realized formatting is a bit broken. :( Fixed: #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p # swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug

You can do code blocks on HN by prefixing your lines with four spaces. #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p # swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug

[deleted]

Re: DeskPad – A virtual monitor for screen sharing

#76
post #67

Earlier quoted context omitted.

I just realized formatting is a bit broken. :( Fixed: #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p # swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug

You can do code blocks on HN by prefixing your lines with four spaces. #!/bin/bash swaymsg create_output OUTPUT=$(swaymsg -r -t get_outputs | jq '.[].name' | grep HEADLESS | tr -d '"') # No need to reduce res, it defualts to 1080p # swaymsg output "$OUTPUT" resolution 1280x720 wl-mirror "$OUTPUT" swaymsg output "$OUTPUT" unplug

Four spaces!? Absurd! Think of how many bytes you're wasting! In just your last code block your flooded the internet with 28 needless bytes!?!?!?!! If this keeps up soon we'll all just be downloading whitespace.

Only two spaces are needed: https://news.ycombinator.com/formatdoc

  function trim {
    sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
  }
/end sarcasm

Re: DeskPad – A virtual monitor for screen sharing

#77
post #65

I've gotten away with simply firing up OBS and "screen sharing" the virtual camera. Has worked fine on Zoom and Slack huddles, with the added benefit of giving me other things that OBS can provide: easy recording, scenes, text, source management, plugins, etc. For a casual conversation it's somewhat overkill, but when you're doing something more serious or formal, or need to switch between a keynote/Powerpoint and a…

> and actually rather easy to get going in.

The other day I tried installing OBS on a Mac and this was not my experience. I couldn't even get it to recognize the built-in MacBook camera, much less share a screen or a mic or...

I've successfully got OBS set up on Linux in the past and managed to get a simple workflow running, but even that took a lot of fiddling to get started and I had the darndest time finding what I needed. The UI reminded me of GIMP—I'm sure I could eventually figure out how to work it and it probably makes complicated workflows possible in ways that simpler tools don't, but for a newcomer it has been overwhelming.

Re: DeskPad – A virtual monitor for screen sharing

#78
After trying various solutions - including DeskPad - I came up with a custom cross-platform (I'm on macOS, but assume it'll work elsewhere) solution that worked incredibly well on my 40" ultrawide monitor: OBS[1].

Having never used OBS before but knowing it was popular among streamers, I wondered if I could use it to (1) only share the specific applications I wanted to share and (2) share them at a resolution that people could actually read, without constantly being asked to zoom in.

I first tried setting up a virtual camera and sharing via my video stream, but it was laggy and the quality was so poor that people couldn't read what I was sharing. I quickly gave up on that approach.

Then I discovered Projectors[2]. By right-clicking on the main view in OBS and selecting "Windowed Projector (Preview)", it launches a separate window, which I can then share directly via Zoom, Teams, Meet, etc.

Whatever I drag into the OBS view is displayed in the Windowed Projector (similar to DeskPad), with the added bonus that I can choose to blur certain applications that might be dragged in. For example, if I open Slack or my password manager, the entire window blurs until I focus back on my terminal or browser.

It took a bunch of tweaking to perfect, but I'm very pleased with how well it works now.

---

[1] https://obsproject.com/

[2] https://obsproject.com/kb/power-of-projectors

Re: DeskPad – A virtual monitor for screen sharing

#80

This looks great - really useful! I have always wondered how these virtual desktops work. A cursory looks shows that this is using some undocumented APIs. How do people learn they can create a virtual desktop in this way if the knowledge to do so is hidden/obfuscated? Does apple allow distribution of an app that use these "private" APIs? Is anyone aware of what mechanisms are there for achieving something similar in…

> Does apple allow distribution of an app that use these "private" APIs? In the app store, sure, any other way, what can they going to do about it?

They could not notarize it, meaning users have to tackle bypassing the Gatekeeper?
Post reply on HN