If you are unable to create new .desktop file in raspberry pi desktop or /usr/share/applications directory then here is easy trick to create shortcuts of your python codes or scripts.
This works for all GUI packages(pyqt4, tkinter etc) & GPIO libraries.
Sponsor Link
This Project is Sponsored by UTSource.net UTSource is a professional electronic components online platform
- Move to desktop or this directory /usr/share/applications
- Copy any .desktop file: sudo cp python2.7.desktop myapp.desktop
- Edit myapp.desktop file: sudo nano myapp.desktop
- Press Ctrl+X & Y to save the changes. Shortcut created for your python applications & now just double click to open.
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=MyApp
Icon=/home/pi/myapp.xpm
Exec=/usr/bin/python /home/pi/myapp.py
Comment[en_US]=Hardware info
StartupNotify=true
Categories=Utility
Replace myapp.py & myapp.xpm with your file. Convert .png icon to .xpm & size<= 32x32.
Detailed Info: https://lkubaski.wordpress.com/2012/06/29/adding-lxde-start-menu-and-desktop-shortcuts/
For any other clarifications comment
0 comments:
Post a Comment
Thanks for your comment. We will try to reply as soon as possible.
Regards
VSL Creations