Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] mate-control-center 1.24 without polkit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Wed Oct 28, 2020 2:19 am    Post subject: [solved] mate-control-center 1.24 without polkit Reply with quote

I'm trying t update from mate 1.12 to mate 1.24 without adding any kits.
I've managed to bypass elogind but I'm stuck on mate-control-center without polkit. I even gave up trying to block udisks.
it should be possible. v1.12 did not require polkit.

Does anyone have a patch or overlay?


Last edited by Tony0945 on Wed Oct 28, 2020 4:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 11:35 am    Post subject: Reply with quote

Tony0945,

The build system depends on polkit. Fixing the ebuild not to depend on polkit gets you to
Code:
checking for DBUS... yes
checking for POLKIT... no
configure: error: Package requirements (polkit-gobject-1) were not met:

No package 'polkit-gobject-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables POLKIT_CFLAGS
and POLKIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


Faking POLKIT_CFLAGS and POLKIT_LIBS lets it get as far as trying to link against polkit.
Code:
MAKEOPTS="-j1" POLKIT_CFLAGS="-march=native" POLKIT_LIBS="/dev/null" emerge -1av mate-control-center
...

libtool: link: x86_64-pc-linux-gnu-gcc -march=native -mindirect-branch=thunk -O2 -pipe -flto -Wl,-O1 -o .libs/mate-theme-test mate-theme-test.o -Wl,--export-dynamic -pthread -pthread /dev/null -Wl,--export-dynamic -pthread -pthread  -Wl,--as-needed ./.libs/libcommon.a ../../capplets/common/.libs/libcommon.a /var/tmp/portage/mate-base/mate-control-center-1.24.1/work/mate-control-center-1.24.1/libwindow-settings/.libs/libmate-window-settings.so -lmarco-private -ldconf -lXcursor -lXi -ldbus-glib-1 -ldbus-1 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lmate-desktop-2 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lstartup-notification-1 -lmate-menu -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lX11 -lm -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: /dev/null: file is empty
collect2: error: ld returned 1 exit status


error: /dev/null: file is empty :)

From here, its poke about in the mate-control-center build system and remove things. I've not done that, I just don't have mate-control-center installed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 5013
Location: Dallas area

PostPosted: Wed Oct 28, 2020 12:28 pm    Post subject: Reply with quote

I glanced at the source for control center and I doubt you'll be able to remove either polkit, as they've sprinkled it everywhere.

If it were me AND I truly wanted control center, then I'd look at trying to use the old version that works, even if I had to modify ebuilds, etc.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Wed Oct 28, 2020 2:26 pm    Post subject: Reply with quote

Looking at mate-control-center-1.24.0, as far as I can tell, Mate's time and date manager (mate-time-admin) needs library libpolkit-gobject-1 to check whether setting the system clock is authorized, apparently to gray out certain buttons on a window. If you want to investigate, the code is in capplets/time-admin/src. File main.c in that directory seems to be the only source file that actually contains an #include <polkit/something> directive.

There does not seem to be any other direct need of Polkit, however, mate-control-center's code makes lots of D-Bus method calls everywhere, and those might require authorization at runtime.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Wed Oct 28, 2020 4:17 pm    Post subject: Reply with quote

Thank you! You have all been very helpful!

Two things were key. Setting -base in package.use for the meta package. And making an overlay package for mate-session-manager.
The altered ebuild just removed the udisks flag from the gvfs dependency. I rarely mount USB sticks, don't mind doing it manually when I do, and removing the flag dropped a ton of dependencies.

Doing this let me get rid of pycairo and pygtk that depended on python 2.7 and were interfering in emerges.

To add back the base flagged things that I want. I just made a set. (Got a new tool!)

Code:
~ $ grep mate /var/lib/portage/world
mate-base/mate
media-fonts/infinality-ultimate-meta

$ cat /etc/portage/sets/mymate
mate-base/caja::mybuilds   #graphical file   manager
mate-base/mate-applets-meta
x11-terms/mate-terminal
x11-themes/mate-themes-meta
media-gfx/eom


I thought mate-control-center was needed for operation. It seems that it is just a graphical interface to gconf. I don't use either. I tried once with advice from an Ubuntu or Fedora site but the advice didn't work on Gentoo anyway.

Anon-E-Moose: I think you were one of the people sticking with gtk2. Gtk3 seems better now. Have you switched? I could get rid of a bunch of stuff in package.use if I switched.

EDIT:
One thing I lost was the ability to halt or reboot from the panel. Now I have only a logout button. It's not that hard to switch to VT1, login and type "reboot". i rarely halt and usually stop xdm (hence X) before halting. Usually a halt means I'm doing something with the hardware and need the power off. Yes, it's wasteful. here in winter, it just gives me some auxiliary heaters that don't use natural gas (Illinois power is mostly nukes with some wind).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 4:39 pm    Post subject: Reply with quote

GDH-gentoo,

Yep, commenting out a few lines in configure.ac, so it doesn't go looking for polkit.

In capplets/time-admin/src/main.c polkit is called a couple of times.
gboolean is_authorized variable is a pointer to a struct, so gcc tells me when I try to set it to an int.

I have coaxed it to build but its not happy.

I won't miss it. Its not installed now.

The cleanest way to fix this is to drop time-admin altogether. That sounds like a lot of work.
I don't think I'll spend any more time on it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16228

PostPosted: Wed Oct 28, 2020 5:14 pm    Post subject: Reply with quote

Tony0945 wrote:
It's not that hard to switch to VT1, login and type "reboot". i rarely halt and usually stop xdm (hence X) before halting. Usually a halt means I'm doing something with the hardware and need the power off.
With the right ACPI configuration, you could make the power button run reboot or halt, as you prefer. Also, it is generally safe to have an xterm (or equivalent) run /bin/su - to get a root shell, then run shutdown -h now, reboot, etc. from there, rather than logging out of X and logging in on the terminal.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Wed Oct 28, 2020 5:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
In capplets/time-admin/src/main.c polkit is called a couple of times.
gboolean is_authorized variable is a pointer to a struct, so gcc tells me when I try to set it to an int.

From what I 've seen, is probably not hard to modify the code to make it believe that you are always authorized to set the system clock, and not link to libpolkit-gobject-1. Although you might find at runtime that you actually aren't when mate-time-admin makes the D-Bus method calls to request setting it. I hope that failure mode is cleanly handled.

I'd try doing it myself just for fun, but I'm surely not going to install all the other dependencies to test the result :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 5:51 pm    Post subject: Reply with quote

GDH-gentoo,

I've done it myself, for the educational value. There are two patches, one to the ebuild
ebuild patch:
--- /usr/portage/mate-base/mate-control-center/mate-control-center-1.24.1.ebuild   2020-09-25 21:39:17.000000000 +0100
+++ /usr/local/gentoo-static/mate-base/mate-control-center/mate-control-center-1.24.1.ebuild   2020-10-28 11:20:38.876413938 +0000
@@ -15,7 +15,7 @@
 LICENSE="FDL-1.1+ GPL-2+ LGPL-2+ LGPL-2.1+ HPND"
 SLOT="0"
 
-IUSE="accountsservice appindicator debug"
+IUSE="accountsservice appindicator debug olde-gentoo"
 
 COMMON_DEPEND="
    dev-libs/atk
@@ -33,7 +33,7 @@
    media-libs/freetype:2
    media-libs/libcanberra:0[gtk3]
    >=sys-apps/dbus-1
-   sys-auth/polkit[introspection]
+   !olde-gentoo? ( sys-auth/polkit[introspection] )
    x11-apps/xmodmap
    x11-libs/cairo
    x11-libs/gdk-pixbuf:2

olde-gentoo is a local (to me) USE flag that I use to keep nasty things at bay without breaking things for normal users.
Unless you USE=olde-gentoo, that patch does nothing.

/etc/portage/patches/mate-base/mate-control-center/no-polkit.patch:
diff -rU3 mate-control-center-1.24.1_org/capplets/time-admin/src/main.c mate-control-center-1.24.1/capplets/time-admin/src/main.c
--- mate-control-center-1.24.1_org/capplets/time-admin/src/main.c       2020-10-28 17:05:37.075679391 +0000
+++ mate-control-center-1.24.1/capplets/time-admin/src/main.c   2020-10-28 17:10:46.791160777 +0000
@@ -15,7 +15,7 @@
 *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 #include <glib/gi18n.h>
-#include <polkit/polkit.h>
+/* #include <polkit/polkit.h> */
 
 #include "capplet-util.h"
 #include "time-tool.h"
@@ -98,8 +98,10 @@
 static void UpdatePermission(TimeAdmin *ta)
 {
     gboolean is_authorized;
-
+/*
     is_authorized = g_permission_get_allowed (G_PERMISSION (ta->Permission));
+*/
+    is_authorized = gtk_true;
     gtk_widget_set_sensitive(ta->TimeZoneButton, is_authorized);
     gtk_widget_set_sensitive(ta->NtpSyncSwitch,  is_authorized);
     gtk_widget_set_sensitive(ta->SaveButton,     is_authorized && !ta->NtpState);
@@ -145,12 +147,12 @@
     /* Make sure that every window gets an icon */
     gtk_window_set_default_icon_name ("preferences-system-time");
 
-    ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION, NULL, NULL, &error);
+    /* ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION, NULL, NULL, &error);
     if (ta->Permission == NULL)
     {
         g_warning ("Failed to acquire %s: %s", TIME_ADMIN_PERMISSION, error->message);
         g_error_free (error);
-    }
+    } */
     gtk_lock_button_set_permission(GTK_LOCK_BUTTON (ta->ButtonLock),ta->Permission);
     g_signal_connect(ta->Permission, "notify", G_CALLBACK (on_permission_changed), ta);
 
diff -rU3 mate-control-center-1.24.1_org/configure.ac mate-control-center-1.24.1/configure.ac
--- mate-control-center-1.24.1_org/configure.ac 2020-10-28 17:05:37.051680047 +0000
+++ mate-control-center-1.24.1/configure.ac     2020-10-28 17:06:57.773464774 +0000
@@ -136,7 +136,7 @@
 PKG_CHECK_MODULES(MATECC_SHELL, $COMMON_MODULES libmate-menu)
 
 PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1)
-PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
+#PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
 PKG_CHECK_MODULES(MATE_DESKTOP, mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED)
 PKG_CHECK_MODULES(DEFAULT_APPLICATIONS_CAPPLET, libxml-2.0)
 PKG_CHECK_MODULES(MARCO, libmarco-private >= $MARCO_REQUIRED)
@@ -247,8 +247,10 @@
 
 EXTRA_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-properties\\\"\""
 
-MATECC_CAPPLETS_CFLAGS="${COMMON_CFLAGS} ${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS} ${POLKIT_CFLAGS}"
-MATECC_CAPPLETS_LIBS="${COMMON_LIBS} ${CAPPLET_LIBS} ${DBUS_LIBS} ${POLKIT_LIBS}"
+MATECC_CAPPLETS_CFLAGS="${COMMON_CFLAGS} ${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS}
+# ${POLKIT_CFLAGS}"
+MATECC_CAPPLETS_LIBS="${COMMON_LIBS} ${CAPPLET_LIBS} ${DBUS_LIBS}
+# ${POLKIT_LIBS}"
 
 MATECC_CAPPLETS_CLEANFILES="\$(desktop) \$(desktop).in"
 MATECC_CAPPLETS_EXTRA_DIST="ChangeLog \$(desktop).in.in \$(cappletname)-capplet.png \$(pixmaps_DATA)"


The part
Code:
+/*
     is_authorized = g_permission_get_allowed (G_PERMISSION (ta->Permission));
+*/
+    is_authorized = gtk_true;
is not correct but as you say, it probably won't work anyway. I get d-bus errors trying to use the time module.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Wed Oct 28, 2020 7:45 pm    Post subject: Reply with quote

I would have tried replacing the PolkitPermission object with a GSimplePermission one, which seems to do what we want, and is closer to the original code (assuming this compiles, I don't have GTK+ installed to test it):
Code:
--- original/mate-control-center-1.24.0/capplets/time-admin/src/main.c   2020-02-10 08:48:47.000000000 -0300
+++ patched/mate-control-center-1.24.0/capplets/time-admin/src/main.c   2020-10-28 16:42:31.152082620 -0300
@@ -15,7 +15,6 @@
 *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 #include <glib/gi18n.h>
-#include <polkit/polkit.h>
 
 #include "capplet-util.h"
 #include "time-tool.h"
@@ -115,7 +114,6 @@
 
 static void InitMainWindow(TimeAdmin *ta)
 {
-    GError     *error = NULL;
     GtkBuilder *builder;
 
     builder = gtk_builder_new_from_resource ("/org/mate/mcc/ta/time-admin.ui");
@@ -145,12 +143,8 @@
     /* Make sure that every window gets an icon */
     gtk_window_set_default_icon_name ("preferences-system-time");
 
-    ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION, NULL, NULL, &error);
-    if (ta->Permission == NULL)
-    {
-        g_warning ("Failed to acquire %s: %s", TIME_ADMIN_PERMISSION, error->message);
-        g_error_free (error);
-    }
+    ta->Permission = g_simple_permission_new (TRUE);
+    if (ta->Permission == NULL) g_warning ("Failed to create a GSimplePermission object");
     gtk_lock_button_set_permission(GTK_LOCK_BUTTON (ta->ButtonLock),ta->Permission);
     g_signal_connect(ta->Permission, "notify", G_CALLBACK (on_permission_changed), ta);
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 7:50 pm    Post subject: Reply with quote

GDH-gentoo,

That looks much nicer.
The Time and Date Manager still fails with a g_bus_get_sync error here.

My patch is now
/etc/portage/patches/mate-base/mate-control-center/no-polkit.patch:
diff -rU3 mate-control-center-1.24.1_org/capplets/time-admin/src/main.c mate-control-center-1.24.1/capplets/time-admin/src/main.c
--- mate-control-center-1.24.1_org/capplets/time-admin/src/main.c       2020-10-28 19:54:03.855309158 +0000
+++ mate-control-center-1.24.1/capplets/time-admin/src/main.c   2020-10-28 19:59:44.662077637 +0000
@@ -15,7 +15,7 @@
 *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 #include <glib/gi18n.h>
-#include <polkit/polkit.h>
+/* #include <polkit/polkit.h> */
 
 #include "capplet-util.h"
 #include "time-tool.h"
@@ -115,7 +115,7 @@
 
 static void InitMainWindow(TimeAdmin *ta)
 {
-    GError     *error = NULL;
+/*     GError     *error = NULL; */
     GtkBuilder *builder;
 
     builder = gtk_builder_new_from_resource ("/org/mate/mcc/ta/time-admin.ui");
@@ -145,12 +145,17 @@
     /* Make sure that every window gets an icon */
     gtk_window_set_default_icon_name ("preferences-system-time");
 
-    ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION, NULL, NULL, &error);
+    /* ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION, NULL, NULL, &error);
     if (ta->Permission == NULL)
     {
         g_warning ("Failed to acquire %s: %s", TIME_ADMIN_PERMISSION, error->message);
         g_error_free (error);
-    }
+    } */
+
+
+    ta->Permission = g_simple_permission_new (TRUE);
+    if (ta->Permission == NULL) g_warning ("Failed to create a GSimplePermission object");
+
     gtk_lock_button_set_permission(GTK_LOCK_BUTTON (ta->ButtonLock),ta->Permission);
     g_signal_connect(ta->Permission, "notify", G_CALLBACK (on_permission_changed), ta);
 
diff -rU3 mate-control-center-1.24.1_org/configure.ac mate-control-center-1.24.1/configure.ac
--- mate-control-center-1.24.1_org/configure.ac 2020-10-28 19:54:03.855309158 +0000
+++ mate-control-center-1.24.1/configure.ac     2020-10-28 19:56:05.452012978 +0000
@@ -136,7 +136,7 @@
 PKG_CHECK_MODULES(MATECC_SHELL, $COMMON_MODULES libmate-menu)
 
 PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1)
-PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
+#PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
 PKG_CHECK_MODULES(MATE_DESKTOP, mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED)
 PKG_CHECK_MODULES(DEFAULT_APPLICATIONS_CAPPLET, libxml-2.0)
 PKG_CHECK_MODULES(MARCO, libmarco-private >= $MARCO_REQUIRED)
@@ -247,8 +247,10 @@
 
 EXTRA_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-properties\\\"\""
 
-MATECC_CAPPLETS_CFLAGS="${COMMON_CFLAGS} ${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS} ${POLKIT_CFLAGS}"
-MATECC_CAPPLETS_LIBS="${COMMON_LIBS} ${CAPPLET_LIBS} ${DBUS_LIBS} ${POLKIT_LIBS}"
+MATECC_CAPPLETS_CFLAGS="${COMMON_CFLAGS} ${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS}"
+# ${POLKIT_CFLAGS}"
+MATECC_CAPPLETS_LIBS="${COMMON_LIBS} ${CAPPLET_LIBS} ${DBUS_LIBS}"
+# ${POLKIT_LIBS}"
 
 MATECC_CAPPLETS_CLEANFILES="\$(desktop) \$(desktop).in"
 MATECC_CAPPLETS_EXTRA_DIST="ChangeLog \$(desktop).in.in \$(cappletname)-capplet.png \$(pixmaps_DATA)"

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Wed Oct 28, 2020 8:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:
The Time and Date Manager still fails with a g_bus_get_sync error here.

Could you post the error? I'd like to determine if it could be related to the patch, or if it is something else.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Wed Oct 28, 2020 9:07 pm    Post subject: Reply with quote

Hu wrote:
Also, it is generally safe to have an xterm (or equivalent) run /bin/su - to get a root shell, then run shutdown -h now, reboot, etc. from there, rather than logging out of X and logging in on the terminal.
Yes, I realized afterwards that all I have to do is popup an xterm (icon is sitting on the panel) and type "sudo reboot". I sudo without a password, after all I'm the guy who administers the passwords. Halt I worry more about. My memory (which could be in error) tells me that in Unix days, halt was a hard stop and shutdown was the gradual one. It seems that today, halt tries to kill running processes and shutdown does nothing at all. Worse comes to worse, I can reboot and hit the power button at the boot beep.

I don't worry about setting the time because ntpdate runs at boot and I have a root cronjob that runs it three times a day. Eight hours is about the time it takes to be off by one second.
If ntpdate doesn't run for a day, I'm off three seconds (shrugs). IIRC, the time and date can be set manually. I
m not a Windoze guy who needs a GUI for everything. it's just convenience.

EDIT: Thank you guys! Keep those patches coming!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 9:40 pm    Post subject: Reply with quote

GDH-gentoo,

Time And Date Manager pops up a dialogue that says

g_bus_get_sync
Could not Connect: No such file or directory.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Wed Oct 28, 2020 9:52 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Time And Date Manager pops up a dialogue that says

g_bus_get_sync
Could not Connect: No such file or directory.

I see. That's probably InitDbusProxy():
Code:
static gboolean InitDbusProxy(TimeAdmin *ta)
{
    GError *error = NULL;

    ta->Connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
    if(ta->Connection == NULL)
    {
        ErrorMessage (_("g_bus_get_sync"), error->message);
        goto EXIT;
    }
// ...
}
I suppose mate-time-admin could not connect to the system-wide message bus. Is D-Bus running? Or is yours one of those D-Bus-free systems?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Wed Oct 28, 2020 9:59 pm    Post subject: Reply with quote

GDH-gentoo,

dbus is running but I don't have a device manager at all.
/dev is entirely static.

-- Edit --
dbus was running for my user, not the system message bus.
Having started dbus, the error is

GetNtpState
GDBUS.Error:org.freedesktop.DBus.Error.ServiceUnknown: The
name freedesktop.timedate1 was not provided by any .service
files

That's copy typed.

-- Edit some more ---

Dismissing that error brings up the Time and Date Manager with everything except the timezone greyed out.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 548
Location: South America

PostPosted: Thu Oct 29, 2020 2:11 am    Post subject: Reply with quote

NeddySeagoon wrote:
Having started dbus, the error is

GetNtpState
GDBUS.Error:org.freedesktop.DBus.Error.ServiceUnknown: The
name freedesktop.timedate1 was not provided by any .service
files

That's copy typed.
mate-time-admin wants to communicate with a process that implements the org.freedesktop.timedate1 D-Bus interface. I don't know which package provides this for OpenRC-based Gentoo systems; I suppose it's not mate-control-center, and I suppose you don't have it.

NeddySeagoon wrote:
Dismissing that error brings up the Time and Date Manager with everything except the timezone greyed out.
I can't tell if this is caused by the patch or something else :?

This small program works as expected, printing "Allowed":
Code:
#include <gio/gio.h>
#include <stdio.h>

int main() {
   GPermission *perm = g_simple_permission_new(TRUE);
   if (!perm) {
      fprintf(stderr, "GSimplePermission not created\n");
      return 1;
   }
   printf("%s\n", g_permission_get_allowed(perm)? "Allowed": "Not allowed");
   return 0;
}
(And prints "Not allowed" if the argument of g_simple_permission_new() is changed to FALSE)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46756
Location: 56N 3W

PostPosted: Thu Oct 29, 2020 12:13 pm    Post subject: Reply with quote

GDH-gentoo,

It looks like its
Code:
* app-admin/openrc-settingsd
     Available versions:  1.0.1-r1 {systemd}
     Homepage:            https://gitweb.gentoo.org/proj/openrc-settingsd.git
     Description:         System settings D-Bus service for OpenRC

and correct, I don't have it.
Also I use openrc-0.17 to avoid some of the to me, questionable, design decisions that came soon after.
I do know that one of two have since been reverted. As the Royal Navy say ... It was good enough for Nelson :)

I did try to test ...
Code:
# emerge -1av app-admin/openrc-settingsd

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "sys-auth/polkit" have been masked.
but the point of this was to get rid of sys-auth/polkit.
We are well past the point of diminishing returns here, for one applet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 5013
Location: Dallas area

PostPosted: Thu Oct 29, 2020 12:52 pm    Post subject: Reply with quote

NeddySeagoon wrote:
app-admin/openrc-settingsd


all courtesy of the "gnome team"

I guess that MS style embrace and crush is still active. :lol:
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
sitquietly
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2010
Posts: 107
Location: On the Wolf River, Tennessee

PostPosted: Thu Oct 29, 2020 9:00 pm    Post subject: Re: [solved] mate-control-center 1.24 without polkit Reply with quote

Tony0945 wrote:
I'm trying t update from mate 1.12 to mate 1.24 without adding any kits.
.....Does anyone have a patch or overlay?


An interesting sidenote: I run plasma-meta without any kits. I put an ebuild for "solid" in my local overlay and just remove the dependency on udisks and the uses for systemd/elogind. But although the plasma desktop is very nice, and activities are incredibly helpful, I seem to always return to fluxbox / rox-filer / dmenu / rofi for getting things done.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Fri Oct 30, 2020 7:48 pm    Post subject: Reply with quote

Good News! Openbox will run mate-panel without any other mate component. I miss the desktop but my panel already had thunderbird, palemoon, sagetv and mate-terminal icons on it.
That's 90% of what I run. Now if I can put a virtualbox icon on it, I'm in business. And it stops all that spam about "Cannot connect to polkit" that mate-session-manager fills /var/log/messages with.

Seems faster. I'll have to try it on the k10 where mate 1.24 has terrible lags.

Yes, the other panel applets like the sensors applet and clock seem to be working too. And caja runs when called from the menu. I don't usually run it but it's handy for exploring the samba mounts.

So most of the Mate/Gnome problems are in trying to keep it "integrated" like Windows instead of hooking small applications together with tested defined hooks like Unix.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 5013
Location: Dallas area

PostPosted: Fri Oct 30, 2020 8:23 pm    Post subject: Reply with quote

Running either pcmanfm or spacefm with the "--desktop" option will give you desktop icons (or at least the ability to use them)


In openbox it's easy enough to set up keyboard shortcuts, some of mine (W is the windows key on the keyboard) no need for an icon.

W-r -- rdp to win gaming box
W-v -- Virtual machine menu
W-w -- start win gaming box
W-x -- dosbox - 98se
W-z -- dosbox config
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Fri Oct 30, 2020 10:20 pm    Post subject: Reply with quote

Code:
tony@Casti ~ $ pcmanfm --desktop
error: Could not find thumbnail in zip file
error: Could not find thumbnail in zip file

^C

Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4297
Location: Illinois, USA

PostPosted: Sat Oct 31, 2020 1:34 am    Post subject: Reply with quote

Anon-E-moose wrote:
Running either pcmanfm or spacefm with the "--desktop" option will give you desktop icons (or at least the ability to use them)


All right! Now running openbox with mate-panel and pcmanfm --desktop. The look and feel of Mate without the overhead.
Subjectively, it feels faster and tighter. Pale Moon seems to load faster. Under pure Mate it was palpably slow and worse on 1.24 than on 1.12.

Yes, it was easy to put a virtualbox icon on the mate-panel and yes, it works. That feels faster too. The new desktop had the icons re-ordered but that was easy to fix. The mate-panel logout icon doesn't work because it tries to kill mate-session-manager which isn't running. I can kludge something up with xmessage.

here's the autostart, sans comments:
Code:
 ~/.config/openbox $ grep -v ^# autostart

DESKTOP_ENV="OPENBOX"


pcmanfm --desktop &
mate-panel &        #conventional mate panel, works except for logout

mate-terminal &
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 5013
Location: Dallas area

PostPosted: Sat Oct 31, 2020 11:08 am    Post subject: Reply with quote

I have this in my rc.xml file (keyboard shortcut file)

Code:
    <!-- System level commands -->
    <keybind key="W-s">
      <keybind key="q">
        <action name="Exit">
          <prompt>yes</prompt>
        </action>
      </keybind>
      <keybind key="x">
        <action name="Exit">
          <prompt>no</prompt>
        </action>
      </keybind>
    </keybind>


then it's windows meta key + either "q" or "x" depending on whether I want to acknowledge it shutting down, ie ask for conformation.

Or right click (anywhere on desktop) for menu,

I added this to the menu section (menu.xml)

Find where the Reconfigure option is and change to this

Code:
        <menu id="40" label="OpenBox">
            <menu id="client-list-menu"/>
            <item label="Reconfigure"> <action name="Reconfigure"/> </item>
            <separator/>
            <item label="Exit"> <action name="Exit"/> </item>
        </menu>


It will add an exit option to menu, I just added the quick exit, could change to the ask version. (I think this is correct, but I hardly use the menu option)

Edit to add: http://openbox.org/wiki/Help:Contents
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum