Skip to content

Commit 02d9fa6

Browse files
SaicharanKandukurigitbook-bot
authored andcommitted
GITBOOK-43: update termux-x11 docs #8
1 parent d1a7605 commit 02d9fa6

File tree

2 files changed

+41
-35
lines changed

2 files changed

+41
-35
lines changed

.gitbook/assets/image.png

29 KB
Loading

udroid-landing/setting-up-gui/termux-x11.md

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,86 @@ description: guide for setting termux-x11 for udroid GUI
44

55
# setting up termux-x11
66

7-
Termux:X11 is a termux addon providing android frontend for xwayland. It uses Wayland display protocol, which is aimed to become the successor of the X Window System. Note that it is not a fully fledged wayland server, its like a X system in wayland.
7+
termux-x11 is a termux addon providing Android frontend for xwayland. It uses the Wayland display protocol, which is aimed to become the successor of the X Window System. Note that it is not a fully-fledged Wayland server, it's like an X system in Wayland.
88

99
### 1. How does it work?
1010

11-
Through its companion package, the executable creates socket through $XDG\_RUNTIME\_DIR in Termux directory by default.
11+
Through its companion package, the executable creates a socket through $XDG\_RUNTIME\_DIR in the Termux directory by default.
1212

13-
The wayland sockets is the way for the graphical applications to communicate with. Termux X11 applications do not have wayland support yet, this kind of setup may not be straightforward and therefore additional packages should be installed in order for X11 applications to be run in Termux:X11.
13+
The Wayland sockets are the way for the graphical applications to communicate with. Termux X11 applications do not have Wayland support yet, this kind of setup may not be straightforward and therefore additional packages should be installed in order for X11 applications to be run in termux-x11.
1414

1515
### 2. Requirements
1616

17-
* Termux from workflows builds
18-
* Termux:x11 companion app from [<mark style="color:orange;">Github actions</mark>](https://github.com/termux/termux-x11/actions/workflows/debug\_build.yml) ( prefer downloading one with a green tick mark )
19-
* <img src="../../.gitbook/assets/image (1).png" alt="" data-size="original">![](<../../.gitbook/assets/image (2).png>)
17+
* Termux from [f-droid](https://f-droid.org/en/packages/com.termux/) or [termux-dev builds](https://github.com/termux/termux-app/actions/workflows/debug\_build.yml)
18+
* termux-x11 app from [GitHub releases page](https://github.com/termux/termux-x11/releases)
19+
*
20+
21+
<figure><img src="../../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
22+
23+
2024

2125
### 3. Setup Instructions
2226

23-
Get termux-x11 from x11 repository
27+
First, we need to set `x11-repo` and then to install `termux-x11-nightly`. These commands below do the job of installing both of them. execute these commands in termux-app ( copy, paste, then enter )
2428

2529
```bash
26-
pkg install x11-repo -y
27-
pkg install termux-x11-nightly
30+
apt install x11-repo -y
31+
apt install termux-x11-nightly -y
2832
```
2933

34+
### 4. Starting `termux-x11` app
3035

31-
### 4. Using Termux-x11 to run udroid
32-
33-
Assuming you installed ubuntu with proot-distro with xfce4 installed, in termux session execute
36+
To start `termux-x11` app just use this command.
3437

3538
```bash
3639
termux-x11 :0
3740
```
3841

39-
this starts termux-x11 with all the required ENV variables
42+
This launches the termux-x11 app and XWayland server with the display on address `:0`
4043

4144
{% hint style="info" %}
42-
by default, the Wayland socket is stored in termux `$TMPDIR` so using --shared-tmp binds `/tmp` in proot Linux to `$TMPDIR` of termux app \[ udroid manages to do this by default )
45+
By default, the Wayland socket is stored in termux **`$TMPDIR`** so using `--shared-tmp` binds `/tmp` in proot Linux to `$TMPDIR` of termux app \[ udroid manages to do this by default )
4346
{% endhint %}
4447

45-
Log in to your favorite udroid distro
48+
### 5. Using termux-x11 with UDROID
4649

47-
```bash
48-
udroid -l xfce4
49-
```
50+
udorid launch script takes care of mounting the termux-x11 default socket directory to the suites tmp directory, you just have to export the **DISPLAY** variable to the correct display address and run the application/Desktop environment to show the GUI in termux-x11
5051

51-
Now export `DISPLAY` environment variable with the value `:0`
52+
### Examples
53+
54+
#### Staring `glxgears`
5255

5356
```bash
5457
export DISPLAY=:0
58+
glxgears
5559
```
5660

57-
finally, start your Desktop Environment ( xfce4 works better )
61+
#### Staring `xfce4`
5862

5963
```bash
60-
dbus-launch --exit-with-session startxfce4
64+
export DIPLAY=:0
65+
startxfce4
6166
```
6267

63-
That's all now if you open minimized Termux:x11 app you see xfce4 running
64-
65-
### 5. Troubleshooting
68+
#### Staring `gnome`
6669

67-
will be updated soon...
68-
69-
### References
70+
```bash
71+
export DISPLAY=:0
72+
export XDG_CURRENT_DIR=GNOME
7073

71-
Official termux-x11 repo
74+
# PATH GNOME issue with proot
75+
for file in $(find /usr -type f -iname "*login1*"); do mv -v $file "$file.back"; done
7276

73-
{% embed url="https://github.com/termux/termux-x11" %}
77+
service dbus start
78+
gnome-shell --x11
79+
```
7480

75-
Official wayland sources
81+
{% hint style="info" %}
82+
Sometimes you may need further tweaks to make program run termux-x11
7683

77-
{% embed url="https://github.com/wayland-project/wayland" %}
84+
it may be options, environment variables and etc...
85+
{% endhint %}
7886

79-
#### Check this section for suites
87+
### termux-x11 repo
8088

81-
{% content-ref url="broken-reference/" %}
82-
[broken-reference](broken-reference/)
83-
{% endcontent-ref %}
89+
{% embed url="https://github.com/termux/termux-x11" %}

0 commit comments

Comments
 (0)