Skip to content

Commit

Permalink
feat: add config option to unset
Browse files Browse the repository at this point in the history
Signed-off-by: KAS <[email protected]>
  • Loading branch information
alakhmed committed Jan 17, 2025
1 parent aa822dd commit 7b77d27
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/daemon/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
"SessionConfig": {
"additionalProperties": false,
"properties": {
"hideVncPassword": {
"description": "Unsets $VNCPASSWORD inside a container to make the password harder to get.",
"type": "boolean"
},
"vncPassword": {
"description": "Default VNC password to use. Defaults to randomly generated.",
"type": "string"
Expand Down
4 changes: 4 additions & 0 deletions apps/daemon/src/lib/config/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ export interface SessionConfig {
* Default VNC password to use. Defaults to randomly generated.
*/
vncPassword?: string;
/**
* Unsets $VNCPASSWORD inside a container to make the password harder to get.
*/
hideVncPassword?: boolean;
}
1 change: 1 addition & 0 deletions apps/daemon/src/session/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default async function createSession({
`STARLIGHT_NOSTR=${nostrUrl}`,
`STARLIGHT_ID=${sessionName}`,
`VNCPASSWORD=${pass}`,
`WIPEVNCENV=${config.session.hideVncPassword ? "true" : "false"}`,
...envArray,
],
NetworkDisabled: offline || false,
Expand Down
7 changes: 5 additions & 2 deletions workspaces/scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash
echo $VNCPASSWORD | vncpasswd -f > /home/stardust/.vnc/passwd
export VNCPASSWORD=hahayes
unset VNCPASSWORD
if [[ $WIPEVNCENV == "true" ]]; then
# haha yes -proudparrot2
unset VNCPASSWORD
unset WIPEVNCENV
fi
vncserver -kill :1
sudo rm -rf /run/dbus
sudo mkdir -p /run/dbus
Expand Down

0 comments on commit 7b77d27

Please sign in to comment.