You are not logged in.
I am having a problem with exo-open opening text files with vim.
The command "exo-open file.txt" errors "failed to execute child process 'xterm'". However, "exo-open --launch TerminalEmulator" correctly opens my terminal (xfce4-terminal). I can get vim to open the text file with "exo-open --launch TerminalEmulator /usr/bin/vim file.txt".
Why does exo-open file.txt try to open xterm not xfce4-terminal?
Tom
Last edited by tomeaton17 (2018-03-29 16:19:56)
Offline
Took me a while! Are you on a Debian family distro?
This MATE bug references the corresponding Debian and Ubuntu bugs and also offers some info and possible workaround (didn't try, don't use vim). Not sure if it's fixed or not. Glib development seems particularly arcane.
Offline
Ooops... and welcome to the forum!
Offline
Thank you for the welcome! I am using Arch Linux, probably should have put that in the op.
Offline
Honestly, this goes way over my head... I ended up in some termcap rabbit hole [the shivers], but I also found this recent Arch forum thread that deals with a similar situation (and in the end points to some Glib glitch, again), which concludes:
Trilby wrote:
That's hardcoded into it? That's horrible. (edit: yes, I confirmed it is hardcoded in, and yes that is horrible).
xdg-open is not much better. It assumes it is run in a terminal and never even checks if it has to start one. So it probably is best to hardcode your terminal in desktop files and remove Terminal=true.
FWIW, I replicated your situation in my laptop,
exo-open file.txt
(with the text/plain MIME type default app set to vim) opens Vim in xterm, while
exo-open --launch TerminalEmulator vim file.txt
did the right thing and opened in my default terminal.
What's the output of these commands?
printenv | grep TERM
xfce4-terminal -V
cat /usr/share/applications/vim.desktop
pacman -Qi xterm
Offline
Thanks for the reply.
Here is the output of the commands:
TERM=xterm-256color
terminal version:
xfce4-terminal 0.8.7.3 (Xfce 4.12)
Copyright (c) 2003-2018
The Xfce development team. All rights reserved.
Written by Benedikt Meurer <benny@xfce.org>,
Nick Schermer <nick@xfce.org>
and Igor Zakharov <f2404@yandex.ru>.
Please report bugs to <http://bugzilla.xfce.org/>.
vim.desktop:
[Desktop Entry]
Name=Vim
GenericName=Text Editor
GenericName[de]=Texteditor
Comment=Edit text files
Comment[af]=Redigeer tekslêers
Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
Comment[ar]=حرّر ملفات نصية
Comment[az]=Mətn fayllarını redaktə edin
Comment[be]=Рэдагаваньне тэкставых файлаў
Comment[bg]=Редактиране на текстови файлове
Comment[bn]=টেক্স্ট ফাইল এডিট করুন
Comment[bs]=Izmijeni tekstualne datoteke
Comment[ca]=Edita fitxers de text
Comment[cs]=Úprava textových souborů
Comment[cy]=Golygu ffeiliau testun
Comment[da]=Redigér tekstfiler
Comment[de]=Textdateien bearbeiten
Comment[el]=Επεξεργασία αρχείων κειμένου
Comment[en_CA]=Edit text files
Comment[en_GB]=Edit text files
Comment[es]=Edita archivos de texto
Comment[et]=Redigeeri tekstifaile
Comment[eu]=Editatu testu-fitxategiak
Comment[fa]=ویرایش پروندههای متنی
Comment[fi]=Muokkaa tekstitiedostoja
Comment[fr]=Édite des fichiers texte
Comment[ga]=Eagar comhad Téacs
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
Comment[he]=ערוך קבצי טקסט
Comment[hi]=पाठ फ़ाइलें संपादित करें
Comment[hr]=Uređivanje tekstualne datoteke
Comment[hu]=Szövegfájlok szerkesztése
Comment[id]=Edit file teks
Comment[it]=Modifica file di testo
Comment[ja]=テキストファイルを編集します
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
Comment[ko]=텍스트 파일을 편집합니다
Comment[lt]=Redaguoti tekstines bylas
Comment[lv]=Rediģēt teksta failus
Comment[mk]=Уреди текстуални фајлови
Comment[ml]=വാചക രചനകള് തിരുത്തുക
Comment[mn]=Текст файл боловсруулах
Comment[mr]=गद्य फाइल संपादित करा
Comment[ms]=Edit fail teks
Comment[nb]=Rediger tekstfiler
Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
Comment[nl]=Tekstbestanden bewerken
Comment[nn]=Rediger tekstfiler
Comment[no]=Rediger tekstfiler
Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
Comment[pl]=Edytor plików tekstowych
Comment[pt]=Editar ficheiros de texto
Comment[pt_BR]=Edite arquivos de texto
Comment[ro]=Editare fişiere text
Comment[ru]=Редактор текстовых файлов
Comment[sk]=Úprava textových súborov
Comment[sl]=Urejanje datotek z besedili
Comment[sq]=Përpuno files teksti
Comment[sr]=Измени текстуалне датотеке
Comment[sr@Latn]=Izmeni tekstualne datoteke
Comment[sv]=Redigera textfiler
Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
Comment[th]=แก้ไขแฟ้มข้อความ
Comment[tk]=Metin faýllary editle
Comment[tr]=Metin dosyalarını düzenle
Comment[uk]=Редактор текстових файлів
Comment[vi]=Soạn thảo tập tin văn bản
Comment[wa]=Asspougnî des fitchîs tecses
Comment[zh_CN]=编辑文本文件
Comment[zh_TW]=編輯文字檔
TryExec=vim
Exec=vim %F
Terminal=true
Type=Application
Keywords=Text;editor;
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
pacman -Qi xterm
error: package 'xterm' was not found
Thanks for the help so far
Offline
Honestly, this goes way over my head.
Mine, too, lol. Says on http://vimdoc.sourceforge.net/htmldoc/starting.html that simply typing
vim filename
works.
Regards,
MDM
Offline
So... you can either install Xterm (and use Vim in Xterm), or modify the vim.desktop file to use the Xfce terminal?
To modify the desktop file, you may have Menulibre or Alacarte already installed. If so, right click the Whisker Menu button and choose "Edit Applications", filter for "vim" and change the command to:
exo-open --launch TerminalEmulator vim %F
and toggle off the "Execute in terminal" option (this is important), then save your changes (also important!) and try... and then tell us
Offline
@MDM
It's not the same, that would work from Xfce terminal and open Vim in that same terminal window, but if issued, for example, from the Alt+F2 GUI launcher or a script or whatever it wouldn't work, whereas "exo-open --launch TerminalEmulator vim %F" works anywhere (one hopes!).
lol i don't even use vim
Offline
So... you can either install Xterm (and use Vim in Xterm), or modify the vim.desktop file to use the Xfce terminal?
To modify the desktop file, you may have Menulibre or Alacarte already installed. If so, right click the Whisker Menu button and choose "Edit Applications", filter for "vim" and change the command to:
exo-open --launch TerminalEmulator vim %F
and toggle off the "Execute in terminal" option (this is important), then save your changes (also important!) and try... and then tell us
Can confirm this works sort of, I had to specify the path of vim like so
exo-open --launch TerminalEmulator /usr/bin/vim &F
and then it works!
Thanks for the help alcornoqui.
Offline
Great! You can prepend [SOLVED] to the subject line, if you will.
See you around.
Offline
@MDM
It's not the same, that would work from Xfce terminal and open Vim in that same terminal window, but if issued, for example, from the Alt+F2 GUI launcher or a script or whatever it wouldn't work
Apologies. I naively believed a Wikipedia article again.
Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface.
But you are correct. I even (temporarily) installed the thing to verify when I saw your statement that you don't even use it, thinking you might have been guessing.
Regards,
MDM
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 589.46 KiB (Peak: 606.3 KiB) ]