3

I'm trying to find the configuration file that startx uses to start the i3 window manager.

The weird part is, grep -r i3 returns no relevant results in ~ and /etc/X11/.

I have checked every file I can think of. My ~ directory does not have any .x* files in it. No .x* file in the /etc/X11 sub dirs has any reference to i3. I checked .xinitrc, .Xsession, etc.

But.. when I login, I can run startx and i3 magically starts. I am utterly perplexed.

Running Ubuntu on an odroid, but that shouldn't make a difference.

If it makes a difference, I installed i3 as root before creating my user.

cat /etc/issue
Ubuntu 16.04.1 LTS \n \l

uname -a
Linux odroid 3.10.96-113 #1 SMP PREEMPT Wed Jul 6 22:19:28 UTC 2016 armv7l armv7l armv7l GNU/Linux

As you can see below, there are no places left to hide:

root@odroid:/home/matt# find / -name *xinit*
/var/lib/dpkg/info/xinit.conffiles
/var/lib/dpkg/info/xinit.list
/var/lib/dpkg/info/xinit.md5sums
/var/lib/dpkg/info/xinit.postinst
/etc/X11/xinit
/etc/X11/xinit/xinitrc.d
/etc/X11/xinit/xinitrc
/usr/share/doc/xinit
/usr/share/man/man1/xinit.1.gz
/usr/bin/xinit
root@odroid:/home/matt# 

root@odroid:/home# grep -r 'exec i3'
matt/.config/i3/config_bak:bindsym $mod+Return exec i3-sensible-terminal
matt/.config/i3/config:bindsym $mod+Return exec i3-sensible-terminal
root@odroid:/home# cd /etc/
root@odroid:/etc# grep -r 'exec i3'
i3/config:bindsym Mod1+Return exec i3-sensible-terminal
i3/config:exec i3-config-wizard
i3/config.keycodes:bindcode $mod+36 exec i3-sensible-terminal
root@odroid:/etc# 

What is starting i3 when I run startx?

3

i3 seems to be a X Window Manager. If it's your system's default window manager, it's registered with the 'alternatives' system - which you can check with update-alternatives --display x-window-manager. This means that /usr/bin/x-window-manager is a symlink to /etc/alternatives/x-window-manager; this in turn is set by the 'alternatives' system to point to i3.

If you want to change the system default window manager, root can update-alternatives --config x-window-manager.

If Xsession finds a window manager, it will make this the default program to start in the session. In Debian, this is done in /etc/X11/Xsession.d/50x11-common_determine-startup.

If a users want to run a different program in their X session, then they can write a ~/.xsession that starts (or execs) the desired program.

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.