I'm running LXDE on Fedora 21. My script's purpose is to extend the display across two monitors:
#!/bin/sh
xrandr --output VIRTUAL1 --off --output LVDS1 --mode 1440x900 --pos 1280x124 --rotate normal --output TV1 --off --output VGA1 --mode 1280x1024 --pos 0x0 --rotate normal
This runs without issue from a terminal window but chokes as a cron job.
From my cron log:
Jul 9 20:14:01 localhost CROND[19494]: (user) CMD (/home/user/screens.sh)
Jul 9 20:14:01 localhost CROND[19492]: (user) CMDOUT (Can't open display )
xrandr
would be when you are not logged? Or someone else is logged? Please motivate your question. – Basile Starynkevitch Jul 10 '15 at 17:13