On Tue, 28 Jan 2020 06:57:08 -0800 Ben Koenig <[email protected]> dijo:
>>>Use the $DISPLAY variable to launch on a target X server. Since you >>>on a desktop system you probably only have X running once, so try >>>something like this >>>DISPLAY=:0 gxmessage <args go here> >> >you can echo $DISPLAY to find out what display is currently running. >> >Setting the env variable before any graphical command can be used to >> >specify which x server/screen you want it to be displayed on. cron >> >jobs run outside of X, so $DISPLAY is usually unset. >> >> Thanks, but it still isn't working. I started by setting DISPLAY=:0 >> as in your example, but when it didn't work I did: >> >> echo $DISPLAY >> :0.0 >If the $DISPLAY variable doesn't work, then you can probably use the >-display option. I just tried this on my system, and as it turns out >you also need to set your Xauthority as well > >$ XAUTHORITY=/home/<username>/.Xauthority gxmessage -display :0 "Hello, >world!" >Setting display on it's own isn't enough. Now the script says '$XAUTHORITY=/home/jjj/.Xauthority gxmessage -display :0 "Hello world"' but I get: /home/jjj/Software/./Backup_script_for_Home.sh: line 9: /home/jjj/.Xauthority=/home/jjj/.Xauthority: No such file or directory I checked and the .Xauthority file is really there, and a search revealed that there are no other .Xauthority files or folders anywhere on ~/. I can only think that root is unable to look in ~/. That doesn't make much sense, but it's all I can think of. _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
