这是indexloc提供的服务,不要输入任何密码
Skip to content

[WIP] GNOME Shell #24585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

[WIP] GNOME Shell #24585

wants to merge 20 commits into from

Conversation

licy183
Copy link
Member

@licy183 licy183 commented May 2, 2025

No description provided.

@robertkirkman
Copy link
Contributor

It's really amazing and thank you for trying, this is a very famous software and if you succeed to make this, then a lot of people will come from all over to get this, because it's really very popular.

So far for me I see this,

Screenshot_20250503-072956_Termux_X11

I tried this

LIBGL_ALWAYS_SOFTWARE=1 termux-x11 &
DISPLAY=:0 LIBGL_ALWAYS_SOFTWARE=1 gnome-session &

I don't see any messages printed in terminal, and I am not sure where to get any log of this. but, this is already a lot of progress because, when GNOME isn't working on GNU/Linux, sometimes it won't show even this screen, on GNU/Linux when GNOME isn't working sometimes it's just black, so something is working to show this screen.

@licy183
Copy link
Member Author

licy183 commented May 4, 2025

OK. I finally successfully run gnome-shell with VNC. The steps:

  1. Edit $PREFIX/share/dbus-1/system.d/org.freedesktop.UPower.conf to allow Termux user's upowerd to get accessed with system dbus, replace root with your Termux user (should be $USER or whoami)
--- a/org.freedesktop.UPower.conf
+++ b/org.freedesktop.UPower.conf
@@ -5,7 +5,7 @@
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
   <!-- Only root can own the service -->
-  <policy user="root">
+  <policy user="@TERMUX_USER@">
     <allow own="org.freedesktop.UPower"/>
   </policy>
   <policy context="default">
  1. Run dbus-lanuch --config-file $PREFIX/share/dbus-1/system.conf to start a system dbus
  2. In one shell, run UPOWER_CONF_FILE_NAME=$PREFIX/etc/UPower/UPower.conf $PREFIX/libexec/upowerd -d to start upowerd
  3. In another shell, run DISPLAY=:1 gnome-session and then it should get started.

@IntinteDAO
Copy link
Contributor

I will play around tomorrow, but GDM is a login manager, it is not required in Termux if I am not mistaken

@licy183
Copy link
Member Author

licy183 commented May 4, 2025

GDM will not work, but gnome-shell requires its gobject-introspection to work.

@twaik
Copy link
Member

twaik commented May 5, 2025

Is there any way to disable gdm usage in packages? What packages are requiring it?

@licy183
Copy link
Member Author

licy183 commented May 5, 2025

Is there any way to disable gdm usage in packages? What packages are requiring it?

It has too many references in gnome-shell's JavaScript. Patching to remove these codes may work, but I haven't tried it.

@licy183
Copy link
Member Author

licy183 commented May 5, 2025

It is much difficult to clean all the code paths of GDM in gnome-shell. Simply removing js/gdm will not work. It has a code path like js/ui/unlockDialog.js -> js/gdm/authPrompt.js -> js/gdm/*, but it is not possible to remove the usage of AuthPrompt in UnlockDialog.

https://github.com/search?q=repo%3AGNOME%2Fgnome-shell+GDM+language%3AJavaScript&type=code&p=1&l=JavaScript

@sabamdarif
Copy link
Contributor

wow really 😍

@sabamdarif
Copy link
Contributor

Screenshot_20250506-171058_Termux_X11
Screenshot_20250506-171105_Termux_X11

this is what i am able to get so far, but really thanks

@sabamdarif
Copy link
Contributor

Screenshot_20250605-223032_Termux_X11

after some try and error i get something that is usable (with termux x11)

@sabamdarif
Copy link
Contributor

termux-x11 :0 &
export DISPLAY=:0
  • Edit $PREFIX/share/dbus-1/system.d/org.freedesktop.UPower.conf to allow Termux user's upowerd to get accessed with system dbus, replace root with your Termux user (should be $USER ), like the below example

as licy183 suggest

<busconfig>
  <!-- Only root can own the service -->
  <policy user="$USER">
    <allow own="org.freedesktop.UPower"/>
  </policy>
dbus-launch --config-file $PREFIX/share/dbus-1/system.conf
UPOWER_CONF_FILE_NAME=$PREFIX/etc/UPower/UPower.conf $PREFIX/libexec/upowerd -d
dbus-launch --exit-with-session gnome-session --disable-acceleration-check

one thing that i also have xfce and lxqt installed

Screenshot_20250605-224008_Termux_X11

@TomJo2000
Copy link
Member

as licy183 suggest

<busconfig>
  <!-- Only root can own the service -->
  <policy user="$USER">
    <allow own="org.freedesktop.UPower"/>
  </policy>

We should be able to do that automatically as part of the postinst script for whatever package contains that file.

Though we should probably also relocate all necessary files from any */systemd/ directories into either the general locations for those types of files, or a gnome subdirectory if possible.

@sabamdarif
Copy link
Contributor

one thing i didn't mention is that if i create a new custom session like

/data/data/com.termux/files/usr/share/gnome-session/sessions/minimal.session

and add only few things

i don't know much so i just add the tings that sound impotent

[GNOME Session]
Name=Minimal GNOME
RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.Sound;
DefaultProvider-wm=gnome-shell
DesktopName=GNOME

this is what i add then it's work much better, it have less glitches

then launch like this

dbus-launch --exit-with-session gnome-session --session=minimal

here is a small clip:- https://drive.google.com/file/d/1iz7bJvjeDXxuIruNbpYo1F7cBv-6qgSS/view?usp=sharing

@quiverwing-personal
Copy link

quiverwing-personal commented Jun 29, 2025

With gnome-backgrounds, this provide a wallpaper for (almost-full) session of GNOME (gnome-session and gnome-session --session=gnome) (properly).

I installed/builded a gnome-backgrounds from a source.

$ (
>    cd gnome-backgrounds
>    meson --prefix "$PREFIX" setup
> )
$ ninja -C gnome-backgrounds/setup build install

I tried running these command based on a this mention and commands from #22709.

$ termux-x11 \
>           -force-bgra \
>           -ac \
>           -audit 8 \
>           :0 &
$ export XDG_RUNTIME_DIR="${PREFIX/$PREFIX/$PREFIX\/var\/run}" DISPLAY=":0"
$ rm -r --force $XDG_RUNTIME_DIR/dbus/paid || :
$ dbus-daemon --system &
$ pulseaudio \
>           --daemonize=true \
>           --exit-idle-time=-1 \
>           --scache-idle-time=-1 \
>           --start
$ export PULSE_SERVER=127.0.0.1 UPOWER_CONF_FILE_NAME=$PREFIX/etc/UPower/UPower.conf
$ alias upowerd="$PREFIX/libexec/upowerd"
$ upowerd --replace &
$ export GAILLUM_VERSION="virpipe" MESA_GL_VERSION_OVERRIDE=3.0
$ virgl_test_server \
>           --multi-clients \
>           --use-egl-surfaceless
$ dbus-launch \
>           --exit-with-session \
>                 gnome-session --session=gnome

gnome-session/gnome-shell dont have error by default; it can (excepted to) include error (properly).

Screenshot From 2025-06-29 16-07-18

Because installing gnome-backgrounds include a /data/data/com.termux/files/usr/share/backgrounds/gnome or its parent-ish directories, gnome-session accept a backgrounds store for gnome-backgrounds.

Display of website for extensions of GNOME also dont crashed (continually) by default but its extension cannot be installed without its components.

Screenshot From 2025-06-29 17-13-25

When i hold and drag my window to (top) bar and de-hold it, it may control its element; Termuxs variant of gnome-shell/X11 have a Termux-supported attribute that cause a error BadMatch unfortunately.

(gnome-shell:21119): Mtk-ERROR **: 17:14:05.712: Received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 2336 error_code 8 request_code 130 (MIT-SHM) minor_code 4)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the MUTTER_SYNC environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the mtk_x_error() function.)
== Stack trace for context 0x7ecbcbb4f0 ==
#0     7ecbc21018 i   resource:///org/gnome/shell/ui/init.js:21 (7dbe37ea60 @ 48)
AUDIT: Sun Jun 29 17:14:05 2025: 24261: client 20 disconnected
AUDIT: Sun Jun 29 17:14:05 2025: 24261: client 15 disconnected
client failed: VTEST_CLIENT_ERROR_INPUT_READ
client failed: VTEST_CLIENT_ERROR_INPUT_READ
AUDIT: Sun Jun 29 17:14:05 2025: 24261: client 6 disconnected
gnome-session-binary: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 5
gnome-session-binary: WARNING: App 'org.gnome.Shell.desktop' respawning too quickly
AUDIT: Sun Jun 29 17:14:05 2025: 24261: client 5 disconnected
AUDIT: Sun Jun 29 17:14:05 2025: 24261: client 5 connected from local host ( uid=10415 gid=10415 pid=21260 )
Crash Annotation GraphicsCriticalError: |[0]CP+[GFX1-]: Couldn't sanitize GL_RENDERER "virgl (llvmpipe (LLVM 11.1.0, 128 bits))" (t=77.639) |[1][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=142.015) |[2][GFX1-]: Detect DeviceReset DeviceResetReason::FORCED_RESET DeviceResetDetectPlace::WR_SIMULATE in Parent process (t=4547.45) |[3][GFX1-]: Detect DeviceReset DeviceResetReason::FORCED_RESET DeviceResetDetectPlace::WR_SIMULATE in Parent process (t=4548.09) |[4][GFX1-]: Detect DeviceReset DeviceResetReason::FORCED_RESET DeviceResetDetectPlace::WR_SIMULATE in Parent process (t=4552.07) [GFX1-]: Detect DeviceReset DeviceResetReason::FORCED_RESET DeviceResetDetectPlace::WR_SIMULATE in Parent process

Installing gnome-backgrounds (almost) solve a blues screen/background for (minimal) GNOME but can packaged. With a gnome-backgrounds and a gnome session, should gnome/mutter-desktop packaged as a metapackage for GNOME?.

@sabamdarif
Copy link
Contributor

Screenshot_20250704-000336_Termux_X11
Screenshot_20250704-000345_Termux_X11
Screenshot_20250704-000235_Termux_X11

@quiverwing-personal here gnome extension is working but, after i restart the desktop something like this #24585 (comment) happens

@TomJo2000
Copy link
Member

Out of curiosity, how does the pending phase out X11 support in GNOME 49/50 effect our ability to offer a package for the gnome session?

Additionally, GDM is dropping support for its built-in startup service manager.
https://gitlab.gnome.org/GNOME/gnome-session/-/merge_requests/145
And gaining a dependency on systemd-userdbd.
https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/289

The latter we likely already have to work around with GNOME 48.
The former might cause issues for us going forward.

See also: https://blogs.gnome.org/adrianvovk/2025/06/10/gnome-systemd-dependencies/

@sabamdarif
Copy link
Contributor

isn't Termux working on Wayland support? I think I saw some work being done on that.
As for systemd, it might be difficult, but there are some Linux distros like Gentoo that don’t ship with systemd. You can see what they will do about it.

there is another slight chance it might get a fork 😅, after all x11 get forked so for gnome who knows

@TomJo2000
Copy link
Member

TomJo2000 commented Jul 4, 2025

isn't Termux working on Wayland support? I think I saw some work being done on that. As for systemd, it might be difficult, but there are some Linux distros like Gentoo that don’t ship with systemd. You can see what they will do about it.

Wayland is the smaller of those worries to be fair.
There is always FreeRDP or Waypipe to support it.
See also: https://gitlab.gnome.org/GNOME/gnome-remote-desktop

WayVNC unfortunately is a bust since it only works with Wlroots based compositors.
There's also some work getting Wayland display output via Termux:GUI, though that seemed rather specific to LabWC and I'm not sure what the status on general support for that is.

there is another slight chance it might get a fork 😅, after all x11 get forked so for gnome who knows

There is a chance of a GNOME fork to keep X11 support alive, though that would effectively strand us at GNOME 49 without any upstream support from the main GNOME project.
It'd be a stopgap solution at best.

@sabamdarif
Copy link
Contributor

without any upstream support from the main GNOME project.

yes this will be a issue

then i think we have to wait for GNOME 49, let see what others do about systemd

@sabamdarif
Copy link
Contributor

here is the gnome-background and gnome-browser-connector i used

@sabamdarif
Copy link
Contributor

Screenshot_20250705-121914_Termux_X11

the extension app is working too

@licy183
Copy link
Member Author

licy183 commented Jul 5, 2025

Running llvmpipe over virpipe looks really weird. It's better to not use virpipe and run gnome-session directly over llvmpipe.

@sabamdarif
Copy link
Contributor

sabamdarif commented Jul 11, 2025

Screenshot_20250711-093800_Termux_X11

nautilus is working .
Don't know if the thing i did is right or not here:- this is what i did

@sabamdarif
Copy link
Contributor

sabamdarif commented Jul 23, 2025

Screenshot_20250723-114225_Termux_X11 Screenshot_20250723-114441_Termux_X11

Finally ported the gnome settings app

This is what i did :- Here

@sabamdarif
Copy link
Contributor

Screenshot_20250726-131205_Termux_X11

refine is now working too (it's better then gnome-tweaks)

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.

7 participants