[QUICK & DIRTY] Emacs in X11 without WM
Posted: Sun Nov 29, 2015 4:10 pm
Welcome to the Quick & Dirty series here on the LinuxBBQ BBS.
You want to have all the convenience of an Xserver without 'bloat' added (let's say Emacs itself isn't bloat, OK?)
The following steps will give you a X session with Emacs running in full-screen without a window manager. Hitting C-x C-c will shut down X and drop you back to login.
1) we don't need a so-called display manager (LightDM, etc)
2) in our ~/.xinitrc we have the following lines (more or less, just be sure the last line is exactly the same)
3) use 'startx' to run
You might argue that this would also work in an x-terminal-emulator with emacs -nw -fs -- that's true, but you wouldn't have the nice PDF displays or image previews in dired.
Extra hint:
You can put the following snipped into your emacs configuration to assign fullscreen to F11 and to set the frame to maximized -- it is optional:
Have fun!
You want to have all the convenience of an Xserver without 'bloat' added (let's say Emacs itself isn't bloat, OK?)
The following steps will give you a X session with Emacs running in full-screen without a window manager. Hitting C-x C-c will shut down X and drop you back to login.
1) we don't need a so-called display manager (LightDM, etc)
2) in our ~/.xinitrc we have the following lines (more or less, just be sure the last line is exactly the same)
Code: Select all
#!/bin/bash
# disable blanking
xset s off &
xset -dpms &
# pick a mouse pointer
xsetroot -cursor_name left_ptr &
# Ctrl-Alt-Backspace kills the X session (let's keep this in case gnus dies on you)
setxkbmap -option terminate:ctrl_alt_bksp &
exec emacs -fs
You might argue that this would also work in an x-terminal-emulator with emacs -nw -fs -- that's true, but you wouldn't have the nice PDF displays or image previews in dired.
Extra hint:
You can put the following snipped into your emacs configuration to assign fullscreen to F11 and to set the frame to maximized -- it is optional:
Code: Select all
(defun toggle-fullscreen ()
"Toggle full screen on X11"
(interactive)
(when (eq window-system 'x)
(set-frame-parameter
nil 'fullscreen
(when (not (frame-parameter nil 'fullscreen)) 'fullboth))))
(global-set-key [f11] 'toggle-fullscreen)
(custom-set-variables
'(initial-frame-alist (quote ((fullscreen . maximized)))))