Skip to content

Commit

Permalink
Allow install no DE
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanpham-dev committed Mar 24, 2021
1 parent 2bbf5fe commit 9392c48
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ groupadd --gid 21081 permagrp3
groupadd --gid 51081 permagrp4
groupadd --gid 20305 permagrp5
groupadd --gid 50305 permagrp6
groupadd --gid 20258 permagrp7
groupadd --gid 50258 permagrp8

rm -rf /etc/resolv.conf
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
chmod +x /usr/share/andronix/firstrun
mkdir -p ~/.vnc
apt update -y && apt upgrade -y && apt install wget gnupg sudo dialog -y
chmod 4755 /usr/bin/sudo
rm -rf /etc/skel/.profile.1 /root/.profile.1
chmod +x /usr/share/andronix/firstrun
/usr/share/andronix/firstrun; exit
6 changes: 5 additions & 1 deletion .profile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ exit() {
pkill ssh-agent
pkill gpg-agent
pkill pulseaudio
vncserver -kill :1

if [ ! -z `which vncserver` ]; then
vncserver -kill :1
fi

unset LD_PRELOAD
unset -f exit
exit
Expand Down
9 changes: 9 additions & 0 deletions de-xfce
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo "#!/bin/bash
wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/xfce.sh -O ~/xfce.sh
chmod +x ~/xfce.sh
bash ~/xfce.sh
rm -rf ~/xfce.sh
rm -rf ~/.bash_profile" > "/home/$1/.bash_profile"
chmod +x "/home/$1/.bash_profile"
13 changes: 6 additions & 7 deletions firstrun
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,11 @@ then
sed -i s/"PermitRootLogin yes"/"#PermitRootLogin prohibit-password"/g /etc/ssh/sshd_config
fi
msg "You can start using your newly installed Andronix Modded OS..."
echo "#!/bin/bash
wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/xfce.sh -O ~/xfce.sh
chmod +x ~/xfce.sh
bash ~/xfce.sh
rm -rf ~/xfce.sh
rm -rf ~/.bash_profile" > /home/$USER/.bash_profile
chmod +x /home/$USER/.bash_profile

if [ -f /usr/share/andronix/de-install ]; then
chmod +x /usr/share/andronix/de-install
/usr/share/andronix/de-install $USER
fi

# Replace the current activity with a new shell for the user
exec su - $USER
10 changes: 10 additions & 0 deletions ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,18 @@ wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/vnc
wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/vncpasswd -P ubuntu20-fs/usr/local/bin > /dev/null
wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/vncserver-stop -P ubuntu20-fs/usr/local/bin > /dev/null
wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/vncserver-start -P ubuntu20-fs/usr/local/bin > /dev/null

wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/firstrun -P ubuntu20-fs/usr/share/andronix > /dev/null

mkdir -p ubuntu20-fs/usr/share/andronix
case "$1" in
"nde")
;;
*)
wget -q https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/de-xfce -O ubuntu20-fs/usr/share/andronix/de-install > /dev/null
;;
esac

chmod +x ubuntu20-fs/root/.bash_profile
chmod +x ubuntu20-fs/root/.profile
chmod +x ubuntu20-fs/usr/local/bin/vnc
Expand Down
1 change: 1 addition & 0 deletions xfce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ sudo apt-mark hold udisks2

sudo apt update && sudo apt upgrade -y && sudo apt install xfce4 xfce4-goodies xfce4-terminal tigervnc-standalone-server tigervnc-common exo-utils dbus-x11 pavucontrol libexo-1-0 ffmpeg language-pack-en --no-install-recommends -y
sudo apt --fix-broken install

mkdir -p ~/.vnc

echo '#!/bin/bash
Expand Down

0 comments on commit 9392c48

Please sign in to comment.