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

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

asked Aug 5 '14

wombatr0n gravatar image

updated Aug 5 '14

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.

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
1

answered Aug 6 '14

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'.

0

answered Aug 8 '14

wombatr0n gravatar image

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

Question Tools

Stats

Asked: Aug 5 '14

Seen: 318 times

Last updated: Aug 08 '14