├── LICENSE
├── README.md
├── builder
└── gui.sh
├── images
├── application-menu.png
├── gnome.png
├── kde.png
├── lxde.png
├── lxqt.png
└── xfce.png
├── remove.sh
└── setup.sh
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Easily Install Full Debian Linux Verious Type Of Desktop in Termux
3 |
4 |
5 |
6 | 
7 | 
8 | 
9 |
10 |
11 |
12 | ### Features:
13 |
14 | - :speaker: Fixed Audio Output
15 | - :computer:GNOME work perfectly
16 | - :globe_with_meridians: 2 Browsers (Chromium & Mozilla Firefox)
17 | - :tv: VLC Media Player
18 | - :books: Easy for Beginners
19 | - :hammer: Install XFCE, LXDE, LXQT, KDE, or GNOME Desktop
20 |
21 | ### Installation:
22 |
23 | 1. Firstly install [Termux](https://termux.com) apk from [HERE](https://f-droid.org/repo/com.termux_118.apk)
24 | 2. Secondly Clone the Repository & Run the setup File
25 |
26 | - `pkg update -y && pkg upgrade -y`
27 | - `pkg install git wget -y`
28 | - `git clone https://github.com/sabamdarif/modded-debian`
29 | - `cd modded-debian`
30 | - `bash setup.sh`
31 | - `debian`
32 | - `bash gui.sh`
33 | - Now select **KFCE**, **KDE**, **LXDE**, **LXQT** OR **GNOME** Desktop
34 |
35 |
36 | DEMO IMAGES:
37 |
38 | |GNOME|LXDE|XFCE|KDE|LXQT|
39 | |--|--|--|--|--|
40 | ||||||
41 |
42 |
43 |
44 | 3. **You have to note your VNC password !!**
45 | 4. DEBIAN image is now successfully installed.
46 |
47 | - Type `vncstart` to run Vncserver
48 | - Type `vncstop` to stop Vncserver
49 |
50 | 5. Install VNC VIEWER Apk on your Device. [Google Play Store](https://play.google.com/store/apps/details?id=com.realvnc.viewer.android&hl=en)
51 | 6. Or, Install NetHunter KeX from [Nethunter Store](https://store.nethunter.com/en/packages/com.offsec.nethunter.kex/)
52 |
53 | 7. Open VNC VIEWER & Click on + Button & Enter the Address `localhost:1` & Name anything you like
54 | 8. Set the Picture Quality to High for better Quality
55 | 9. Click on Connect & Input the Password
56 | 10. Enjoy :smile:
57 |
58 | ### NOTE:
59 |
60 | - **Type `debian` to run DEBIAN CLI AS NORMAL USER.**
61 | - **Type `debian -r` to run DEBIAN CLI AS ROOT USER.**
62 | - **Type `vncstart` to run Vncserver**
63 | - **Type `vncstop` to stop Vncserver**
64 | - **Type `vncstop -f` to stop Vncserver forcefully**
65 | - **Type `bash remove.sh` to remove DEBIAN**
66 |
67 | ### ISSUES:
68 | - **Issue:-** Vnc server related issue like *vnc autostop* , *Apps not showing*
69 | - **Solution:-** Login into root user using `debian -r` then launch vncserver
70 |
71 | ### If you like my work then dont forget to give a Star :)
72 |
--------------------------------------------------------------------------------
/builder/gui.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | R="$(printf '\033[1;31m')"
4 | G="$(printf '\033[1;32m')"
5 | Y="$(printf '\033[1;33m')"
6 | W="$(printf '\033[1;37m')"
7 | C="$(printf '\033[1;36m')"
8 |
9 | banner() {
10 | clear
11 | printf "\033[32m code by @saba_mdrif \033[0m\n"
12 | printf "\033[32m subscribe my YouTube Channel Hello Android \033[0m\n"
13 |
14 | }
15 |
16 | add_user() {
17 | apt autoremove sudo -y
18 | banner
19 | read -p $' \e[1;31m[\e[0m\e[1;77m~\e[0m\e[1;31m]\e[0m\e[1;92m Input Username [Lowercase] : \e[0m\e[1;96m\en' user
20 | echo -e "${W}"
21 | read -p $' \e[1;31m[\e[0m\e[1;77m~\e[0m\e[1;31m]\e[0m\e[1;92m Input Password : \e[0m\e[1;96m\en' pass
22 | echo -e "${W}"
23 | useradd -m -s $(which bash) ${user}
24 | echo "${user}:${pass}" | chpasswd
25 | apt update -y
26 | apt install sudo -y
27 | echo "$user ALL=(ALL:ALL) ALL" >> /etc/sudoers
28 | cat < "/data/data/com.termux/files/usr/bin/debian"
29 | if [ "\$1" = "-r" ]; then
30 | proot-distro login debian
31 | else
32 | proot-distro login --user "$user" debian
33 | fi
34 | EOF
35 | #chmod +x /data/data/com.termux/files/usr/bin/debian
36 | clear
37 |
38 | }
39 |
40 | update_sys() {
41 | echo "${G}Updating System..."${W}
42 | termux-wake-lock
43 | sleep 3
44 | apt-get update
45 | }
46 |
47 | ask() {
48 | banner
49 | echo
50 | echo -e "${R} [${W}-${R}]${C} Select Desktop Type"${W}
51 | echo
52 | echo "${C}1. XFCE4 (recommended)"${W}
53 | echo
54 | echo "${C}2. LXDE"${W}
55 | echo
56 | echo "${C}3. LXQT"${W}
57 | echo
58 | echo "${C}4. KDE"${W}
59 | echo
60 | echo "${C}5. GNOME"${W}
61 | echo
62 | read -p "${Y}Select option(default 1): "${W} select_desktop
63 | echo
64 | sleep 0.5
65 | banner
66 | read -p "${G}Do you to install VLC (y/n) "${w} ask_vlc
67 | sleep 0.5
68 | echo -e "${R} [${W}-${R}]${C} Select Browser"${W}
69 | echo
70 | echo "${C}1. Firefox (recommended)"${W}
71 | echo
72 | echo "${C}2. Chromium"${W}
73 | echo
74 | read -p "${Y}Select option(default 1): "${W} ask_browser
75 | }
76 |
77 | install_desktop_type() {
78 | banner
79 | if [[ $select_desktop == "1" ]]; then
80 | xfce_mode
81 | elif [[ $select_desktop == "2" ]]; then
82 | lxde_mode
83 | elif [[ $select_desktop == "3" ]]; then
84 | lxqt_mode
85 | elif [[ $select_desktop == "4" ]]; then
86 | kde_mode
87 | elif [[ $select_desktop == "5" ]]; then
88 | gnome_mode
89 | elif [[ $select_desktop == "" ]]; then
90 | xfce_mode
91 | fi
92 | }
93 |
94 | fix_broken() {
95 | banner
96 | echo -e "${Y}Checking error and fix it..."${W}
97 | dpkg --configure -a
98 | apt-get install --fix-broken -y
99 | }
100 |
101 | package() {
102 | banner
103 | echo -e "${R} [${W}-${R}]${C} Checking required packages..."${W}
104 | apt update -y
105 | apt --fix-broken install udisks2 -y
106 | rm /var/lib/dpkg/info/udisks2.postinst
107 | echo "" > /var/lib/dpkg/info/udisks2.postinst
108 | dpkg --configure -a
109 | apt-mark hold udisks2
110 | apt-mark unhold gvfs-daemons
111 | dpkg --configure -a
112 | packs=(sudo wget curl nano git mousepad librsvg2-common inetutils-tools dialog tightvncserver tigervnc-standalone-server tigervnc-tools dbus-x11 )
113 | dpkg --configure -a
114 | for packs_name in "${packs[@]}"; do
115 | type -p "$packs_name" &>/dev/null || {
116 | echo -e "\n${R} [${W}-${R}]${G} Installing package : ${Y}$packs_name${C}"${W}
117 | apt-get install "$packs_name" -y --no-install-recommends
118 | }
119 | done
120 | fix_broken
121 | }
122 |
123 | firefox_installer() {
124 | echo "${Y}Checking if Firefox browser installed already.."${W}
125 | echo
126 | echo
127 | if [[ $(command -v firefox) ]]; then
128 | echo "${C}Firefox is already installed.."${W}
129 | sleep 0.5
130 | clear
131 | else
132 | clear
133 | echo "${G}Firefox not found.Installing now.."${W}
134 | echo
135 | echo
136 | apt install firefox-esr -y
137 | fi
138 | }
139 |
140 | chromium_installer() {
141 | echo "${Y}Checking if Chromium browser installed already.."${W}
142 | echo
143 | echo
144 | if [[ $(command -v chromium) ]]; then
145 | echo "${C}Chromium is already installed.."${W}
146 | sleep 0.5
147 | clear
148 | else
149 | clear
150 | echo "${G}Chromium not found.Installing now.."${W}
151 | echo
152 | echo
153 | apt install chromium -y
154 | fi
155 | }
156 |
157 | browser_installer() {
158 | banner
159 | if [[$ask_browser == "1"]]; then
160 | firefox_installer
161 | elif [[$ask_browser == "2"]]; then
162 | chromium_installer
163 | elif [[$ask_browser == ""]]; then
164 | firefox_installer
165 | fi
166 |
167 | }
168 |
169 | vlc_installer() {
170 | banner
171 | if [ "$ask_vlc" == "y" ]; then
172 | echo "${Y}Checking if vlc is available or not"${W}
173 | if [[ $(command -v vlc) ]]; then
174 | echo
175 | echo "${G}vlc is already Installed"${W}
176 | sleep 1
177 | else
178 | echo "${G}vlc is not installed. Installing vlc.."${W}
179 | echo
180 | sleep 1
181 | apt install vlc -y
182 | fi
183 | else
184 | echo "${C}Canceling...."${W}
185 | sleep 1.2
186 | fi
187 | }
188 |
189 | vncstop() {
190 | if [[ -e "/bin/vncstop" ]]; then
191 | rm -rf /bin/vncstop
192 | fi
193 | cat < "/bin/vncstop"
194 | #!/usr/bin/env bash
195 | if [ "\$1" == "-f" ]; then
196 | pkill Xtigervnc
197 | else
198 | vncserver -kill :*
199 | fi
200 | rm -rf /username/.vnc/localhost:*.pid
201 | rm -rf /tmp/.X1-lock
202 | rm -rf /tmp/.X11-unix/X1
203 | EOF
204 | chmod +x /bin/vncstop
205 | }
206 |
207 | xfce_mode() {
208 | add_user
209 | package
210 | banner
211 | echo -e "${R} [${W}-${R}]${C} Installing XFCE DESKTOP"${W}
212 | apt install xfce4* -y
213 | banner
214 | echo -e "${R} [${W}-${R}]${C} Setting up VNC Server..."${W}
215 | if [[ ! -d "$HOME/.vnc" ]]; then
216 | mkdir -p "$HOME/.vnc"
217 | fi
218 | if [[ -e "/bin/vncstart" ]]; then
219 | rm -rf /bin/vncstart
220 | fi
221 | echo "#!/usr/bin/env bash" >>/bin/vncstart
222 | echo "dbus-launch" >>/bin/vncstart
223 | echo "vncserver -geometry 1500x720 -xstartup /usr/bin/startxfce4" >>/bin/vncstart
224 | chmod +x /bin/vncstart
225 | vncstop
226 | echo "export DISPLAY=":1"" >> /etc/profile
227 | echo "export PULSE_SERVER=127.0.0.1" >> /etc/profile
228 | source /etc/profile
229 | }
230 |
231 | gnome_mode() {
232 | banner
233 | echo "${G}Select Gnome Desktop Type..."${W}
234 | echo
235 | echo "${Y}1. Core (~2Gb | Recomended)"${W}
236 | echo
237 | echo "${Y}2. Full (~3.5GB of space)"${W}
238 | echo
239 | read -p "${Y}select an option (Default 1): "${W} answer_gnome_desktop
240 | echo
241 | if [[ ${answer_gnome_desktop} == "1" ]]; then
242 | banner
243 | echo "${G}Installing Gnome Core..."${W}
244 | echo
245 | apt install gnome-shell gnome-terminal -y
246 | elif [[ ${answer_gnome_desktop} == "2" ]]; then
247 | banner
248 | echo "${G}Installing Gnome Full..."${W}
249 | echo
250 | apt-get install gnome -y
251 | elif [[ ${answer_gnome_desktop} == "" ]]; then
252 | banner
253 | echo "${G}Installing Gnome Core..."${W}
254 | echo
255 | apt install gnome-shell gnome-terminal -y
256 | fi
257 | dpkg --configure -a
258 | apt --fix-broken install -y
259 | banner
260 | echo "${Y}Installing Required Packages"${W}
261 | packs=(wget curl nautilus nano gedit gnome-software gnome-tweaks gnome-shell-extension-manager tigervnc-standalone-server tigervnc-tools dbus-x11 )
262 | for packs_name in "${packs[@]}"; do
263 | type -p "$packs_name" &>/dev/null || {
264 | echo -e "\n${R} [${W}-${R}]${G} Installing package : ${Y}$packs_name${C}"${W}
265 | apt-get install "$packs_name" -y --no-install-recommends
266 | }
267 | done
268 | echo -e "${R} [${W}-${R}]${C} Setting up VNC Server..."${W}
269 | if [[ ! -d "$HOME/.vnc" ]]; then
270 | mkdir -p "$HOME/.vnc"
271 | fi
272 | if [[ -e "$HOME/.vnc/xstartup" ]]; then
273 | rm "$HOME/.vnc/xstartup"
274 | fi
275 | cat < "$HOME/.vnc/xstartup"
276 | export XDG_CURRENT_DESKTOP="GNOME"
277 | service dbus start
278 | gnome-shell --x11
279 | EOF
280 | chmod +x "$HOME/.vnc/xstartup"
281 | # mkdir -p "/home/$user/.vnc"
282 | # cp -r "$HOME/.vnc/xstartup" "/home/$user/.vnc/xstartup"
283 | # chmod +x "/home/$user/.vnc/xstartup"
284 | if [[ -e "/bin/vncstart" ]]; then
285 | rm -rf /bin/vncstart
286 | fi
287 | echo "#!/usr/bin/env bash" >>/bin/vncstart
288 | echo "vncserver -geometry 2580x1080 " >>/bin/vncstart
289 | chmod +x /bin/vncstart
290 | vncstop
291 | #echo "export DISPLAY=":1"" >> /etc/profile
292 | echo "export PULSE_SERVER=127.0.0.1" >> /etc/profile
293 | source /etc/profile
294 | echo -e "${R} [${W}-${R}]${C} Fix Vnc Login Issue.."${W}
295 | for file in $(find /usr -type f -iname "*login1*"); do rm -rf $file
296 | done
297 | echo "proot-distro login debian" > /data/data/com.termux/files/usr/bin/debian
298 | }
299 |
300 | lxde_mode() {
301 | add_user
302 | package
303 | banner
304 | echo -e "${R} [${W}-${R}]${C} Installing LXDE DESKTOP"${W}
305 | apt install lxde lxterminal -y
306 | apt-get install udisks2 -y
307 | echo " " > /var/lib/dpkg/info/udisks2.postinst
308 | apt-mark hold udisks2
309 | apt-get install tzdata -y
310 | apt-get install lxde lxterminal -y
311 | mv /usr/bin/lxpolkit /usr/bin/lxpolkit.bak
312 | apt-get --fix-broken install -y
313 | apt-get clean
314 | banner
315 | echo -e "${R} [${W}-${R}]${C} Setting up VNC Server..."${W}
316 | if [[ ! -d "$HOME/.vnc" ]]; then
317 | mkdir -p "$HOME/.vnc"
318 | fi
319 | if [[ -e "/bin/vncstart" ]]; then
320 | rm -rf /bin/vncstart
321 | fi
322 | echo "#!/usr/bin/env bash" >>/bin/vncstart
323 | echo "dbus-launch" >>/bin/vncstart
324 | echo "vncserver -geometry 1600x900 -name remote-desktop :1" >>/bin/vncstart
325 | chmod +x /bin/vncstart
326 | mkdir -p ~/.vnc
327 | if [[ -e "~/.vnc/xstartup" ]]; then
328 | rm ~/.vnc/xstartup
329 | fi
330 | cat < "~/.vnc/xstartup"
331 | #!/bin/bash
332 | export PULSE_SERVER=127.0.0.1
333 | xrdb $HOME/.Xresources
334 | dbus-launch startlxde
335 | EOF
336 | chmod +x ~/.vnc/xstartup
337 | mkdir -p /home/$user/.vnc
338 | cp ~/.vnc/xstartup /home/$user/.vnc/
339 | chmod +x /home/$user/.vnc/xstartup
340 | vncstop
341 | echo "export DISPLAY=":1"" >> /etc/profile
342 | echo "export PULSE_SERVER=127.0.0.1" >> /etc/profile
343 | source /etc/profile
344 | }
345 |
346 | lxqt_mode(){
347 | add_user
348 | package
349 | banner
350 | echo -e "${R} [${W}-${R}]${C} Installing LXQT DESKTOP"${W}
351 | apt-get install udisks2 -y
352 | echo " " > /var/lib/dpkg/info/udisks2.postinst
353 | apt-mark hold udisks2
354 | apt-get install tzdata -y
355 | apt-get install lxqt qterminal -y
356 | apt-get install tigervnc-standalone-server dbus-x11 -y
357 | apt-get --fix-broken install -y
358 | apt-get clean
359 | banner
360 | echo -e "${R} [${W}-${R}]${C} Setting up VNC Server..."${W}
361 | if [[ ! -d "$HOME/.vnc" ]]; then
362 | mkdir -p "$HOME/.vnc"
363 | fi
364 | if [[ -e "/bin/vncstart" ]]; then
365 | rm -rf /bin/vncstart
366 | fi
367 | echo "#!/usr/bin/env bash" >>/bin/vncstart
368 | echo "dbus-launch" >>/bin/vncstart
369 | echo "vncserver -geometry 1600x900 -xstartup /bin/startlxqt" >>/bin/vncstart
370 | chmod +x /bin/vncstart
371 | vncstop
372 | echo "export DISPLAY=":1"" >> /etc/profile
373 | echo "export PULSE_SERVER=127.0.0.1" >> /etc/profile
374 | source /etc/profile
375 | }
376 |
377 | kde_mode() {
378 | add_user
379 | package
380 | banner
381 | echo -e "${R} [${W}-${R}]${C} Installing KDE DESKTOP"${W}
382 | apt-get install udisks2 -y
383 | echo " " > /var/lib/dpkg/info/udisks2.postinst
384 | apt-mark hold udisks2
385 | apt-get install tzdata -y
386 | apt-get install kde-plasma-desktop konsole -y
387 | apt-get install tigervnc-standalone-server dbus-x11 -y
388 | apt-get --fix-broken install -y
389 | apt-get clean
390 | banner
391 | echo -e "${R} [${W}-${R}]${C} Setting up VNC Server..."${W}
392 | if [[ ! -d "$HOME/.vnc" ]]; then
393 | mkdir -p "$HOME/.vnc"
394 | fi
395 | if [[ -e "/bin/vncstart" ]]; then
396 | rm -rf /bin/vncstart
397 | fi
398 | echo "#!/usr/bin/env bash" >>/bin/vncstart
399 | echo "dbus-launch" >>/bin/vncstart
400 | echo "vncserver -geometry 1600x900 -xstartup /bin/startplasma-x11" >>/bin/vncstart
401 | chmod +x /bin/vncstart
402 | vncstop
403 | echo "export DISPLAY=":1"" >> /etc/profile
404 | echo "export PULSE_SERVER=127.0.0.1" >> /etc/profile
405 | source /etc/profile
406 | }
407 |
408 | note() {
409 | banner
410 | echo -e " ${G} Successfully Installed !"${W}
411 | termux-wake-unlock
412 | sleep 1
413 | if [[ $select_desktop == "5" ]]; then
414 | echo
415 | echo -e " ${C}Type ${G}debian${C} to login into debian cli (as root user)"${W}
416 | echo
417 | echo -e " ${C}You cannot add any user in GNOME Desktop"${W}
418 | echo
419 | echo -e " ${C}You need to use as root user"${W}
420 | else
421 | echo
422 | echo -e " ${C}Type ${G}debian${C} to login as normal user"${W}
423 | echo
424 | echo -e " ${C}Type ${G}debian -r${C} to login as root user"${W}
425 | echo
426 | fi
427 | echo
428 | echo -e " ${C}Type ${G}vncstart${C} to run Vncserver."${W}
429 | echo
430 | echo -e " ${C}Type ${G}vncstop${C} to stop Vncserver."${W}
431 | echo
432 | echo -e " ${C}Open VNC VIEWER or Nethunter Kex & Click on + Button."${W}
433 | echo
434 | echo -e " ${C}Enter the Address localhost:1 & Name anything you like."${W}
435 | echo
436 | echo -e " ${C}Click on Connect & Input the Password."${W}
437 | echo
438 | echo -e " ${C}If you install the GNOME DESKKTOP you may need to use UltraVnc mode in Nethunter Kex."${W}
439 | echo
440 | echo -e " ${C}Enjoy"${W}
441 | echo
442 | echo
443 |
444 | }
445 |
446 | add_sound() {
447 | echo "$(echo "bash ~/.sound" | cat - /data/data/com.termux/files/usr/bin/debian)" > /data/data/com.termux/files/usr/bin/debian
448 | }
449 |
450 | checkup_xfce() {
451 | if [[ $select_desktop == "1" ]]; then
452 | echo "${Y}Do you want to set up the application menu?"${W}
453 | customize
454 | else
455 | echo "Canceling..."
456 | sleep 0.5
457 | fi
458 | }
459 |
460 |
461 | customize() {
462 | if [[ $(command -v plank) ]]; then
463 | echo "${G}Plank is already installed .."${W}
464 | sleep .5
465 | clear
466 | else
467 | clear
468 | sleep 1
469 | echo "${G}Plank not found.Installing now.."${W}
470 | echo
471 | apt install plank -y
472 | fi
473 | mkdir /home/${user}/.config/autostart/
474 | cat < "/home/${user}/.config/autostart/plank.desktop"
475 | [Desktop Entry]
476 | Type=Application
477 | Name=Plank
478 | Exec=plank
479 | EOF
480 | chmod +x /home/${user}/.config/autostart/plank.desktop
481 | echo "${G}Create Your VNC Password"${W}
482 | vncstart
483 | sleep 60
484 | check-up
485 | vncstop
486 | gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'Gtk+'
487 | gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ zoom-enabled true
488 | banner
489 | sudo apt install rofi -y
490 | sudo apt install wget -y
491 | mkdir -p ~/.config/rofi
492 | rofi -dump-config > ~/.config/rofi/config.rasi
493 | cd ~
494 | wget https://raw.githubusercontent.com/sabamdarif/modded-debian/main/images/application-menu.png
495 | wget https://raw.githubusercontent.com/sabamdarif/modded-debian/main/builder/style.rasi
496 | mv style.rasi application-menu.png ~/.config/rofi
497 | cat < "/home/${user}/.config/rofi/launcher.sh"
498 | #!/usr/bin/env bash
499 |
500 | ## Run
501 | rofi \
502 | -show drun \
503 | -theme /home/${user}/.config/rofi/style.rasi
504 | EOF
505 | cat < "appsearch.desktop"
506 | [Desktop Entry]
507 | Name=Application Search
508 | Exec=bash /home/${user}/.config/rofi/launcher.sh
509 | Icon=/home/${user}/.config/rofi/application-menu.png
510 | Type=Application
511 | Terminal=false
512 | StartupNotify=false
513 | EOF
514 | mkdir ~/.local/share/applications
515 | if [[ ! -d "~/.local/share/applications" ]]; then
516 | mkdir ~/.local/share/applications
517 | fi
518 | mv appsearch.desktop ~/.local/share/applications/
519 | chmod +x ~/.local/share/applications/appsearch.desktop
520 | config_folder="/home/${user}/.config"
521 | plank_folder="${config_folder}/plank"
522 | dock_folder="${plank_folder}/dock1"
523 | launchers_folder="${dock_folder}/launchers"
524 | if [ ! -d "${config_folder}" ]; then
525 | mkdir -p "${config_folder}"
526 | fi
527 |
528 | if [ ! -d "${plank_folder}" ]; then
529 | mkdir -p "${plank_folder}"
530 | fi
531 |
532 | if [ ! -d "${dock_folder}" ]; then
533 | mkdir -p "${dock_folder}"
534 | fi
535 |
536 | if [ ! -d "${launchers_folder}" ]; then
537 | mkdir -p "${launchers_folder}"
538 | fi
539 | cd ~
540 | cat < appsearch.dockitem
541 | [PlankDockItemPreferences]
542 | Launcher=file:///home/${user}/.local/share/applications/appsearch.desktop
543 | EOF
544 | mv appsearch.dockitem ~/.config/plank/dock1/launchers
545 | clear
546 | killall plank
547 |
548 | }
549 |
550 | ask
551 | update_sys
552 | install_desktop_type
553 | browser_installer
554 | vlc_installer
555 | add_sound
556 | #checkup_xfce
557 | note
--------------------------------------------------------------------------------
/images/application-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/application-menu.png
--------------------------------------------------------------------------------
/images/gnome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/gnome.png
--------------------------------------------------------------------------------
/images/kde.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/kde.png
--------------------------------------------------------------------------------
/images/lxde.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/lxde.png
--------------------------------------------------------------------------------
/images/lxqt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/lxqt.png
--------------------------------------------------------------------------------
/images/xfce.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sabamdarif/modded-debian/50a58a8a3a1761a347145a3e4f291f926860252b/images/xfce.png
--------------------------------------------------------------------------------
/remove.sh:
--------------------------------------------------------------------------------
1 | #!/data/data/com.termux/files/usr/bin/bash
2 |
3 | R="$(printf '\033[1;31m')"
4 | G="$(printf '\033[1;32m')"
5 | Y="$(printf '\033[1;33m')"
6 | B="$(printf '\033[1;34m')"
7 | C="$(printf '\033[1;36m')"
8 | W="$(printf '\033[1;37m')"
9 |
10 | banner() {
11 | clear
12 |
13 | }
14 |
15 | remove() {
16 | echo -e "${R} [${W}-${R}]${C} Purging packages..."${W}
17 | if [[ -d "$PREFIX/var/lib/proot-distro/installed-rootfs/debian" ]]; then
18 | proot-distro remove debian
19 | #proot-distro clear-cache
20 | rm -rf $PREFIX/bin/debian
21 | cd ~
22 | rm .sound
23 | rm -rf /data/data/com.termux/files/usr/bin/debian
24 | rm -rf $PREFIX/var/lib/proot-distro/installed-rootfs/debian
25 | exit 0
26 | fi
27 | }
28 |
29 | banner
30 | remove
31 |
--------------------------------------------------------------------------------
/setup.sh:
--------------------------------------------------------------------------------
1 | #!/data/data/com.termux/files/usr/bin/bash
2 | R="$(printf '\033[1;31m')"
3 | G="$(printf '\033[1;32m')"
4 | Y="$(printf '\033[1;33m')"
5 | B="$(printf '\033[1;34m')"
6 | C="$(printf '\033[1;36m')"
7 | W="$(printf '\033[1;37m')"
8 |
9 | banner() {
10 | clear
11 | printf "\033[32m code by @sabamdrif \033[0m\n"
12 | printf "\033[32m subscribe my YouTube Channel Hello Android \033[0m\n"
13 |
14 | }
15 |
16 | check_pack() {
17 | banner
18 | termux-wake-lock
19 | sleep 0.2
20 | termux-setup-storage
21 | echo -e "${R} [${W}-${R}]${C} Checking required packages..."${W}
22 | if [[ `command -v pulseaudio` && `command -v proot-distro` && `command -v wget` ]]; then
23 | echo -e "\n${R} [${W}-${R}]${G} Packages already installed."${W}
24 | else
25 | packs=(pulseaudio proot proot-distro)
26 | for pack_name in "${packs[@]}"; do
27 | type -p "$pack_name" &>/dev/null || {
28 | echo -e "\n${R} [${W}-${R}]${G} Installing package : ${Y}$pack_name${C}"${W}
29 | pkg update -y
30 | pkg upgrade -y
31 | pkg install "$pack_name" -y
32 | }
33 | done
34 | fi
35 |
36 | }
37 |
38 |
39 | install_rootfs() {
40 | banner
41 | echo -e "${R} [${W}-${R}]${C} Setting up Environment..."${W}
42 | if [[ -d "$PREFIX/var/lib/proot-distro/installed-rootfs/debian" ]]; then
43 | echo -e "\n${R} [${W}-${R}]${G} Distro already installed."${W}
44 | exit 0
45 | else
46 | proot-distro install debian
47 | termux-reload-settings
48 | fi
49 |
50 | if [[ -d "$PREFIX/var/lib/proot-distro/installed-rootfs/debian" ]]; then
51 | echo -e "\n${R} [${W}-${R}]${G} Installed Successfully !!"${W}
52 | else
53 | echo -e "\n${R} [${W}-${R}]${G} Error Installing Distro !\n"${W}
54 | exit 0
55 | fi
56 | }
57 |
58 | add_sound() {
59 | banner
60 | echo -e "\n${R} [${W}-${R}]${C} Fixing Sound Problem..."${W}
61 | if [[ ! -e "$HOME/.sound" ]]; then
62 | touch $HOME/.sound
63 | fi
64 |
65 | echo "pulseaudio --start --exit-idle-time=-1" >> $HOME/.sound
66 | echo "pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" >> $HOME/.sound
67 | if [[ -e "$PREFIX/var/lib/proot-distro/installed-rootfs/debian /root/gui.sh" ]]; then
68 | chmod +x $PREFIX/var/lib/proot-distro/installed-rootfs/debian/root/gui.sh
69 | else
70 | cp -f /data/data/com.termux/files/home/modded-debian/builder/gui.sh $PREFIX/var/lib/proot-distro/installed-rootfs/debian/root/gui.sh
71 | chmod +x $PREFIX/var/lib/proot-distro/installed-rootfs/debian/root/gui.sh
72 | fi
73 |
74 | }
75 |
76 | notes() {
77 | echo "proot-distro login debian --bind /dev/null:/proc/sys/kernel/cap_last_cap" > $PREFIX/bin/debian
78 | if [[ -e "$PREFIX/bin/debian" ]]; then
79 | chmod +x $PREFIX/bin/debian
80 | termux-reload-settings
81 | echo -e "\n${R} [${W}-${R}]${G} debian-letest(CLI) is now Installed on your Termux"${W}
82 | echo -e "\n${R} [${W}-${R}]${G} Type ${C}debian${G} to run debian CLI."${W}
83 | echo -e "\n${R} [${W}-${R}]${G} If you Want to Use debian in GUI MODE then ,"${W}
84 | echo -e "\n${R} [${W}-${R}]${G} Run ${C}debian${G} first & then type ${C}bash gui.sh "${W}
85 | echo -e "\n"
86 | exit 0
87 | else
88 | echo -e "\n${R} [${W}-${R}]${G} Error Installing Distro !"${W}
89 | exit 0
90 | fi
91 | termux-wake-unlock
92 | }
93 |
94 |
95 |
96 | check_pack
97 | install_rootfs
98 | add_sound
99 | notes
100 |
--------------------------------------------------------------------------------