[vim/vim] `:URLOpen` doesn't work in GUI (Issue #18977)

5 views
Skip to first unread message

Mateo Gjika

unread,
9:56 AM (3 hours ago) 9:56 AM
to vim/vim, Subscribed
mateoxh created an issue (vim/vim#18977)

Steps to reproduce

  1. open gvim
  2. run :URLOpen https://www.vim.org/

Expected behaviour

A browser should be opened.

Version of Vim

9.1.1966

Environment

Ubuntu 24.04
The terminal doesn't matter since it only fails in the GUI version
bash

Logs and stack traces


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/18977@github.com>

Christian Brabandt

unread,
11:51 AM (1 hour ago) 11:51 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18977)

so what does :!xdg-open https://www.vim.org/ do?


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/18977/3677952856@github.com>

Mateo Gjika

unread,
12:09 PM (1 hour ago) 12:09 PM
to vim/vim, Subscribed
mateoxh left a comment (vim/vim#18977)

It works (if you append & at the end). The problem is that :Launch xdg-open https://www.vim.org/ doesn't work, which is what URLOpen basically does.

:Launch firefox https://www.vim.org/ works correctly, so the problem is calling xdg-open from the GUI, I guess?


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/18977/3677965827@github.com>

Christian Brabandt

unread,
12:22 PM (1 hour ago) 12:22 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18977)

I don't get it. For me xdg-open does not work at all. I either need :!setsid xdg-open ... or :!gio open.

What that means is, configure your g:Openprg correctly


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/18977/3677973381@github.com>

Mateo Gjika

unread,
12:35 PM (1 hour ago) 12:35 PM
to vim/vim, Subscribed
mateoxh left a comment (vim/vim#18977)

Just run xdg-open in the background by appending & . This is what Launch already does.

I don't think I need to configure g:Openprg because URLOpen does work in the terminal. I want to understand why it doesn't work in the GUI version.


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/18977/3677981526@github.com>

Christian Brabandt

unread,
12:58 PM (20 minutes ago) 12:58 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18977)

Well it works for some, it doesn't work for others. I have seen different behaviour even when using different shells and different commadns. It's inherently hard to debug this, I don't think there is an easy way to fix this reliably for every user, so you'll have to configure it for your system (or debug this if you are really interested to find the root cause), if it doesn't work for you. Perhaps using :set guioptions+=! works better, not sure.


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/18977/3677997049@github.com>

Reply all
Reply to author
Forward
0 new messages