Nodes/comfy-ovum/Open output via shell
ComfyUI Node

Open output via shell

Auto-open your finished render in VLC — securely, no shell injection

By sfinktah·Created about a year ago·Updated 10 months ago· 7
Open output via shell
  • input
  • output
filenamelink.png

Open Output via Shell is the "when your video finishes, just play it" node. You feed it a filename, it opens that image or video with your OS's default app - VLC if that's your video player, Photos on Windows, whatever - and your workflow keeps running. No hunting through the output folder after every render, no dragging files into a player. It's a tiny quality-of-life node, and once you've used it in a video workflow you'll miss it everywhere else.

The reason it's worth trusting over a generic "run a shell command" node is the safety work. Opening files from inside a node graph is exactly the kind of thing that goes wrong with spaces in paths, quotes, and surprise characters - and it's the same class of risk that makes custom node security discussions real. This node sidesteps the whole mess by never invoking a shell at all.

How it works

Three layers of protection before anything launches. First it validates: the path must exist, must be a regular file (not a directory), and its MIME type must start with image/ or video/. Second, it picks a platform-appropriate launcher - cmd /c start on Windows (handling the notorious window-title quirk), open on macOS, xdg-open on Linux - and runs it with subprocess.run and shell=False, so no shell parsing, no injection. Third, a 10-second timeout keeps a hung launcher from stalling your queue. Every failure path returns an [ERROR] ... string rather than crashing the run, and because it's flagged OUTPUT_NODE, it actually executes even when nothing downstream consumes it.

The inputs and outputs that matter

  • input (*) - an optional passthrough. It doesn't alter data; its job is enforcing execution order. Wire your saver's path through this if you need to guarantee the file is written before the open fires.
  • filename (STRING, default link.png) - the full path to the image or video. The tooltip says it all: "Usually connected to the output of another node."
  • output (STRING) - a success message or an [ERROR] ... detail you can log, display in a note, or ignore.

Installing it

Part of comfy-ovum (sfinktah). ComfyUI Manager: search "comfy-ovum", install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart after. No models to download; dependencies are the pack's light set (pillow, numpy, requests, aiohttp, etc.), all handled by Manager.

Common issues

The most common surprise is the MIME check: a file with a missing or unusual extension (or a .webp your system doesn't recognize) gets rejected with "File is not an image or video" even though it's perfectly openable. If that happens, check the extension maps to a real MIME type. On headless Linux boxes there's no xdg-open, so you'll get a clean [ERROR] Required system command not found instead of a crash - the message is the feature. And remember the input socket is ordering-only: if you wire it, make sure whatever produces the file actually runs before this node, or you'll be opening last run's file.

Categoryovum

Inputs (2)

NameTypeDefaultDescription
input*
filenameSTRINGlink.pngUsually connected to the output of another node

Outputs (1)

NameTypeDescription
outputSTRING