There was a way to register URL protocol handler for "vim:" in Ubuntu 18.04 LTS to call gVim.
You can create urls from type: "vim:local_file?line_number" for exapmple: "vim:~/.vimrc?5" will open .vimrc and focus on line 5.
First create file "/usr/share/applications/rvim.desktop".
Append in "/usr/share/applications/defaults.list":
x-scheme-handler/vim=rvim.desktop
Append in your "~/.vimrc":
function! s:gotoline()
let file = bufname("%")
if file =~ "vim:"
let bufnumber = bufnr("%")
let file = substitute(file, "vim:", "", "")
let line = 0
if file =~ "?"
let matches = split(file, '?')
let file = matches[0]
let line = matches[1]
endif
exec "keepalt edit +" . line . " " . fnameescape(file)
exec "bwipeout " . bufnumber
endif
return file
endfunction
autocmd BufNewFile * nested call s:gotoline()
autocmd BufRead * nested call s:gotoline()