You are not logged in.

#1 2020-07-03 13:49:53

arch1bald1
Member
Registered: 2019-06-15
Posts: 10

pam.d/* -> Entry for accessing X-Server

Hi,

what entry do I have to add/change to allow running "xdotool" in an anacron script?

For su I added

"session         optional        pam_xauth.so"

in "/etc/pam.d/su"

Thias works for becoming root by "su"

But despite anacron is running as root thias doesn't work.

I'm using systemd's conie.service to run cronjobs.

Thanks in advance for any help.

Offline

#2 2020-07-03 14:05:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: pam.d/* -> Entry for accessing X-Server

Forego all of this and use a systemd user timer  https://wiki.archlinux.org/index.php/Systemd/Timers https://wiki.archlinux.org/index.php/Systemd/User

Before we suggest potentially dangerous things, can you elaborate what your end goal is? What's the point of this cronjob, what do you want it to do? Which script are you executing? If you intend to manipulate the running X session of your own user, don't rip security holes into the xorg server, just set up a timer/cronjob that runs in the context of the user running the X server.

Offline

#3 2020-07-03 15:40:36

arch1bald1
Member
Registered: 2019-06-15
Posts: 10

Re: pam.d/* -> Entry for accessing X-Server

The script is for dirvish backup.

To prevent sleep mode while not using the machine I use system-inhibit

Now to trigger the sleep countdown of Gnome again I want to simulate mouse movement with xdotool

I explicitely don't want to send sleep signal after the dirvish run as I might be using the machine.

Offline

#4 2020-07-03 16:35:21

seth
Member
Registered: 2012-09-03
Posts: 51,266

Re: pam.d/* -> Entry for accessing X-Server

Don't run xdotool as root and import the relevant environment (certainly DISPLAY, perhaps XAUTHORITY)
https://gist.githubusercontent.com/Alad … tfile1.txt

Offline

Board footer

Powered by FluxBB