g0hl1n / xprintidle

a utility that queries the X server for the user's idle time and prints it to stdout - forked from http://www.dtek.chalmers.se/~henoch/text/xprintidle.html
GNU General Public License v2.0
57 stars 5 forks source link

How to get the value before login in xdm? #20

Open spavlovich001 opened 2 weeks ago

spavlovich001 commented 2 weeks ago

For some reason, I can't get xprintidle to work before logging into the window manager. Is there any way to get it to work before logging into the window manager? I run xprintidle from rc.local and get no result when running xprintidle

schilive commented 2 weeks ago

Does it not work before you log in in the lock screen, before you start the window manager, or before you start the X server?

spavlovich001 commented 2 weeks ago

Does it not work before you log in in the lock screen, before you start the window manager, or before you start the X server?

I'm start pc, xorg server start and run xdm. I can't log into xdm and xprintidle doesn't give information (launch xprintidle from rc.local)

cat /home/user/.dwm/scripts/startup/daemon/02_idle_shutdown.sh

echo pre >> /home/user/temp.txt
sudo -E -u user bash -c "DISPLAY=:0 XAUTHORITY=/home/user/.Xauthority xprintidle" >> /home/user/temp.txt
# env >> /home/user/temp.txt
echo post >> /home/user/temp.txt