gpt4all
gpt4all copied to clipboard
Linux: GPT4All in the start menu
Feature request
A trivial enhancement, if you'd like to include it. As of now, GPT4All creates a desktop shortcut when installed in Linux. It's also possible to get it into the start menu as per the script shown below.
Motivation
Sometimes, it helps to be able to start an application from the start menu. It also makes it easier to pin the application, when it's available in the start menu.
Your contribution
The file needs to be created in this folder:
sudo -H gedit /usr/share/applications/gpt4all.desktop.
With the following content (and <gpt4all.install.location> substituted with the appropriate path):
[Desktop Entry]
Version=2.4.13
Name=GPT4All
Comment=GPT4All
GenericName=ChatBot
Keywords=gpt,gpt4all
Exec=<gpt4all.install.location>/bin/chat %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=<gpt4all.install.location>/logo-48.png
Categories=QT,LLM
StartupNotify=true
The installer by default doesn't install anything into a system folder. In fact, you shouldn't run it as root on Linux.
I know there are alternative directories in ~/.local/ or ~/.config/ (would have to go look it up in the spec again) but I'm not sure whether they are unified across distros. Even the current method of putting one in the Desktop folder is not without its problems.
See also:
- #346
- #873
It's the ~/.local/share/applications/ folder. Thanks @cosmic-snow. I didn't know we could install it to that folder too. It would work for most Linux distributions, assuming they follow the XDG specification. This is typically the case for mainstream desktop environments like GNOME, KDE, Xfce, and others. I believe this is the desktop entry specification.
IIRC, the desktop spec curiously doesn't mandate a name of variable which points to the desktop folder (see esp. 2nd linked issue).
Also, here's what I currently have in the .desktop file of a test VM:
[Desktop Entry]
Type=Application
Terminal=false
Exec="/home/test/gpt4all/bin/chat"
Name=GPT4All
Icon=/home/test/gpt4all/logo-48.png
Name[en_US]=GPT4All
Expanding that a bit would also be necessary. So there are up to 3-4 things to potentially address:
- Expand
.desktopentry. Should at least have one suitable category (OP lists some more good entries, but not sure which of those are supported/specific keywords).- Also, if possible, should probably be made into a template file instead of being wholly part of the installation script (see issue 873).
- Install a copy into an XDG mandated user location so it gets picked up by the launcher.
- Address the problem with
Desktopfolders which have localised names (see linked issues in previous comment).- I'm assuming the same problem doesn't exist for a launcher entry, but needs to be checked.
Not all of these would have to be solved at the same time, but it's good to have them grouped here.
If it's still active, I would love to do this. =)
I'd say it is and I don't know of anyone who has tried to tackle that.
i will work on this