digitaltrails / vdu_controls

VDU controls - a control panel for monitor brightness/contrast/...
GNU General Public License v3.0
114 stars 3 forks source link

vdu_controls crashes if ddcutil not found #48

Closed rockowitz closed 1 year ago

rockowitz commented 1 year ago

If vdu_controls does not detect ddcutil, it can crash in various ways. You probably want to put up a message that ddcutil must be in the users path and exit immediately after the message is read.

digitaltrails commented 1 year ago

Something I'd overlooked, thanks for pointing it out. I hope to have it covered before the next release.

digitaltrails commented 1 year ago

This used to be handled, but layering on other error handling options masked it. Fixed at startup/initialisation (might still be problem if ddcutil goes missing later).

rockowitz commented 1 year ago

I just tested running _vdu_controls without ddcutil installed. After clicking OK on the "No controllable monitors found." message box, vdu_controls minimizes to the system tray. When I open vdu_controls, it's possible to click on the refresh button, causing a segfault. I suggest that if the error message on the initial dialog is "No such file or directory 'ddcutil'" vdu_controls should terminate instead of minimizing to the system tray after the user clicks OK.

digitaltrails commented 1 year ago

I'll nail it down yet.

digitaltrails commented 1 year ago

I would like the user to always be able to get into the GUI proper. This is just in case a problem is caused by some setting change they've made - they should always be able to get to the settings GUI.

It's a relatively trivial change to get refresh to pick up ddcutil becoming available. It's quite similar to a monitor becoming available.