3

I'm new to Emacs, and I find it to he very useful, it's almost like a Text UI with tabs and windows and such. And so many applications. Such as IRC, shell, email, and file manager. But there something that would make Emacs so cool to the point I would just ditch all desktop environments for it. Would it be possible to start an xorg server within of emacs on the console? Like having X inside of one window with like Firefox running inside of it. With a mouse and everything. And when you switch to another window, there no X environment within that window. Is such a thing even possible? Does it exist? Might it exist?

  • What OS are you using? – DisplayName Nov 9 '14 at 20:49
  • 3
    Would you then run emacs inside this X environment? and run an emacs that runs an X environment that runs an emacs that runs an X environment… – gniourf_gniourf Nov 9 '14 at 20:54
  • @DisplayName: Linux. Emacs on windows and Mac is crap. – toxemicsquire Nov 9 '14 at 21:22
  • @gniourf Anything is possible with that. But I'd just like use Firefox a – toxemicsquire Nov 9 '14 at 21:23
  • Linux isn't an operating system. Whats wrong with emacs on OS X? It's GNU emacs, which is the same emacs as the one in the most popular Linux OSes. – DisplayName Nov 9 '14 at 21:33
1
+50

Can you run X11 in emacs? Yes, but not how you describe. If you start in text only mode sudo init 3 and then log in and start emacs, you can start x by running the startx command through emacs. M-! startx Doing so will start the X environment on a separate screen/terminal that you will have to shift to using Ctrl-Alt-# where # is the in order to see.

Can you run X11 inside an emacs frame? No.

The configuration for X lets you specify a Screen and corresponding monitor. To run it inside of an emacs frame, emacs would need to be able to emulate a screen/monitor as seen by X. From the man page for xorg.conf, "Each Screen section binds together a graphics board and a monitor." Thus emacs would have to have some built in ability to emulate a graphics card and monitor. While I suppose that it may be Possible to implement something like that, I believe it is safe to say that is not default behavior. This can be confirmed by reviewing the emacs source code.

The source code can be obtained with the following command.

git clone -b master git://git.sv.gnu.org/emacs.git

It takes a while to download.

If you look through the code, you will see that the shell commands are run via lisp and no special handling for graphics that would be necessary to do what you are talking about. I believe the specific code is in the emacs/lisp/simple.el file but lisp is not one of my stronger languages.

Hopefully this answers your question. If you have two monitors, it is conceivable that you run emacs in standard terminal on one and X on the other. You would simply need to configure your X settings to do so but I believe that is beyond the scope of this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.