Short version: LightDM doesn't quite load my i3 session correctly and fails splendidly at loading my vanilla Unity desktop session. I suspect it's a problem with LightDM's configuration or various startup files (e.g. .xinitrc, .profile, etc).

Now, when I hit the login manager and select i3 session as I log in, it shows a blank background. I have to load i3 by pressing Ctrl+Alt+F1 and running startx. When I do that, nm-applet no longer shows up in the lower right corner of my i3status bar as it did before. My bash shell also has a different font (it still highlights filenames, though). (Edit: htop is also suddenly not installed, which is really confusing.)

When I try to run a Unity session, I get a blank white text box taking up a small fraction of my screen that looks like it's supposed to be a terminal of some sort. I can't press Ctrl+Alt+F(1-6) and get back to a terminal, so I am forced to reboot. Fixing this problem isn't critical, but hopefully, it helps diagnose the problem.

Long version:

I installed i3 a while back.

sudo apt install i3

Upon my first reboot, I was initially very happy with it. I tweaked some nautilus settings to not show the desktop icons so I could use nautilus.

gsettings set org.gnome.desktop.background show-desktop-icons false

After my second reboot, I logged in with my familiar Unity login manager and selected 'i3' as a session, I encountered a blank desktop background.

I followed the instructions here: to no avail, so I tried reinstalling ubuntu-desktop, resetting, and eventually removing my existing compiz configuration.

sudo apt-get install --reinstall ubuntu-desktop
dconf reset -f /org/compiz/
rm -rf ~/.compiz-1 ~/.config/compiz-1

Here's my .xinitrc file, which I made at some point during this long process.

# ~/.xinitrc
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  unset f

setxkbmap -option ctrl:nocaps

# set PATH so it includes user's private bin directories

# alias to allow quick vga connection
alias connect-vga='xrandr --output LVDS2 --auto --output VGA2 --preferred --right-of LVDS2'
alias disconnect-vga='xrandr --output LVDS2 --auto --output VGA2 --off'

# set primary display so that nm-applet icon shows up? untested
#xrandr --output LVDS1 --primary

# exec enlightenment_start
exec i3

P.S.: I also got a 4K monitor just about when all this happened. In fact, this started when I had some issues setting the resolution to something that would work with my 8-year-old Thinkpad T420. It seems to work fine now, though.


I am just guessing, but you can try:

  • make sure you check in LightDM startup screen Default Xsession
  • there are two important config files: (1) .xinitrc and (2) .xsession
  • to make sure everything is executed as expected, I have .xinitrc like this (just includes my .xsession) file:

    # in some cases (?) the .xsession file was not processed
    # and so those commands needed to be manually executed here
    xrdb -merge ${HOME}/.Xresources
    . ${HOME}/.xsession
  • everything important is in .xsession, there is bit more code over the years, but regarding the i3, the relevant parts contain:

    nm-applet &
    blueman-applet &
    pasystray &
    udiskie --smart-tray --file-manager="my-x-file-browser.sh" &
    clipit &
    shutter &
    dropbox start -i &
    exec i3 2>> ~/.xsession-errors

So as you can see, I start some applets and make sure the stderr of i3 is redirected to a file, just to be sure I do not miss any error.

My advice:

  1. LightDM has Default Xsession selected.
  2. Make sure your .xinitrc gets executed (you may try the same setup as mine ie. use both .xsession as well as .xinitrc)
  3. Redirect output to some log file (2>> ~/.xsession-errors can get quite big over time, so make sure to logrotate it or otherwise discard it)

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.