Git Product home page Git Product logo

termux-ubuntu's Introduction

Install Ubuntu20 on Termux Android

This installs Ubuntu 20 with xfce4 desktop on Termux. All scripts are from Andronix, I just compose and edit them to make the installer easier and smoother. It includes:

  • Ubuntu 20
  • XFCE4 Desktop
  • TigerVNC Server
  • Non-root Account Creation
  • Audio Support
  • Chromium Browser

Installation

Copy and paste this command to Termux:

Ubuntu 20 With XFCE4

pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh && chmod +x ubuntu.sh && bash ubuntu.sh

Ubuntu 20 CLI Only

pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh && chmod +x ubuntu.sh && bash ubuntu.sh nde

Ubuntu 20 With LXDE

pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh && chmod +x ubuntu.sh && bash ubuntu.sh lxde

Run

Start Ubuntu

After installation, on Termux, you can execute this command to run ubuntu:

./start-ubuntu20.sh

Exit Ubuntu

To exit ubuntu you can simply run exit command. This will stop vncserver and some services.

exit

Start VNC Server

On Ubuntu, run this command to start VNC Server:

vncserver-start

Then you can use VNC Client to connect to 127.0.0.1:1 or 127.0.0.1:5901

Stop VNC Server

On Ubuntu, run this command to stop VNC Server:

vncserver-stop

VNC Client For Android

VNC Viewer (from RealVNC) is the best when you use your phone. Unfortunately, it does not does not support Samsung DEX.

AVNC is another good VNC client. In my opinion it is the best when you use your tablet or Samsung Dex.

Issues

Group Issue

If you get an issue message like this:

groups: cannot find name for group ID 20305
groups: cannot find name for group ID 50305

You can simply add group with this command:

sudo groupadd --gid 20305 permagrp5
sudo groupadd --gid 50305 permagrp6

Other

Install VS Code

Install LibreOffice

On Ubuntu, run this command to install LibreOffice with patch

wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/librepatch.sh && chmod +x librepatch.sh && bash librepatch.sh

Install FireFox

On Ubuntu, run this command to install FireFox

sudo apt install firefox

Follow this url to fix firefox crash termux/proot#139 (comment)

Install Theme & Icons


mkdir -p ~/.local/share/icons ~/.local/share/themes
cd ~/Downloads
tar -xf "Prof--XFCE- 2.1.tar.gz"
mv "Prof--XFCE- 2.1" ~/.local/share/themes/
tar -xf Vimix.tar.xz
mv Vimix ~/.local/share/icons/

Intall Oh My Zsh

cp ~/.profile ~/.zprofile
sudo apt install git curl zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

termux-ubuntu's People

Contributors

hicwic avatar tuanpham-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-ubuntu's Issues

Installation error

proot warning: can't chdir("/root/.") in the guest rootfs: No such file or directory
proot info: default working directory is now "/"
proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/jails/ubuntu/ubuntu-fs, cwd = /, $PATH=(null))
fatal error: see proot --help.

unexpected end of file in ubuntu.sh

I tried to install it first with single line from readme, but it threw an error.
On fresh install of termux v.0.116 from f-droid
Android 10

~ $ pkg update -y && pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh && chmod +x ubuntu.sh && bash ubuntu.sh
Checking availability of current mirror: ok
Hit:1 https://termux.mentality.rip/termux-main stable InRelease
Hit:2 https://packages.termux.org/apt/termux-games games InRelease
Hit:3 https://packages.termux.org/apt/termux-science science InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Checking availability of current mirror: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
curl is already the newest version (7.77.0-3).
proot is already the newest version (5.1.107-40).
tar is already the newest version (1.34).
wget is already the newest version (1.21.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--2021-07-09 22:14:43--  https://raw.githubusercontent.com/tuanpham-dev/termux-ubuntu/master/ubuntu.sh
Resolving raw.githubusercontent.com... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8965 (8.8K) [text/plain]
Saving to: ‘ubuntu.sh’

ubuntu.sh       100%[=====>]   8.75K  --.-KB/s    in 0.001s

2021-07-09 22:14:44 (11.3 MB/s) - ‘ubuntu.sh’ saved [8965/8965]

--2021-07-09 22:14:44--  https://andronixos.sfo2.cdn.digitaloceanspaces.com/OS-Files/setup-audio.sh
Resolving andronixos.sfo2.cdn.digitaloceanspaces.com... 205.185.216.10, 205.185.216.42
Connecting to andronixos.sfo2.cdn.digitaloceanspaces.com|205.185.216.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20643 (20K) [application/x-sh]
Saving to: ‘setup-audio.sh’

setup-audio.sh  100%[=====>]  20.16K  --.-KB/s    in 0.002s

2021-07-09 22:14:46 (12.4 MB/s) - ‘setup-audio.sh’ saved [20643/20643]

Checking availability of current mirror: ok
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pulseaudio is already the newest version (14.2-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
module already present
modiefied timeout to 180 seconds
Download Rootfs, this may take a while base on your internet speed.
--2021-07-09 22:14:47--  https://github.com/AndronixApp/AndronixOrigin/raw/master/Rootfs/Ubuntu20/focal-arm64.tar.gz
Resolving github.com... 140.82.121.3
Connecting to github.com|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu20/focal-arm64.tar.gz [following]
--2021-07-09 22:14:48--  https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Rootfs/Ubuntu20/focal-arm64.tar.gz
Resolving raw.githubusercontent.com... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26215001 (25M) [application/octet-stream]
Saving to: ‘ubuntu20-rootfs.tar.gz’

ubuntu20-rootfs 100%[=====>]  25.00M  8.48MB/s    in 2.9s

2021-07-09 22:14:52 (8.48 MB/s) - ‘ubuntu20-rootfs.tar.gz’ saved [26215001/26215001]

Decompressing Rootfs, please be patient.
ubuntu.sh: line 257: warning: here-document at line 42 delimited by end-of-file (wanted `EOF')
ubuntu.sh: line 258: syntax error: unexpected end of file
~ $

VNC error password

Hello, when i try to connect from VNC client, gives error of password.

abort in vncpasswd

Hit:5 http://ppa.launchpad.net/xubuntu-dev/staging/ubuntu focal InRelease
Get:6 http://ftp.debian.org/debian buster InRelease [122 kB]
Get:7 http://ftp.debian.org/debian buster-updates InRelease [51.9 kB]
Err:6 http://ftp.debian.org/debian buster InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517
Err:7 http://ftp.debian.org/debian buster-updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
W: GPG error: http://ftp.debian.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517
E: The repository 'http://ftp.debian.org/debian buster-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package chromium is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
chromium-bsu
E: Package 'chromium' has no installation candidate
sed: can't read /usr/share/applications/chromium.desktop: No such file or directory
You can now start vncserver by running vncserver-start

Running vncserver-start

To Kill VNC Server just run vncserver-stop

Provide a new VNC password: /usr/local/bin/vncpasswd: line 4: /usr/bin/vncpasswd: No such file or directory

Password for VNC changed

1fjqingyou@localhost:~$ vncpasswd

Provide a new VNC password: /usr/local/bin/vncpasswd: line 4: /usr/bin/vncpasswd: No such file or directory

Can't setup the desktop environment

When I run command ./start-ubuntu20.sh ,this appears on the CLI
Warning: localhost:1 is taken because of /tmp/.X1-lock Remove this file if there is no X server localhost:1 A VNC/X11 server is already running as :1 on machine localhost VNC server started. The default password is the account password for v v@localhost:~$
Now when I go to VNC Viewer and enter the address as 127.0.0.1:1 or 127.0.0.1:5901,It says :
The port on which the computer is listening for a connection could not be contacted.

Please help me with this issue, I'm really frustrated.

How to install Ubuntu18.04?

Hi, tuanpham.
I find all posts about termux and ubuntu are above the version 20.x. How could I install a Ubuntu18.04 on termux?

Lxde

can you pls try make a script for the lxde DE?

Ubuntu does not start :(

Great Job Tuanpham-dev .... The ubuntu lxde works fine for me.... I use it every day for networking and stuff.
But today I think I did something wrong while I was trying to forward vnc server to lan(It was a success, since there was a folder for that vnc.conf 👍 ).But in the process I may have done something wrong I guess .after that when I stopped the vm and restarted , It doesn't respond. (When I type ./startubuntu20.sh it does nothing and i can't do anything until I do ctrl+z. I can't fix it because there is no error log.
The files i opened were /etc/hosts , hostname , vnc.conf I have'nt modified any other files.
Does opening files destroy it?
I need help...

@tuanpham-dev
@hicwic
@ALL

Pic below

I waited around 10mins , still nothing.

Screenshot_20230418-154846_Termux

I can't connect to VNC

I can't connect to VNC, I've tried both addresses and none connected, I used avnc and nethunter kex, can anyone help?

i can't enter my password

I pasted your command in the terminal, but the 「final [sudo] password for rtyrtyrtyqa: 」cannot enter

Postgresql installation not working

After installing postgresql, when I am calling pg_createcluster command or initdb command it is not starting the database and thowing error could not create shared memory segment: Function not implemented; Failed system call was shmget(key=5432001, size=56, 03600). Is System V IPC not implemented the project? Please help someone how to solve this or install postgresql correctly.

dbus socket is not found black screen during remote vnc

Android 10
Host: samsung SM-P615
Kernel: 4.14.113-19529942
Cpu: (8) @ 1.742GHz
Memory: 2274MiB / 3575MiB

dde package installed sucessfully by adding apt-add-repository manually

Log
You chose dynamic resolution

New 'remote-desktop' desktop at :1 on machine localhost

Starting applications specified in /home/reids/.vnc/xstartup
Log file is /home/reids/.vnc/localhost:1.log

Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/reids/.vnc/passwd localhost:1 to connect to the VNC server.

VNC server started. The default password is the account password for reids
reids@localhost:$ startdde
backend_syslog.go:45: syslog is not available: Unix syslog delivery error
backend_syslog.go:45: syslog is not available: Unix syslog delivery error
failed to list backlight controller: open /sys/class/backlight: no such file or directory
backend_syslog.go:45: syslog is not available: Unix syslog delivery error
backend_syslog.go:45: syslog is not available: Unix syslog delivery error
backend_syslog.go:45: syslog is not available: Unix syslog delivery error
manager.go:630: [updateMonitors] add monitor: VNC-0 0 0 1900 1200
xsettings.go:243: Start xsettings failed: dial unix /var/run/dbus/system_bus_socket: connect: connection refused
-> main.go:100
-> proc.go:203
-> asm_arm64.s:1128
main.go:103: dial unix /var/run/dbus/system_bus_socket: connect: connection refused
main.go:119: dial unix /var/run/dbus/system_bus_socket: connect: connection refused
reids@localhost:
$ ps
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
reids@localhost:~$

snapd issue

Snap store doesn't work. Here is the screenshot. I guess it's services are somehow not running.
image

Firefox page crashed

I installed Firefox via this command

sudo apt install firefox

When opening any website (e.g "https://www.google.com"), the page tabs has crashed.

https://ibb.co/6Nn6CGd

Note: I already force stopped Termux/ killing vnc/ uninstalling firefox and relaunch, restore, close Firefox page tabs but the problem is still the same.

Using a different DE instead of xfce (for example gnome)

I just installed this script on my phone, and using it on my laptop via vnc, but there's a problem. I tried to install gnome and then after logging out I got a black screen. Is it possible to install a different DE instead of xfce? If yes, how? Thanks

Error vncserver after vncserver-start

Error

You chose dynamic resolution
/usr/local/bin/vnc: line 3: vncserver: command not found
VNC server started. The default password is the account password for fazel
fazel@localhost:~$

Always get error

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Alternative to TigerVNC?

VNC can't play YouTube videos reliably. It has heavy frame drops. It's simply reliable. I've checked sites like anydesk, they don't have support for arm64. Any other programs that can share virtual display?

vnc disconnect(ubuntu command line in termux stops)

Hello , i installed sucesfully ubuntu and run it then i installed java jdk and jre then i installed android studio 2020 all things was good but when i wanted build the android stidio project vnc (termux command line) stoped even i retried but same thing happened 😔 please help,

ld.so

ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Audio Support

I see that pulseaudio isn't installed, but there is pavucontrol which shows OpenSL ES Output. I'm trying to figure out how this works, and I assume this is a loopback monitor streamed over TCP. The problem is that I can't find the port set for streaming.
I'm trying to play audio using SImple Protocol Player and I already tried port 4712 and 8000 but no luck.

ERROR: ld.so

~ $ ./start-ubuntu20.sh
groups: cannot find name for group ID 20084
groups: cannot find name for group ID 50084
ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/lib/aarch64-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.