xplanet 갱신 스크립트를 crontab에 어떻게 올려야하나요?
글쓴이: kernuts / 작성시간: 금, 2005/10/28 - 1:06오전
xplanet을 설치하고, 몇가지 설정을 해준 후에
10분마다 바탕화면에 업데이트 해주기 위해서
돌아다니던 스크립트 소스를 다음과 같이 좀 변경하여
cromtab에 넣어주었습니다.
콘솔에서 직접 실행하면 제대로 작동하는데
이상하게도 cron이 실행할 때에는 스크립트 내부의 다른 명령어들은 실행을 하는데 가장 중요한 xplanet ... 이 부분은 실행을 안해주고 넘어가버리네요...
왜 cp, mv 이런 부분들은 실행을 하는데 xplanet... 은 실행을 안해주는걸까요...??
#!/bin/bash PREFIX=~/.xplanet/images/ OUTPUT=xplanet.png OLD=xplanet_old.png GEOMETRY=1024x768 LONGITUDE=127 LATITUDE=0 #default is no projection,i.e. render a globe #rectangular is the flat world map. also try ancient, azimuthal, hemisphere, mercator, mollweide, peters or orthographic. PROJECTION=orthographic cp $PREFIX$OUTPUT $PREFIX$OLD gconftool-2 --set /desktop/gnome/background/picture_filename -t string "$PREFIX$OLD" if [ -z $PROJECTION ]; then xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude LATITUDE -starmap BSC -target earth -radius 25 -label -labelpos -40+40 -font gulim.ttf -fontsize 14 -config mkoe else xplanet -num_times 1 -output "$PREFIX$OUTPUT" -geometry $GEOMETRY -longitude $LONGITUDE -latitude $LATITUDE -projection $PROJECTION -starmap BSC -target earth -radius 40 -label -labelpos -40+40 -font gulim.ttf -fontsize 14 -config mkoe fi #update Gnome backgound gconftool-2 --set /desktop/gnome/background/picture_filename -t string "$PREFIX$OUTPUT" rm -f $PREFIX$OLD
Forums:
xplanet 부분의 로그를 잡아보세요.
>나 2> 파이프로 실행될 때 어떤 걸 내뱉는지 확인하세요.
xplanet을 써본적은 없지만 아마 콘솔에서 실행하면서 DISPLAY 값이 없어서 실행을 못하는 것 같습니다.
콘솔에서 그냥 입력하면 잘 됩니다.crontab에만들어가면 그러네요.
콘솔에서 그냥 입력하면 잘 됩니다.
crontab에만들어가면 그러네요...
The knowledge belongs to the World like Shakespear's and Asprin.
댓글 달기