Starting session with exwm

Today I found that emacs has its own window manager with very impressive showcase. However I can't really understand how to configure it from the brief documentation where I don't understand how can I start it. Thus my question how can I configure emacs window manager on Ubuntu? Now I have Ubuntu 16.04 with emacs 25.1.1.

1 Answer

I have been running EXWM and booting straight into emacs for about 8 months now.
I will probably never use another window manager, its really great!

I am running Debian Stretch/ Emacs 26.0.50.
However, the following should work for you on Ubunutu and Emacs 25.1.1:

Steps

  1. Check if your home directory has a .xinitrc
  2. If not, copy the xinitrc from /etc/X11/xinit/xinitrc
    2b. If you cant find this dont worry, touch a new file called .xinitrc
  3. Paste the following into your file
#!/usr/bin/env bash
#
# This is a sample file for the ~/.xinitrc file.
#
# You may need to comment out the next line to disable access control
#xhost +
# Set themes, etc
gnome-settings-daemon &
# Set fallback cursor
xsetroot -cursor_name left_ptr
# If Emacs is started in server mode, `emacsclient` is a convenient way to edit
# files in place (used by e.g. `git commit`)
export VISUAL=emacsclient
export EDITOR="$VISUAL"
# Disable access control
xhost +SI:localuser:$USER
## Over-rides
#
xset b off &
#numlockx off # Turn off numlock
# Set keyboard repeat rate
xset r rate 180 40
# Set capslock as ctrl
setxkbmap -layout us -option ctrl:nocaps
# Programs to start upon startup
xfce4-power-manager &
syncthing -no-browser & # Syncthing
nm-applet & # Network Manager
pasystray & # Pulseaudio volume control from tray
udiskie --tray & # Disk mount utility
# launch emacs upon startup
exec dbus-launch --exit-with-session emacs

4. If you touched the file ~/.xinitrc then change its file permission to 774
5. Create a symlink to ~/.xinitrc called ~/.xsession

Note

If you create a symlink ~/.xsession instead of /.xsessionrc you will have the flexibility to install another window manager such as openbox or xfce.
At login, you will be able to choose whether you boot into exwm or another window manager.
But if you create the symlink to ~/.xsessionrc then your machine will always boot into exwm (unless over-ridden of course).
See here for more details

I recommend installing another window manager so when your emacs.d file does not load you can use a window manager to sort it out.

Enjoy.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like