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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ The following environment variables allow configuration of the `browser` block:
|`WINDOW_POSITION`|`x,y`|`0,0`|Specifies the browser window position on the screen|
|`API_PORT`|port number|5011|Specifies the port number the API runs on|
|`REMOTE_DEBUG_PORT`|port number|35173|Specifies the port number the chrome remote debugger runs on|
|`XSET_COMMAND`|`string`|`s off -dpms`|Specifies the xset commandline options. Example: `s 30 30 dpms 30 30 30` will turn on the screensaver and turn off the display using dpms after 30 seconds.|

---

Expand Down
11 changes: 8 additions & 3 deletions src/startx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/
export VERSION=`chromium-browser --version`
echo "Installed browser version: $VERSION"

# stop the screen blanking
xset s off -dpms
if [[ ! -z $XSET_COMMAND ]]
then
xset $XSET_COMMAND
else
# stop the screen blanking by default
xset s off -dpms
fi

node /usr/src/app/server.js
node /usr/src/app/server.js