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
  Python Calculator Application MemeStealer 7 42,904 Apr-17-2025, 07:02 PM
Last Post: AndreyAD
  Linux, Python, C ++, Brain2 and errors. PiotrBujakowski 0 978 Jun-24-2024, 03:41 PM
Last Post: PiotrBujakowski
  Is possible to run the python command to call python script on linux? cuten222 6 2,357 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  Running 3rd party libs on Steam Deck (Arch Linux) with restricted access metulburr 0 3,267 Jan-07-2023, 10:41 PM
Last Post: metulburr
  Python running only in application Mawixy 2 1,808 Apr-19-2022, 11:38 AM
Last Post: Mawixy
  Python syntax in Linux St0rmcr0w 2 66,284 Jul-29-2021, 01:40 PM
Last Post: snippsat
  How to send data from a python application to an external application aditya_rajiv 1 3,000 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  python application and credentials safety concern aster 4 4,596 Mar-06-2021, 06:51 PM
Last Post: snippsat
  Keep Application running after Python script ends PEGylated_User 0 2,665 Nov-12-2020, 03:27 PM
Last Post: PEGylated_User
  where to get portable Python for Linux (Fedora)? python001 5 8,778 Nov-01-2020, 05:23 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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