Skip to content

Commit

Permalink
only run dbus commands on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimon-au committed Nov 27, 2023
1 parent 023d46e commit 47e82e6
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/vscode/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@ pipeline "Contextive VsCode Extension" {
}

stage "Start Xvbf & Dbus" {

run (bashCmd "/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &")
run "sudo service dbus start"
run "sudo mkdir $XDG_RUNTIME_DIR"
run (bashCmd "sudo chmod 700 $XDG_RUNTIME_DIR")
run (bashCmd "sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR")
run (bashCmd "dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &")

stage "Start dbus" {
whenLinux
run (bashCmd "sudo service dbus start")
run (bashCmd "sudo mkdir $XDG_RUNTIME_DIR")
run (bashCmd "sudo chmod 700 $XDG_RUNTIME_DIR")
run (bashCmd "sudo chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR")

run (
bashCmd "dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &"
)
}

echo ">>> Started xvfb & dbus"
}

Expand Down

0 comments on commit 47e82e6

Please sign in to comment.