-- Leo's gemini proxy

-- Connecting to gmi.noulin.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Setting up the linux virtual consoles


Feed


date: 2022-02-07 16:19:08


categories: tools


firstPublishDate: 2021-02-12 21:15:44


Which terminal programs do I use?


developer tools: gcc, gdb, git,...

text editor: vim

remote shell: ssh

copy files between computers: sftp

terminal multiplexer: tmux, screen

file managers: mc (midnight commander), ranger, ncdu

web and gemini browser: w3m

email: mutt

newsgroups: slrn

system monitoring: htop, iotop, iftop,...

music player: mocp


What are the linux virtual consoles?


After the boot menu, linux boots and shows text the first console. In the 90s, the consoles were in text mode but nowadays they are in graphical mode. A linux virtual console is like a full screen terminal and the latency (time between key pressed and something appearing on screen) is lower than in graphical environment, the latency is under 15ms when the screen displays 60 frames per second.


To access console 3, press: **ctrl+alt+F3**


On debian buster, **ctrl+alt+F1 and F2** are the graphical user interface and the consoles are on **ctrl+alt+F3 to F6**.


w3m is terminal web browser able to display images on web pages in the consoles. A graphical alternative to w3m running in the framebuffer is netsurf, to learn how to install netsurf in debian buster follow the instructions in this

post

.


The consoles are able to display text, images and millions of colors.


Other keys for switching console:


WIN + Arrow left/right: previous/next console

ALT + Fn: Switch to console n

WIN + Fn: Switch to console n


Other keys:


SHIFT + Page up/Page Down: Scroll up or down

ALT(GR) + Printscreen: Switch to last console

CTRL + ALT + DEL: Reboot

ALT + Printscreen + K: logout from console

CTRL + .: Compose, in debian the configuration are in /etc/console-setup/*.inc


In tmux, pane resizing doesn't work unsing the keys CTRL + b + CTRL + ARROWS, use the tmux command prompt instead:


CTRL + b + :
resize-pane -R 10

This command resizes current pane to the right by 10 columns


I open photos with `fbi` and pdfs with fbgs:


fbi IMG_0484.JPG
fbgs -xxl file.pdf

For watching video in the linux console, I use mplayer with the framebuffer video output:


mplayer -vo fbdev2 video_file.mp4

Setup


To change to the cursor to plain rectangle, run this command:


sudo echo 0 > /sys/module/vt/parameters/cur_default

Mouse


The mouse is handled with the gpm packages:


sudo apt-get install gpm

Sometimes gpm stops working, so I restart it with:


/etc/init.d/gpm restart

Colors


I use `setvtrgb` program to setup the console 16 color palette.


I create the file `linuxConsoleColor.txt` which correspond to the tango color theme in gnome-terminal:


46,204,78,196,52,117,6,211,85,239,138,252,114,173,52,238
52,0,154,160,101,80,152,215,87,41,226,233,159,127,226,238
54,0,6,0,164,123,154,207,83,41,52,79,207,168,226,236

Line 1: red components

Line 2: green components

Line 3: blue components


Then run the command:


setvtrgb linuxConsoleColor.txt
clear

Set font


setfont /usr/share/consolefonts/Uni2-TerminusBold20x10.psf.gz

For permanent changes, use `setupcon` to change the values in `/etc/default/console-setup`


Screensaver


Run:


setterm -blank 10

to enable screensaver after 10 minutes


Boot to console


sudo systemctl set-default multi-user.target

Undo boot to console:


sudo systemctl set-default graphical.target

hashtags: #linux


Feed

-- Response ended

-- Page fetched on Tue May 21 22:42:48 2024