(I first asked this question at
http://stackoverflow.com/q/39510377/1175080 and there I was suggested
to post this question to this mailing list.)

With GVim on my Windows 7 system, if I press `gx` while the cursor is on
an URL, it launches the URL in Firefox (my default browser on
Windows).

However, when I do the same on my XFCE4 Desktop on Debian 8.3 Linux
system, pressing `gx` does nothing at all.

I am using GVim (Vim 7.4) on both systems.

The `:let g:netrw_browsex_viewer` command returns `E121: Undefined variable: 
g:netrw_browsex_viewer` on both systems.

I tried entering the `:let g:netrw_browsex_viewer= "xdg-open"` command on the 
Linux system, but it didn't help at all.

I have two questions:

  1. Why does the `gx` command work for URLs on the Windows system but
     not on XFCE4 desktop on the Debian Linux system even though
     `g:netrw_browsex_viewer` is undefined in both?

  2. How can I make the `gx` command work for URLs on XFCE4 desktop on
     the Debian Linux system?

Additional details:

  1. If I run the `xdg-open http://google.com/` on shell, it launches
     Google in Firefox. If there is no Firefox running, a new Firefox
     instance is launched. If Firefox is already running, then a new tab
     is opened in the existing instance.

  2. If I enter `:call system('xdg-open http://google.com/')` from
     GVim on the XFCE desktop on Debian 8.3 Linux, it launches Firefox
     (or a Firefox tab) to display the URL.

  3.  I tried two things. I entered the
      `:let g:netrw_browsex_viewer="xdg-open"` in command-line mode in Vim
      itself. The gx command did nothing after that.
      
      I also entered `let g:netrw_browsex_viewer="xdg-open"` in
      ~/.vimrc. The `gx` command still did not work. I have other
      commands such as `colorscheme darkblue`, etc. in the same file
      which work fine. 

Here is the GVim version details on Windows 7 where the `gx` command
runs fine without any customization at all.

    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 14:36:26)
    MS-Windows 32-bit GUI version
    Compiled by mool@tororo
    Big version with GUI.  Features included (+) or not (-):
    +arabic          +ex_extra        +mouseshape      +syntax
    +autocmd         +extra_search    +multi_byte      +tag_binary
    +balloon_eval    +farsi           +multi_lang      +tag_old_static
    +browse          +file_in_path    -mzscheme        -tag_any_white
    ++builtin_terms  +find_in_path    +netbeans_intg   -tcl
    +byte_offset     +float           -ole             -tgetent
    +cindent         +folding         +path_extra      -termresponse
    +clientserver    -footer          -perl            +textobjects
    +clipboard       +gettext/dyn     +persistent_undo +title
    +cmdline_compl   -hangul_input    -postscript      +toolbar
    +cmdline_hist    +iconv/dyn       +printer         +user_commands
    +cmdline_info    +insert_expand   -profile         +vertsplit
    +comments        +jumplist        -python          +virtualedit
    +conceal         +keymap          -python3         +visual
    +cryptv          +langmap         +quickfix        +visualextra
    +cscope          +libcall         +reltime         +viminfo
    +cursorbind      +linebreak       +rightleft       +vreplace
    +cursorshape     +lispindent      -ruby            +wildignore
    +dialog_con_gui  +listcmds        +scrollbind      +wildmenu
    +diff            +localmap        +signs           +windows
    +digraphs        -lua             +smartindent     +writebackup
    -dnd             +menu            -sniff           -xfontset
    -ebcdic          +mksession       +startuptime     -xim
    +emacs_tags      +modify_fname    +statusline      -xterm_save
    +eval            +mouse           -sun_workshop    +xpm_w32
       system vimrc file: "$VIM\vimrc"
         user vimrc file: "$HOME\_vimrc"
     2nd user vimrc file: "$HOME\vimfiles\vimrc"
     3rd user vimrc file: "$VIM\_vimrc"
          user exrc file: "$HOME\_exrc"
      2nd user exrc file: "$VIM\_exrc"
      system gvimrc file: "$VIM\gvimrc"
        user gvimrc file: "$HOME\_gvimrc"
    2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
    3rd user gvimrc file: "$VIM\_gvimrc"
        system menu file: "$VIMRUNTIME\menu.vim"
    Compilation: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   
-DFEAT_CSCOPE 
    -DFEAT_NETBEANS_INTG   -DFEAT_XPM_W32   -DWINVER=0x0400 -D_WIN32_WINNT=0x
    0400  /Fo.\ObjGi386/ /Ox /GL -DNDEBUG  /Zl /MT -DFEAT_GUI_W32 
-DDYNAMIC_ICONV 
    -DDYNAMIC_GETTEXT -DFEAT_BIG /Fd.\ObjGi386/ /Zi
    Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib 
    kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib 
uuid.lib /machine:i386

Here are the GVim, Debian and XFCE version details.

    $ vim --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:36:07)
    Included patches: 1-488, 576
    Modified by pkg-vim-maintain...@lists.alioth.debian.org
    Compiled by james...@debian.org
    Huge version with GTK2 GUI.  Features included (+) or not (-):
    +acl             +farsi           +mouse_netterm   +syntax
    +arabic          +file_in_path    +mouse_sgr       +tag_binary
    +autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
    +balloon_eval    +float           +mouse_urxvt     -tag_any_white
    +browse          +folding         +mouse_xterm     +tcl
    ++builtin_terms  -footer          +multi_byte      +terminfo
    +byte_offset     +fork()          +multi_lang      +termresponse
    +cindent         +gettext         -mzscheme        +textobjects
    +clientserver    -hangul_input    +netbeans_intg   +title
    +clipboard       +iconv           +path_extra      +toolbar
    +cmdline_compl   +insert_expand   +perl            +user_commands
    +cmdline_hist    +jumplist        +persistent_undo +vertsplit
    +cmdline_info    +keymap          +postscript      +virtualedit
    +comments        +langmap         +printer         +visual
    +conceal         +libcall         +profile         +visualextra
    +cryptv          +linebreak       +python          +viminfo
    +cscope          +lispindent      -python3         +vreplace
    +cursorbind      +listcmds        +quickfix        +wildignore
    +cursorshape     +localmap        +reltime         +wildmenu
    +dialog_con_gui  +lua             +rightleft       +windows
    +diff            +menu            +ruby            +writebackup
    +digraphs        +mksession       +scrollbind      +X11
    +dnd             +modify_fname    +signs           -xfontset
    -ebcdic          +mouse           +smartindent     +xim
    +emacs_tags      +mouseshape      -sniff           +xsmp_interact
    +eval            +mouse_dec       +startuptime     +xterm_clipboard
    +ex_extra        +mouse_gpm       +statusline      -xterm_save
    +extra_search    -mouse_jsbterm   -sun_workshop    +xpm
       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
          user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
        user gvimrc file: "$HOME/.gvimrc"
    2nd user gvimrc file: "~/.vim/gvimrc"
        system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread 
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include 
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 
-I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/freetype2    -g -O2 -fPIE -fstack-protector-strong -Wformat 
-Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     
-I/usr/include/tcl8.6  -D_REENTRANT=1  -D_THREAD_SAFE=1  
-D_LARGEFILE64_SOURCE=1  
    Linking: gcc   -L. -Wl,-z,relro 
-L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic 
-Wl,-export-dynamic -Wl,-E  -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed 
-o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo 
-lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 
-lfontconfig -lfreetype  -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm 
-ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  
-fstack-protector -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE 
-lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu 
-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 
-Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz 
-lpthread -lieee -lm -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm

    $ dpkg -l *vim* | grep ^i
    ii  vim-common     2:7.4.488-7  amd64        Vi IMproved - Common files
    ii  vim-gtk        2:7.4.488-7  amd64        Vi IMproved - enhanced vi 
editor - with GTK2 GUI
    ii  vim-gui-common 2:7.4.488-7  all          Vi IMproved - Common GUI files
    ii  vim-runtime    2:7.4.488-7  all          Vi IMproved - Runtime files
    ii  vim-tiny       2:7.4.488-7  amd64        Vi IMproved - enhanced vi 
editor - compact version

    $ cat /etc/debian_version 
    8.3

    $ xfce4-about --version
    xfce4-about 4.10.0 (Xfce 4.10)

    Copyright (c) 2008-2011
        The Xfce development team. All rights reserved.

    Please report bugs to <http://bugzilla.xfce.org/>.
    Translators list from 2012-04-22 00:21:09.

Can you help me to get the `gx` command working on the XFCE + Debian
8.3 Linux system?

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui