Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to sent custom options to the "xset" command #104

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Zebble
Copy link

@Zebble Zebble commented Feb 4, 2022

This should allow more granular control of dpms and other xset options.

The full commandset for xset is available, as this just sends whatever you specify in the XSET_COMMAND to the xset command in startx.sh.

@ghost
Copy link

ghost commented Feb 4, 2022

An error occurred whilst building your landr site preview:

{
  "name": "Error",
  "message": "Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build",
  "stack": "Error: Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build\n    at Object.exports.run (/usr/src/app/lib/build-runner.js:257:11)\n    at async build (/usr/src/app/bot/index.js:132:19)\n    at async /usr/src/app/bot/index.js:210:25\n    at async Promise.all (index 0)\n    at async middleware (/usr/src/app/node_modules/@octokit/webhooks/dist-node/index.js:355:5)"
}

@Zebble
Copy link
Author

Zebble commented Sep 12, 2022

Merged latest master.

@Zebble
Copy link
Author

Zebble commented Sep 12, 2022

Any chance of getting this PR committed @phil-d-wilson ?

@bbugh
Copy link
Contributor

bbugh commented Oct 2, 2023

I need this as well for a "kiosk" that will be largely inactive until users interact with the device. Is there anything I can do to support getting this merged @phil-d-wilson? Thank you!

@phil-d-wilson
Copy link
Contributor

@bbugh @Zebble

I'll definitely try. FYI I stepped up to co-CEO this time last year, so I've been rather busy focusing at the organisational level for a while. But, best effort, I want to enable people using this block.

Has anyone tested these changes? And on what devices?

Thanks!
Phil

@bbugh
Copy link
Contributor

bbugh commented Oct 25, 2023

@phil-d-wilson congratulations, I'm happy for you and/or sorry that happened. 😂

I have tested the changes now and this branch does solve the problem @Zebble brought up of shutting down the screen at a configured time, and that solves the better half of our problem as well.


The XSET_COMMAND is pretty specific though, I wonder if it wouldn't be better as a two-parter:

  1. a DISABLE_SCREENSAVER (or something) command that prevents xset s off -dpms from running
  2. some way for users to add insert a custom script.

RE: # 2 - I've found all of the balena blocks to be awesome 🎉 but also hard to customize when necessary because so much heavy lifting is done in ENTRYPOINT and we can't safely/smartly override that.

We also need to do additional customization for xscreensaver because for usability's sake we don't want the screen to just shut off immediately, we want it to show an animated screensaver first. Short of copying startx.sh locally and overwriting it or inserting something with sed, I'm not seeing a way to easily do this. Some implementation ideas:

  • Having it automatically run a specific script location
  • having an environment variable like XORG_STARTUP_SCRIPT that points to a user-customizable entrypoint file that runs right before node
  • More flexible but definitely more work, having multiple "hooks" that look for user-provided files at specific events

@bbugh
Copy link
Contributor

bbugh commented Feb 22, 2024

For what it's worth, we've been running sed in the Dockerfile to replace the line and it's worked fine. Not ideal or future proof, but functional.

RUN sed -i 's/xset s off -dpms/xset s off dpms 3600 10800 21600/' /usr/src/app/startx.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants