Python Forum
How to install my Python application as an Arch Linux Program
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to install my Python application as an Arch Linux Program
#1
Hi,

currently I start my self-written Python application on my Arch Linux Desktop from the terminal like this:
$ python <path to .py file>

But I would prefer to have my Python applicaion installed like a real program. The benefit would be, that I can start it by clicking on an icon, add it in the GNOME favorite bar etc.
Any hints, where in the www I can find a tutorial how to do this?

Thanks!
Reply
#2
Is the application a single file? If it is you can put it anywhere, make it executable ( sudo chmod +x my_script.py ) and create a symlink to it in /usr/bin/. Do the same chmod "magic" on the link too. Then you can create a desktop file and save it into /home/.local/share/applications/
A desktop file looks like this (see):

[Desktop Entry]

# The type as listed above
Type=Application

# The version of the desktop entry specification to which this file complies
Version=1.0

# The name of the application
Name=jMemorize

# A comment which can/will be used as a tooltip
Comment=Flash card based learning tool

# The path to the folder in which the executable is run
Path=/opt/jmemorise

# The executable of the application, possibly with arguments.
Exec=jmemorize

# The name of the icon that will be used to display this entry
Icon=jmemorize

# Describes whether this application needs to be run in a terminal or not
Terminal=false

# Describes the categories in which this entry should be shown
Categories=Education;Languages;Java;
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is possible to run the python command to call python script on linux? cuten222 6 732 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  How do I properly implement restarting a multithreaded python application? MrFentazis 1 628 Jul-17-2023, 09:10 PM
Last Post: JamesSmith
  Running 3rd party libs on Steam Deck (Arch Linux) with restricted access metulburr 0 1,861 Jan-07-2023, 10:41 PM
Last Post: metulburr
  Python running only in application Mawixy 2 1,134 Apr-19-2022, 11:38 AM
Last Post: Mawixy
  How to use a variable in linux command in python code? ilknurg 2 1,604 Mar-14-2022, 07:21 AM
Last Post: ndc85430
  Python syntax in Linux St0rmcr0w 2 51,495 Jul-29-2021, 01:40 PM
Last Post: snippsat
  How to send data from a python application to an external application aditya_rajiv 1 2,181 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  python application and credentials safety concern aster 4 3,519 Mar-06-2021, 06:51 PM
Last Post: snippsat
  Login to NordVPN on Linux with python script AGreenPig 2 5,995 Feb-09-2021, 10:44 AM
Last Post: AGreenPig
  how to run linux command with multi pipes by python !! evilcode1 2 6,375 Jan-25-2021, 11:19 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020