Tag Archives: linux

Tmux on login

to start tmux on login add the following to your ~/.bashrc

# Start Tmux by default
# If not running interactively, do not do anything
if command -v tmux>/dev/null; then
  [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux
fi

Auto attach

to automatically attach to last session or create a new if none available extend your ~/.bashrc and ~/.tmux.conf with the following

~/.bashrc

# Start Tmux by default
# If not running interactively, do not do anything
if command -v tmux>/dev/null; then
  [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux attach
fi

~/.tmux.conf

# if run as "tmux attach", create a session if one does not already exist
new-session -n $HOST

Continue reading Tmux on login

Add and set screen mode using xrandr

This works in ubuntu if you want to set any other screen mode get the according screen line with cvt XRES YRES FREQUENCY
Also the device name may have to be modified but VGA1 is typical for an second monitor which is plugged in via VGA.


xrandr --newmode "1280x1024_60" 109.25 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60
xrandr --output VGA1 --mode 1280x1024_60