Skip to content

Commit 5a4ee56

Browse files
fixed issues
fixed -> stopvnc can't delete locks fixed -> startvnc forever warning fixed -> startvnc missing color fixed -> hippo(shortcut) cant login
1 parent 4607911 commit 5a4ee56

File tree

3 files changed

+28
-26
lines changed

3 files changed

+28
-26
lines changed

etc/scripts/hippo/hippo.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function _lauch_or_install()
9090
if ! __check_for_plugin; then
9191
echo -e "Plugin at ${HIPPO_SCRIPT_FILE} is missing ......"
9292
echo -e "May be this not a correct installation...."
93-
echo -e "Try to notice us a \e[34m${SOCIAL_PLATFORM}\e[0m"
93+
echo -e "Try to notice us at \e[34m${SOCIAL_PLATFORM}\e[0m"
9494
exit 1
9595
else
9696
if ! __check_for_filesystem; then
@@ -102,35 +102,35 @@ function _lauch_or_install()
102102
clear
103103
echo -e "Now You can launch your ubuntu 21.04 with command \e[1;32mhippo\e[0m"
104104
# echo -e "use hippo --help for more option and comming up features"
105-
else
106-
echo -e "Launching".....
107-
proot-distro login hippo
108105
fi
106+
else
107+
echo -e "Launching".....
108+
proot-distro login hippo
109109
fi
110110
fi
111111
}
112112

113113
if [ $# -eq 0 ]; then
114114
case "$1" in
115115
upgrade) __upgrade;;
116+
startvnc)
117+
if __check_for_hippo; then
118+
proot-distro launch hippo -- startvnc
119+
else
120+
echo -e "This command is supposed to run after installing hippo"
121+
# echo -e "Use \e[1;32mhippo --install\e[0m install"
122+
echo -e "\e[32mError:\e[0m Hippo not found"
123+
fi
124+
;;
125+
stoptvnc)
126+
if __check_for_hippo; then
127+
proot-distro launch hippo -- stoptvnc
128+
else
129+
echo -e "This command is supposed to run after installing hippo"
130+
# echo -e "Use \e[1;32mhippo --install\e[0m install"
131+
echo -e "\e[32mError:\e[0m Hippo not found"
132+
fi
133+
;;
116134
*) _lauch_or_install;;
117-
# startvnc)
118-
# if __check_for_hippo; then
119-
# proot-distro launch hippo -- startvnc
120-
# else
121-
# echo -e "This command is supposed to run after installing hippo"
122-
# # echo -e "Use \e[1;32mhippo --install\e[0m install"
123-
# echo -e "\e[32mError:\e[0m Hippo not found"
124-
# fi
125-
# ;;
126-
# stoptvnc)
127-
# if __check_for_hippo; then
128-
# proot-distro launch hippo -- stoptvnc
129-
# else
130-
# echo -e "This command is supposed to run after installing hippo"
131-
# # echo -e "Use \e[1;32mhippo --install\e[0m install"
132-
# echo -e "\e[32mError:\e[0m Hippo not found"
133-
# fi
134-
# ;;
135135
esac
136136
fi

etc/scripts/vncserver/startvnc.sh

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

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

2828

2929
if ! $vnc; then
3030
vncserver -xstartup "${DEFAULT_XSTARTUP}" -desktop "Hippo Default VNC" :${port}
3131
else
3232
echo "A vncserver lock is found for port ${port}"
33-
echo "Use \e[1;32mhippo stoptvnc\e[0m or \e[1;32mstopvnc\e[0m to stop it and try again..."
33+
echo -e "Use \e[1;32mhippo stoptvnc\e[0m or \e[1;32mstopvnc\e[0m to stop it and try again..."
3434
fi

etc/scripts/vncserver/stopvnc.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ vncserver --kill :${port} >> /dev/null
2020

2121
if [ -f /tmp/.X11-unix/X${port} ]; then
2222
echo "cleaning lock files..."
23+
rm -rf /tmp/.X11-unix/X${port}
2324
elif [ -f /tmp/.X${port}-lock ]; then
2425
echo "cleaning lock files..."
26+
/tmp/.X${port}-lock
2527
fi
2628

2729
echo "Cleaning pid,log files at ~/.vnc ..."

0 commit comments

Comments
 (0)