알림 보내기에 팝업 메시지가 표시되지 않음

알림 보내기에 팝업 메시지가 표시되지 않음

특정 조건에서 실행되는 스크립트가 있습니다.수동으로스크립트를 실행하면 팝업이 나타나지만 스크립트를 자동화하려고 하면(예: 시스템이 일시 중지 상태에서 재개된 직후에 스크립트를 실행) 팝업이 나타나지 않지만 스크립트는 다른 작업을 수행합니다.

여기 내 스크립트가 있습니다.

export DISPLAY=:0
#!/bin/bash
sleep 7s
echo "gotfile" $file1
lynx --dump link1 >> file1
lynx --dump link2 >> file1
lynx --dump link3 >> file1
grep "magnet:?xt=urn:btih:" file1 > file2
sed -i 's/^......//' file2
awk '/org%3A1337%2Fannounce/{print;print "";next}1' file2 >> file3
lines=$(wc -l < file3)
echo "no. of line $lines"
    if grep somepattern file3;
        then
            lineno=$(grep -n somepattern file3 | cut -d : -f 1)
            echo "current line no :-" $lineno
            link=$(head -n $lineno file3 | tail -1)
            echo $link
                notify-send -i /home/hasan/Desktop/flash/Flash.ico 'Flash is Running' 'Getting 3'
                notify-send -u critical 'Getting 3'
                transmission-remote -a $link
                echo $link >> flush
                echo "\n\n" >> flush

    fi

관련 정보