Last active
September 7, 2023 05:20
-
-
Save glenntam/8af4e51992d7339f749cc0ecdb69b49e to your computer and use it in GitHub Desktop.
HOWTO: mosh + tmux + browsh in 24bit True Color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Do you want to use mosh + tmux + browsh in glorious 16-million 24bit true color on your VPS? | |
# Of course you do. Here's how: | |
# First, you need to recompile Mosh from source to enable true color. | |
# (Among other things, you need protobuf to compile mosh). | |
apt update | |
apt install build-essential debhelper autotools-dev protobuf-compiler libprotobuf-dev dh-autoreconf pkg-config libutempter-dev zlib1g-dev libncurses5-dev libssl-dev bash-completion locales | |
cd $HOME | |
git clone https://github.com/mobile-shell/mosh | |
cd mosh | |
./autogen.sh | |
./configure | |
make | |
make install | |
# Next, install tmux, and make it report 24bit true color: | |
apt install tmux | |
echo "set-option -ga terminal-overrides \",xterm-256color:Tc\"" >> $HOME/.tmux.conf | |
tmux | |
# The final piece is to install browsh, whose only dependency is firefox | |
apt install firefox | |
cd $HOME | |
wget https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb | |
dpkg -i browsh_1.6.4_linux_amd64.deb | |
# otherwise, check out https://www.brow.sh/downloads/ for your respective distro | |
# Test with: | |
curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash | |
# now browsh and enjoy! | |
### addendum ### | |
# These are all for the VPS side, of course. The computer you are using also has to support true colors in the first place! | |
# If your local terminal emulator is iTerm2, for example, you can report your terminal as xterm-256color in Profiles -> Terminal -> Terminal Emulation | |
# Your local version of Mosh also needs to be true color-enabled. If your client is a Mac, for example, just do: | |
#brew install mosh --HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment