# X forwarding emacs error



## sw2wolf (Dec 6, 2017)

The freebsd11.1 is running as a guest of VBOX. By using X forwarding i.e. `ssh -X ... xterm`, i can make X app(s) appear on my local windows host. However, when x-forwarding emacs, it doesnot work normally.

The issue I was running into stemmed from a Gtk+ bug which caused Emacs to crash when an X11 connection was unexpectedly lost.

Recompiling emacs to use a different X toolkit solved the issue.

`./configure --with-x-toolkit=lucid`

But as its poor hardware resource of the VM, i donot want to build emacs by myself. Can we achieve this goal only using `pkg`

Sincerely!


----------



## SirDice (Dec 6, 2017)

sw2wolf said:


> Recompiling emacs to use a different X toolkit solved the issue.
> 
> `./configure --with-x-toolkit=lucid`


Use the port. It has various options you can set.

```
X11 toolkit (each implies X11): you can only select none or one of them
     GTK2=off: GTK+ 2 GUI toolkit support
     GTK3=on: GTK+ 3 GUI toolkit support
     MOTIF=off: Motif widget library support
     XAW=off: Athena widgets
     XAW3D=off: Athena3D widgets
```



sw2wolf said:


> Can we achieve this goal only using  pkg


Short and simple answer, no.


----------

