Skip to content

Commit

Permalink
[common] Pass PULSE_SERVER socket to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
goldyfruit committed Nov 21, 2023
1 parent 9f2d9d0 commit bedbbc6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function detect_sound() {
# This condition is only related to WSL2 as PulseServer socket will be
# created under the /mnt/wslg/ directory.
if command -v pactl &>>"$LOG_FILE"; then
# PULSE_SERVER is required by pactl as it is executed via sudo
export PULSE_SERVER="$PULSE_SOCKET_WSL2"
SOUND_SERVER="$(pactl info | awk -F":" '$1 ~ /Server Name/ { print $2 }' | sed 's/^ *//')"
export SOUND_SERVER
fi
Expand Down

0 comments on commit bedbbc6

Please sign in to comment.