You are not logged in.
Hi,
I'm trying to open a plain text file using xdg-open with vim/nvim.
My .desktop file looks like this:
...
TryExec=vim
Exec=vim %F
Terminal=true
...
When I try to open a file (xdg-open test.txt), I receive the following message:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
Do you have any idea what I have to change?
Last edited by lmnch (2023-09-10 08:46:24)
Offline
Specualative: xdg-open closes stdin but doesn't run vim in a new TE but re-uses the existing one where vim then runs w/o stdin.
Create some ~/bin/xvim binary that explicitly runs vim in the TE of your choice '… -e vim -p "$@"' and add a desktop entry for that in ~/.local/share/applications/xvim.desktop w/ "Terminal=false" (cause you're bringing the TE)
Nice benefit is that you can also control aspects of the specific TE (geometry, colors, …)
Offline