[vim/vim] gvim cannot use +clientserver, but vim can. (Issue #17747)

76 views
Skip to first unread message

Gabriel

unread,
Jul 14, 2025, 8:33:56 AM7/14/25
to vim/vim, Subscribed
gcb created an issue (vim/vim#17747)

Steps to reproduce

  1. gvim --remote-*

Expected behaviour

gvim starts a server.

Version of Vim

9.1.1-1497

Environment

Linux 6.15.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Jul 2025 17:10:18 +0000 x86_64 GNU/Linux
any terminal (tested: xterm, foot)
TERM=st
shell=bash

Operating System: Arch Linux
KDE Plasma Version: 6.4.2
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 PRO 6650U with Radeon Graphics
Memory: 32 GiB of RAM (30.7 GiB usable)

Logs and stack traces

$ command -v gvim vim
/usr/bin/gvim
/usr/bin/vim
$ ls -la /usr/bin/{,g}vim
lrwxrwxrwx 1 root root       3 2025-06-29 22:53 /usr/bin/gvim -> vim
-rwxr-xr-x 1 root root 5220848 2025-06-29 22:53 /usr/bin/vim
$ vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 29 2025 22:53:48)
Included patches: 1-1497
Compiled by Arch Linux
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +find_in_path      +multi_byte        +termguicolors
+arabic            +float             +multi_lang        +terminal
+autocmd           +folding           -mzscheme          +terminfo
+autochdir         -footer            +netbeans_intg     +termresponse
-autoservername    +fork()            +num64             +textobjects
+balloon_eval      +gettext           +packages          +textprop
+balloon_eval_term -hangul_input      +path_extra        +timers
+browse            +iconv             +perl/dyn          +title
++builtin_terms    +insert_expand     +persistent_undo   +toolbar
+byte_offset       +ipv6              +popupwin          +user_commands
+channel           +job               +postscript        +vartabs
+cindent           +jumplist          +printer           +vertsplit
+clientserver      +keymap            +profile           +vim9script
+clipboard         +lambda            -python            +viminfo
+cmdline_compl     +langmap           +python3/dyn       +virtualedit
+cmdline_hist      +libcall           +quickfix          +visual
+cmdline_info      +linebreak         +reltime           +visualextra
+comments          +lispindent        +rightleft         +vreplace
+conceal           +listcmds          +ruby/dyn          +wayland
+cryptv            +localmap          +scrollbind        +wayland_clipboard
+cscope            +lua/dyn           +signs             +wildignore
+cursorbind        +menu              +smartindent       +wildmenu
+cursorshape       +mksession         -sodium            +windows
+dialog_con_gui    +modify_fname      +sound             +writebackup
+diff              +mouse             +spell             +X11
+digraphs          +mouseshape        +startuptime       +xattr
+dnd               +mouse_dec         +statusline        -xfontset
-ebcdic            +mouse_gpm         -sun_workshop      +xim
+emacs_tags        -mouse_jsbterm     +syntax            -xpm
+eval              +mouse_netterm     +tabpanel          +xsmp_interact
+ex_extra          +mouse_sgr         +tag_binary        +xterm_clipboard
+extra_search      -mouse_sysmouse    -tag_old_static    -xterm_save
-farsi             +mouse_urxvt       -tag_any_white     
+file_in_path      +mouse_xterm       +tcl/dyn           
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
3rd user gvimrc file: "~/.config/vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cloudproviders -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -pthread -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.40/core_perl/CORE -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -L/usr/local/lib -o vim -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lcairo-gobject -lgdk_pixbuf-2.0 -latk-1.0 -lpango-1.0 -lcairo -lharfbuzz -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXt -lX11 -lwayland-client -lXdmcp -lSM -lICE -lm -ltinfo -lcanberra -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm



now, vim works fine under wayland (i assume i have all the x11 compat layers)

$ vim --servername "hello" &
[1] 26754

$ vim --serverlist 
HELLO


but gvim alias doesn't.

$ gvim -u NONE --servername "hello"
$ gvim -u NONE --serverlist 
(nothing)


gvim can see the vim' server, if one was started.

here's what lsof shows for (working) vim:

# lsof -E -P -p ...
vim     26872  gcb   0u   CHR              136,3      0t0        6 /dev/pts/3 22664,xterm,5u
vim     26872  gcb   1u   CHR              136,3      0t0        6 /dev/pts/3 22664,xterm,5u
vim     26872  gcb   2u   CHR              136,3      0t0        6 /dev/pts/3 22664,xterm,5u
vim     26872  gcb   3u  unix 0x0000000000000000      0t0   219363 type=STREAM ->INO=219364 1205,ksmserver,24u (CONNECTED)
vim     26872  gcb   4rR  DIR               0,36       80      439 /tmp/vI64Hi2
vim     26872  gcb   5u  unix 0x0000000000000000      0t0   217547 type=STREAM ->INO=213989 1133,Xwayland,28u (CONNECTED)
vim     26872  gcb   6u  unix 0x0000000000000000      0t0   219365 type=STREAM ->INO=218420 1040,kwin_wayl,230u 1040,kwin_wayl,225u (CONNECTED)


gvim doesn't open those, and trying to start from inside the gvim session i get:

:let x = remote_startserver("hi")
E240: No connection to the X server


on vim:

:let x = remote_startserver("hi")
:echo v:servername
hi


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

Gabriel

unread,
Jul 14, 2025, 8:35:38 AM7/14/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

I also tested gvim commands with both GVIM_ENABLE_WAYLAND=0 and =1 (1 is my default)


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

Christian Brabandt

unread,
Jul 14, 2025, 3:14:27 PM7/14/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17747)

I am not sure, perhaps @64-bitman can answer 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/17747/3070675803@github.com>

Foxe Chen

unread,
Jul 14, 2025, 3:25:17 PM7/14/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

Can't reproduce, running vim -g --servername TEST and then vim -g --serverlist shows TEST. Are you sure you are running XWayland?


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

Gabriel

unread,
Jul 14, 2025, 10:59:32 PM7/14/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

Can't reproduce, running vim -g --servername TEST and then vim -g --serverlist shows TEST. Are you sure you are running XWayland and that $DISPLAY is set properly?

i'm not too versed on wayland. But I can tell this is a regular kde desktop setup as close to upstream as possible.

extra/xorg-xwayland 24.1.8-1 (xorg) [installed]

$ env | grep DISPLAY
WAYLAND_DISPLAY=wayland-0
DISPLAY=:1

$ ps aux | grep xwayland
0.0  0.0 149832 17252 ?        Ssl  02:42   0:00 /usr/bin/kwin_wayland_wrapper --xwayland
7.2  1.1 2863228 379980 ?      Sl   02:42   0:56 /usr/bin/kwin_wayland --wayland-fd 8 --socket wayland-0 --xwayland-fd 9 --xwayland-fd 10 --xwayland-display :1 --xwayland-xauthority /run/user/1000/...

let me know if i can send something else.

other than that, vim (the same binary that gvim is symlinked to) works fine, as mentioned on the description above.


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

Foxe Chen

unread,
Jul 14, 2025, 11:30:56 PM7/14/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

Can you share the exact ./configure settings used?


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

Gabriel

unread,
Jul 15, 2025, 10:43:30 AM7/15/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

built 1-1544, as-is from this repo (nothing passed to ./configure). same results.


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

Gabriel

unread,
Jul 18, 2025, 10:16:19 PM7/18/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

@64-bitman

$ cat src/auto/config.cache 
# [...]

ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu=yes}
ac_cv_c_const=${ac_cv_c_const=yes}
ac_cv_c_inline=${ac_cv_c_inline=inline}
ac_cv_c_uint32_t=${ac_cv_c_uint32_t=yes}
ac_cv_c_volatile=${ac_cv_c_volatile=yes}
ac_cv_env_CC_set=set
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_bind_textdomain_codeset=${ac_cv_func_bind_textdomain_codeset=yes}
ac_cv_func_clock_gettime=${ac_cv_func_clock_gettime=yes}
ac_cv_func_connect=${ac_cv_func_connect=yes}
ac_cv_func_fchdir=${ac_cv_func_fchdir=yes}
ac_cv_func_fchmod=${ac_cv_func_fchmod=yes}
ac_cv_func_fchown=${ac_cv_func_fchown=yes}
ac_cv_func_fseeko_ftello=${ac_cv_func_fseeko_ftello=yes}
ac_cv_func_fsync=${ac_cv_func_fsync=yes}
ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes}
ac_cv_func_getcwd=${ac_cv_func_getcwd=yes}
ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname=yes}
ac_cv_func_getpgid=${ac_cv_func_getpgid=yes}
ac_cv_func_getpseudotty=${ac_cv_func_getpseudotty=no}
ac_cv_func_getpwent=${ac_cv_func_getpwent=yes}
ac_cv_func_getpwnam=${ac_cv_func_getpwnam=yes}
ac_cv_func_getpwuid=${ac_cv_func_getpwuid=yes}
ac_cv_func_getrlimit=${ac_cv_func_getrlimit=yes}
ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes}
ac_cv_func_inet_ntop=${ac_cv_func_inet_ntop=yes}
ac_cv_func_iswupper=${ac_cv_func_iswupper=yes}
ac_cv_func_localtime_r=${ac_cv_func_localtime_r=yes}
ac_cv_func_lstat=${ac_cv_func_lstat=yes}
ac_cv_func_mblen=${ac_cv_func_mblen=yes}
ac_cv_func_memset=${ac_cv_func_memset=yes}
ac_cv_func_mkdtemp=${ac_cv_func_mkdtemp=yes}
ac_cv_func_nanosleep=${ac_cv_func_nanosleep=yes}
ac_cv_func_opendir=${ac_cv_func_opendir=yes}
ac_cv_func_posix_openpt=${ac_cv_func_posix_openpt=yes}
ac_cv_func_putenv=${ac_cv_func_putenv=yes}
ac_cv_func_qsort=${ac_cv_func_qsort=yes}
ac_cv_func_readlink=${ac_cv_func_readlink=yes}
ac_cv_func_remove=${ac_cv_func_remove=yes}
ac_cv_func_select=${ac_cv_func_select=yes}
ac_cv_func_select_args=${ac_cv_func_select_args='int,fd_set *,struct timeval *'}
ac_cv_func_setenv=${ac_cv_func_setenv=yes}
ac_cv_func_setpgid=${ac_cv_func_setpgid=yes}
ac_cv_func_setsid=${ac_cv_func_setsid=yes}
ac_cv_func_shmat=${ac_cv_func_shmat=yes}
ac_cv_func_sigaction=${ac_cv_func_sigaction=yes}
ac_cv_func_sigaltstack=${ac_cv_func_sigaltstack=yes}
ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes}
ac_cv_func_sigset=${ac_cv_func_sigset=yes}
ac_cv_func_sigsetjmp=${ac_cv_func_sigsetjmp=no}
ac_cv_func_sigstack=${ac_cv_func_sigstack=yes}
ac_cv_func_sigvec=${ac_cv_func_sigvec=no}
ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes}
ac_cv_func_strcoll=${ac_cv_func_strcoll=yes}
ac_cv_func_strerror=${ac_cv_func_strerror=yes}
ac_cv_func_strftime=${ac_cv_func_strftime=yes}
ac_cv_func_stricmp=${ac_cv_func_stricmp=no}
ac_cv_func_strncasecmp=${ac_cv_func_strncasecmp=yes}
ac_cv_func_strnicmp=${ac_cv_func_strnicmp=no}
ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes}
ac_cv_func_strptime=${ac_cv_func_strptime=yes}
ac_cv_func_strtol=${ac_cv_func_strtol=yes}
ac_cv_func_sync=${ac_cv_func_sync=yes}
ac_cv_func_tgetent=${ac_cv_func_tgetent=yes}
ac_cv_func_towlower=${ac_cv_func_towlower=yes}
ac_cv_func_towupper=${ac_cv_func_towupper=yes}
ac_cv_func_tzset=${ac_cv_func_tzset=yes}
ac_cv_func_unsetenv=${ac_cv_func_unsetenv=yes}
ac_cv_func_usleep=${ac_cv_func_usleep=yes}
ac_cv_func_utime=${ac_cv_func_utime=yes}
ac_cv_func_utimes=${ac_cv_func_utimes=yes}
ac_cv_have_x=${ac_cv_have_x='have_x=yes ac_x_includes='\'''\''  ac_x_libraries='\'''\'''}
ac_cv_header_AvailabilityMacros_h=${ac_cv_header_AvailabilityMacros_h=no}
ac_cv_header_X11_SM_SMlib_h=${ac_cv_header_X11_SM_SMlib_h=yes}
ac_cv_header_X11_Sunkeysym_h=${ac_cv_header_X11_Sunkeysym_h=yes}
ac_cv_header_X11_xpm_h=${ac_cv_header_X11_xpm_h=yes}
ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes}
ac_cv_header_dispatch_dispatch_h=${ac_cv_header_dispatch_dispatch_h=no}
ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h=yes}
ac_cv_header_errno_h=${ac_cv_header_errno_h=yes}
ac_cv_header_fcntl_h=${ac_cv_header_fcntl_h=yes}
ac_cv_header_frame_h=${ac_cv_header_frame_h=no}
ac_cv_header_iconv_h=${ac_cv_header_iconv_h=yes}
ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h=yes}
ac_cv_header_langinfo_h=${ac_cv_header_langinfo_h=yes}
ac_cv_header_libc_h=${ac_cv_header_libc_h=no}
ac_cv_header_libgen_h=${ac_cv_header_libgen_h=yes}
ac_cv_header_libintl_h=${ac_cv_header_libintl_h=yes}
ac_cv_header_linux_xattr_h=${ac_cv_header_linux_xattr_h=yes}
ac_cv_header_locale_h=${ac_cv_header_locale_h=yes}
ac_cv_header_math_h=${ac_cv_header_math_h=yes}
ac_cv_header_poll_h=${ac_cv_header_poll_h=yes}
ac_cv_header_pwd_h=${ac_cv_header_pwd_h=yes}
ac_cv_header_setjmp_h=${ac_cv_header_setjmp_h=yes}
ac_cv_header_sgtty_h=${ac_cv_header_sgtty_h=yes}
ac_cv_header_stdint_h=${ac_cv_header_stdint_h=yes}
ac_cv_header_stdio_h=${ac_cv_header_stdio_h=yes}
ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes}
ac_cv_header_string_h=${ac_cv_header_string_h=yes}
ac_cv_header_strings_h=${ac_cv_header_strings_h=yes}
ac_cv_header_stropts_h=${ac_cv_header_stropts_h=no}
ac_cv_header_sys_access_h=${ac_cv_header_sys_access_h=no}
ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=yes}
ac_cv_header_sys_ioctl_h=${ac_cv_header_sys_ioctl_h=yes}
ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h=yes}
ac_cv_header_sys_poll_h=${ac_cv_header_sys_poll_h=yes}
ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h=no}
ac_cv_header_sys_ptms_h=${ac_cv_header_sys_ptms_h=no}
ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h=yes}
ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h=yes}
ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h=yes}
ac_cv_header_sys_statfs_h=${ac_cv_header_sys_statfs_h=yes}
ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h=no}
ac_cv_header_sys_sysctl_h=${ac_cv_header_sys_sysctl_h=no}
ac_cv_header_sys_sysinfo_h=${ac_cv_header_sys_sysinfo_h=yes}
ac_cv_header_sys_systeminfo_h=${ac_cv_header_sys_systeminfo_h=no}
ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes}
ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h=yes}
ac_cv_header_sys_utsname_h=${ac_cv_header_sys_utsname_h=yes}
ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
ac_cv_header_sys_xattr_h=${ac_cv_header_sys_xattr_h=yes}
ac_cv_header_termcap_h=${ac_cv_header_termcap_h=yes}
ac_cv_header_termio_h=${ac_cv_header_termio_h=yes}
ac_cv_header_termios_h=${ac_cv_header_termios_h=yes}
ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
ac_cv_header_util_debug_h=${ac_cv_header_util_debug_h=no}
ac_cv_header_util_msg18n_h=${ac_cv_header_util_msg18n_h=no}
ac_cv_header_utime_h=${ac_cv_header_utime_h=yes}
ac_cv_header_wchar_h=${ac_cv_header_wchar_h=yes}
ac_cv_header_wctype_h=${ac_cv_header_wctype_h=yes}
ac_cv_lib_ICE_IceConnectionNumber=${ac_cv_lib_ICE_IceConnectionNumber=yes}
ac_cv_lib_ICE_IceOpenConnection=${ac_cv_lib_ICE_IceOpenConnection=yes}
ac_cv_lib_Xdmcp__XdmcpAuthDoIt=${ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes}
ac_cv_lib_Xpm_XpmCreatePixmapFromData=${ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes}
ac_cv_lib_acl_acl_get_file=${ac_cv_lib_acl_acl_get_file=yes}
ac_cv_lib_attr_fgetxattr=${ac_cv_lib_attr_fgetxattr=yes}
ac_cv_lib_m_strtod=${ac_cv_lib_m_strtod=yes}
ac_cv_lib_posix1e_acl_get_file=${ac_cv_lib_posix1e_acl_get_file=no}
ac_cv_lib_sec_acl_get=${ac_cv_lib_sec_acl_get=no}
ac_cv_lib_selinux_is_selinux_enabled=${ac_cv_lib_selinux_is_selinux_enabled=no}
ac_cv_lib_socket_socket=${ac_cv_lib_socket_socket=no}
ac_cv_lib_tinfo_tgetent=${ac_cv_lib_tinfo_tgetent=yes}
ac_cv_lib_wayland_client_wl_display_connect=${ac_cv_lib_wayland_client_wl_display_connect=yes}
ac_cv_lib_xpg4__xpg4_setrunelocale=${ac_cv_lib_xpg4__xpg4_setrunelocale=no}
ac_cv_objext=${ac_cv_objext=o}
ac_cv_path_EGREP=${ac_cv_path_EGREP='/usr/bin/grep -E'}
ac_cv_path_EGREP_TRADITIONAL=${ac_cv_path_EGREP_TRADITIONAL='/usr/bin/grep -E'}
ac_cv_path_FGREP=${ac_cv_path_FGREP='/usr/bin/grep -F'}
ac_cv_path_GLIB_COMPILE_RESOURCES=${ac_cv_path_GLIB_COMPILE_RESOURCES=/usr/bin/glib-compile-resources}
ac_cv_path_GREP=${ac_cv_path_GREP=/usr/bin/grep}
ac_cv_path_GTK_UPDATE_ICON_CACHE=${ac_cv_path_GTK_UPDATE_ICON_CACHE=/usr/bin/gtk-update-icon-cache}
ac_cv_path_UPDATE_DESKTOP_DATABASE=${ac_cv_path_UPDATE_DESKTOP_DATABASE=/usr/bin/update-desktop-database}
ac_cv_path_ac_pt_PKG_CONFIG=${ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config}
ac_cv_prog_AWK=${ac_cv_prog_AWK=gawk}
ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
ac_cv_prog_MSGFMT=${ac_cv_prog_MSGFMT=msgfmt}
ac_cv_prog_STRIP=${ac_cv_prog_STRIP=strip}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=gcc}
ac_cv_prog_cc_c11=${ac_cv_prog_cc_c11=}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=}
ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
ac_cv_search_opendir=${ac_cv_search_opendir='none required'}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_long=${ac_cv_sizeof_long=8}
ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
ac_cv_sizeof_time_t=${ac_cv_sizeof_time_t=8}
ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=4}
ac_cv_struct_st_mtim_nsec=${ac_cv_struct_st_mtim_nsec=st_mtim.tv_nsec}
ac_cv_sys_largefile_opts=${ac_cv_sys_largefile_opts='none needed'}
ac_cv_type_dev_t=${ac_cv_type_dev_t=yes}
ac_cv_type_gid_t=${ac_cv_type_gid_t=yes}
ac_cv_type_ino_t=${ac_cv_type_ino_t=yes}
ac_cv_type_long_long_int=${ac_cv_type_long_long_int=yes}
ac_cv_type_mode_t=${ac_cv_type_mode_t=yes}
ac_cv_type_off_t=${ac_cv_type_off_t=yes}
ac_cv_type_pid_t=${ac_cv_type_pid_t=yes}
ac_cv_type_rlim_t=${ac_cv_type_rlim_t=yes}
ac_cv_type_size_t=${ac_cv_type_size_t=yes}
ac_cv_type_stack_t=${ac_cv_type_stack_t=yes}
ac_cv_type_uid_t=${ac_cv_type_uid_t=yes}
ac_cv_type_unsigned_long_long_int=${ac_cv_type_unsigned_long_long_int=yes}
cf_cv_ebcdic=${cf_cv_ebcdic=no}
vi_cv_have_gpm=${vi_cv_have_gpm=yes}
vi_cv_have_sysmouse=${vi_cv_have_sysmouse=no}
vim_cv_getcwd_broken=${vim_cv_getcwd_broken=no}
vim_cv_ipv6_networking=${vim_cv_ipv6_networking=yes}
vim_cv_memmove_handles_overlap=${vim_cv_memmove_handles_overlap=yes}
vim_cv_stat_ignores_slash=${vim_cv_stat_ignores_slash=no}
vim_cv_terminfo=${vim_cv_terminfo=yes}
vim_cv_tgetent=${vim_cv_tgetent=zero}
vim_cv_timer_create=${vim_cv_timer_create=yes}
vim_cv_timer_create_with_lrt=${vim_cv_timer_create_with_lrt=no}
vim_cv_timer_create_works=${vim_cv_timer_create_works=yes}
vim_cv_toupper_broken=${vim_cv_toupper_broken=no}
vim_cv_uname_m_output=${vim_cv_uname_m_output=x86_64}
vim_cv_uname_output=${vim_cv_uname_output=Linux}
vim_cv_uname_r_output=${vim_cv_uname_r_output=6.15.6-arch1-1}


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

Foxe Chen

unread,
Jul 20, 2025, 2:51:02 PM7/20/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

Sorry for the delay. Unfortunately I have no idea what may be causing this :/. I'm not very familiar with the clientserver code either. May someone whos more familiar with the clientserver codebase can help out with 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/17747/3094703324@github.com>

Gabriel

unread,
Jul 22, 2025, 5:53:41 PM7/22/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

let me know if I can provide any other info. I failed to see anything on the code for the features... but it's the first time i'm looking at any of it.

some wayland versions on the systems with problem:

61:extra/kwayland 6.4.3-1 (plasma) [installed]
67:extra/kwin 6.4.3-1 (plasma) [installed]
71:extra/layer-shell-qt 6.4.3-1 (plasma) [installed]
75:extra/libdecor 0.2.3-1 [installed]
77:extra/libva 2.22.0-1 [installed]
103:extra/qt5-wayland 5.15.17+kde+r57-1 (qt5) [installed]
105:extra/qt6-wayland 6.9.1-1 (qt6) [installed]
111:extra/sddm 0.21.0-6 [installed]
143:extra/wayland 1.23.1-2 [installed]
149:extra/wayland-utils 1.2.0-2 [installed]
165:extra/wl-clipboard 1:2.2.1-3 [installed]
191:extra/xorg-xwayland 24.1.8-1 (xorg) [installed]


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

Foxe Chen

unread,
Jul 22, 2025, 7:51:40 PM7/22/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

@gcb Could you run GDB and create a breakpoint at clientserver.c:prepare_server? Then run Vim and try seeing if the breakpoint is reached and step through the whole function. A video of you doing the process would be nice.


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

Gabriel

unread,
Sep 3, 2025, 9:46:42 AM9/3/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

@gcb Could you run GDB and create a breakpoint at clientserver.c:prepare_server? Then run Vim and try seeing if the breakpoint is reached and step through the whole function. A video of you doing the process would be nice.

I will need some guidance. Tried to simply start without forking, set a breakpoint to that function and run... but then

$ gdb vim -f
...
gbd$ run
...
[Detaching after fork from child process 2927]
[Inferior 1 (process 2926) exited normally]
No registers.
gdb$


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

Foxe Chen

unread,
Sep 3, 2025, 2:55:52 PM9/3/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

@gcb Could you run GDB and create a breakpoint at clientserver.c:prepare_server? Then run Vim and try seeing if the breakpoint is reached and step through the whole function. A video of you doing the process would be nice.

I will need some guidance. Tried to simply start without forking, set a breakpoint to that function and run... but then

$ gdb vim -f
...
gbd$ run
...
[Detaching after fork from child process 2927]
[Inferior 1 (process 2926) exited normally]
No registers.
gdb$

Can you run gdb on a debug build of vim? Also you don't pass -f to gdb, you pass it to run


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

Gabriel

unread,
Sep 8, 2025, 11:57:16 AM9/8/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

@64-bitman thanks for the pointers. let me know if this helps or what else i can help with.

https://github.com/user-attachments/assets/2296c715-d60b-4f2d-a7ae-002458fcb302


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

Foxe Chen

unread,
Sep 11, 2025, 9:54:19 PM9/11/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

Sorry, can you do it again but compile with debug symbols? Using termdebug would be nice. Thanks


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

Gabriel

unread,
Sep 12, 2025, 11:22:47 AM9/12/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

termdebug

Not sure what that is


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

Christian Brabandt

unread,
Sep 12, 2025, 12:28:22 PM9/12/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17747)

If you search the Makefile for DEBUG, you find some ready to use CFLAGs. termdebug is a plugin distributed with Vim that was originally developed to help debugging Vim using gdb, see :h termdebug


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

Drew Vogel

unread,
Oct 4, 2025, 10:01:15 AM10/4/25
to vim/vim, Subscribed
dvogel left a comment (vim/vim#17747)

@gcb is DISPLAY set in your environment when you run vim and gvim? Can you run gvim --servername HELLO in one tab and and gvim --serverlist in another tab? I suspect it will show the server started by the first command.

It has been a while since I looked at the client-server code but AFAIK this is working as designed. When X11 support is enabled and the GUI is in use, the communication relies on X11 server atoms. You can see the (quite complicated) conditional that leads to different clientserver_method values being chosen:

#  define X_DISPLAY	((gui.in_use) ? gui_mch_get_display() : xterm_dpy)
    Display *
gui_mch_get_display(void)
{
    if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL
#if GTK_CHECK_VERSION(3,0,0)
	    && GDK_IS_X11_DISPLAY(gtk_widget_get_display(gui.mainwin))
#endif
	)
	return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
    else
	return NULL;
}
prepare_server(mparm_T *parmp)
{
# if defined(FEAT_X11) || defined(FEAT_SOCKETSERVER)
    /*
     * Register for remote command execution with :serversend and --remote
     * unless there was a -X or a --servername '' on the command line.
     * Only register nongui-vim's with an explicit --servername argument,
     * or when compiling with autoservername.
     * When running as root --servername is also required.
     */

    if (
#  ifdef FEAT_X11
	    X_DISPLAY != NULL &&
#  endif

	    parmp->servername != NULL && (
#  if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
		(
#   if defined(FEAT_AUTOSERVERNAME)
		    1
#   else
		    gui.in_use
#   endif
#   ifdef UNIX
		 && getuid() != ROOT_UID
#   endif
		) ||
#  endif
		parmp->serverName_arg != NULL))
    {
#  ifdef FEAT_SOCKETSERVER
	if (clientserver_method == CLIENTSERVER_METHOD_SOCKET)
	{
	    if (socket_server_init(parmp->servername) == OK)
		TIME_MSG("initialize socket server");
	}
#  endif
#  ifdef FEAT_X11
	if (clientserver_method == CLIENTSERVER_METHOD_X11)
	{
	    (void)serverRegisterName(X_DISPLAY, parmp->servername);
	    TIME_MSG("register x11 server name");
	}
#  endif
	vim_free(parmp->servername);
    }
#ifdef FEAT_X11
    else
	serverDelayedStartName = parmp->servername;
#endif
# endif


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

Drew Vogel

unread,
Oct 4, 2025, 10:10:41 AM10/4/25
to vim/vim, Subscribed
dvogel left a comment (vim/vim#17747)

@gcb it looks like @64-bitman added a command line argument to override this. So you should be able to make gvim see the server started by vim with gvim --clientserver socket --serverlist.

# if defined(FEAT_X11) && defined(FEAT_SOCKETSERVER)
    main_msg(_("--clientserver <socket|x11> Backend for clientserver communication"));
# endif
    void
f_serverlist(typval_T *argvars UNUSED, typval_T *rettv)
{
    char_u	*r = NULL;

#ifdef FEAT_CLIENTSERVER
# ifdef MSWIN
    r = serverGetVimNames();
# else
#  ifdef FEAT_SOCKETSERVER
    if (clientserver_method == CLIENTSERVER_METHOD_SOCKET)
	r = socket_server_list_sockets();
#  endif
#  ifdef FEAT_X11
    if (clientserver_method == CLIENTSERVER_METHOD_X11)
    {
    make_connection();
    if (X_DISPLAY != NULL)
	r = serverGetVimNames(X_DISPLAY);
    }
#  endif
# endif
#endif
    rettv->v_type = VAR_STRING;
    rettv->vval.v_string = r;
}


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

Drew Vogel

unread,
Oct 4, 2025, 10:35:44 AM10/4/25
to vim/vim, Subscribed
dvogel left a comment (vim/vim#17747)

@chrisbra @64-bitman I think it's worth considering flipping this default.

Almost all systems that support X11 also support unix sockets. So defaulting to --clientserver socket even when X11 is compiled in and present in the environment won't break most users. Systems that support X11 but do not support unix sockets (which I think might be only VMS?) can disable FEAT_SOCKETSERVER in the build, ensuring that it defaults to --clientserver x11.

It seems to me that the X11 client-server code has one advantage over the unix sockets. It works transparently when the X11 client and server are on different machines. That was a very common use case when the feature was first added but is much less common now. Anyone doing that today is pretty aware that they are doing it. It seems reasonable for the Vim 10 release to require those users to specify --clientserver x11.

If we don't want to go that far though, simply checking if DISPLAY begins with : (and is thus local) would be a good way to ensure users using local X11 servers don't fall into the hole that @gcb has here.


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

Foxe Chen

unread,
Oct 4, 2025, 3:48:32 PM10/4/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

@chrisbra @64-bitman I think it's worth considering flipping this default.

Almost all systems that support X11 also support unix sockets. So defaulting to --clientserver socket even when X11 is compiled in and present in the environment won't break most users. Systems that support X11 but do not support unix sockets (which I think might be only VMS?) can disable FEAT_SOCKETSERVER in the build, ensuring that it defaults to --clientserver x11.

It seems to me that the X11 client-server code has one advantage over the unix sockets. It works transparently when the X11 client and server are on different machines. That was a very common use case when the feature was first added but is much less common now. Anyone doing that today is pretty aware that they are doing it. It seems reasonable for the Vim 10 release to require those users to specify --clientserver x11.

If we don't want to go that far though, simply checking if DISPLAY begins with : (and is thus local) would be a good way to ensure users using local X11 servers don't fall into the hole that @gcb has here.

I think the one major difference between X11 and socketserver, is that with the socketserver, you need to be a server to communicate, while with X11, you can communicate as a client without ever starting a server.


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

ji-cerny

unread,
Oct 14, 2025, 7:44:12 AM10/14/25
to vim/vim, Subscribed
ji-cerny left a comment (vim/vim#17747)

I also have problem that gvim does not register any servername and thus cannot be used using vim --remote-expr calls. It is on Fedora 43/wayland.

I tried to bisect the problem and it appears that the first bad commit is

commit 48a3b146b49d508f1d592974105c690b7af62ea8 (HEAD, tag: v9.1.1585)
Author: Christoffer Aasted <chr.a...@gmail.com>
Date:   Wed Jul 23 21:05:51 2025 +0200

    patch 9.1.1585: Wayland: gvim still needs GVIM_ENABLE_WAYLAND
    
    Problem:  Wayland: gvim still needs GVIM_ENABLE_WAYLAND
    Solution: Drop the GVIM_ENABLE_WAYLAND code, always enable both X11 and
              Wayland GUI support (Christoffer Aasted)
    
    closes: #17817
    
    Signed-off-by: Christoffer Aasted <chr.a...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

If I revert this commit, then gvim has servername again.


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

ji-cerny

unread,
Oct 14, 2025, 4:13:44 PM10/14/25
to vim/vim, Subscribed
ji-cerny left a comment (vim/vim#17747)

I tried to look what happens in clientserver.c: prepare_server function. The macro X_DISPLAY returns NULL, so the first condition always fails and the function does essentially nothing. This happens also when --clientserver socket is used, because the test if (clientserver_method == CLIENTSERVER_METHOD_SOCKET) is inside of the first condition.
(I tested it gvim --clientserver socket does not register servername as well)

X_DISPLAY is false because the function gui_mch_get_display returns NULL when gtk_widget_get_display(gui.mainwin) returns a GdkWaylandDisplay. This is the case when gdk_set_allowed_backens("x11") is not called, as it was before the commit 48a3b14

I can help testing, but I have no idea how to solve this. Probably really use unix socket if running in wayland mode, and then probably always.


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

ji-cerny

unread,
Oct 16, 2025, 10:52:29 AM10/16/25
to vim/vim, Subscribed
ji-cerny left a comment (vim/vim#17747)

I tried to correct the logic in clientserrver.c: prepare_server() function. The following patch seems to work for me, but it does not feel like a clean solution.

diff --git a/src/clientserver.c b/src/clientserver.c
index 813c269c9..54ded63a5 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -265,10 +265,6 @@ prepare_server(mparm_T *parmp)
      */
 
     if (
-#  ifdef FEAT_X11
-	    X_DISPLAY != NULL &&
-#  endif
-
 	    parmp->servername != NULL && (
 #  if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
 		(
@@ -284,19 +280,23 @@ prepare_server(mparm_T *parmp)
 #  endif
 		parmp->serverName_arg != NULL))
     {
+#  ifdef FEAT_X11
+	if (clientserver_method == CLIENTSERVER_METHOD_X11)
+	{
+	    if (X_DISPLAY != NULL){
+		(void)serverRegisterName(X_DISPLAY, parmp->servername);
+		TIME_MSG("register x11 server name");
+	    }
+	    else /* We are running on wayland */
+		clientserver_method = CLIENTSERVER_METHOD_SOCKET;
+	}
+#  endif
 #  ifdef FEAT_SOCKETSERVER
 	if (clientserver_method == CLIENTSERVER_METHOD_SOCKET)
 	{
 	    if (socket_server_init(parmp->servername) == OK)
 		TIME_MSG("initialize socket server");
 	}
-#  endif
-#  ifdef FEAT_X11
-	if (clientserver_method == CLIENTSERVER_METHOD_X11)
-	{
-	    (void)serverRegisterName(X_DISPLAY, parmp->servername);
-	    TIME_MSG("register x11 server name");
-	}
 #  endif
 	vim_free(parmp->servername);
     }


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

Christian Brabandt

unread,
Oct 16, 2025, 2:16:40 PM10/16/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17747)

So is the issue that X_DISPLAY is actually being NULL ?
How about this patch instead:

diff --git a/src/clientserver.c b/src/clientserver.c
index 813c269c9..86bd84083 100644
--- a/src/clientserver.c
+++ b/src/clientserver.c
@@ -265,10 +265,6 @@ prepare_server(mparm_T *parmp)
      */

     if (
-#  ifdef FEAT_X11
-           X_DISPLAY != NULL &&
-#  endif
-
            parmp->servername != NULL && (
 #  if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
                (
@@ -284,26 +280,33 @@ prepare_server(mparm_T *parmp)
 #  endif
                parmp->serverName_arg != NULL))
     {
+#  ifdef FEAT_X11
+       if (clientserver_method == CLIENTSERVER_METHOD_X11
+               && X_DISPLAY != NULL)
+       {
+               (void)serverRegisterName(X_DISPLAY, parmp->servername);
+               TIME_MSG("register x11 server name");
+       }
+       else
+#  endif
+#  ifdef FEAT_SOCKETSERVER
+           clientserver_method = CLIENTSERVER_METHOD_SOCKET;
+#  else
+       ;
+#  endif
 #  ifdef FEAT_SOCKETSERVER
        if (clientserver_method == CLIENTSERVER_METHOD_SOCKET)
        {
            if (socket_server_init(parmp->servername) == OK)
                TIME_MSG("initialize socket server");
        }
-#  endif
-#  ifdef FEAT_X11
-       if (clientserver_method == CLIENTSERVER_METHOD_X11)
-       {
-           (void)serverRegisterName(X_DISPLAY, parmp->servername);
-           TIME_MSG("register x11 server name");
-       }
 #  endif
        vim_free(parmp->servername);
     }
-#ifdef FEAT_X11
+#  ifdef FEAT_X11
     else
        serverDelayedStartName = parmp->servername;
-#endif
+#  endif
 # endif

     /*


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

ji-cerny

unread,
Oct 17, 2025, 3:29:48 AM10/17/25
to vim/vim, Subscribed
ji-cerny left a comment (vim/vim#17747)

How about this patch instead:

This patch works for me as well.
(BTW, I could not apply it directly because of tab/spaces changes. Is there some trick to do it?)

So is the issue that X_DISPLAY is actually being NULL ?

If I understand the things correctly, the change in the commit 48a3b14 makes the gvim on wayland to use gdk's wayland backend instead of the x11 backend. In this case X_DISPLAY is NULL, because it is defined as

#define X_DISPLAY	((gui.in_use) ? gui_mch_get_display() : xterm_dpy)

or

#define X_DISPLAY	((gui.in_use) ? gui_mch_get_display() : (Display *)NULL)

The function gui_mch_get_display() returns NULL on wayland backend. (It is actually already used to check for wayland backend , see gtk_gui_x11.c, line 2055

if (!display_type)
	display_type = gui_mch_get_display() ? DT_X11 : DT_WAYLAND;

When running on GDK's wayland backend X11 sockets cannot be used anyway, so the patch switches to unix sockets instead.

Note that X11 enabled vim in xterm, still uses X11 sockets. So if one uses vim and gvim at the same time, gvim listens to unix sockets and vim X11 sockets, which is suboptimal for my use of this functionality.


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

Christian Brabandt

unread,
Oct 17, 2025, 3:43:29 AM10/17/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17747)

This patch works for me as well.


(BTW, I could not apply it directly because of tab/spaces changes. Is there some trick to do it?)

I'd like to know this too. It typically happens when copy pasting a patch in a terminal (which I guess does not properly copy/paste the spaces vs tabs).

For the other parts, @64-bitman perhaps?


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

Foxe Chen

unread,
Oct 17, 2025, 8:07:20 AM10/17/25
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#17747)

From what I'm seeing, the current X11 clientserver implementation on the GTK gui relies on GTK for the X11 stuff? Meaning using the Wayland backend breaks this functionality.

Note that X11 enabled vim in xterm, still uses X11 sockets. So if one uses vim and gvim at the same time, gvim listens to unix sockets and vim X11 sockets, which is suboptimal for my use of this functionality.

I suppose the most straightforward solution would be to integrate the X11 event loop into GTK/GLib's event loop stuff, so that using the Wayland backend doesn't affect X11 clientserver functionality. I'm not sure how complicated that might be though.


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

Gabriel

unread,
Oct 21, 2025, 9:52:13 AM10/21/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

Couldn't look into this last weeks. apologies. Just catching up.

If you search the Makefile for DEBUG, you find some ready to use CFLAGs. termdebug is a plugin distributed with Vim that was originally developed to help debugging Vim using gdb, see :h termdebug

@chrisbra I didn't find anything on the makefiles. and the :help seems about usage only. Is it something I should enable on build, or do you mean I should use termdebug plugin on the recording?

@gcb is DISPLAY set in your environment when you run vim and gvim? Can you run gvim --servername HELLO in one tab and and gvim --serverlist in another tab? I suspect it will show the server started by the first command.

@dvogel display vars are pretty standard:

WAYLAND_DISPLAY=wayland-0
DISPLAY=:1

I tried similar but move verbose values. No change.

@gcb it looks like @64-bitman added a command line argument to override this. So you should be able to make gvim see the server started by vim with gvim --clientserver socket --serverlist.

Lost on this too. Compiled upstream/HEAD and didn't get this code. Is it on some branch or behind a flag?

commit 0124320c97b0fbbb44613f42fc1c34fee6181fc8 (HEAD -> master, tag: v9.1.1868, origin/master, origin/HEAD)
$ make
$ src/vim -g --clientserver socket 
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Oct 21 2025 12:37:26)
Unknown option argument: "--clientserver"

Tried applying chrisbra patch and still can't get anything to work.

$ git d
diff --git src/Makefile src/Makefile
index 6fb1eb95e..593031af0 100644
--- src/Makefile
+++ src/Makefile
@@ -587,7 +587,7 @@ CClink = $(CC)
 # When using -g with some older versions of Linux you might get a
 # statically linked executable.
 # When not defined, configure will try to use -O2 for gcc and -O for others.
-#CFLAGS = -g
+CFLAGS = -g
 #CFLAGS = -O
 
 # Optimization limits - depends on the compiler.  Automatic check in configure
@@ -1105,7 +1105,7 @@ INSTALL_DATA_R    = cp -r
 
 ### Program to run on installed binary.  Use the second one to disable strip.
 #STRIP = strip
-#STRIP = /bin/true
+STRIP = /bin/true
 
 ### Permissions for binaries  {{{1
 BINMOD = 755
diff --git src/clientserver.c src/clientserver.c
index 813c269c9..c04c6e714 100644
--- src/clientserver.c
+++ src/clientserver.c
@@ -265,10 +265,6 @@ prepare_server(mparm_T *parmp)
      */
 
     if (
-#  ifdef FEAT_X11
-       X_DISPLAY != NULL &&
-#  endif
-
        parmp->servername != NULL && (
 #  if defined(FEAT_AUTOSERVERNAME) || defined(FEAT_GUI)
        (
@@ -284,26 +280,35 @@ prepare_server(mparm_T *parmp)
 #  endif
        parmp->serverName_arg != NULL))
     {
+
+#  ifdef FEAT_X11
+       if (clientserver_method == CLIENTSERVER_METHOD_X11
+               && X_DISPLAY != NULL)
+       {
+               (void)serverRegisterName(X_DISPLAY, parmp->servername);
+               TIME_MSG("register x11 server name");
+       }
+       else
+#  endif
+#  ifdef FEAT_SOCKETSERVER
+           clientserver_method = CLIENTSERVER_METHOD_SOCKET;
+#  else
+       ;
+#  endif
+
 #  ifdef FEAT_SOCKETSERVER
    if (clientserver_method == CLIENTSERVER_METHOD_SOCKET)
    {
        if (socket_server_init(parmp->servername) == OK)
        TIME_MSG("initialize socket server");
    }
-#  endif
-#  ifdef FEAT_X11
-   if (clientserver_method == CLIENTSERVER_METHOD_X11)
-   {
-       (void)serverRegisterName(X_DISPLAY, parmp->servername);
-       TIME_MSG("register x11 server name");
-   }
 #  endif
    vim_free(parmp->servername);
     }
-#ifdef FEAT_X11
+#   ifdef FEAT_X11
     else
    serverDelayedStartName = parmp->servername;
-#endif
+#   endif
 # endif
 
     /*
$ make

$ src/vim -g -u NONE --servername HELLO
WARNING: Glycin running without sandbox.

$ src/vim -g -u NONE --serverlist
(nothing)

$


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

Gabriel

unread,
Oct 21, 2025, 10:19:10 AM10/21/25
to vim/vim, Subscribed
gcb left a comment (vim/vim#17747)

cannot step into GDK_IS_X11_DISPLAY(gtk_widget_get_display(gui.mainwin)), but it always jump to return NULL from there.

gui_mch_get_display(void)
{
    if (gui.mainwin != NULL && gtk_widget_get_window(gui.mainwin) != NULL
#if GTK_CHECK_VERSION(3,0,0)
	    && GDK_IS_X11_DISPLAY(gtk_widget_get_display(gui.mainwin))
#endif
	)
	return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(gui.mainwin));
    else
	return NULL;
}
Screenshot_20251021_141047.png (view on web)

try to step into

Screenshot_20251021_141119.png (view on web)


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

Alexey Korepanov

unread,
Jan 19, 2026, 9:32:22 PMJan 19
to vim/vim, Subscribed
khumarahn left a comment (vim/vim#17747)

Hi. This issue breaks inverse search for users of vimtex, which means a lot of extra scrolling when typing math in latex. What's currently the best workaround?


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

Steven Webb

unread,
4:59 AM (5 hours ago) 4:59 AM
to vim/vim, Subscribed
swebb left a comment (vim/vim#17747)

So is the issue that X_DISPLAY is actually being NULL ? How about this patch instead:

@chrisbra your patch applied cleanly and worked perfectly for me. Thank you.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17747/4517207016@github.com>

Reply all
Reply to author
Forward
0 new messages