I just installed tmux on Ubuntu 10.04 and tried to remap the prefix key to C-a by creating the file ~/.tmux.conf with these lines:

set-option -g prefix C-a
unbind-key C-b

When starting tmux, both regularly and with -f ~/.tmux.conf, the prefix is effectively the same default C-b

There are no errors or warnings whatsoever.

Any idea what's wrong with the loading of the conf?

link|improve this question

49% accept rate
It Works For Me™. Try running strace -s9999 -f -o tmux.strace tmux -c true and post the output of grep -C5 'tmux\.conf' tmux.strace. – Gilles Sep 14 '10 at 20:24
feedback

3 Answers

The file ~/.tmux.conf is loaded when the tmux server is first started. So if there are existing tmux sessions, starting a new session with tmux does not result in reloading the conf file. Try restarting tmux server: Use the command tmux list-sessions to see if there are existing sessions. Exit them (e.g. tmux reattach then kill all windows and exit). Once all sessions are gone, try tmux again. This time the rebinding should work.

link|improve this answer
killall tmux or tmux kill-server will get the job done too – Matt Jun 25 '11 at 2:01
feedback

To reload your ~/.tmux.conf without killing your session, you can simply do:

C-b :source-file /absolute/path/to/your/.tmux.conf
link|improve this answer
feedback

There's also a default keyboard shortcut binding to reload your ~/.tmux.conf, at least in my installation: C-b r. If you hit C-b ? it brings up a list of all bound keyboard shortcuts, so you can see if you have one already defined.

link|improve this answer
That is specific to your installation/configuration. By default, <prefix> r is bound to refresh-client (what you describe would be something like source ~/.tmux.conf). – Chris Johnsen Jan 1 at 3:09
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.