Background:
The Windows installer for Gramps 5.1 and earlier versions created two application shortcuts: one for the GUI version and another for the console version. (The grampsw
and grampsd
launchers were added for GrampsAIO-4.0.3-1) The console version provided more detailed error reporting, with errors being piped to both the console and log file. Recent changes (for 5.1 and enhanced for 5.2) created an automated build process for the installer, but resulted in the loss of the console shortcut option.
On Fedora 37, Gramps is available through the Applications menu, launching the GUI version. However, running Gramps from the terminal (which requires invoking Python explicitly and navigating path issues) provides additional diagnostic information.
Question:
Is it possible to create a custom .desktop file for Fedora that would add a “Gramps Console” entry to the Applications menu, mimicking the functionality of the former Windows console shortcut and providing easy access to the more verbose diagnostic output?
Perplexity AI responds
Yes, it’s possible to add a Gramps Console icon to the Fedora Applications list. Here’s how you can do it:
- Create a new
.desktop
file for the Gramps Console:
nano ~/.local/share/applications/gramps-console.desktop
- Add the following content to the file, adjusting the Exec line to match your Gramps installation:
[Desktop Entry]
Name=Gramps Console
Comment=Genealogy System (Console Version)
Exec=python3 /path/to/gramps/gramps.py
Icon=gramps
Terminal=true
Type=Application
Categories=Office;Genealogy;
-
Save the file and exit the text editor.
-
Make the .desktop file executable:
chmod +x ~/.local/share/applications/gramps-console.desktop
This will create a new icon in your Applications list for Gramps Console, which will launch Gramps in a terminal window, providing the additional diagnostic information you’re looking for[1][6].
To ensure that Gramps is in your system path, you can add its directory to your PATH environment variable:
echo 'export PATH=$PATH:/path/to/gramps' >> ~/.bashrc
source ~/.bashrc
Replace /path/to/gramps
with the actual path to your Gramps installation.
After completing these steps, you should see a new Gramps Console icon in your Applications menu, which will launch Gramps in a terminal window with more detailed error reporting.
Citations:
[1] How to add programs to GNOME's software list? - Fedora Discussion
[2] Application Launcher Customization on Fedora Linux | Syslogine Docs
[3] Is there a way to launch a commandline application with a desktop icon and have the terminal window be linked to the application icon? - Fedora Discussion
[4] Reddit - Dive into anything
[5] How to - Desktop App icon - Fedora Discussion
[6] Customize applications menu - Fedora Discussion
[7] Installing Gramps for Linux computers - Gramps
[8] FedoraForum.org