Article 4QS94 Copy command wont work if run from Alt-F2

Copy command wont work if run from Alt-F2

by
ddenial
from LinuxQuestions.org on (#4QS94)
Hello

This is a part in my shell script - which basically compares two files and if they are different, overwrites the other

Code:if ! cmp --silent /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so ; then
notify-send "Different"
sudo cp -af /backup/libffmpeg.so /usr/lib64/opera/libffmpeg.so
fiIf I tun this script from a terminal, the cp command works perfectly. But if I run this script from Alt-F2 the scripts enter 'if' loop, executes the notify-send command, however, won't copy/replace the file.

Why is it so? How do I correct this?

Thankslatest?d=yIl2AUoC8zA latest?i=A1IrKaOsi4o:Hb8AR75veJg:F7zBnMy latest?i=A1IrKaOsi4o:Hb8AR75veJg:V_sGLiP latest?d=qj6IDK7rITs latest?i=A1IrKaOsi4o:Hb8AR75veJg:gIN9vFwA1IrKaOsi4o
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments