notificar-enviar não mostrando mensagem pop-up

1

Eu tenho um script que é executado em certas condições, sempre que eu manualmente executo o script, o pop-up aparece, no entanto, se eu tentar anumotar o script (ou seja, executar o script logo após o sistema ser retomado suspender) o pop-up não aparece, no entanto, o script faz outras tarefas.

Aqui está o meu script.

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
    
por penta 23.05.2016 / 11:47

0 respostas

Tags