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

What shell does ‘exec’ actually use and how can I change it?

asked 2015-08-08 19:51:31 +0000

k.stm gravatar image

updated 2015-08-08 20:00:45 +0000

This might be a non-i3-question after all.

In the i3 docs, it says that

“What good is a window manager if you can’t actually start any applications? The exec command starts an application by passing the command you specify to a shell,”

but what shell are the commands actually passed to? My user’s shell is set to /bin/zsh, but apparently exec invokes command via /bin/sh. How can I change that?

I use debian testing/unstable, should that matter.

Background: I use an i3 key binding to invoke urxvtcd -e emacs -nw, but evaluating (getenv "PATH") from within emacs gives me then the wrong environment (whereas (getenv "SHELL") gives me /bin/zsh).

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2015-08-08 23:20:10 +0000

Airblader gravatar image

i3 uses /bin/sh because this is available everywhere. You cannot modify this. Leaving aside the question of why your /bin/sh doesn't just point to zsh, you can do this:

exec /bin/zsh whatever.sh
edit flag offensive delete link more

Comments

Or `exec zsh -c whatever`. Ok.

k.stm gravatar imagek.stm ( 2015-08-09 15:23:30 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2015-08-08 19:51:31 +0000

Seen: 283 times

Last updated: Aug 08