You are not logged in.

#1 2015-04-07 23:00:51

inkdinky
Member
Registered: 2011-12-08
Posts: 66

[Solved] Failing at getting tmux to use my config file

Pretty simple, right?
I'm failing epically!
   

tmux -f .tmux.conf.test

gets me nowhere.
tmux is reporting as 1.9a.
I copied and pasted the two examples shown here https://wiki.archlinux.org/index.php/Tm … ialization to no avail (I changed the `Command` to `emacs`.)

Contents of my .tmux.conf.test

new  -n WindowName0 emacs Command
neww -n WindowName1 emacs Command1
neww -n WindowName2 emacs Command2

I'm on xterm with up to date e'erything

I'm not a newb, but dang it I sure feel like one right now!

Any help is appreciated!

Last edited by inkdinky (2015-04-08 00:22:09)

Offline

#2 2015-04-07 23:07:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Failing at getting tmux to use my config file

"Command" is a placeholder: you have to pass the program (emacs, in this case) an actual command that it can execute (and one that doesn't exit immeditaely upon completion, otherwise you will never see the window)...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-04-07 23:25:43

inkdinky
Member
Registered: 2011-12-08
Posts: 66

Re: [Solved] Failing at getting tmux to use my config file

But wouldn't

emacs Command

work? If I enter that on the command line it'll start emacs and have a file called Command that I'll be editing? I'm using the no-x emacs.

I even tried

tmux -f /usr/share/tmux/t-williams.conf 

and that didn't seem to take. I'd have expected C-b (the default) to have been rebound to C-a etc but that doesn't seem to be the case. I still create only with C-b.

Last edited by inkdinky (2015-04-07 23:31:01)

Offline

#4 2015-04-07 23:29:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Failing at getting tmux to use my config file

Have you restarted your server?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-04-07 23:33:09

inkdinky
Member
Registered: 2011-12-08
Posts: 66

Re: [Solved] Failing at getting tmux to use my config file

After doing my pacman update, I restarted.

Or by `server` are you referring to tmux?

Sounds newbish, but I just want to be clear. Not sure if you were referencing tmux as a window server and I needed to restart that somehow.

Offline

#6 2015-04-07 23:34:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Failing at getting tmux to use my config file

Yes, your tmux server. It won't pick up changes to your config unless it is restarted, or you explicitly reload it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-04-08 00:06:38

inkdinky
Member
Registered: 2011-12-08
Posts: 66

Re: [Solved] Failing at getting tmux to use my config file

Hmmm  I'm confused.
If I

 tmux -f /usr/share/tmux/t-williams.conf

I don't get the keybindings I'd expect.
But if I

tmux

and then

C-b : source-file /usr/share/tmux/t-williams.conf

I see the keybindings I'd expect.

I wasn't sure how to restart tmux.  There doesn't seem to be any mention of restarting tmux on the man page. And if I exit out of tmux and enter back in, it still doesn't seem to read the specified config.

I'd expect when starting tmux with a -f somefile.conf that it would apply those settings to that session, but it doesn't seem to do that. Or is there a step I'm missing?

Right now after exiting and starting tmux again I get the t-williams.conf still being applied.

Only when I start tmux and then source-file some.conf am I getting the config settings to take place.

Am I misinterpreting the -f option?
From the man page

The configuration file is a set of tmux commands which are executed in sequence when the server is first started.  tmux loads configuration files once when the server process has started.  The source-file command may be used to load a file later.

Which I interpret as not needing a restart if specified when tmux is first started.

Offline

#8 2015-04-08 00:21:09

inkdinky
Member
Registered: 2011-12-08
Posts: 66

Re: [Solved] Failing at getting tmux to use my config file

I think I now fully understand.
I had a session of tmux running in another xterm while I was in my other xterm trying to get tmux to use the configuration file I was running.
That seems to be the reason why only

C-b : source-file /some/conf/file

would work.
Specifying the configuration file on the command line wasn't working either because the server was already running. Therefore the only way to override the config was to use the source-file method.
Once I exited out of the other tmux session in the other xterm was tmux *truly* being restarted.

Thanks jasonwryan for the help. Sorry for being dense.

Offline

#9 2015-04-08 00:26:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Failing at getting tmux to use my config file

No problem: glad you got it sorted.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB