You are not logged in.

#1 2018-12-08 20:07:49

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

[solved] pass and urxvt+tmux problem

I use urxvt+tmux and have a silly problem with pass utility. I have installed it recently and try to understand. I have initialized the password store. Then I try to create a new password:

$ pass insert "archlinux.org/wiki/Kirill Bugaev"
Enter password for archlinux.org/wiki/Kirill Bugaev:

I type password, tap Enter, but nothing happens. Cursor stays on the end of Enter password for archlinux.org/wiki/Kirill Bugaev: line and I should run Ctrl-C to go back to shell.
When I try to remove hierarchical name:

$ pass rm archlinux.org/wiki
Are you sure you would like to delete archlinux.org/wiki/? [y/N] y^M

I tap y, then Enter and get ^M. Then I should to run Ctrl-C again.
But everything works fine in xterm. I never had such issue with urxvt+tmux before. Pass is only utility which behaves this way.
tmux 2.8, rxvt-unicode (urxvt) v9.22 - released: 2016-01-23

Last edited by Kirill Bugaev (2018-12-09 12:28:22)

Offline

#2 2018-12-08 20:12:31

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

Re: [solved] pass and urxvt+tmux problem

Please paste the output of `echo $TERM` from both Urxvt and Xterm.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-12-08 20:31:30

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] pass and urxvt+tmux problem

urxvt

$ echo $TERM
tmux-256color

xterm

$ echo $TERM
xterm

Oops. It is tmux problem, urxvt+tmux is exact. I have tried pass insert in urxvt without tmux and xterm+tmux, both work fine.

Last edited by Kirill Bugaev (2018-12-08 20:37:26)

Offline

#4 2018-12-08 20:38:46

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

Re: [solved] pass and urxvt+tmux problem

So, paste your tmux.conf...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-12-08 20:44:50

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] pass and urxvt+tmux problem

.tmux.conf

# Meta(Alt) key can not work because I set Urxvt.meta8: true in .Xresources.
# That is needed for <Alt> works in Vim.

# Make tmux behaves more like xterm
#set-window-option -g xterm-keys on

# Change tmux prefix Ctrl-b to Alt-a
unbind C-b
set -g prefix M-a
bind M-a send-prefix

# Disable Esc (Alt+) key delay
set -s escape-time 0

# Browsing URLs
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n "urlview" '$SHELL -c "urlview < /tmp/tmux-buffer"'

# 256 colour terminal
set -g default-terminal "tmux-256color"

# limit the scrollback buffer
set -g history-limit 10000

# override treminal emulator settings
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
set -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'

# Switch between panes with vim-tmux-navigator
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?|ssh|mosh?|tmux)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h"  "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j"  "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k"  "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l"  "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l

# Now you should clear screen with "prefix Ctrl-l"
bind C-l send-keys 'C-l'

# Resize panes with Ctrl-{Arrows}
bind-key -n C-Left resize-pane -L
bind-key -n C-Right resize-pane -R
bind-key -n C-Up resize-pane -U
bind-key -n C-Down resize-pane -D

# "prefix h" and "prefix v" horizontal and vertical splits
bind-key h split-window -v
bind-key v split-window -h

# Swap panes with window rotation
bind-key C-n swap-pane -s :+.top \; rotate-window -Ut :+
bind-key C-p swap-pane -s :+.bottom \; rotate-window -Dt :+

# mouse
set -g mouse on
bind-key m set-option -g mouse on \; display 'Mouse: ON'
bind-key M set-option -g mouse off \; display 'Mouse: OFF'

# status bar
# Switch on/off status bar with Ctrl-b + b, Ctrl-b + B
bind-key b set-option -g status on
bind-key B set-option -g status off

# copy mode vi-style
setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

# merge tmux and system copy/paste buffers
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
bind-key ] run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"

# reload an updated configuration
bind-key r source-file ~/.tmux.conf

# terminal emulator window titles
set -g set-titles on
set -g set-titles-string "#T"

# Color theme
source-file ~/.tmux/color_theme.conf
 

~/.tmux/color_theme.conf

# Status update interval
set -g status-interval 1

# ! Force switch on status bar !
set -g status on

# Basic status bar colors
#set -g status-fg colour238
#set -g status-bg colour233
set -g status-fg colour15
set -g status-bg colour14

# Left side of status bar
#set -g status-left-bg colour233
#set -g status-left-fg colour243
set -g status-left-bg colour14
set -g status-left-fg colour15
set -g status-left-length 40
set -g status-left "#[fg=colour15,bg=colour11,bold] #S #[fg=colour11,bg=colour14,nobold]#[fg=colour15,bg=colour14] #(whoami) #[fg=colour14,bg=colour11]#[fg=colour15,bg=colour11] #I:#P #[fg=colour11,bg=colour14,nobold]"

# Right side of status bar
set -g status-right-bg colou14
set -g status-right-fg colour15
set -g status-right-length 150
set -g status-right "#[fg=colour11,bg=colour14]#[fg=colour15,bg=colour11] %H:%M:%S #[fg=colour14,bg=colour11]#[fg=colour15,bg=colour14] %d-%b-%y #[fg=colour11,bg=colour14]#[fg=colour15,bg=colour11,bold] #H "

# Window status
set -g window-status-format "  #I:#W#F  "
set -g window-status-current-format "#[fg=colour14,bg=black]#[fg=colour4,nobold] #I:#W#F #[fg=colour14,bg=black,nobold]"

# Current window status
set -g window-status-current-bg colour4
set -g window-status-current-fg colour15

# Window with activity status
set -g window-status-activity-bg colour14 # fg and bg are flipped here due to
set -g window-status-activity-fg colour15 # a bug in tmux

# Window separator
set -g window-status-separator ""

# Window status alignment
set -g status-justify centre

# Pane border
set -g pane-border-bg default
set -g pane-border-fg colour11

# Active pane border
set -g pane-active-border-bg default
set -g pane-active-border-fg colour4

# Pane number indicator
set -g display-panes-colour colour15
set -g display-panes-active-colour colour11

# Clock mode
set -g clock-mode-colour colour4
set -g clock-mode-style 24

# Message
set -g message-bg colour4
set -g message-fg white

# Command message
set -g message-command-bg colour15
set -g message-command-fg black

# Mode
set -g mode-bg colour4
set -g mode-fg colour15

Last edited by Kirill Bugaev (2018-12-08 20:47:28)

Offline

#6 2018-12-08 20:47:40

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

Re: [solved] pass and urxvt+tmux problem

And if you comment out: "set -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'"?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2018-12-08 20:52:49

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] pass and urxvt+tmux problem

I have commented and it works. Oh my god. What does this string mean?
jasonwryan, thank you.

Last edited by Kirill Bugaev (2018-12-08 20:55:21)

Offline

#8 2018-12-08 20:54:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [solved] pass and urxvt+tmux problem

Kirill Bugaev wrote:

Oh my god. What does this string mean?

You're the one who put it in your config, why are you asking us?

It looks like it is a brain-dead attempt to set a terminal emulator title every time the enter key is pressed.

To save trouble in the future, go through your user config(s) and remove any line for which you could ask the above question.  And then stop blindly copy-and-pasting other people's configs.

Last edited by Trilby (2018-12-08 20:56:19)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#9 2018-12-08 21:09:48

Kirill Bugaev
Member
Registered: 2018-08-03
Posts: 173

Re: [solved] pass and urxvt+tmux problem

Trilby wrote:

You're the one who put it in your config, why are you asking us?

It looks like it is a brain-dead attempt to set a terminal emulator title every time the enter key is pressed.

To save trouble in the future, go through your user config(s) and remove any line for which you could ask the above question.  And then stop blindly copy-and-pasting other people's configs.

Trilby, thanks.
I have blindly copied it from ArchWiki tmux

Offline

#10 2018-12-08 21:14:13

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

Re: [solved] pass and urxvt+tmux problem

Kirill Bugaev wrote:

I have blindly copied it from ArchWiki tmux

I have removed that stanza.

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2018-12-08 21:43:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [solved] pass and urxvt+tmux problem

Kirill Bugaev wrote:

I have blindly copied it from ArchWiki

Then I apologize for a large portion of my accusatory tone.  But regardless of where you find a config entry, you should be sure you understand what it is doing before you paste it into your configs.  That said, our wiki should be, and generally is, kept up to avoid passing on problematic advice.  This bit in particular strikes me as odd though as the (now removed) blurb didn't even give an indication of what those lines were for, other than to "override settings".

Last edited by Trilby (2018-12-08 21:48:28)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

Board footer

Powered by FluxBB