The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

i3 doesn't execute command on first login [closed]

asked 2014-08-05 01:44:13 +0000

wombatr0n gravatar image

updated 2014-08-05 02:07:37 +0000

In my .i3/config, I have

exec --no-startup-id i3-msg 'workspace 2; exec urxvtc -e mutt -n; workspace 1'

to open mutt on workspace 2 and switch back to workspace 1. When I startx after logging in, mutt doesn't run. However, if I quit i3 and startx again, mutt opens in workspace 2. If I split the commands into different lines:

exec i3-msg 'workspace 2'
exec --no-startup-id i3-msg 'exec urxvtc -e mutt -n'
exec i3-msg 'workspace 1'

it will switch to workspace 2, but won't run the following commands. Again, it works just fine if I exit i3 and startx again. This is on Slackware 14.1 x86, with the SBo version of i3.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by TonyC
close date 2014-08-08 22:01:47.915618

2 answers

Sort by » oldest newest most voted

answered 2014-08-06 12:23:34 +0000

Adaephon gravatar image

I'm unsure, why the one-liner does not work consistently. In the split up version there is really no guarantee that it will run

Use assign(see User's Guide) to set a specfic workspace for an application.

In this case, you can set a custom title for the urxvtc terminal window with the option -title and use this as criteria for the assign setting. Adding the following lines to your ~/.i3/config should do the trick

assign [title="^mutt mail$"] 2
exec --no-startup-id urxvtc -title 'mutt mail' -e mutt -n

Note: you really only need i3-msg to run i3 commands. If you want to start program, exec program is the way to go. There is no need for exec i3-msg 'exec program'.

edit flag offensive delete link more

answered 2014-08-08 04:17:45 +0000

wombatr0n gravatar image

Turns out it was an issue with the urxvt daemon, nothing to do with i3.

edit flag offensive delete link more

Question Tools


Asked: 2014-08-05 01:44:13 +0000

Seen: 318 times

Last updated: Aug 08 '14