reddit / emacs

emacsclient in linux

[deleted] · 2022-03-07 17:24
Hi, A very strange situation here. When I launch the client from the terminal using `emacsclient -c`, the client launches with the terminal showing a message `Waiting for Emacs...`. However, when I use a `.desktop` file it fails to launch! Curiously, when I set `Terminal=true` in the `.desktop`, it works. Any idea what's going wrong? Thanks! EDIT: `Terminal=false` \-> `Terminal=true`
chenleo1992 · 2022-03-07 18:32
Here is mine. Hope it helps. `[Desktop Entry]` `Name=Emacs Client` `GenericName=Text Editor` `Comment=Edit text` `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++;` `Exec=emacsclient -c %F` `Icon=emacs` `Type=Application` `Terminal=false` `Categories=Development;TextEditor;` `StartupWMClass=Emacs` `Keywords=Text;Editor;`
DrownNotably · 2022-03-08 00:09
Does the regular emacs .desktop file work or is it only emacsclient that is broken? Might be nothing, but did you build from source? Maybe it is getting a different PATH when you run it with the terminal?
[deleted] · 2022-03-08 09:43
Thank you for sharing! My .desktop is identical! I rebooted the machine today morning and things are back to normal. The uptime was almost a month... Still don't understand what gave though.
[deleted] · 2022-03-08 09:47
Hi, things are working again after a reboot (uptime ~ a month...). Still don't understand what gave though. It was very bizarre because when I called the client from a terminal or krunner it worked. But clicking on the .desktop icon didn't. In any case, life is too short to investigate inconsequential problems like these (because I'm a kde user and not dev). Cheers ^_^
DrownNotably · 2022-03-08 10:09
Aha fair enough. I'm glad it works now.