I've made a script on My Raspberry Pi (Rasbian Jessie) where I made a .desktop file to launch a Python script from the desktop.
When I open nautilus and go to the desktop path, the file runs. But when I double-click it from the desktop (without root privileges) nothing happens.
Shortcut.desktop
[Desktop Entry]
Version=1.0
Name=Network Monitor
Comment=This is my comment
Exec=python /home/Network_Monitor_Device/Scripts/Interface.py
Icon=/home/Network_Monitor_Device/Scripts/Logo.PNG
Path=/home/Network_Monitor_Device/Scripts/
Terminal=false
Type=Application
Categories=Utility;Application;
StartupNotify=true
Interface.py
#!/usr/bin/env python
import os
import sqlite3
import subprocess
import sys
...
Permissions on .desktop
-
The problem was that the permission of Network_Monitor_Device was root. Thanks!Manariba– Manariba2017年04月13日 07:40:28 +00:00Commented Apr 13, 2017 at 7:40
1 Answer 1
I found the solution:
The permission of folder "Network_Monitor_Device" was still on root. I've changed it to "Pi" and the script did it!