43 votes

Getting 256 colors to work in tmux

As per the tmux FAQ, add this to your ~/.tmux.conf: set -g default-terminal "screen-256color" Then add this alias for tmux: alias tmux='tmux -2' No need to override the TERM variable in ...
user1338062's user avatar
29 votes
Accepted

Is there a way to persistently disable the menu bar in Konsole on Gnome 3?

There are actually two different settings. The one you described in your question, Ctrl+Shift+M or Settings > Show Menubar is for the current window only. You can disable the menubar for newly ...
maetthu's user avatar
  • 426
20 votes
Accepted

Scrolling is disabled all of a sudden in terminal

Perhaps you ran a subshell from an editor, and it left the terminal in the alternate screen. You can test that by tput rmcup which would return to the normal display. While in the alternate screen,...
Thomas Dickey's user avatar
20 votes

Getting 256 colors to work in tmux

For people who have latest tmux, the .tmux.conf option from the accepted answer should work. I only want to add that you will probably need to restart tmux for the new configuration to take effect: ...
mast3r's user avatar
  • 301
19 votes
Accepted

possible to join/attach Konsole windows?

I can not tell if and when this changed, but with Konsole 20.08.1 (I could test it on Arch Linux), detached tabs can be re-attached to their original window by: Dragging them by their label in the ...
fra-san's user avatar
  • 10.2k
18 votes

Ugly Horizontal Lines Displayed in Kate and Konsole with Fractional HiDPI Scaling

Upgrading to Qt 5.12 is fine, but does not seem to fix the issue straight away. In Konsole profile settings under the advanced tab, change "Line Spacing" to 1. This has fixed the issue with horizontal ...
ismay7's user avatar
  • 181
11 votes

Getting 256 colors to work in tmux

Following lines in ~/.tmux.conf worked for me -- set -g default-terminal "xterm-256color" set-option -ga terminal-overrides ",xterm-256color:Tc" Tested on Tmux 2.7, Ubuntu 16.04,...
user3496912's user avatar
11 votes

Getting 256 colors to work in tmux

I could not explain why this works but it solved the problem for me. ~/.tmux.conf set-option -g default-command bash
John Snow's user avatar
  • 219
10 votes
Accepted

Ugly Horizontal Lines Displayed in Kate and Konsole with Fractional HiDPI Scaling

This is reported to have been resolved in QTBUG-66036 with version 5.12. As of the time I am writing this, QT on Arch Linux is version 5.11.2-1. Other common distros have also not released packages ...
BugBuddy's user avatar
  • 648
9 votes
Accepted

KDE Konsole: how to save and restore current session?

Create ~/.konsole/watcher.sh and make it executable (chmod 755 watcher.sh) then add it to the startup applications. We can start konsole in a restored mode with konsole --tabs-from-file ~/.konsole/...
intika's user avatar
  • 14.4k
8 votes

How to clear the bash history when i close the terminal?

You can use a .bash_logout file to specify commands that should be executed when logging out (see e.g. here for more information).
bat's user avatar
  • 148
8 votes
Accepted

How to clear the bash history when i close the terminal?

erase .bash_history cat /dev/null > .bash_history or >.bash_history add a trap to .bashrc trap "history -c" EXIT
Yunus's user avatar
  • 1,684
7 votes
Accepted

How to unsplit the screen in konsole?

Most likely you accidentally hit Ctrl+( (split view left/right) or Ctrl+) (split view top/bottom). To revert that, use Ctrl+Shift+W (default shortcut) to close them one by one. More information is in ...
apiz's user avatar
  • 86
7 votes

How to clear the bash history when i close the terminal?

The bash documentation (see man bash) includes this about history, Shell Variables The following variables are set by the shell: [...] HISTFILE The name of the file in which command history is saved ...
Chris Davies's user avatar
5 votes
Accepted

Ctrl-Enter for Midnight Commander not working in X terminals in Fedora, working in OpenSuse

tl;dr: Get used to Alt+Enter (a.k.a. ESC followed by Enter) instead. Ctrl+Enter generates the exact same sequence in terminal emulators as Enter, so there's no way for an app to distinguish these two....
egmont's user avatar
  • 5,886
5 votes

Ugly Horizontal Lines Displayed in Kate and Konsole with Fractional HiDPI Scaling

As a workaround, you could change the Fonts DPI: go to Fonts, check the box Force Fonts DPI set to an appropriate value (I use 144 on a 2560x1440 screen, you may want to try 192 in 4K) Higher DPI ...
nico's user avatar
  • 183
5 votes

Ugly Horizontal Lines Displayed in Kate and Konsole with Fractional HiDPI Scaling

Another workaround is setting Line Spacing to 1 under Settings -> Edit Current Profile ... -> Advanced -> Terminal Features. It's almost unnoticeable (one extra pixel between lines), but fixes the ...
J. Doe's user avatar
  • 51
5 votes
Accepted

Is there a way to turn off highlighting of pasted text in Konsole on Plasma 5.21?

It is a bash feature, not Konsole. Use this command to turn it off: bind 'set enable-bracketed-paste off'
grzegom's user avatar
  • 66
5 votes
Accepted

img2pdf: get pages in good order

Your best option is to rename the files so that they all have the same number of zero-padded digits, using the perl rename utility (this has different names on different distros, including perl-rename,...
cas's user avatar
  • 78.6k
5 votes
Accepted

Why do I see a black-and-white emoji in console with Noto Color Emoji font installed?

The emojis are shown by the font selected in the terminal/console and the ones from the emoji fonts in color are not taking precedence over them. So it's basically the (limited) emoji support of your ...
gertvdijk's user avatar
  • 14k
4 votes

Scrolling is disabled all of a sudden in terminal

The reset command helped me in this case
pkk's user avatar
  • 41
4 votes

Getting 256 colors to work in tmux

Really important note here if you're running an Ubuntu older than Bionic (18.04). If you're running tmux 2.1 or older, and you probably are, basically no advice you read online about tmux will work.....
zzxyz's user avatar
  • 319
4 votes

How to automatically record all your terminal sessions with script utility

Instead of: test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || I would use: grep -qx "$PPID" <(pgrep -x "script") || The double-quotes aren't necessary in this case, but I tend ...
William Dye's user avatar
4 votes
Accepted

changing prompt color in bash in konsole

Applications running in the terminal, such as the shell, send escape sequences to the terminal to change the appearance of subsequent output. The escape sequence to change the character attributes is ...
Gilles 'SO- stop being evil''s user avatar
4 votes
Accepted

How can KDE Konsole be prevented from trapping the Ctrl/Alt/Shift + Cursor keys?

This can partly be done in the Settings->Configure Shortcuts menu in Konsole. As can be seen from the image the Shift Right key was for navigating to the next tab, and it has been disabled. The ...
vfclists's user avatar
  • 7,531
4 votes
Accepted

colorize hostname in command line prompt

Background After the expansion is done for special prompt sequences, every character remaining in the prompt is counted in order to calculate the length of the prompt. Problem Since you've added ...
Iskustvo's user avatar
  • 957
4 votes

img2pdf: get pages in good order

You can use the shell to expand the filenames in the correct order. In bash, you can use brace expansion if you know the number range: img2pdf Vol_{1..430}.tif -o out.pdf Or using regular wildcards, ...
L. Scott Johnson's user avatar
4 votes
Accepted

Open Konsole terminal always in split view

The following should work. Create a json file (filename layout.json or any filename you want) with this content: { "Orientation": "Vertical", "Widgets": [ { ...
Edgar Magallon's user avatar
3 votes
Accepted

Emulating VT220 escape sequences in Konsole keytab

Konsole ignores that, because it relies upon a hard-coded list of keys which cannot be mapped: // Override any of the following shortcuts because // they are needed by the terminal int keyCode = ...
Thomas Dickey's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible