So say I'm running a Linux server that is running irssi in a tmux session.(Detached) My question is, when I ssh into the server and reattach the session, will my shortcuts that I use on the 2nd PC take effect? So will irssi and tmux the session follow the settings I have in the pc that is doing the accessing, or will it follow the server settings?

I am asking for the settings for tmux and irssi.

  • 2
    The question is incomplete. What type of settings are you asking about? irssi? tmux? terminal? – tink May 13 '13 at 0:37
  • @tink, fixed it to reflect that. – Rivasa May 13 '13 at 1:08
  • @Link - can you try and expand on the portions of your question regarding the settings some more? Everyone here is eager to help, but there is still some confusion with respect to what it is your asking. Please try and clarify what you mean when you use the term "shortcut", for example. – slm May 13 '13 at 4:32

This type of confusion comes up quite a bit with people that are new to Unix in general and also the whole business of remotely connecting from one Unix system to another, so here's a canonical answer that hopefully will help others in the future as well.

Say this is your scenario:

       .----------.                    .----------.
       | Server S |                    | Client C |
       |          |                    |          |
       |          |                    |          |
       '----------'                    '----------'
       /home/user1                     /home/user1              
       /home/user1/.tmux.conf          /home/user1/.tmux.conf   
       /home/user1/.irssi/config       /home/user1/.irssi/config

user accounts

In the above situation, we have 2 computers, and 2 user accounts. 2 accounts? Yes even though these 2 systems have the same user, user1, these accounts are completely unrelated to each other, other than they happen to have the same name.


If you have software installed on both systems, the software on the 2 systems is completely unrelated from one another. So for example you could have tmux version 1 on Server S, while Client C could have version 2.

You can check what version a compute has like so:

$ tmux -V
tmux 1.4

$ irssi -v
irssi 0.8.15 (20100403 1617)

settings & home directories

Most Unix software makes use of setting files, aka. configuration files. These files typically reside in a user's "home" directory, aka. /home/user1, in our example above.

NOTE: Other users have their own home directories, aka. /home/user2, etc.

So each application will typically keep a default set of settings in your "home" directory in locations such as:




There is no true consistency in how these are named. You'll notice that they contain a period (".") in front of them. This is so that when you do an ls in the "home" directory these configuration files are omitted from the output.

For example:

$ ls
adir1  adir2  afile1  afile2

$ ls -a
.  ..  adir1  adir2  afile1  afile2  .irssi  .tmux.conf

The first command shows everything minus these period (aka. dot files), while the second version of this command, includes a switch, -a, which shows these "hidden" files.

settings (fancy word for this is configurations)

So now with some foundation we can better understand your question. Hopefully it's obvious at this point that the configuration settings on one system, are completely independent of settings on another system.

For example:

The version of tmux on Server S could be at say version 1, meanwhile tmux on Client C could be at version 2, and maybe these 2 versions have different features and/or capabilities, so the settings files on these 2 systems would be completely different from one another.

So typically what people will do is maintain the files in a master location, and then copy (or push) them out to the various systems that they use them on. Taking care to maintain any differences between the various versions they may encounter.

This may seem painful but it's actually nice in the sense that it forces you as the user to manage the files in a more thoughtful and controlled way, rather than letting them just float wildly, like a rudder on a sailboat, with no one at the helm.

Also there are tools (scp and/or rsync) to help facilitate the management and/or movement of the files, but that's another topic all together.

which settings are getting used?

So when you ssh into Server S and start up a tmux session you're using the tmux settings from the user1 that's local to Server S. If you disconnect from Server S, and then later connect to it from Client C, you're still using the configuration files from Server S.

Keep this in the back of your mind. The settings that will get used are the ones that are local to where the software is running. tmux is running locally on Server S, so it will be using the settings local to Server S. The same goes for irssi.

The ssh connection. You're running the ssh client, locally on Client C, to connect to Server S, so the ssh configurations that are being used, are the ones local to Client C.

  • You put so much effort in your answer (I appreciate that) but I am afraid it doesn't cover the questioner's problem at all. – Hauke Laging May 13 '13 at 3:59
  • How do you figure? Please elaborate on what points it's not covering. Always looking to make answers as strong as possible. – slm May 13 '13 at 4:02
  • It's of course hard to explain why a statement does not answer a question. The problem here is not that there are separate config files on both systems. The non-trivial problem (which kept me from answering) is: How do the terminal settings of the client system interact with the terminal settings on the server. I assume that some changes are evened out by the tmux client. – Hauke Laging May 13 '13 at 4:08
  • Can you be more specific when you say "terminal settings"? I've re-read the OPs question several times and there is something in the way that he/she phrases "shortcuts..take effect" that I kept mulling over. This is why I structured my answer the way I did, in an attempt to maybe help draw out from the OP exactly what he/she's asking in more accurate terminologies. – slm May 13 '13 at 4:13
  • Terminal settings is a very vague term, are we meaning the stty terminal settings, or the configuration settings within tmux itself, for example. – slm May 13 '13 at 4:15

After the clarification: those two "travel" with the server; the client from which you connect won't impact on either.


Once you start your IRC client inside of a terminal multiplexer both of the applications read their respective configuration from storage (which is probably the disk on the server). Once the applications are running, the configuration stays unchanged (unless you explicitely change it, of course). No matter where from where you are going to connect to the session, the shortcuts are going to be the same.

Hence quite generally: the effective settings are those of the running program in question.

To prevent confusion it is a good idea to keep your settings synchronised, either by using network file-system for home directory or storing the configuration under a VCS (preferably a distributed one and synchronising frequently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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