Hot answers tagged

29

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 your profile or when starting tmux. More information: http://vim.wikia.com/wiki/256_colors_setup_for_console_Vim


26

Does Ctrl+Alt work? Found it mentioned in a bug tracker, but I can't test it myself as I don't use KDE.


22

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 created windows permanently by unchecking Settings > Configure Konsole > General > Show menubar by default or by changing/adding [KonsoleWindow] ...


18

The newest version of ncurses ships with a tmux-256color terminfo entry (the FAQ does mention this). As an example, a benefit of using tmux-256color over screen-256color is that italics is properly rendered (screen doesn't support italics). So if you have the latest ncurses package, the following will work as well: set -g default-terminal "tmux-256color&...


15

When you press a key or key combination in a terminal, it is transmitted to the application running in the terminal as a sequence of one or more characters. For example, when you press a, the application receives a. When you press Enter, the application receives the character CR (a.k.a. ^M (pronounced “control-emm”), a.k.a. character number 13, a.k.a. \r or \...


15

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, some terminals may override the scroll-wheel action by sending up/down cursor escapes.


13

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 lines for me.


11

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: tmux kill-server && tmux Interestingly, this isn't mentioned anywhere in the answers and took me a while to figure out.


10

Although this question was asked by an individual wanting to record his own sessions, an alternative use case might be a system administrator who wants to keep track of what various users are doing. I fear running script inside the system-wide bashrc might not be suitable in the case when users of the machine are reluctant to have recordings made of their ...


9

(1) gives you an emulation of the terminal. Programs such as Gnome Terminal an Konsole are called "terminal emulator". (2) gives you a real terminal. Alright, it's still an emulation of a terminal, but it's "more real" than (1), because the emulation is done by the kernel itself. (3) is actually the same as (2). When you don't have X you will see tty0, ...


9

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 with Qt 5.12. However, when Qt 5.12 is released, the developers expect this issue to be resolved. To check your Qt version, you can open a terminal and type: ...


8

Using strace you can see what konsole is up to. $ strace -s 2000 -o konsole.log ... ... open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2655, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f316d8fc000 read(3, "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:/sbin/nologin\...


8

You can use a .bash_logout file to specify commands that should be executed when logging out (see e.g. here for more information).


7

I could not explain why this works but it solved the problem for me. ~/.tmux.conf set-option -g default-command bash


7

For the same reason ls -l reads /etc/passwd, it is the data that associates UIDs with names. When ls calls stat(2) on a file it gets a numeric UID for the owner of the file. In order to display that as a human readable name, it needs to look it up in the only place that has those associations, /etc/passwd. For example a typical first line in /etc/passwd is ...


7

You need to first go to settings of konsole: settings -> configure current profile -> Tabs -> Tab title format = %w The konsole by default ignores what is asked for, it does its own thing, as configured. %w tells is replaced by what ever the shell wants it to be. There are other codes, use the insert button it knows all the codes. A brief note on getting ...


6

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 [...]. The default value is ~/.bash_history. If unset, the command history is not saved when a shell exits. So, to allow command history during a session but ...


5

I'd say it's a bug. What version of bash are you running? Your command-line is incorrect, but it shouldn't crash the shell. I'd expect to see output like this: $ cp p2 &2 & [1] 24800 [2] 24801 $ bash: 2: command not found cp: missing destination file operand after `p2' Try `cp --help' for more information. [1]- Exit 1 cp -i p2 [2]+ ...


5

Go to Settings->Edit Current Profile. Select the Mouse tab. There's a check box there: Allow Ctrl+scrollwheel to zoom text size. Untick that and click Apply.


5

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. Well, no way by looking at the input stream it receives from the terminal emulator. mc has an interesting feature called "X11 support". It does not only look ...


5

erase .bash_history cat /dev/null > .bash_history or >.bash_history add a trap to .bashrc trap "history -c" EXIT


4

You can open Konsole in fullscreen mode with konsole --fullscreen (That should work only with KDE 4.11 and newer). However, I assume that you want to be able to open Konsole in fullscreen mode with just clicking icon somewhere, maybe in taskbar. To achieve that, do the following steps: Copy /usr/share/applications/konsole.desktop to either /usr/share/...


4

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..for anything. tmux -V is an easy test for this. If you see 2.1 or older, you can build tmux from source, or you can add an unofficial repository. I updated ...


4

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 translate to bigger text in your screen Set the your display scaling factor back to 1 Logout and login to your user (or restart) At this point the horizontal ...


4

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 issue.


4

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 the color sequences, which in fact shouldn't be counted for the length of a prompt, bash now actually thinks that your prompt is longer than it really is. ...


4

Most likely you accidentally hit Ctrl+( (split view left/right) or Ctrl+) (split view top/bottom). To close views: Ctrl+shift+x to close active view (default shortcut). Ctrl+shift+o to close all but the current view (default shortcut). More information is in the Konsole command reference.


3

Ok I found what was the problem for me. IBus daemon had been configured to use the same shortcut. It can be changed by: ibus-setup and then restarting the daemon using something like: killall ibus-daemon ibus-daemon -d


3

It depends on how terminal works, really. Some terminals aim to be lightweight, others do not. Some features require more overhead which can have visible impact(this is what you've encountered). You may want to look for lightweight terminal emulators, try out few and pick the one that fits you best. I've personally used Sakura nad Terminator, both of which ...


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