Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-05-07 16:59:23

ctac
Member
Registered: 2017-05-08
Posts: 57

What is call on logout?

Hi,
OpenBSD 6.5 xfce 4.12.1
I try to manage the ability of users to logout, shutdown or restart.
I use org.xfce.session.policy
Shutdown and Restart are handle by xfsm-shutdown-helper and I create a rule file to handle that.
I can't find a way to logout.
If I rename xfce4-session-logout only the menu application is affected and I get a dialog box Error:

Failed to execute command "xfce4-session-logout"
Failed to execute child process "xfce4-session-logout" (No such file or directory)

The Logout button in the action menu is not affected and show the dialog box with logout, shutdown and restart.
If shutdown and restart are not allowed, they are greyed.
The shutdown and restart buttons in the action menu are not updated (bug ?) roll
Another place where I find the Logout button is when I click right on a panel and I choose Panel on the context Menu.
I don't understand why it is there, I think nobody try to quit this way !!! roll
This button is not affected too and show the dialog box.
Perhaps there is anothers places where we can find this button.
So :
Is it a program responsible of the logout?
If no, it's certainly a message sent via dbus to xfce4-session.
If this is the case, how can I catch it?
Thanks.

Offline

#2 2019-05-13 22:14:06

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: What is call on logout?

What menu application?
Whisker-menu or the "Application menu" panel plugin?
Try using some menu editor like Alacarte if it's the second.
Menus read from the *.desktop files ussualy.
If the menu plugin can't find the command  xfce4-session-logout it will probably display the error message.

To monitor for dbus messages run

dbus-monitor --session

Then you could send a dbus message via dbus-send to logout in the second terminal smile

Values are boolean, the first is "show_dialog" the secondis "allow_save".

dbus-send --session --type=method_call --print-reply --dest=org.xfce.SessionManager /org/xfce/SessionManager org.xfce.Session.Manager.Logout boolean:true boolean:false

Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#3 2019-05-16 15:46:19

ctac
Member
Registered: 2017-05-08
Posts: 57

Re: What is call on logout?

Hi, thanks for reply.
Perhaps my question is not quite clear so ...
I try to catch user logout from xfce session.
I think before that the message box 'Logout, Shutdown, Restart ...) is part of xfce4-session-logout.
But this not the case because if I rename xfce4-session-logout, the message box continue anyway to pop up.
I try to know what is the program responsible of this message box.
Thanks.

Offline

#4 2019-05-31 20:14:04

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: What is call on logout?

xfce4-session-logout just sends signals via dbus
https://github.com/xfce-mirror/xfce4-se … out/main.c

Open the terminal and type

sleep 10; xprop

Now quickly open the Logout dialog and wait until the mouse cursor changes into a cross.
Then click anywhere on the dialog and close it to see the terminal.
It will tell you that the window class is xfce4-session.

The dialog is part of xfce4-session the very session manager that starts the xfce.

--- Oh, here it is.
https://github.com/xfce-mirror/xfce4-se … t-dialog.c

Last edited by Misko_2083 (2019-06-01 10:06:35)


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#5 2019-06-03 18:25:42

ctac
Member
Registered: 2017-05-08
Posts: 57

Re: What is call on logout?

Thanks to reply.
What i saw in you link ?
The message box xfce_session_logout send message via dbus so :
I can catch easily the signals reboot.
I can catch the signal shutdown with login1 (in debian) , perhaps with consolekit but i don't use it, and i can't catch it in openbsd with org.xfce.session .policy.
There is no way i know to catch the signal logout.
If you know a way ?
Another thing i saw is the switch user is part of the message box xfce_session_logout.
So i can have a button in this message box with switch user but i never saw it.
Only in the action button menu.

xfsm-logout-dialog.c wrote:

/**
   * Switch User
   *
   * Hide the button if system cannot switch user, requires the display
   * manager to provide the org.freedesktop.DisplayManager dbus API
**/

What is missing here with org.freedesktop.DisplayManager dbus API
Thanks.

Offline

#6 2019-06-06 00:51:03

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: What is call on logout?

Have a look here about user switching
https://forum.xfce.org/viewtopic.php?pid=47326#p47326

xfce4-power-manager --dump

pkaction --action-id org.xfce.session.xfsm-shutdown-helper --verbose

What policy file do you have?

Don't know about logout.


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 8 queries executed - Memory usage: 545.02 KiB (Peak: 545.87 KiB) ]