You are not logged in.
I am currently trying to make Xubuntu logout when the user is idle for 2 mins. However this doesn't work. I use the command xfce4-session-logout --logout which works perfectly from the command line, but when using cron I get the error
Could not get owner of name 'org.xfce.session manager' No such Name
I guess there is some environment variable missing or something like that, but Google didn't find anything. Can you help?
Best regards,
Philipp
System: Raspberry Pi 2
OS: Xubuntu 15.10
Offline
cron doesn't have access to your user's X or dbus environments. Here is one way to get xfce4-session-logout to run from a cron job:
1. Add to the end of your ~/.bashrc file, the following command:
export | egrep "DBUS_SESSION_BUS_ADDRESS|DISPLAY" > ~/.xsession-export
2. Create a script to do the actual logout that incorporates those values:
#!/bin/bash
. $HOME/.xsession-export
/usr/bin/xfce4-session-logout
...and make the script executable.
3. Call this script from your cron job.
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
[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 520.52 KiB (Peak: 522.91 KiB) ]