[vim/vim] make install does not install .desktop files by default on Ubuntu (Issue #15528)

8 views
Skip to first unread message

John Devin

unread,
Aug 19, 2024, 10:39:28 PM8/19/24
to vim/vim, Subscribed

Steps to reproduce

  1. make and make install vim on Ubuntu 24.04
  2. See that the vim.desktop and gvim.desktop files are not installed in /usr/share/applications/, or elsewhere

Expected behaviour

I'm not sure that this is a bug, or just unsupported; however, installing after doing ./configure --prefix="$HOME/.local/" does install .desktop files in $HOME/.local/share/applications with no other configuration, so I believe installing them is expected.

This has actually been in the todo.txt file for a while: (link):

Installation of .desktop files does not work everywhere.
It's now fixed, but the target directory probably isn't right.
Add configure check?
Should use /usr/local/share/applications or /usr/share/applications.
Or use $XDG_DATA_DIRS.
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)

It seems make install only checks for /usr/local/share/applications and not /usr/share/applications. Ubuntu 24.04 doesn't have /usr/local/share/applications, so the .desktop files aren't installed (I did upgrade from 20.04 though, so if a fresh install is different I'll close this).

Version of Vim

9.1.0682

Environment

OS: Ubuntu 24.04

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15528@github.com>

Christian Brabandt

unread,
Aug 20, 2024, 4:06:41 PM8/20/24
to vim/vim, Subscribed

So the question is, if you create a directory /usr/local/share/applications/ and copy the gvim.desktop files into it, does your desktop environment pick it up from there or not? If applications do not bother to look into /usr/local/share/applications for those desktop files, then it does not make sense to install those desktop files there, no?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15528/2299672330@github.com>

Christian Brabandt

unread,
Aug 20, 2024, 4:32:02 PM8/20/24
to vim/vim, Subscribed

Ah, I see the issue. $DESTDIR is usually not defined and as such the directory is not created. Can you try the following patch please?

diff --git a/src/Makefile b/src/Makefile
index 2da0c6f4a..a23d9822c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2624,7 +2624,7 @@ ICONTHEMEPATH = $(DATADIR)/icons/hicolor
 DESKTOPPATH = $(DESTDIR)$(DATADIR)/applications
 KDEPATH = $(HOME)/.kde/share/icons
 install-icons:
-       if test -n "$(DESTDIR)"; then \
+       if test -n "$(DESTDIR)$(DATADIR)"; then \
                $(MKDIR_P) $(ICON48PATH) $(ICON32PATH) \
                $(ICON16PATH) $(DESKTOPPATH); \
        fi


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15528/2299712268@github.com>

John M Devin

unread,
Aug 20, 2024, 7:08:37 PM8/20/24
to vim/vim, Subscribed

Just tried it; it works.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15528/2299907490@github.com>

Christian Brabandt

unread,
Aug 21, 2024, 2:44:47 PM8/21/24
to vim/vim, Subscribed

thanks, created #15546 to fix this


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15528/2302733790@github.com>

Christian Brabandt

unread,
Aug 22, 2024, 3:22:56 PM8/22/24
to vim/vim, Subscribed

Closed #15528 as completed via dabf07e.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/15528/issue_event/13983036653@github.com>

Reply all
Reply to author
Forward
0 new messages