Skip to content

Commit be317ab

Browse files
fix startvnc, stopvnc attempt
1 parent adc3835 commit be317ab

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

etc/scripts/hippo/hippo.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,16 @@ function _lauch_or_install()
187187

188188

189189
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 >> /dev/null
190-
# if [[ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh ]] && [[ ! -f ${HIPPO_DIR}/bin/startvnc ]]; then
191-
# DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh"
192-
# cp "${DIR}" ${HIPPO_DIR}/bin/startvnc
193-
# proot-distro login hippo -- chmod 775 /bin/startvnc
194-
# fi
195-
# if [ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh ] && [ ! -f ${HIPPO_DIR}/bin/stopvnc ]; then
196-
# DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh"
197-
# cp "${DIR}" ${HIPPO_DIR}/bin/stopvnc
198-
# proot-distro login hippo -- chmod 775 /bin/stopvnc
199-
# fi
190+
if [[ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh ]] && [[ ! -f ${HIPPO_DIR}/bin/startvnc ]]; then
191+
DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/startvnc.sh"
192+
cp "${DIR}" ${HIPPO_DIR}/bin/startvnc
193+
proot-distro login hippo -- chmod 775 /bin/startvnc
194+
fi
195+
if [ -f "${CACHE_ROOT}"/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh ] && [ ! -f ${HIPPO_DIR}/bin/stopvnc ]; then
196+
DIR="${CACHE_ROOT}/fs-manager-hippo/etc/scripts/vncserver/stopvnc.sh"
197+
cp "${DIR}" ${HIPPO_DIR}/bin/stopvnc
198+
proot-distro login hippo -- chmod 775 /bin/stopvnc
199+
fi
200200
proot-distro login hippo "$@" || warn "program exited unexpectedly..."
201201
fi
202202
}
@@ -212,25 +212,25 @@ if [ $# -ge 1 ]; then
212212
--install) _lauch_or_install;;
213213
--help) __help;;
214214

215-
# startvnc)
216-
# if __check_for_hippo; then
217-
# proot-distro login hippo -- startvnc
218-
# else
219-
# echo -e "This command is supposed to run after installing hippo"
220-
# # echo -e "Use \e[1;32mhippo --install\e[0m install"
221-
# echo -e "\e[32mError:\e[0m Hippo not found"
222-
# fi
223-
# ;;
215+
startvnc)
216+
if __check_for_hippo; then
217+
proot-distro login hippo --no-kill-on-exit -- startvnc
218+
else
219+
echo -e "This command is supposed to run after installing hippo"
220+
# echo -e "Use \e[1;32mhippo --install\e[0m install"
221+
echo -e "\e[32mError:\e[0m Hippo not found"
222+
fi
223+
;;
224224

225-
# stoptvnc)
226-
# if __check_for_hippo; then
227-
# proot-distro login hippo -- stoptvnc
228-
# else
229-
# echo -e "This command is supposed to run after installing hippo"
230-
# # echo -e "Use \e[1;32mhippo --install\e[0m install"
231-
# echo -e "\e[32mError:\e[0m Hippo not found"
232-
# fi
233-
# ;;
225+
stoptvnc)
226+
if __check_for_hippo; then
227+
proot-distro login hippo --no-kill-on-exit -- stoptvnc
228+
else
229+
echo -e "This command is supposed to run after installing hippo"
230+
# echo -e "Use \e[1;32mhippo --install\e[0m install"
231+
echo -e "\e[32mError:\e[0m Hippo not found"
232+
fi
233+
;;
234234
*) _lauch_or_install "$@";;
235235
esac
236236
else

etc/scripts/vncserver/startvnc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ else
1818
fi
1919

2020
if [ -f /tmp/.X11-unix/X${port} ]; then
21-
vnc=1
21+
vnc=false
2222
elif [ -f /tmp/.X${port}-lock ]; then
23-
vnc=1
23+
vnc=false
2424
else
25-
vnc=0
25+
vnc=true
2626
fi
2727

2828

0 commit comments

Comments
 (0)