

You may want to put all your additions into a separate file like #alias vdir='vdir -color=auto' alias grep='grep -color=auto'Įxport GCC_COLORS='error=01 31:warning=01 35:note=01 36:caret=01 32:locus=01:quote=01'Īdd an "alert" alias for long running commands. Test -r ~/.dircolors & eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" If this is an xterm set the title to "$TERM" \w\a]$PS1"Įnable color support of ls and also add handy aliases # a case would tend to support setf rather than setaf.) (Lack of such support is extremely rare, and such # We have color support assume it's compliant with Ecma-48 Should be on the output of commands, not on the prompt Off by default to not distract the user: the focus in a terminal window

Uncomment for a colored prompt, if the terminal has the capability turned Xterm-color|*-256color) color_prompt=yes Set a fancy prompt (non-color, unless we know we "want" color) Set variable identifying the chroot you work in (used in the prompt below) Make less more friendly for non-text input files, see lesspipe(1) Match all files and zero or more directories and subdirectories.shopt -s globstar If set, the pattern "**" used in a pathname expansion context will If not running interactively, don't do anythingĭon't put duplicate lines or lines starting with space in the history.Īppend to the history file, don't overwrite itįor setting history length see HISTSIZE and HISTFILESIZE in bash(1)Ĭheck the window size after each command and, if necessary, See /usr/share/doc/bash/examples/startup-files (in the package bash-doc) ~/.bashrc: executed by bash(1) for non-login shells. In case user has configured the command, and it isn't executable, I recommend an optional error message.OK. With this list starting with user configuration and ending with your hard-coded list, check each command and see if it's executable and pick the first one that is.Put aliases such as x-terminal-emulator with higher priority in the list. Collect a list of commonly used terminal emulators.Use this as the second highest priority when available. Use XDG_CURRENT_DESKTOP environment variable, and implement logic for each desktop environment to read their configuration to find out the configured default emulator.Use this with highest priority if configured. Here is a reasonable strategy for choosing the command in your program: Each desktop environment that has a concept of "default terminal emulator" has their own way of configuring it.ĭebian has has "update-alternatives" system that allows configuration of "default" applications based on aliases, and it has a package that creates an alias x-terminal-emulator that can be used to configure the default terminal emulator.
#Xterm uxterm lxterminal how to#
No, there is no general way in the Linux kernel to find out which (or whether a) terminal emulator is installed on the system by default.Īlthough the (fairly ubiquitous) specifications describe how to associate MIME type with a default application, there isn't a specification for default application without an associated file to be opened as far as I can tell.
