LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-08-2021, 08:32 PM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Rep: Reputation: 253Reputation: 253Reputation: 253
Question How to make accountsservice work with xfce?


Hello, everyone.

I have xfdesktop set a new desktop background every 5 minutes, and it complains with the following message in the xsession error log (~/.local/share/sddm/xorg-session.log)"

Code:
** (xfdesktop:3062): WARNING **: 21:54:08.828: Failed to set the background '/home/user/images/image111.jpg': GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.DisplayManager.AccountsService”
(See also this issue: https://gitlab.xfce.org/xfce/xfdesktop/-/issues/176)

However, accountsservice comes with the stock Slackware, under the name accountsservice-0.6.55-x86_64-4

For some reason, xfdesktop cannot contact it, however. How to make it work?
 
Old 12-10-2021, 02:14 PM   #2
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 781

Rep: Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895
I tried to look into what is going on with the 'accountsservice' package. From what I see, 'accountsservice' is a dbus service that both xfce and plasma automatically activate as needed (there could be other things that use it, I didnt look for too long). Plasma starts and uses the service when modifying 'users' in the system settings. Xfce appears to start the daemon from login.

You can see it running on the system dbus after starting xfce:
Code:
# qdbus --system | grep -i account
 org.freedesktop.Accounts
It appears to be running and working as intended to me.

I also see that same warning as you in '~/.local/share/sddm/xorg-session.log' whenever I change the background in xfce's settings. I don't know what provides this 'org.freedesktop.DisplayManager.AccountsService' dbus interface but it doesnt seem to be part of 'accountsservice'.

The background still changes properly so it seems like a harmless warning to me.
 
Old 12-10-2021, 05:28 PM   #3
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
I also looked into this a bit when the error message started showing up in my ~/.xsession-errors file. I get the error even though my background is set to a solid color - no background file (wallpaper) at all.

As far as I can tell, using dbus-monitor, xfdesktop is successfully contacting AccountsService via D-bus, but the attempt to set the BackgroundFile property is rejected.

I was curious enough to do a little detective work, and here is what I found.

The response on your bug report at https://gitlab.xfce.org/xfce/xfdesktop/-/issues/176 seems to be going in the wrong direction. It isn't that AccountsService is not available. The feature they are using is not available.

(1) From the xfdesktop ChangeLog on Oct 7, 2018:
Quote:
Sync user's wallpaper selection to AccountsService

This used to be possible only within Ubuntu in the past, but now the feature is also present in upstream AccountsService.
(2) Bug requests asking for the Ubuntu feature to be added to AccountsService:

https://bugs.freedesktop.org/show_bug.cgi?id=43578
https://bugs.freedesktop.org/show_bug.cgi?id=95137

Reading the bug reports, it doesn't look like the feature did ever get added. If so, then xfdesktop's attempt to set background file would still only work on the Ubuntu-patched AccountsService, and perhaps the developers of xfdesktop don't realize that.
 
Old 12-10-2021, 08:52 PM   #4
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
So, the issue should rather be about implementing "extensions to accountsservice" protocol in xfdesktop? Whatever that "extensions" thing is.
 
Old 12-10-2021, 10:02 PM   #5
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Depends on whether we consider the problem to be a strange error message being logged, or some missing functionality. I don't think we are missing any functionality. Why does AccountsService need to know what wallpaper you are using? Is it for a login manager like LightDM to show it at login time? I can't see that being a good feature anyway.

If the only problem is the error message, then I say xfdesktop should just ignore the error. I would have suggested toning it down to something like "unable to tell Account Service about your wallpaper", but you said you have a frequent automatic change, which would still get too many messages.

My opinion: xfdesktop should just silently ignore any error telling Accounts Service about wallpaper changes.
 
Old 12-10-2021, 11:34 PM   #6
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Now that you have written about it, it seems to me that this is a security vulnerability, actually. A wallpaper may be a pure decoration, but may be not, if it is used to display some useful information, such as server status. Forwarding this information to the login manager is a security issue.

On the other hand I am vehemently opposed to the idea of silently ignoring failures. In my experience this usually leads to unexpected catastrophic results.

I think that forwarding a the background to the login manager should be a runtime option in the xfdesktop's properties. There _may_ be cases when one user is fine with sharing this information, and another one is not.
 
Old 12-11-2021, 02:55 AM   #7
DryFalls
Member
 
Registered: Apr 2021
Posts: 44

Rep: Reputation: Disabled
A previous search for the org.freedesktop.DisplayManager.AccountsService file only found lightdm. which is not provided. Xfce itself doesn't need AccountsService. Only plasma5 seems to want it.
 
Old 12-11-2021, 09:20 AM   #8
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 781

Rep: Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895Reputation: 895
So the 'org.freedesktop.DisplayManager' dbus service is provided by display managers like 'lightdm' and 'sddm', but only 'lightdm' seems to have implemented the 'AccountsService' extension. Found this commit for 'lightdm' which seems to back what ljb643 said in post 3:

https://github.com/canonical/lightdm...46769f8236232f

Perhaps this statement is incorrect and its still only possible with "Ubuntu" (lightdm):
Quote:
Sync user's wallpaper selection to AccountsService

This used to be possible only within Ubuntu in the past, but now the feature is also present in upstream AccountsService.
 
Old 12-11-2021, 04:38 PM   #9
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
How about posting a recommendation, or even a patch, at https://gitlab.xfce.org/xfce/xfdesktop/-/issues/176 to completely remove the feature whereby xfdesktop tells AccountsService every time the background changes? Problem solved - no error message, no security issue. Ubuntu will presumably have to go back to patching the code to add their feature, but they like doing stuff like that, don't they?
 
Old 12-31-2021, 01:48 AM   #10
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
I've done a patch that adds a compile-time check. Maybe it will be accepted?

Code:
diff --git a/configure.ac.in b/configure.ac.in
index 6d36396a..bb5e14f2 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -106,6 +106,21 @@ else
 fi
 AM_CONDITIONAL([ENABLE_DESKTOP_ICONS], [test "x$enable_desktop_icons" = "xyes"])
 
+dnl do we want desktop icons at all?
+AC_ARG_ENABLE([ubuntu-accountsservice-integration],
+    [AS_HELP_STRING([--disable-ubuntu-accountsservice-integration],
+            [Do not compile in support for ubuntu accountsservice integration (default=enabled)])],
+        [ac_cv_enable_ubuntu_accountsservice_integration=$enableval],
+        [ac_cv_enableubuntu_accountsservice_integration=yes])
+if test "x$ac_cv_enable_ubuntu_accountsservice_integration" = "xno"; then
+    enable_ubuntu_accountsservice_integration="no"
+else
+    enable_ubuntu_accountsservice_integration="yes"
+    AC_DEFINE([ENABLE_UBUNTU_ACCOUNTSSERVICE_INTEGRATION], [1], [Set if ubuntu accountsservice integration support is enabled])
+fi
+AM_CONDITIONAL([ENABLE_UBUNTU_ACCOUNTSSERVICE_INTEGRATION], [test "x$enable_ubuntu_accountsservice_integration" = "xyes"])
+
+
 dnl if we want desktop icons, do we also want file icons?
 AC_ARG_ENABLE([file-icons],
     [AS_HELP_STRING([--disable-file-icons],
@@ -203,6 +218,7 @@ AC_OUTPUT
 echo
 echo "Build Configuration:"
 echo "* Build desktop menu module:                    $build_desktop_menu"
+echo "* Build support for ubuntu accountsservice integration: $enable_ubuntu_accountsservice_integration"
 echo "* Build support for desktop icons:              $enable_desktop_icons"
 echo "      Include support for file/launcher icons:  $enable_file_icons"
 if test x"$LIBNOTIFY_FOUND" = x"yes"; then
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index e00c9010..d0795f7e 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -483,6 +483,7 @@ backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
     }
     if(monitor == -1)
         return;
+#ifdef ENABLE_UBUNTU_ACCOUNTSSERVICE_INTEGRATION
     /* notify Accountsservice of the new bg (only for monitor0) */
     if(monitor == 0)
     {
@@ -497,6 +498,7 @@ backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
             g_free(new_filename);
         }
     }
+#endif
 
 #ifdef G_ENABLE_DEBUG
     XF_DEBUG("backdrop changed for workspace %d, monitor %d (%s)", current_workspace, monitor,
It won't apply to Slackware as-is, because it is aimed at configure.ac.in, not configure.ac, but the files are almost the same, so it should not matter. Also, and autoreconf -i is needed.
 
Old 12-31-2021, 01:55 AM   #11
Lockywolf
Member
 
Registered: Jul 2007
Posts: 683

Original Poster
Rep: Reputation: 253Reputation: 253Reputation: 253
Merge request:

https://gitlab.xfce.org/xfce/xfdeskt...sts/29/commits
 
Old 04-28-2024, 05:48 PM   #12
dmillfree
LQ Newbie
 
Registered: Apr 2024
Distribution: Slackware64_Current
Posts: 2

Rep: Reputation: 0
This is the fix for this

OK the missing dbus service files are needed. I stumbled across this while playing with Xubuntu and their lightdm login session manager.

The following is going to guide you into creating a Slackware package to fix this. This fix also fixes the error messages about changing wallpaper and login pictures.

accountsservice-display-fix
├── install
│** ├── doinst.sh
│** └── slack-desc
└── usr
└── share
├── accountsservice
│** └── interfaces
├── dbus-1
│** ├── interfaces
│** │** └── org.freedesktop.DisplayManager.AccountsService.xml
│** └── system.d
│** └── org.freedesktop.DisplayManager.conf
└── polkit-1
└── actions
└── org.freedesktop.DisplayManager.AccountsService.policy

11 directories, 5 files
That's the folder structure.

Step-1 create the folders

#!/bin/sh

mkdir -p accountsservice-display-fix/install
mkdir -p accountsservice-display-fix/usr/share/accountsservice/interfaces
mkdir -p accountsservice-display-fix/usr/share/dbus-1/interfaces
mkdir -p accountsservice-display-fix/usr/share/dbus-1/system.d
mkdir -p accountsservice-display-fix/usr/share/polkit-1/actions

Save that as a bash script, run it to create the folders.

Step-2 Create the files

( cd usr/share/accountsservice/interfaces ; rm -rf org.freedesktop.DisplayManager.AccountsService.xml )
( cd usr/share/accountsservice/interfaces ; ln -sf ../../dbus-1/interfaces/org.freedesktop.DisplayManager.AccountsService.xml org.freedesktop.DisplayManager.AccountsService.xml )

save that as doinst.sh in the accountsservice-display-fix/install folder

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.

|-----handy-ruler----------------------------------------------|
accountsservice-display-fix: This accountsservice-display-fix package was created
accountsservice-display-fix:
accountsservice-display-fix: to address the missing dbus service files that give us the
accountsservice-display-fix: org.freedesktop.DisplayManager.AccountsService
accountsservice-display-fix: that works with the accountsservice application.
accountsservice-display-fix:
accountsservice-display-fix: This was created for those who do not install KDE on
accountsservice-display-fix: Slackware. KDE most likely has it's own version of
accountsservice-display-fix: org.freedesktop.DisplayManager.AccountsService
accountsservice-display-fix: This package gives us xfce users the functionality needed
accountsservice-display-fix:

save that as slack-desc in the accountsservice-display-fix/install folder

<node>
<interface name="org.freedesktop.DisplayManager.AccountsService">

<annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/>

<annotation name="org.freedesktop.Accounts.Authentication.ChangeOwn"
value="org.freedesktop.DisplayManager.AccountsService.ModifyOwn"/>

<annotation name="org.freedesktop.Accounts.Authentication.ReadAny"
value="org.freedesktop.DisplayManager.AccountsService.ReadAny"/>

<annotation name="org.freedesktop.Accounts.Authentication.ChangeAny"
value="org.freedesktop.DisplayManager.AccountsService.ModifyAny"/>

<property name="BackgroundFile" type="s" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue" value=""/>
</property>
<property name="HasMessages" type="b" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue" value="false"/>
</property>
<property name="KeyboardLayouts" type="as" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue" value="[]"/>
</property>

</interface>
</node>

save that as org.freedesktop.DisplayManager.AccountsService.xml in the accountsservice-display-fix/usr/share/dbus-1/interfaces folder

<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

<!-- Only root can own the service -->
<policy user="root">
<allow own="org.freedesktop.DisplayManager"/>
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DisplayManager"
send_member="AddSeat"/>
</policy>

<policy context="default">
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DBus.Properties"/>
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DisplayManager"/>
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DisplayManager.Seat"/>
<allow send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DisplayManager.Session"/>
<deny send_destination="org.freedesktop.DisplayManager"
send_interface="org.freedesktop.DisplayManager"
send_member="AddSeat"/>
</policy>

</busconfig>

save that as org.freedesktop.DisplayManager.conf in the accountsservice-display-fix/usr/share/dbus-1/system.d folder

<?xml version="1.0" encoding="UTF-8"?>
<policyconfig>
<action id="org.freedesktop.DisplayManager.AccountsService.ModifyOwn">
<description>Set properties of own user</description>
<description xml:lang="zh_TW">設定使用者自己的屬性</description>
<message>Authentication is required to set one's own greeter properties.</message>
<message xml:lang="zh_TW">設定某人自己的 greeter 屬性需要身份核對。</message>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

<action id="org.freedesktop.DisplayManager.AccountsService.ReadAny">
<description>Set properties of any user</description>
<description xml:lang="zh_TW">設定任何使用者的屬性</description>
<message>Authentication is required to get another user's greeter properties.</message>
<message xml:lang="zh_TW">取得其他使用者的 greeter 屬性需要身份核對。</message>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

<action id="org.freedesktop.DisplayManager.AccountsService.ModifyAny">
<description>Set properties of any user</description>
<description xml:lang="zh_TW">設定任何使用者的屬性</description>
<message>Authentication is required to set another user's greeter properties.</message>
<message xml:lang="zh_TW">設定其他使用者的 greeter 屬性需要身份核對。</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>
</action>
</policyconfig>

save that as org.freedesktop.DisplayManager.AccountsService.policy in the accountsservice-display-fix/usr/share/polkit-1/actions folder

Step-3 create the Slackware package

Double check to make sure all the folders and files are created and located where they should be run in console tree accountsservice-display-fix
that should show you the same folder structure as above.

Now cd into the accountsservice-display-fix folder and makepkg /tmp/accountsservice-display-fix.tgz

then run installpkg /tmp/accountsservice-display-fix.tgz reboot the computer and voila it's fixed.
 
  


Reply

Tags
accountsservice, dbus, freedesktop, xfdesktop



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AccountsService not finding running systemd 224 RaynoVox Linux From Scratch 2 03-05-2016 10:48 AM
unmet dependencies for gir1.2-accountsservice-1.0 jkinable Linux - Software 5 06-15-2015 08:21 PM
make Xconfig doesn't work, make menuconfig does work Debian/KDE bucovaina78 Linux - Kernel 1 10-15-2008 01:26 PM
XFCE Network ServersI use XFCE (sometimes) but I can not find my network folders on a holzster Ubuntu 0 10-24-2006 05:48 PM
Xfce problems with task bar and xfce-panel aeruzcar Linux - Software 4 06-26-2006 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration