Skip to content

Instantly share code, notes, and snippets.

@jaimet
jaimet / terminal-control.sh
Created September 29, 2022 18:45 — forked from bcap/terminal-control.sh
Useful terminal control characters
# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
@jaimet
jaimet / xinit-precedence.md
Created October 26, 2023 15:54 — forked from deomorxsy/xinit-precedence.md
Xinit's precedence order after invoked with startx

Part I

"If you log in in text mode then start a GUI session with xinit or with the wrapper script startx, then xinit does the following things:

  • Start an X server (typically through the script /etc/X11/xinit/xserverrc).
  • Usually run some scripts in /etc/X11 (typically /etc/X11/xinit/xinitrc), depending on how it's set up.
  • Run ~/.xinitrc, if it exists. If it doesn't exist, run a default client (traditionally xterm).
  • Once ~/.xinitrc terminates, kill the X server.

If you log in in graphical mode on an X display manager (xdm, gdm, kdm, wdm, lightdm, …), traditionally, what is executed after you log in is some scripts in /etc/X11 then ~/.xsession.