[英]Using procmail to trigger applications to run on my computer… But I hit a snag
I wanted to make a setup where if I recieve an email, applications would run automatically. 我想进行设置,如果我收到电子邮件,应用程序将自动运行。 I got the Email and fetchmail setup working, but I seem to be getting problems with the execution of the linux commands themselves. 我可以使用Email和fetchmail设置,但是我似乎在执行Linux命令本身时遇到问题。
Here is the Procmail code: 这是Procmail代码:
:0
* ^Subject: .*Subject
| xrandr --size 1360x768;\
firefox "link"; \
timeout 2m recordmydesktop; \
xrandr --size 1366x768
This is the error: 这是错误:
(process:3611): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Error: no display specified
No display specified for connection!
I found my answer. 我找到了答案。
I just needed to add this line just before the other scripts. 我只需要在其他脚本之前添加此行。 export DISPLAY=:0.0; 出口DISPLAY =:0.0; \\ \\
Whole code: 整个代码:
:0
* ^Subject: .*subject!
| export DISPLAY=:0.0; \
xrandr --size 1360x768;\
firefox "***"; \
timeout 150m recordmydesktop; \
xrandr --size 1366x768
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.