Ubuntu: Refresh desktop icon in GNOME Ubuntu desktop


I am writing a bash script to create a desktop icon and open a document. I have icon stored in /home/usr/Pictures/icons/icon1.png My desktop icon is created with proper link to pdf document which I want but the icon is not getting set. I need to restart my system to launch new icon. Is there any command to refresh desktop icons without rebooting?

My code is:

cat <<EOF >/home/techy/Desktop/doc.desktop    [Desktop Entry]  Version=1.0  Type=Link  Name=document read  URL=file:///home/techy/Documents/guide.pdf  Icon=/home/techy/Pictures/icons/icon1.png  EOF    chmod +rwx /home/techy/Desktop/doc.desktop  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »