-
-
Notifications
You must be signed in to change notification settings - Fork 1
Shortcut Linux
Tip: As of
moleditpy-installerv3.0, runningmoleditpy-installerdoes all of the following automatically — an application-menu.desktopentry, optional Desktop shortcut (--desktop), and a.pmeprjMIME type registration with its own file icon (per-user via~/.local/share/applications, or system-wide withsudo moleditpy-installer --system). See Installation for Linux. The manual steps below are for building the.desktopfile by hand.
First, create the application launcher's definition file (.desktop file). Open a text editor and save the following content as moleditpy.desktop.
[Desktop Entry]
Type=Application
Version=1.0
Name=MoleditPy
Exec=[Full path to moleditpy executable]
Terminal=true
Icon=[Path to site-packages]/moleditpy/assets/icon.pngField Descriptions:
- Name: The name displayed in the application menu or as the shortcut name.
- Exec: The command or full path to launch the application. (See details below)
- Icon: The full path to the icon file to be displayed.
-
Terminal: Whether to run the application in a terminal (black screen). Specify
trueorfalse. -
Type: Specify
Application.
To make the .desktop file function correctly, you must modify the Exec= and Icon= paths to match your environment.
Specifying the full path to the moleditpy executable in the Exec= field is the most reliable method.
How to find the path:
- Open a terminal.
- Type
which moleditpyand press Enter. - Copy the displayed full path.
- Rewrite the
Exec=line in your.desktopfile with the copied path.
Note: It is possible to use just the executable name (e.g.,
Exec=moleditpy), but this requires the executable to be located in a directory included in your$PATHenvironment variable. Specifying the full path is less dependent on the environment.
Specify the full path to the icon file (.png or .svg). If moleditpy is installed as a Python package, a common path structure would be:
[Path to site-packages]/moleditpy/assets/icon.png
Replace [Path to site-packages] to match your environment (e.g., /home/YOUR_USERNAME/.local/lib/pythonX.X/site-packages).
By placing the created moleditpy.desktop file in the appropriate directory, MoleditPy will appear in your application menu (launcher).
This will add the launcher to the menu for the current user only.
- Open your file manager and enter the following path in the address bar:
(
~/.local/share/applications/~signifies your home directory) - Copy or move your
moleditpy.desktopfile into this folder.
This will add the launcher to the menu for all users on the PC.
- Access the following path (requires administrator privileges):
/usr/share/applications/ - Place the
moleditpy.desktopfile in this folder.
After placing the file, your desktop environment may recognize it automatically. If not, try logging out and logging back in.
Once registered in the application menu (Step 3), you can create a desktop shortcut by dragging and dropping the icon from the menu onto your desktop.
Note: Depending on your desktop environment, when you first execute (double-click) the
.desktopfile copied to your desktop, you may be asked to "trust" it or "mark as trusted" before it can be launched.
-
Installation for Linux — the
moleditpy-installerroute that automates all of this - Shortcut for Windows / macOS
- Keyboard Shortcuts