Sponsored Content
Full Discussion: Tmux on AIX
Operating Systems AIX Tmux on AIX Post 303038628 by topcat on Sunday 8th of September 2019 06:31:27 PM
Old 09-08-2019
Ok, tmux is now installed and running! Let's make it beautiful Smilie

1. Set terminal to 256 colour mode by setting TERM in your shell:
Code:
export TERM=xterm-256color

2. The IBM supplied terminfo settings for xterm-256color (use infocmp xterm-256color to view it) are missing the the entries for the setab and setaf features, which tell the terminal how to set background and foreground colours, respectively. Run man terminfo and search for setb, setf. Running tmux info inside a tmux session will show the missing entries. This is fixed by the following code in .tmux.conf:
Code:
# Supply missing terminal features: set foreground/background colours.
 set-option -s terminal-overrides[0] "xterm-256*:setab=\e[4%p1%dm:setaf=\e[3%p1%dm"

Now you should have 256 colours. I am attaching my .tmux.conf as an example.


Code:
# Supply missing terminal features: set foreground/background colours.
set-option -s terminal-overrides[0] "xterm-256*:setab=\e[4%p1%dm:setaf=\e[3%p1%dm"

# Enable mouse
set-option -g mouse on

# Remap window navigation to vim
unbind-key j
bind-key j select-pane -D
unbind-key k
bind-key k select-pane -U
unbind-key h
bind-key h select-pane -L
unbind-key l
bind-key l select-pane -R

unbind-key C-v
bind-key C-v last-window

# Access clipboard
# move x clipboard into tmux paste buffer
unbind-key C-p
bind-key C-p run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
unbind-key C-y
bind-key C-y run "tmux save-buffer - | xclip -i -selection clipboard > /dev/null"

# Set 256 colour terminal
#set -g default-terminal "screen-256color"

# Status bar colour
set -g status-bg colour28
set -g status-fg colour255

# Activity
setw -g monitor-activity on
set -g visual-activity off
# Highlight active window
setw -g window-status-current-style bg=colour19

# Additional mouse setup
bind-key -n MouseDown3Status new-window -a -t=
bind-key -n MouseDrag1Status swap-window -t=

# Intelligent scrolling
bind -n WheelUpPane if-shell -Ft= '#{?pane_in_mode,1,#{mouse_any_flag}}' \
        'send -Mt=' 'if-shell -Ft= "#{alternate_on}" \
        "send -t= Up" "copy-mode -et=\; send -Mt="'
bind -n WheelDownPane if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
        'send -Mt=' 'if-shell -Ft= "#{alternate_on}" \
        "send -t= Down" "send -Mt="'

# For emacs
setw -g xterm-keys on

# History for Ctrl-B :
set -g history-file ~/.tmux_history

These 3 Users Gave Thanks to topcat For This Post:
 

4 More Discussions You Might Find Interesting

1. AIX

Nim on AIX 7.1 used to migrate AIX 5.3 to AIX 6.1...is possible?

Using nimadm: nimadm -j nimadmvg -c sap024 -s spot_6100 -l lpp_6100 -d "hdisk1" -Y Initializing the NIM master. Initializing NIM client sap024. 0505-205 nimadm: The level of bos.alt_disk_install.rte installed in SPOT spot_6100 (6.1.3.4) does not match the NIM master's level (7.1.1.2).... (2 Replies)
Discussion started by: sciacca75
2 Replies

2. AIX

Will it affect my AIX LPAR security, when i set up email alerts on AIX server.

Hello, I've set up email alerts on AIX Servers. so that i can get email notifications (via mail relay server) when ever there is abnormal behavior. for example 1) my script monitors CPU/disk/memory etc... when it reaches high water ark, it will send an email alert. 2) disk usage alerts 3)... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. UNIX for Beginners Questions & Answers

Tmux - pane current command - help !

Hello Experts ! i have started using tmux recent past . So far so good . while exploring the option , i found an option as I log into terminal where i enabled the tmux , and then i log onto a taxi server and then to my application server. My expectation is when i going aound the paths on... (1 Reply)
Discussion started by: radha254
1 Replies

4. UNIX for Beginners Questions & Answers

Installing tmux on RHEL 6.5

Hi, I am trying to install tmux on vm allocated to me in my company . i am very new to linux. I have the root access on it. Can someone please provide the exact steps to get it installed. I tried: 1. Using yum, i get the below message. # yum install tmux Loaded plugins: security... (6 Replies)
Discussion started by: kunwar
6 Replies
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy