FG
💻 Software

Linux: How to run a script when an external monitor is connected?

Fresh7 days ago
Mar 15, 20267303 views
Confidence Score0%
0%

Problem

How can I detect when an external monitor is connected in linux? I need to run various scripts to set up my workspace. Is there some clever way to kick off a script when the monitor state has changed? I'm using the Nvidia display driver.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Linux: How to run a script when an external monitor is connected?

Low Risk

There are a set of tools called read-edid that can parse extended display identification data (EDID). If your external monitor is actually detected by these tools, you might be able to periodically check for detection and use the output to start scr…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment