Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-08-29 15:49:32

TomL
Member
Registered: 2015-08-29
Posts: 10

another shtudown-Problem

Hello @ all

I am Thomas, an old boy from Germany. I have fun to playing with my PC, and now I'm temporarily here as a guest  with a little Problem and hope, I can find a little help.

I want to change my installed Xfce 4.10 on my Debian Jessie-PC to the actual Version 4.12. And at this moment it is succesfully done. But at the End of my development idea, really at the last Viewpoint, I got a little (to me unsolveable) problem: I cannot shutdown my Computer via xfce-Menu.  The Modul xfce4-session-logout offers 3 Options: Logout, Halt and Reboot. But only Logout is available, Halt and Reboot are inactive.  It seems, this is not a Probleme with missing permissions. It is the same Problem, when I login as "root": Halt and Reboot are inactive. Ok, here is the story:

First I have created a virtual Debian-Jessie-Machine AMD64 without a Desktop. As second I have downloaded all the needed Sourcecode-Files from the Git-Repo, installed them in my VM and compiled all of them succesfully. As next step I have taken a new Jessie-VM, also without a Desktop (it's an untouched copy from the initial VM above) and have installed the new xfce with all deb's.

dpkg -i --force-overwrite /media/Install/deb/*

At last I have installed the missing Libs. For this I tested with Single-Starts every of the Modules in Terminal and waited/watched for Error-Messages. After I installed the reported Libs, everything was fine... except to the last little unsolved problem.

apt-get install lightdm
apt-get install libwnck-3-0 libwnck-3-common libwnck22 libwnck-common
apt-get install libvte9 libburn4 libisofs6 libgtksourceview-3.0-1
apt-get install libunique-1.0-0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0
apt-get install libglade2-0 libupower-glib3
apt-get install libxfconf-0-2 libxml-sax-expatxs-perl

Maybe... (I think so)... there is always a missing Lib, but I get no Errormessages, so I can't understand and solve it. I have checked and it seems, it is not a Policy-Problem.

thomas@Jessie-AMD64-VM:~$ xfce4-power-manager -q
thomas@Jessie-AMD64-VM:~$ xfce4-power-manager --dump

** (xfce4-power-manager:1518): WARNING **: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name
** (xfce4-power-manager:1518): WARNING **: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name
** (xfce4-power-manager:1518): WARNING **: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name
(xfce4-power-manager:1518): GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:2461: signal 'Changed' is invalid for instance '0x8ef560' of type 'GDBusProxy'
(xfce4-power-manager:1518): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode
(xfce4-power-manager:1518): GLib-CRITICAL **: g_error_free: assertion 'error != NULL' failed
** (xfce4-power-manager:1518): WARNING **: No outputs have backlight property

(xfce4-power-manager:1518): xfce4-power-manager-WARNING **: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "GetMaxBrightness" with signature "" on interface "org.freedesktop.UPower.KbdBacklight" doesn't exist

---------------------------------------------------
       Xfce power manager version 1.5.2
Mit Unterstützung für »policykit«
Mit Unterstützung für »network-manager«
---------------------------------------------------
Kann in Bereitschaftsmodus versetzen: Ja
Kann in Ruhezustand versetzen: Ja
Darf in Bereitschaftsmodus versetzen: Ja                                // allow suspend = yes
Darf System in den Ruhezustand versetzen: Ja                            // allow hibernate = yes
Darf System herunterfahren: Ja                                          // allow shutdown = yes
Hat Akku: Nein
Hat Helligkeitsregler: Nein
Hat Hauptschalter: Ja
Hat Taste für Ruhezustand: Ja
Hat Schlaftaste: Ja
Hat Klappe: Nein

In my regular "Jessie"-PC there does no sudoers exist and "sudo" is also not installed, because they are default not present in Debian Jessie. In my new VM "sudo" is also not installed, also sudoers is not available. In both machines it is not allowed to shutdown or reboot the PC as User with the shutdown-command, only "root" can do that. But in both machines the commands "systemctl poweroff" and "systemctl reboot" are allowed and succesfully done as normal User. The Shutdown-Option via xfce-Menu at my PC works good, but it does not at the VM. If I did succesfully logout out of the VM, I can select shutdown via Lightdm-Greeter-Menu. There the shutdown is possible. It seems to me, the handling through xfce with Systemd is a little bit different between my PC and the VM, but I dont know, how to customize it. And the next question is: is an installed "sudo" a must-have in the actual Version xfce 4.12?

I found and read many solutions in the Web, but the most of them did'nt work, because they affect an older Debian and an older xfce. But Jessie and 4.12 are really new at the moment and I cannot find problems and their solutions to this "team" in the Web. And so i hope, I can find some help here.

Best regards
Thomas

Offline

#2 2015-08-30 13:03:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

Hello and welcome.

Usually, greyed out shutdown/reboot options are a symptom of consolekit or policykit issues. Make sure that you have policykit-1-gnome installed and the "policykit-gnome-authentication-agent-1" process running.

I found and read many solutions in the Web, but the most of them did'nt work, because they affect an older Debian and an older xfce.

For sake of completeness, do either of the following solutions help:
- https://forum.xfce.org/viewtopic.php?id=9150
- https://forum.xfce.org/viewtopic.php?id=7713

is an installed "sudo" a must-have in the actual Version xfce 4.12?

No, it is not necessary.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2015-08-31 10:04:02

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

Hello ToZ

Thank you for your reply. But it is not a Problem by Consolekit or Policies.
This is the output of my regular Debian-Jessie-PC with installed xfce 4.10. The output in my just-new-created VM with the installed xfce 4.12 (at the moment without Lightdm) is exactly the same.

root@PCThomas:/home/thomas# uname -a
Linux PCThomas 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

root@PCThomas:/home/thomas# ff / *initrc*
/etc/X11/xinit/xinitrc
/etc/xdg/xfce4/xinitrc


root@PCThomas:/home/thomas# dpkg -l consolekit
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                         Version             Architektur         Beschreibung
+++-============================-===================-===================-==============================================================
un  consolekit                   <keine>             <keine>             (keine Beschreibung vorhanden)

You can see, in Debian-Jessie (with a working xfce 4.10) is no Consolkit installed as default. A File named *initrc* in my homedir is also not exist.  If I try --with-ck-launch on both machines an Error follows immediatly. It seems, the Consolekit is not needed by Jessie, because Jessie do all needed Jobs via systemd. That is the reason, because all the in the Web founded solutions are not working.

The Difference in the Dialog-Window:
Shutdown and Restart in Version 4.10 on PC  is activated and works fine.
Shutdown and Restart in Version 4.12 on VM with same OS is inactive and works not.

And now the fantastic, where we can see, that it is not a Policie-Problem.... both of the following Terminal-Commands  as User (as myself (not root)) working fine. I have xfce 4.12 startet from a Konsole with startxfce4, then I opened a Terminal  in Desktop and enter the command xfce4-session-logout. The logout-Dialog appears correctly on Screen, but with inactive "Shutdown" and "Restart". I have close the Dialog and re-input the command, but now with following -h

thomas@Jessie-AMD64-VM:~$ xfce4-session-logout -h

And it works fine. Both of them (-h and -r)  working fine.  It is not a Problem by Policies.

Last edited by TomL (2015-08-31 10:05:12)

Offline

#4 2015-08-31 10:34:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

Interesting.
What happens if you disable lightdm and log in manually via "startxfce4". Do those buttons then become activated?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2015-08-31 19:19:22

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

ToZ wrote:

Interesting.

Yes, that it is

ToZ wrote:

What happens if you disable lightdm and log in manually via "startxfce4". Do those buttons then become activated?

Lightdm is not installed at the moment. In the afternoon I have cleared all experiments and taken a fresh vm... only with installed xfce  4.12 and the needed Libs (see above) and nothing else.After the Console-Login I start xfce with "startxfce4".  It works really fine and I would be happy, if I could change it in my regular PC.

But the problems stay furthermore. The Buttons in Dialog-Window are grey/inactive. The Commands in Console are possible and allowed

You can see, all is allowed:

thomas@Jessie-AMD64-VM:~$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.5.2
Mit Unterstützung für »policykit«
Mit Unterstützung für »network-manager«
---------------------------------------------------
Kann in Bereitschaftsmodus versetzen: Ja
Kann in Ruhezustand versetzen: Ja
Darf in Bereitschaftsmodus versetzen: Ja
Darf System in den Ruhezustand versetzen: Ja
Darf System herunterfahren: Ja
Hat Akku: Nein
Hat Helligkeitsregler: Nein
Hat Hauptschalter: Ja
Hat Taste für Ruhezustand: Ja
Hat Schlaftaste: Ja
Hat Klappe: Nein

The Dialog-Window appear on screen succesfully, but grey'ed shutdown and reboot

thomas@Jessie-AMD64-VM:~$ xfce4-power-manager

Works good, also with "-r"

thomas@Jessie-AMD64-VM:~$ xfce4-session-logout -h

Offline

#6 2015-08-31 23:15:24

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

If you run just "xfce4-session-logout", do you get the dialog box with the shutdown and reboot buttons greyed out?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2015-09-01 09:15:03

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

Hello ToZ

Yes, exactly!

Last edited by TomL (2015-09-01 09:15:27)

Offline

#8 2015-09-01 11:05:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

I traced through the code looking at restart to see what I could find.

xfce4-session (for the dialog):

xfsm-logout-dialog.c:

/**
   * Reboot
   **/
  if (!xfsm_shutdown_can_restart (dialog->shutdown, &can_restart, &error))
    {
      g_printerr ("%s: Querying CanRestart failed, %s\n\n",
                  PACKAGE_NAME, ERROR_MSG (error));
      g_clear_error (&error);

      can_restart = FALSE;
    }

  button = xfsm_logout_dialog_button (_("_Restart"), "system-reboot",
                                      "xfsm-reboot", XFSM_SHUTDOWN_RESTART,
                                      dialog);

  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
  gtk_widget_set_sensitive (button, can_restart);
  gtk_widget_show (button);

xfsm-shutdown.c:

gboolean
xfsm_shutdown_can_restart (XfsmShutdown  *shutdown,
                           gboolean      *can_restart,
                           GError       **error)
{
  g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);

  if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
    {
      *can_restart = FALSE;
      return TRUE;
    }

  if (shutdown->systemd != NULL)
    {
      if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
        return TRUE;
    }
  else if (shutdown->consolekit != NULL)
    {
      if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
        return TRUE;
    }

  *can_restart = xfsm_shutdown_fallback_auth_restart ();
  return TRUE;
}

xfsm-shutdown-fallback.c:

/**
 * xfsm_shutdown_fallback_auth_restart:
 *
 * Return value: Returns whether the user is authorized to perform a restart.
 **/
gboolean
xfsm_shutdown_fallback_auth_restart (void)
{
  return xfsm_shutdown_fallback_check_auth (POLKIT_AUTH_RESTART_XFSM);
}

static gboolean
xfsm_shutdown_fallback_check_auth (const gchar *action_id)
{
  gboolean auth_result = FALSE;
#ifdef HAVE_POLKIT
  GDBusConnection *bus;
  PolkitAuthority *polkit;
  PolkitAuthorizationResult *polkit_result;
  PolkitSubject *polkit_subject;

  bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
  polkit = polkit_authority_get_sync (NULL, NULL);
  if (polkit != NULL && bus != NULL)
    {
      polkit_subject = polkit_system_bus_name_new (g_dbus_connection_get_unique_name (bus));
      polkit_result = polkit_authority_check_authorization_sync (polkit,
                                                                 polkit_subject,
                                                                 action_id,
                                                                 NULL,
                                                                 POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
                                                                 NULL,
                                                                 NULL);
      if (polkit_result != NULL)
        {
          auth_result = polkit_authorization_result_get_is_authorized (polkit_result);
          g_object_unref (polkit_result);
        }

        g_object_unref (polkit);
        g_object_unref (bus);
      }
#endif /* HAVE_POLKIT */

  return auth_result;
}

So in a nutshell (in your case), the dialog is displayed after a check against the policykit to see if you are authorized to restart, and the sensitivity of the button set after that is determined.

xfce4-session-logout (for the command to logout):

main.c:

/* create messsage */
  proxy = dbus_g_proxy_new_for_name_owner (conn,
                                           "org.xfce.SessionManager",
                                           "/org/xfce/SessionManager",
                                           "org.xfce.Session.Manager",
                                           &err);
                                           

.......                                          
                                          
                                              else if (opt_reboot)
        {
          result = dbus_g_proxy_call (proxy, "Restart", &err,
                                      G_TYPE_BOOLEAN, allow_save,
                                      G_TYPE_INVALID, G_TYPE_INVALID);

The command-line logout just uses dbus to make the connection (it doesn't appear to query the policykit). This might explain why you are seeing the inconsistency.

.

Do you have "polkit-1" and "polkit-1-gnome" installed, and are the "polkitd" and "polkit-gnome-authentication-agent-1" processes running?

EDIT: What does this command return:

pkaction --verbose

Last edited by ToZ (2015-09-01 14:11:06)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2015-09-01 16:58:32

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

Hi ToZ

I have started again totaly at the beginning... with a fresh VM. I have quickly installed xfce and the Libs and started it.  "polkitd" was running, but *ooops*  you are right, polkit-gnome-authentication-agent-1 is not installed.  After I installed libpolkit-qt-1-1 it looks like....

thomas@Jessie-AMD64-VM:~$ ps -aux | grep pol
root       992  0.0  0.1 279692  7012 ?        Ssl  17:48   0:00 /usr/lib/policykit-1/polkitd --no-debug
thomas    1191  0.0  0.3 222788 14468 tty1     Sl   17:49   0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
thomas@Jessie-AMD64-VM:~$ 

....immediately a big surprise is following. Now it is not possible to shutdown or reboot the system.Neither Konsole, neither Dialog is working, if want to do this as User. I have no explanation for what's different now. Only when I create
/etc/polkit-1/localauthority/50-local.d/org.freedesktop.enable-power.pkla

[Local power-off]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local hibernate]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultAny=yes
ResultInactive=yes
ResultActive=yes

with the Content above, the Konsolecommand is working again and "xfce4-power-manager --dump" says "all is allowed". But furthermore the Dialogoptions Shutdown and Reboot are greyed and inactive. I can switch the Results from "xfce4-power-manager --dump"-Report by deleting and re-copying the pkla-file. Without this File everything is forbidden... if the File exists, everything is allowed. But there is no effect to the Dialog-Window.

"pkaction --verbose" was a good tip, where we can see, that my pkla-File has in reality no effect. It seems that it is still not allowed

org.freedesktop.login1.power-off:
  description:       Power off the system
  message:           Authentication is required for powering off the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes

org.freedesktop.login1.reboot:
  description:       Reboot the system
  message:           Authentication is required for rebooting the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes

org.freedesktop.login1.hibernate:
  description:       Hibernate the system
  message:           Authentication is required for hibernating the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes

Where can I do the needed settings? I  have read a hint in the Web, that /usr/share/polkit-1/actions/org.freedesktop.login1.policy is persistent only till the next update.... there it might be overwritten.

Offline

#10 2015-09-01 17:24:20

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

This is definitely some sort of policykit issue.

TomL wrote:

After I installed libpolkit-qt-1-1 it looks like....

The "qt" caught my eye. In my Debian 8 VM, I looked at the default policykit packages that are installed:

$ dpkg -l | grep polkit
ii  libpolkit-agent-1-0:amd64             0.105-8                              amd64        PolicyKit Authentication Agent API
ii  libpolkit-backend-1-0:amd64           0.105-8                              amd64        PolicyKit backend API
ii  libpolkit-gobject-1-0:amd64           0.105-8                              amd64        PolicyKit Authorization API
$ dpkg -l | grep policy | grep -v SELinux
ii  policykit-1                           0.105-8                              amd64        framework for managing administrative policies and privileges
ii  policykit-1-gnome                     0.105-2                              amd64        GNOME authentication agent for PolicyKit-1

Generally, the "qt" is for qt-based (e.g. kde) environments. Perhaps it is interfering?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2015-09-01 18:41:04

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

ToZ wrote:

Generally, the "qt" is for qt-based (e.g. kde) environments. Perhaps it is interfering?

I have the libpolkit-qt-1-1 removed, to see if gnome-authentication-agent running again. My mistake, this Lib is not needed. Here is the new output after a reboot. I have this compared with the output from my PC, with the same questions. Up to the qt-lib looks everything exactly the same. On my PC the Shutdown-Dialog is working, on the VM is not. Perhaps there is another problem instead policy.

thomas@Jessie-AMD64-VM:~$  dpkg -l | grep polkit
ii  libpolkit-agent-1-0:amd64             0.105-8                              amd64        PolicyKit Authentication Agent API
ii  libpolkit-backend-1-0:amd64           0.105-8                              amd64        PolicyKit backend API
ii  libpolkit-gobject-1-0:amd64           0.105-8                              amd64        PolicyKit Authorization API

thomas@Jessie-AMD64-VM:~$ dpkg -l | grep policy | grep -v SELinux
ii  policykit-1                           0.105-8                              amd64        framework for managing administrative policies and privileges
ii  policykit-1-gnome                     0.105-2                              amd64        GNOME authentication agent for PolicyKit-1

thomas@Jessie-AMD64-VM:~$ ps -aux | grep polk
root       958  0.0  0.1 279692  7044 ?        Ssl  20:12   0:00 /usr/lib/policykit-1/polkitd --no-debug
thomas     979  0.0  0.3 222784 14404 tty1     Sl   20:12   0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
thomas    1084  0.0  0.0  12740  2100 pts/0    S+   20:13   0:00 grep polk


thomas@Jessie-AMD64-VM:~$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.5.2
Mit Unterstützung für »policykit«
Mit Unterstützung für »network-manager«
---------------------------------------------------
Kann in Bereitschaftsmodus versetzen: Ja
Kann in Ruhezustand versetzen: Ja
Darf in Bereitschaftsmodus versetzen: Ja
Darf System in den Ruhezustand versetzen: Ja
Darf System herunterfahren: Ja
Hat Akku: Nein
Hat Helligkeitsregler: Nein
Hat Hauptschalter: Ja
Hat Taste für Ruhezustand: Ja
Hat Schlaftaste: Ja
Hat Klappe: Nein
thomas@Jessie-AMD64-VM:~$ 


thomas@Jessie-AMD64-VM:~$ pkaction --action-id org.freedesktop.login1.power-off --verbose
org.freedesktop.login1.power-off:
  description:       Power off the system
  message:           Authentication is required for powering off the system.
  vendor:            The systemd Project
  vendor_url:        http://www.freedesktop.org/wiki/Software/systemd
  icon:              
  implicit any:      auth_admin_keep
  implicit inactive: auth_admin_keep
  implicit active:   yes

Offline

#12 2015-09-01 19:05:21

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

Can you try dropping this file (name it "org.xfce.session.policy") into /usr/share/polkit-1/actions to see if it helps? Might need to logout and back in again for it to take effect.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2015-09-01 19:36:56

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: another shtudown-Problem

>First I have created a virtual Debian-Jessie-Machine AMD64 without a Desktop. As second I have downloaded all the needed Sourcecode-Files from the Git-Repo, installed them in my VM and compiled all of them succesfully.

the better way(and faster) would be to install xfce 4.12 from testing or even better upgrade it to testing anyway problem is probably a missing lib on the xfce-session compilation

also how did you compile xfce? i hope you did it with something like:

 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib/$(gcc -print-multiarch) --libexecdir=/usr/lib/$(gcc -print-multiarch)/$pkgname

otherwise the system might just not find your files --> Kaputt wink

Last edited by sixsixfive (2015-09-01 19:47:17)

Offline

#14 2015-09-02 13:33:27

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

ToZ wrote:

Can you try dropping this file (name it "org.xfce.session.policy") into /usr/share/polkit-1/actions to see if it helps? Might need to logout and back in again for it to take effect.

I inserted the code inside the existing "org.xfce.power.policy"... but there is no effect to the shutdown-dialog
/usr/share/polkit-1/actions/org.xfce.power.policy

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  <vendor>XFCE Power Manager</vendor>
  <vendor_url>http://goodies.xfce.org/projects/applications/xfce4-power-manager</vendor_url>
  <icon_name>battery</icon_name>

  <action id="org.xfce.power.backlight-helper">
    <description>Modify the laptop display brightness</description>
    <message>Authentication is required to modify the laptop display brightness</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfpm-power-backlight-helper</annotate>
  </action>

  <action id="org.xfce.power.xfce4-pm-helper">
    <description>Suspend or hibernate the system</description>
    <message>Authentication is required to place the system in suspend or hibernate mode</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfce4-pm-helper</annotate>
  </action>

  <action id="org.xfce.session.xfsm-shutdown-helper">
    <_description>Shutdown, restart, suspend, or hibernate the system</_description>
    <_message>Authentication is required to shutdown, restart, suspend, or hibernate the system.</_message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/lib/xfce4/session/xfsm-shutdown-helper</annotate>
  </action>
</policyconfig>

I have installed sudo.... to see an effect.... no effect

thomas ALL=NOPASSWD: /usr/lib/xfce4/session/xfsm-shutdown-helper

This file works too in konsole, but also no effect to the dialog
/etc/polkit-1/localauthority/50-local.d/org.freedesktop.enable-power.pkla

[Local power-off]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local hibernate]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Probably this is the problem:

thomas@Jessie-AMD64-VM:~$ pkexec --user thomas /usr/lib/xfce4/session/xfsm-shutdown-helper --restart
==== AUTHENTICATING FOR org.xfce.session.xfsm-shutdown-helper ===

Authenticating as: root
Password: 

@665
Here are 3 samples of my compiler-jobs. First downloaded from GIT-Repo.  I do it always at the same way:

    cd /home/thomas/Install/xfce/Source/plugins/datetime-0.6.2 && ./autogen.sh --prefix=/usr && read -p "Weiter?" && make && read -p "Weiter?" &&  checkinstall -D --install=no
    cd ../version-1.2.3 && ./autogen.sh --prefix=/usr && read -p "Weiter?" && make && read -p "Weiter?" &&  checkinstall -D --install=no 
    cd ../xfce4-battery-plugin-1.0.5 && ./autogen.sh --prefix=/usr && read -p "Weiter?" && make && read -p "Weiter?" &&  checkinstall -D --install=no 

Last edited by TomL (2015-09-02 13:46:25)

Offline

#15 2015-09-02 16:03:48

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: another shtudown-Problem

TomL wrote:

I inserted the code inside the existing "org.xfce.power.policy"... but there is no effect to the shutdown-dialog

I don't think it works that way. I think you need to create its own file - at least thats how it exists in the git tree and on my system. It needs to be able to resolve org.xfce.session.

If its recognized, pkaction should show it:

$ pkaction
...
org.xfce.session.xfsm-shutdown-helper

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#16 2015-09-02 17:45:48

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

Hi ToZ

There is no difference in reported result. This rule has been read correctly in both cases. And both cases have no effect to the dialoge

thomas@Jessie-AMD64-VM:~$ pkaction --action-id org.xfce.session.xfsm-shutdown-helper --verbose
org.xfce.session.xfsm-shutdown-helper:
  description:       
  message:           
  vendor:            XFCE Power Manager
  vendor_url:        http://goodies.xfce.org/projects/applications/xfce4-power-manager
  icon:              battery
  implicit any:      auth_admin
  implicit inactive: auth_admin
  implicit active:   yes
  annotation:        org.freedesktop.policykit.exec.path -> /usr/lib/xfce4/session/xfsm-shutdown-helper

I have another idea, to come closer to a solution.  Is it possible and makes sense , to make 2 setups on 2 identical empty VM's with a bare Jessie. One setup from my deb's, one setup from "testing". And then let the machine compare the installed Libs.... to see the missing Libs on the maschine with my deb's. Perhaps a missing Lib make all the Problems.

Last edited by TomL (2015-09-02 17:46:43)

Offline

#17 2015-09-02 18:56:06

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

It cannot be impossible *grrr* ... and it have to run....  ;-)

I have now been installed in my usual empty VM Xfce4 from testing. It runs immediatly... the shutdown-dialog looks ok, no one of the"buttons" is greyed. But if I select "shutdown", root-pwd is requested. This problem is solved by:
/etc/polkit-1/localauthority/50-local.d/org.freedesktop.enable-power.pkla

[Local power-off]
Identity=unix-user:*
Action=org.freedesktop.login1.power-off
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Local hibernate]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I have noted the additional Libs... and that is, what I do tomorrow, testing with my deb's.

Offline

#18 2015-09-03 00:05:29

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: another shtudown-Problem

TomL wrote:

But if I select "shutdown", root-pwd is requested.

Google says:

http://winaero.com/blog/how-to-enable-shutdown-and-reboot-for-a-normal-user-in-debian-jessie/
<action id="org.freedesktop.login1.power-off"> 
                <description>Power off the system</description> 
                <message>Authentication is required for powering off the system.</message> 
                <defaults> 
                        <allow_any>yes</allow_any> 
                        <allow_inactive>yes</allow_inactive> 
                        <allow_active>yes</allow_active> 
                </defaults> 
        </action>

Allow any = yes, lol?

Regards,
MDM

Last edited by MountainDewManiac (2015-09-03 00:06:34)


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#19 2015-09-03 10:58:24

TomL
Member
Registered: 2015-08-29
Posts: 10

Re: another shtudown-Problem

TomL wrote:

It cannot be impossible... and it have to run....

I am wrong. And I give up. Now I am thinking, that it is not possible, to make a proper setup from Xfce 4.12 in Debian Jessie. It seems Xfce 4.12 is based on dependencies, who are not exist in Jessie. I dont want  make a setup from testing, because that ist for me a different kind of a compromised system. I dont know how much interfere the testing-libs the rest of my Jessie. Maybe Jessie becomes a Frankenjessie after this setup *lol*...  and that is not a good idea.

I will wait some time. Perhaps anyone find a solution and tell this to the Web. And at the End of this story... thank you for your help..... and I feel really sorry, that I waste your time.

Best regards
Thomas

Last edited by TomL (2015-09-03 14:10:43)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 718.42 KiB (Peak: 767.27 KiB) ]