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

Conversation

@sabamdarif
Copy link
Contributor

This pr add the dconf-editor packages.
closes #25419

@sabamdarif
Copy link
Contributor Author

sabamdarif commented Jul 20, 2025

@robertkirkman
Copy link
Member

robertkirkman commented Jul 21, 2025

Probably, you should use TERMUX_PKG_RM_AFTER_INSTALL because it's for that, but if there is a way to change the software's install settings to prevent installing the systemd-related files at all, then that would be the best way.

Here is an example of that being done in another package; there might be a way to do something similar here.

- if [ -d /usr/lib/systemd/system ] ; then \
+ if [ -d /notfound/usr/lib/systemd/system ] ; then \
$(INSTALL) -d $(DESTDIR)/usr/lib/systemd/system/ ; \
$(INSTALL_DATA) boinc-client.service $(DESTDIR)/usr/lib/systemd/system/boinc-client.service ; \
- elif [ -d /lib/systemd/system ] ; then \
+ elif [ -d /notfound/lib/systemd/system ] ; then \
$(INSTALL) -d $(DESTDIR)/lib/systemd/system/ ; \
$(INSTALL_DATA) boinc-client.service $(DESTDIR)/lib/systemd/system/boinc-client.service ; \
fi

@robertkirkman
Copy link
Member

robertkirkman commented Jul 21, 2025

This patch seems to do the trick, doesn't it?

--- a/service/meson.build
+++ b/service/meson.build
@@ -10,15 +10,6 @@ configure_file(
   install_dir: dbus_session_service_dir,
 )
 
-systemd_service = 'dconf.service'
-
-configure_file(
-  input: systemd_service + '.in',
-  output: systemd_service,
-  configuration: service_conf,
-  install_dir: systemd_userunitdir,
-)
-
 lib_sources = [
   'dconf-blame.c',
   'dconf-keyfile-writer.c',

If you wanted to expand your idea (systemd does not work in termux, so any files in lib/systemd obviously cannot be used by Termux except to read them to check their commands) to other packages, here is the short list of other packages in Termux that currently contain files in lib/systemd.

~ $ apt-file search 'lib/systemd'
at-spi2-core: /data/data/com.termux/files/usr/lib/systemd/user/at-spi-dbus-bus.service
dconf: /data/data/com.termux/files/usr/lib/systemd/user/dconf.service
evince: /data/data/com.termux/files/usr/lib/systemd/user/org.gnome.Evince.service
monetdb: /data/data/com.termux/files/usr/lib/systemd/system/monetdbd.service
thunar: /data/data/com.termux/files/usr/lib/systemd/user/thunar.service
xfce4-notifyd: /data/data/com.termux/files/usr/lib/systemd/user/xfce4-notifyd.service
xfconf: /data/data/com.termux/files/usr/lib/systemd/user/xfconfd.service

Alternatively, depending on what you prefer, If you would like to propose globally deleting all lib/systemd files from all of Termux moving forward, you could edit termux_step_massage() to add rm -rf lib/systemd among the other similar commands there.

# Remove cache file created by update-desktop-database:
rm -f share/applications/mimeinfo.cache
# Remove cache file created by glib-compile-schemas:
rm -f share/glib-2.0/schemas/gschemas.compiled
# Remove cache file generated when using glib-cross-bin:
rm -rf opt/glib/cross/share/glib-2.0/codegen/__pycache__
# Removing the pacman log that is often included in the package:
rm -f var/log/pacman.log

I'm not sure if everyone would agree that this is a good idea, because systemd service files may be read by users who are familiar with systemd on GNU/Linux in order to understand how to manually launch the service without having systemd, but if the reason you want to remove the lib/systemd folder is because you like how that would clean up the directory structure by removing files that are always unnecessary in Termux from a technical standpoint, then you could propose it and others could give feedback on this idea.

@robertkirkman
Copy link
Member

I do not have a strong opinion either way on whether all systemd-related files should be deleted from Termux;

they don't do anything, but as far as I am aware they don't break anything by being there.

@sabamdarif
Copy link
Contributor Author

they don't do anything, but as far as I am aware they don't break anything by being there.

But for dconf there was some error, so I tested it with gnome and because of that file gnome failed to launch, for some reason it was trying to start the systemd service file or something like that.

i think patching the meson.build will be the best option but adding a patch file mean it might failed in future, so someone have to manually fix that old patch file all the time. where with TERMUX_PKG_RM_AFTER_INSTALL you will not have any issue like that.
so what do you think ?
i think TERMUX_PKG_RM_AFTER_INSTALL will be the best option and also there wasn't any issue because of that so it will be fine

@robertkirkman
Copy link
Member

But for dconf there was some error, so I tested it with gnome and because of that file gnome failed to launch, for some reason it was trying to start the systemd service file or something like that.

Wow, I did not actually know that having lib/systemd files in Termux could result in an error,

in this case, if you think TERMUX_PKG_RM_AFTER_INSTALL is the best option then you can go with that for now, sure, but in this situation, we should consider applying the removal globally in the future in termux_step_massage(), because the same error might happen with one of the other packages that contains lib/systemd files.

# Remove cache file created by update-desktop-database:
rm -f share/applications/mimeinfo.cache
# Remove cache file created by glib-compile-schemas:
rm -f share/glib-2.0/schemas/gschemas.compiled
# Remove cache file generated when using glib-cross-bin:
rm -rf opt/glib/cross/share/glib-2.0/codegen/__pycache__
# Removing the pacman log that is often included in the package:
rm -f var/log/pacman.log

since GNOME is a draft PR currently, if the errors can only be reproduced while using GNOME, then maybe the global removal should be considered for that PR.

@sabamdarif
Copy link
Contributor Author

for adding that rm -rf lib/systemd in termux_step_massage, i think that more related to Gnome Shell pr, so i think licy183 should add that in that pr to fix issue related to gnome

@robertkirkman
Copy link
Member

I have personally tested this and it is working

image

(I changed the width of the sidebar of the GTK4 file picker popup)

I will merge this in 24 hours if no problems are found.

@sabamdarif
Copy link
Contributor Author

@robertkirkman one thing out of this pr, do you know how can i set the file picker to nautilus, even though i install nautilus it still uses the gtk3 file picker, is there any package i need to install to make it work.
any idea about this ?

@robertkirkman
Copy link
Member

I am not completely sure exactly what you mean, but if you can record a video of what you would like to have happen as it currently exists in desktop Linux like Ubuntu or Fedora, then I could try to copy and paste that to Termux.

I think that "file picker" and "file browser" are slightly different programs, and I am not sure exactly if it is possible to "set nautilus as file picker"

@robertkirkman
Copy link
Member

robertkirkman commented Jul 22, 2025

Oh hmm, I think that what you might be referring to is:

setting "org.freedesktop.impl.portal.FileChooser" property equal to "nautilus" is supposed to do something

I am not completely sure whether doing that will work in Termux.

@sabamdarif
Copy link
Contributor Author

thanks for the info

@robertkirkman robertkirkman merged commit c50b07a into termux:master Jul 23, 2025
11 checks passed
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]: Dconf Editor

2 participants