Skip to content

Commit

Permalink
Merge pull request #375 from WhitewaterFoundry/development
Browse files Browse the repository at this point in the history
Default X410 to the DNS IP and VcXsrv to the gateway IP
  • Loading branch information
crramirez authored Oct 16, 2022
2 parents 6e81f31 + 60a0628 commit 700643a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions pengwin-setup.d/vcxsrv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (confirm --title "VCXSRV" --yesno "Would you like to install the VcXsrv X-ser

wVcxsrvDir="$(cmd-exe /C "echo %USERPROFILE%\.vcxsrv" | tr -d '\r')"
VcxsrvDir="$(wslpath "${wVcxsrvDir}")"

if [[ -d "${VcxsrvDir}" ]]; then
echo "Uninstalling previous version"
if cmd-exe /C tasklist | grep -Fq 'vcxsrv.exe'; then
Expand All @@ -30,7 +30,7 @@ if (confirm --title "VCXSRV" --yesno "Would you like to install the VcXsrv X-ser
# now safe to delete
rm -rf "${VcxsrvDir}"
fi

echo "Creating vcxsrv install directory: $VcxsrvDir"
mkdir -p "${VcxsrvDir}"

Expand Down Expand Up @@ -63,14 +63,17 @@ EOF
unset wVcxsrvDir
unset VcxsrvDir

#Make sure that DISPLAY points to the gateway IP address
rm -f "${HOME}/.config/pengwin/display_ip_from_dns"

# Avoid collision with the other XServer
sudo rm -f /etc/profile.d/02-x410.sh

#add_fish_support '01-vcxsrv'
sudo rm -f "${__fish_sysconf_dir:=/etc/fish/conf.d}/02-x410.fish"

source /etc/profile.d/01-vcxsrv.sh

touch "${HOME}"/.should-restart
else
echo "Skipping VcxSrv"
Expand Down
10 changes: 5 additions & 5 deletions pengwin-setup.d/x410.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ if [ -x "$(command -v x410.exe)" ]; then
sudo bash -c 'cat > /etc/profile.d/02-x410.sh' << EOF
#!/bin/sh
if [ -n "\${WSL2}" ]; then
(cmd-exe /c x410.exe /wm /public &> /dev/null &)
else
(cmd-exe /c x410.exe /wm &> /dev/null &)
fi
(cmd-exe /c x410.exe /wm &> /dev/null &)
export X410=yes
EOF
#add_fish_support '02-x410'

#Make sure that DISPLAY points to the internal IP address
mkdir -p "${HOME}/.config/pengwin"
touch "${HOME}/.config/pengwin/display_ip_from_dns"

# Avoid collision with the other XServer
sudo rm -f /etc/profile.d/01-vcxsrv.sh
sudo rm -f "${__fish_sysconf_dir:=/etc/fish/conf.d}/01-vcxsrv.fish"
Expand Down

0 comments on commit 700643a

Please sign in to comment.