this post was submitted on 22 Oct 2023
1 points (100.0% liked)

Emacs

313 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Can somebody please help me solve this. i tired everything i can. i am runnin xQuartz 2.85, Emacs 28.2, Server is linux based. i get this over ssh. Emacs works fine without ssh.

libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast Connection lost to X server 'localhost:10.0' When compiled with GTK, Emacs cannot recover from X disconnects. This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221 For details, see etc/PROBLEMS. Fatal error 6: Aborted Backtrace: emacs[0x5194a2] emacs[0x4febb1] emacs[0x519559] emacs[0x4cab03] emacs[0x4cac1c] /usr/lib/x86_64-linux-gnu/libX11.so.6(_XIOError+0x52)[0x7f6dc1716492] /usr/lib/x86_64-linux-gnu/libX11.so.6(_XEventsQueued+0x7d)[0x7f6dc1713b4d] /usr/lib/x86_64-linux-gnu/libX11.so.6(XPending+0x61)[0x7f6dc1705341] /usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x701ff)[0x7f6dc1db21ff] /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_prepare+0x19f)[0x7f6dc188c8ef] /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5229b)[0x7f6dc188d29b] /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_pending+0x2c)[0x7f6dc188d43c] /usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_events_pending+0x12)[0x7f6dc20971b2] emacs[0x4cb38d] emacs[0x505f82] emacs[0x506625] emacs[0x5be02d] emacs[0x428ca1] emacs[0x50ad97] emacs[0x50c440] emacs[0x50db54] emacs[0x576c46] emacs[0x4fef74] emacs[0x576bb5] emacs[0x4fef13] emacs[0x504127] emacs[0x504488] emacs[0x41ef32] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f6dbfa5f083] emacs[0x41fc0e] Aborted (core dumped)

top 14 comments
sorted by: hot top controversial new old
[–] 7890yuiop@alien.top 1 points 1 year ago (2 children)

For details, see etc/PROBLEMS

I trust you did that.

* Crash bugs
 
** When Emacs is compiled with Gtk+, closing a display kills Emacs.
 
There is a long-standing bug in GTK that prevents it from recovering
from disconnects: https://gitlab.gnome.org/GNOME/gtk/issues/221
 
Thus, for instance, when Emacs is run as a server on a text terminal,
and an X frame is created, and the X server for that frame crashes or
exits unexpectedly, Emacs must exit to prevent a GTK error that would
result in an endless loop.
 
If you need Emacs to be able to recover from closing displays, compile
it with the Lucid toolkit instead of GTK.

Which means using ./configure --with-x-toolkit=lucid when building Emacs from source.

If you're not currently building Emacs from source then that will be a new adventure, but if you keep a log of everything you needed to do on your system to achieve that then you'll have a record (which you could always convet to an executable script) for building it in future without any hassle.

[–] Artistic-Safe232@alien.top 1 points 1 year ago (1 children)

i can do the installation again with homebrew by brew install emacs --with-toolkit=lucid. will it work?

[–] ipmonger@alien.top 1 points 1 year ago (1 children)

Yes, that will likely be sufficient. Note: it may need to install additional dependencies…

[–] Artistic-Safe232@alien.top 1 points 1 year ago (1 children)
[–] fiddlerwoaroof@alien.top 1 points 1 year ago (2 children)

This is confusing to me: Cocoa emacs works pretty well and doesn’t need XQuartz at all. If you’re trying to run the gui over ssh X forwarding, you need to install the lucid version on the server: Debian, at least has it pre-packaged: apt install emacs-lucid should just work

[–] Artistic-Safe232@alien.top 1 points 1 year ago

can you helpe with basic command, plz :)

[–] Artistic-Safe232@alien.top 1 points 1 year ago (2 children)

i tried to install cocoa emacs but failed. cant install through brew

[–] Yaikore@alien.top 1 points 1 year ago

Have you looked into emacs-plus?

[–] alanthird@alien.top 1 points 1 year ago (2 children)

What exactly are you doing here?

Presumably you're running Emacs on a remote, Linux, server, and trying to display it locally using XQuartz over ssh X forwarding?

If so then the locally installed version of Emacs is irrelevant. It's not used in any way. You want to look at the version of Emacs installed on the remote server.

As u/fiddlerwoaroof said, you need to install lucid emacs on the server.

If you just want to run it locally on your Mac then forget about X, install the brew version and it'll Just Work. But it sounds like you already have that working.

[–] Artistic-Safe232@alien.top 1 points 1 year ago (1 children)

sorry for the all all confusion. Actually we have a linux system with GEOS-Chem running. i connect to this server with ssh on my m1 air to edit input files, but i cant open emacs. the only way to do it is through terminal which i am not much familar. is there any other option through which is edit file in GUI mode in my machine. lucid emacs seems not easy installation. can i install mavim on remote sever and then open files with local machine with macvim.

[–] 7890yuiop@alien.top 1 points 1 year ago (1 children)

Another option is to run a local Emacs and access the remote files over ssh via Tramp.

E.g.: C-x C-f /ssh:USERNAME@HOST:/path/to/file

You can read about Tramp in its own manual: C-h i g (tramp) RET

[–] Artistic-Safe232@alien.top 1 points 1 year ago

okey i will look into that

[–] Artistic-Safe232@alien.top 1 points 1 year ago

Thanks, yeah, now i know the issue. i will try to get it installed on remote server.

[–] Artistic-Safe232@alien.top 1 points 1 year ago

i am not sure, it just happend to me to work on a remote server for running GEOS-Chem for which i need to edit files. i am not a developer..