zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.52k stars 1.88k forks source link

Don't mess my .desktop file #721

Closed Arcesilas closed 5 years ago

Arcesilas commented 5 years ago

Trilium automatically creates a .desktop file when executed as desktop app. That's fine. Or maybe not.

Since I have to use environment variables to specify the data path, I haved edited the desktop file (more precisely, I've edited the app launcher in XFCE menu, but that's actually the same thing).

I have trilium installed in /opt/Trilium/ and I use a script ~/bin/trilium to run the executable with the appropriate env variables. Once it's running, it updates the desktop file and change the executable path with /opt/Trilium/trilium: if I want to start it again, I have to edit the file again. And... no, I don't want to start it from the command line.

Potential solution/workaround: create a specific .desktop file for that specific data path (let's call it a notebook), Trilium will never change it. It does not change it, but it does re-create trilium-notes.desktop and I have, again, two instances in the menu list. I don't want to have to instances in my menu: I want to control what's in my menu. If Trilium is not in the menu, why is it a problem? It's my choice to start it the way I want...

I can accept to create a specific .desktop file for each notebook I want to have (because for some reason, I don't want to mess profesionnal, personal, technical, etc. notes). But I don't want a software to decide what files I need in my menu.

I would love to provide a PR, unfortunately, I suck at JS, especially for Node... So, I can only moan...

zadam commented 5 years ago

You should be able to disable this through config.ini:

[General]
# Instance name can be used to distinguish between different instances
instanceName=

# Disable automatically generating desktop icon
noDesktopIcon=true
Arcesilas commented 5 years ago

Absolutely! Works perfectly!

Did I miss it in the documentation, or is it not mentioned? I may add it to the wiki, I just hae no clue on which page, since I think there is no page dedicated to the desktop application... May I create a new one? (which would include the data path, the server port for multiple instances at the same time)