Skip to content

tmux-continuum doesn't work when .tmux.conf is a symbolic link in WSL 2 #138

@kevin-ctera

Description

@kevin-ctera

I recently started using WSL 2 instead of WSL 1. With the change, I found that tmux-continuum was no longer working.

I found it is related to having a symbolic link for .tmux.conf.

$ ls -al .tmux.conf

lrwxrwxrwx 1 kevin kevin 40 Oct 26 11:12 .tmux.conf -> /gdrive/gapps/genv/linux/home/.tmux.conf

I do this because I set up Linux in multiple environments and have to bring up new ones from time to time and can run a script I've created to create links to config files and keep changes/additions in sync between environments.

As a workaround, I've had to change .tmux.conf to a regular file and tell it to source a different file that I update:

$ cat .tmux.conf

# workaround symbolic link issue in WSL 2 for tmux-continuum
source-file /mnt/c/Users/kevin/gdrive/gapps/genv/linux/home/.tmux.conf.main

Plugin content of .tmux.conf.main

$ tail -15 /mnt/c/Users/kevin/gdrive/gapps/genv/linux/home/.tmux.conf.main


# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session' # for vim
set -g @continuum-save-interval '5'
set -g @override_copy_command 'clip.exe'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

I did not find that any other plug-ins are having issues with the symbolic link in WSL 2 outside of tmux-continuum (EG: prefix + Ctrl-s - save, prefix + Ctrl-r - restore work as expected).

The symbolic link doesn't matter in WSL 1 and all plugins work as expected

Is it possible to determine what causes this behavior and fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions