我正在使用Ubuntu16.06,下面是我的shell脚本:
#!/bin/sh
recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/Videos/test/rec_`date +%Y%m%d_%H%M%S`.ogv当我像./script.sh那样从终端运行脚本时,一切都进行得很顺利,并且正在运行。
然而,当我把一个长得像这样的职位:
*/1 * * * * /home/square/playground/script.sh &>/home/square/playground/mylog.log命令:
recordmydesktop --quick-subsampling --fps 3 --no-sound --on-the-fly-encoding --v_quality 40 -o /home/square/Videos/test/rec_`date +%Y%m%d_%H%M%S`.ogv不起作用。当我从终端运行script.sh时,我不知道它为什么要运行,但是它不是通过cron作业运行的。
你知道我怎样才能解决这个问题吗?
发布于 2016-11-17 09:57:45
记录My桌面记录它在其中启动的X会话。
从crontab启动的进程没有X会话。
https://askubuntu.com/questions/850401
复制相似问题