@@ -90,6 +90,44 @@ function start_upgrade() {
9090 return 0
9191}
9292
93+
94+
95+ function __force_uprade_hippo()
96+ {
97+ if [ ! -d " $CACHE_ROOT " ]; then
98+ mkdir " $CACHE_ROOT "
99+ fi
100+
101+ FSM_URL=" https://github.com/RandomCoderOrg/fs-manager-hippo"
102+ git clone ${FSM_URL} " ${CACHE_ROOT} /fs-manager-hippo" || die " failed to clone repo"
103+
104+ if [ -f " ${CACHE_ROOT} " /fs-manager-hippo/install.sh ]; then
105+ cd " ${CACHE_ROOT} " /fs-manager-hippo || die " failed to cd ..."
106+ bash install.sh || die " failed to install manager..."
107+ fi
108+ }
109+
110+ function __help()
111+ {
112+ echo -e " hippo - termux Version ${version} "
113+ echo -e " A bash script to make basic action(login, vncserver) easier for ubuntu-on-android project"
114+ echo -e
115+ echo -e " Usage ${0} [options]"
116+ echo -e
117+ echo -e " Options:"
118+ echo -e " \e[1;34m"
119+ echo -e " --install To try installing hippo"
120+ echo -e " --help to display this message"
121+ echo -e " --enable-dbus To start terminal session with dbus enabled"
122+ echo -e " startvnc To start hippo vncserver"
123+ echo -e " stopvnc To stop hippo vncserver"
124+ echo -e " ------------------"
125+ # SOCIAL_MEDIA link goes here
126+ echo -e " Join the community and leave at DISCORD -> $SOCIAL_PLATFORM "
127+ echo -e " ------------------"
128+ echo -e " \e[0m"
129+ }
130+
93131function _lauch_or_install()
94132{
95133 if ! __check_for_plugin; then
@@ -111,6 +149,8 @@ function _lauch_or_install()
111149 else
112150 # ######################################################################################################
113151 # Thanks to @GxmerSam Sam Alarie, @mizzunet, @Andre-cmd-rgb for the issues randome ideas and suggestion
152+
153+
114154 pulseaudio --start --load=" module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 >> /dev/null
115155 if [ -f " {CACHE_ROOT}" /ubuntu-on-android/etc/scripts/vncserver/startvnc.sh ] && [ ! -f ${HIPPO_DIR} /bin/startvnc ]; then
116156 DIR=" {CACHE_ROOT}/ubuntu-on-android/etc/scripts/vncserver/startvnc.sh"
@@ -127,48 +167,17 @@ function _lauch_or_install()
127167 fi
128168}
129169
130- function __force_uprade_hippo()
131- {
132- if [ ! -d " $CACHE_ROOT " ]; then
133- mkdir " $CACHE_ROOT "
134- fi
135-
136- FSM_URL=" https://github.com/RandomCoderOrg/fs-manager-hippo"
137- git clone ${FSM_URL} " ${CACHE_ROOT} /fs-manager-hippo" || die " failed to clone repo"
138-
139- if [ -f " ${CACHE_ROOT} " /fs-manager-hippo/install.sh ]; then
140- cd " ${CACHE_ROOT} " /fs-manager-hippo || die " failed to cd ..."
141- bash install.sh || die " failed to install manager..."
142- fi
143- }
144-
145- function __help()
146- {
147- echo -e " hippo - termux Version ${version} "
148- echo -e " A bash script to make basic action(login, vncserver) easier for ubuntu-on-android project"
149- echo -e
150- echo -e " Usage ${0} [options]"
151- echo -e
152- echo -e " Options:"
153- echo -e " \e[1;34m"
154- echo -e " --install To try installing hippo"
155- echo -e " --help to display this message"
156- echo -e " --enable-dbus To start terminal session with dbus enabled"
157- echo -e " startvnc To start hippo vncserver"
158- echo -e " stopvnc To stop hippo vncserver"
159- echo -e " Join the community and leave at DISCORD -> $SOCIAL_PLATFORM "
160- echo -e " \e[0m"
161- }
162-
163170if [ $# -ge 1 ]; then
164171 case " $1 " in
165172 upgrade) __upgrade;;
173+
166174 --force-upgrade) __force_uprade_hippo;;
167175 --enable-dbus) shift 1; _lauch_or_install --bind /dev/null:/proc/sys/kernel/cap_last_cap ;;
168176 " --enable-dbus-startvnc" ) shift 1; _lauch_or_install --bind /dev/null:/proc/sys/kernel/cap_last_cap -- startvnc ;;
169177 " --enable-dbus-stopvnc" ) shift 1; _lauch_or_install --bind /dev/null:/proc/sys/kernel/cap_last_cap -- stopvnc ;;
170178 --install) _lauch_or_install;;
171179 --help) __help;;
180+
172181 startvnc)
173182 if __check_for_hippo; then
174183 proot-distro login hippo -- startvnc
@@ -178,6 +187,7 @@ if [ $# -ge 1 ]; then
178187 echo -e " \e[32mError:\e[0m Hippo not found"
179188 fi
180189 ;;
190+
181191 stoptvnc)
182192 if __check_for_hippo; then
183193 proot-distro login hippo -- stoptvnc
0 commit comments