Skip to content

tree-wide: GNOME Desktop#28268

Draft
robertkirkman wants to merge 1 commit intotermux:masterfrom
robertkirkman:gnome-shell
Draft

tree-wide: GNOME Desktop#28268
robertkirkman wants to merge 1 commit intotermux:masterfrom
robertkirkman:gnome-shell

Conversation

@robertkirkman
Copy link
Copy Markdown
Member

@robertkirkman robertkirkman commented Jan 30, 2026

# it really doesn't work well with Zink+Turnip
export LIBGL_ALWAYS_SOFTWARE=1
termux-x11 -xstartup gnome-session

@robertkirkman robertkirkman force-pushed the gnome-shell branch 2 times, most recently from 01b282d to 03c97b6 Compare January 30, 2026 13:11
@sabamdarif
Copy link
Copy Markdown
Contributor

sabamdarif commented Jan 30, 2026

@robertkirkman
Copy link
Copy Markdown
Member Author

Very good thank you I will add them and maybe I'll try to add more

@sabamdarif
Copy link
Copy Markdown
Contributor

Screenshot_20260130-192753_Termux_X11

Working fine

@robertkirkman robertkirkman changed the title addpkg(x11/gnome-shell): 48.7 tree-wide: GNOME Desktop Jan 30, 2026
@sabamdarif
Copy link
Copy Markdown
Contributor

@robertkirkman can you check if just running dbus-daemon --system --fork works or not

@sabamdarif
Copy link
Copy Markdown
Contributor

sabamdarif commented Jan 30, 2026

0102-no-system-bus.patch

@robertkirkman can you try this patch then launch with just termux-x11 :0 -xstartup gnome-session

@sabamdarif
Copy link
Copy Markdown
Contributor

But it can't launch app

@robertkirkman
Copy link
Copy Markdown
Member Author

@robertkirkman can you check if just running dbus-daemon --system --fork works or not

Yes with just dbus-daemon --system --fork it works

@robertkirkman
Copy link
Copy Markdown
Member Author

0102-no-system-bus.patch

@robertkirkman can you try this patch then launch with just termux-x11 :0 -xstartup gnome-session

What does the patch do? I tried it, and for me it is still necessary to run dbus-daemon --system --fork when using it before running gnome-session otherwise it has the white error screen?

@robertkirkman
Copy link
Copy Markdown
Member Author

But it can't launch app

If you have adreno make sure to use export LIBGL_ALWAYS_SOFTWARE=1 first because it has invisible windows for me if I use Zink+Turnip

@sabamdarif
Copy link
Copy Markdown
Contributor

0102-no-system-bus.patch
@robertkirkman can you try this patch then launch with just termux-x11 :0 -xstartup gnome-session

What does the patch do? I tried it, and for me it is still necessary to run dbus-daemon --system --fork when using it before running gnome-session otherwise it has the white error screen?

i was just trying to run them without system bus 😅

@sabamdarif
Copy link
Copy Markdown
Contributor

wait let me share a screen record of my device

@sabamdarif
Copy link
Copy Markdown
Contributor

for some reason it decide to work when i was recording :- https://drive.google.com/file/d/1_qvUG7OH6-F_-2eLFKGSAucKbHPSjA91/view?usp=sharing

but in most of the case this is what was happening:- https://drive.google.com/file/d/19sPJdPRZh0aNUZHWNWEqMbS6u_pQUJPQ/view?usp=sharing

@robertkirkman
Copy link
Copy Markdown
Member Author

robertkirkman commented Jan 31, 2026

I see, that's interesting that the patch works for that for you; for me when I tested that patch and then stopped all dbus-daemon processes and then used gnome-session, this happened:

image

which is the same as what I see when not using the patch and not having dbus-daemon --system

@robertkirkman
Copy link
Copy Markdown
Member Author

I tried to work on version 49, but as we know, version 49 has a strong dependency on a dependency-based init system, with a default at Systemd and the option to implement additional backends, and currently the only additional backend widely known to have been implemented at this time is this one for OpenRC:

https://github.com/swagtoy/gnome-session-openrc

If someone else implements another backend in the future that can restore self-launching of GNOME, then I could progress more by copying that. (I assume the distro with the most maintainers likely to do that is FreeBSD)

I tried to figure out if there is a way to manually write out the commands which the init system needs to execute in order one by one for GNOME 49 to complete its launch sequence, but I haven't been able to yet unfortunately.

I think it might involve a combination of $PREFIX/libexec/gnome-session-service --session=x11, $PREFIX/libexec/gnome-session-ctl, and $PREFIX/libexec/gnome-session-init-worker with certain arguments in a certain order.

Something I might be able to try is wrapping those executables with scripts that log their activities with timestamps on a Systemd or OpenRC distro, then launch GNOME there, then check the log timestamps to construct a sequence of commands necessary to launch GNOME 49.

@robertkirkman
Copy link
Copy Markdown
Member Author

Alpine Linux has moved forward with the rest of GNOME 49 except for gnome-session by making this patch on gnome-shell 49 that makes it backwards compatible with gnome-session 48.

https://gitlab.alpinelinux.org/alpine/aports/-/commit/349a5ed70ff9d89e5c6af01f31078cc9b59bb8e3

I could probably do that now, but if many other distros also do that, then I expect a community-maintained fork or patchset of gnome-session 48 to eventually emerge that I could copy to progress here.

@sabamdarif
Copy link
Copy Markdown
Contributor

diff --git a/gnome-session/main.c b/gnome-session/main.c
index 5f98149..64a1aab 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -518,6 +518,11 @@ main (int argc, char **argv)
                 gsm_util_init_error (TRUE, "%s", error->message);
         }
 
+        /* Termux Hack: Start dbus-daemon --system first before anything */
+        g_message ("Termux Hack: starting system dbus-daemon...");
+        remove ("@TERMUX_PREFIX@/var/run/dbus/pid");
+        system ("dbus-daemon --system --fork");
+
         /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with
          * older versions of GDM,  other display managers, and startx,
          * set a fallback value if we don't find it set.

@robertkirkman can we not do something like this so we don't have to do that extra dbus-daemon --system --fork step, we can just run termux-x11 :0 -xstartup gnome-session

@robertkirkman
Copy link
Copy Markdown
Member Author

Yes it's a good idea I might add that, though, the hard part is that I would want to actually make sure that dbus-daemon --system is not actually running anymore before using rm $PREFIX/var/run/dbus/pid, because i am not sure how bad it would be if it is removed without killing the previous one.

@sabamdarif
Copy link
Copy Markdown
Contributor

ok i will try to do that

@sabamdarif
Copy link
Copy Markdown
Contributor

we can get the pid like this

$ cat "/data/data/com.termux/files/usr/var/run/dbus/pid"
$ 9208

@sabamdarif
Copy link
Copy Markdown
Contributor

diff --git a/gnome-session/main.c b/gnome-session/main.c
index 5f98149..28d8975 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -518,6 +518,23 @@ main (int argc, char **argv)
                 gsm_util_init_error (TRUE, "%s", error->message);
         }
 
+        /* Termux Hack: Start dbus-daemon --system first before anything */
+        {
+            const char *pid_file = "@TERMUX_PREFIX@/var/run/dbus/pid";
+            FILE *f = fopen (pid_file, "r");
+            if (f) {
+                int pid = 0;
+                if (fscanf (f, "%d", &pid) == 1 && pid > 0) {
+                     g_message ("Termux Hack: Killing stale system dbus-daemon (pid %d)", pid);
+                     kill (pid, SIGTERM);
+                }
+                fclose (f);
+            }
+            remove (pid_file);
+            g_message ("Termux Hack: starting system dbus-daemon...");
+            system ("dbus-daemon --system --fork");
+        }
+
         /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with
          * older versions of GDM,  other display managers, and startx,
          * set a fallback value if we don't find it set.

what about this ?

@robertkirkman robertkirkman force-pushed the gnome-shell branch 4 times, most recently from ad3e7cb to aaf2dec Compare January 31, 2026 10:21
@robertkirkman
Copy link
Copy Markdown
Member Author

Yes that's good thank you I tested that and it's working

@23xvx
Copy link
Copy Markdown

23xvx commented Feb 22, 2026

Just asking but can you guys later make a tutorial on this installation and perhaps setup requirements because this looks really amazing to me. I want to try running this on my phone

@robertkirkman
Copy link
Copy Markdown
Member Author

@23xvx hi,

I made this video of how to download PR artifacts, you would download this just like in this video except just make sure you are logged into GitHub so you can see the download URL, and click on this PR instead of the one in the video, everything else is the same, then after you install it just use this command:

LIBGL_ALWAYS_SOFTWARE=1 termux-x11 -xstartup gnome-session
artifacts.webm

it will open

@23xvx
Copy link
Copy Markdown

23xvx commented Feb 23, 2026

@23xvx hi,

I made this video of how to download PR artifacts, you would download this just like in this video except just make sure you are logged into GitHub so you can see the download URL, and click on this PR instead of the one in the video, everything else is the same, then after you install it just use this command:

LIBGL_ALWAYS_SOFTWARE=1 termux-x11 -xstartup gnome-session

artifacts.webm
it will open

Thanks it worked!
Screenshot_20260223_165822_TermuxX11

BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Feb 24, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Feb 24, 2026
@23xvx
Copy link
Copy Markdown

23xvx commented Feb 24, 2026

Another quick question but is it normal for the desktop to be laggy/glitchy because sometimes it takes time to respond when opening an app or just switching to another window

@robertkirkman
Copy link
Copy Markdown
Member Author

Another quick question but is it normal for the desktop to be laggy/glitchy because sometimes it takes time to respond when opening an app or just switching to another window

Yes it's because it has software rendering and GNOME is probably not really going to work on android with hardware accelerated GPU connection. so the CPU performance is fine but the GPU performance is not going to be good.

@robertkirkman
Copy link
Copy Markdown
Member Author

LIBGL_ALWAYS_SOFTWARE=1 makes it have software rendering even if you have turnip and zink,

if you have both turnip (mesa-vulkan-icd-freedreno package, not automatically installed) and zink (mesa package, you already have it installed), and also Adreno GPU (Qualcomm SoC device), you can remove LIBGL_ALWAYS_SOFTWARE=1 when starting GNOME just to see for yourself what happens but it doesn't look very good

@23xvx
Copy link
Copy Markdown

23xvx commented Feb 25, 2026

LIBGL_ALWAYS_SOFTWARE=1 makes it have software rendering even if you have turnip and zink,

if you have both turnip (mesa-vulkan-icd-freedreno package, not automatically installed) and zink (mesa package, you already have it installed), and also Adreno GPU (Qualcomm SoC device), you can remove LIBGL_ALWAYS_SOFTWARE=1 when starting GNOME just to see for yourself what happens but it doesn't look very good

Screenshot_20260225_152219_TermuxX11

I see

BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Feb 26, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Feb 26, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Feb 28, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 1, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 3, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 4, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 4, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 5, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 5, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 5, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 6, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 7, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 7, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 7, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 7, 2026
BullyMaguire-lol added a commit to BullyMaguire-lol/termux-packages that referenced this pull request Mar 8, 2026
robertkirkman pushed a commit that referenced this pull request Mar 8, 2026
- Alternative build of termux#24585

- Fixes termux#10173

- How to use this build:

```bash
export LIBGL_ALWAYS_SOFTWARE=1
termux-x11 -xstartup gnome-session
```

Co-authored-by: Chongyun Lee <licy183@termux.dev>
Co-authored-by: Md Arif <111168803+sabamdarif@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: Gnome shell

4 participants