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

Some exec commands not being executed on i3 startup

asked 2012-11-22 19:36:06 +0000

Murali Suriar gravatar image

I'm running i3 version 4.3 on Ubuntu Precise.

I have the "exec" commands below in my .i3/config. (username removed), and am invoking i3 using the display manager (LightDM?) session, not using a .xsession.

Only a subset of them appear to be taking any effect. Specifically, everything up to bluetooth-applet appears to be being executed correctly.

  • My "i3init" script is called correctly and the environment variables for gnome-keyring-daemon are correctly set.
  • Gnome-settings-daemon, nm-applet, and bluetooth-applet are all started, and the latter two appear in the dock.

However:

  • My custom keybindings are not taking effect (remapping capslock to escape, remapping the "menu" key to "compose"
  • My .Xresources file doesn't appear to be being merged correctly; when I start uxrvt, all colours are set to pink. I need to run "xrdb -merge ..." again before my colourschemes are obeyed.
  • There are no instances of autocutsel running
  • My background image is not set.
  • Also, seemingly my custom configuration commands (e.g. mod+p -> dmenu) are not being processed. This is resolved by hitting mod+shift+c after logging in, at which point my keybindings work. Not sure if this is the same root cause or something different; I'll open a separate question if required.

All the commands below work successfully in executed in a terminal. I've tried them with and without the --no-startup-id option.

Can anyone suggest some possible further debugging steps?

    # i3init; starts gnome-keyring-daemon
    exec "i3init"

    # Start some applets
    exec "/usr/bin/gnome-settings-daemon"
    exec "/usr/bin/nm-applet"
    exec "/usr/bin/bluetooth-applet"

    # Xresources, xmodmap, start urxvt daemon

    exec --no-startup-id "/usr/bin/xmodmap /home/<user>/.keymap"
    exec --no-startup-id "/usr/bin/urxvtd -q -f -o"
    exec --no-startup-id "/usr/bin/xrdb -merge /home/<user>/.Xresources"

    # Start autocutsel to sync clipboards
    exec --no-startup-id "/usr/bin/autocutsel -f -s PRIMARY"
    exec --no-startup-id "/usr/bin/autocutsel -f -s CLIPBOARD"
    exec --no-startup-id "/usr/bin/autocutsel -f -s SECONDARY"

    # Set background
    exec --no-startup-id "/usr/bin/feh --bg-scale /path/to/some/image.jpg"
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2012-11-22 22:41:25 +0000

Chris Jefferson gravatar image

I think your problem is that exec does not take a quoted string when you want to pass arguments.

Try replacing your strings with (for example)

exec --no-startup-id /usr/bin/autocutsel -f -s PRIMARY
edit flag offensive delete link more

Comments

Do you know why arguments can't be passed in quoted strings? Seems a bit counter-intuitive, as I usually encounter the reverse case, i.e. that extra arguments can't be passed unless the command is quoted.

eddie-dunn gravatar imageeddie-dunn ( 2015-06-05 13:36:45 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2012-11-22 19:36:06 +0000

Seen: 5,112 times

Last updated: Nov 22 '12