The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

How to enable logs in Ubuntu

asked Jun 7 '12

I wanted to check out the logs for a crash I could reproduce, but the command gives me:

$ i3-dump-log 
i3-dump-log: Cannot get I3_SHMLOG_PATH atom contents. Is i3 running on this display?

I read that we need to "active" the logging, but I did not understand how/where to do it. Do you know where should I place the command for logging (.xsession file did not work, .i3/config did not work):

exec /usr/bin/i3 -V -d all >~/i3log-$(date +'%F-%k-%M-%S') 2>&1

thanks,

2 answers

Sort by » oldest newest most voted
0

answered Mar 12 '13

updated Mar 12 '13

I just learned that .xinitrc is never called, so .xsession should be just a symlink to .xinitrc (from thie https://wiki.ubuntu.com/CustomXSession). So to make it just work properly on Ubuntu, follow these steps:

  1. Create a .xinitrc file:

    exec /usr/bin/i3 -V >/tmp/i3-$(date +'%F-%k-%M-%S').log 2>&1
  2. Create a symlink for .xsession:

    $ ln -s ~/.xinitrc ~/.xsession
  3. Edit desktop options for lightdm, at: /usr/share/xsessions/i3.desktop

    [Desktop Entry]
    Name=i3
    Comment=improved dynamic tiling window manager
    Exec=/etc/X11/Xsession
    Type=Application

And voila!

1

answered Jun 7 '12

Tucos gravatar image

Shared memory logging is by default only enabled in development builds. If you're using a build from git, then you might simply need to run DISPLAY=:0 i3-dump-log. As for regular logging, your command should be fine and it should be in ~/.xsession if using a display manager and in ~/.xinitrc if using startx.

For further info you can take a look at the Debugging How To for development builds or the regular debugging howto

Comments

In Ubuntu, with gdm, .xsession is never called... any ideas?

bruno.braga gravatar imagebruno.braga (Jun 7 '12)edit

bruno: after entering your username, select the session type "custom" at the bottom of your screen.

Michael gravatar imageMichael (Jun 7 '12)edit

Michael, the new Ubuntu 12.04 does not have the option Custom anymore. I got it working by entering into a terminal (Ctrl+Alt+F1) and: /etc/init.d/lightdm stop; startx (the i3 call must be in .xinitrc)

bruno.braga gravatar imagebruno.braga (Jun 10 '12)edit

I run a session using “i3 (with debug long)”, and running `DISPLAY=:0 i3-dump-log` still give the same as the OP encountered. I wanted to submit a but report, but can't get a debug log. I installed i3 from Synaptic.

Hibou57 gravatar imageHibou57 (Jul 3 '14)edit

Question Tools

Stats

Asked: Jun 7 '12

Seen: 1,025 times

Last updated: Mar 12 '13