Posts Tagged ‘konsole’

Konsole: highlight the current tab

September 19, 2016 1 comment

Holy shit, this problem has been bugging me for years… But at last I found a solution.

So, I use the terminal emulator Konsole, which is very nice, I love it, but the current tab is not highlighted enough. Thus, if you have several tabs opened, it’s always difficult to figure out which is the current one.



It turns out that Konsole can be customized via a CSS stylesheet file. Here is an example (konsole.css) that you should save somewhere:

QTabBar::tab:selected {
    background: lightgreen;
    color: black;
    font: bold;

Then, in Konsole, go to Settings -> Configure Konsole… -> TabBar, and there specify this CSS file:


And here is the result:



Categories: linux Tags: , , , ,

open a terminal in a specified folder

From a script I want to launch a terminal that opens in a specified folder.

Thanks to #linux, I got two solutions:

A1) I use konsole, which has an option for this:

konsole --workdir /tmp

It will open a terminal in the /tmp directory.

A2) Change directory to the specified folder and launch the terminal:

cd /tmp; konsole

If you want to do it from a script, the idea remains the same.

B) If you want to execute a command automatically in the opening terminal, use this:

konsole -e mc

C) Set the title of Konsole to a specified text:

konsole -p tabtitle='NVIM server'

Find more info here.

Categories: bash, linux Tags: , ,

Making gnome-terminal usable

August 11, 2011 Leave a comment

On one of my laptops I had problems with the terminal emulators “konsole” and “terminator”. I had tried “gnome-terminal” a long time ago but I didn’t like it. Now I gave it another try and I could make it usable :)

By default, gnome-terminal starts in a little window of dimension 80×25. If you want it maximized, start like this: “gnome-terminal --maximize“.

I made a custom profile but whenever I restarted gnome-terminal, it loaded the default profile. So I removed the custom profile and modified directly the “Default” one under Edit -> Profile Preferences.

General tab
Untick the “Use the system fixed width font” if you want to use larger fonts. Monospace 12 is fine for me.

I don’t like blinking cursors and unfortunately you cannot change it here. To disable blinking, you need a little hacking. Execute the following command in a terminal:

gconftool-2 --set "/apps/gnome-terminal/profiles/Default/cursor_blink" --type boolean "False"

This tip is from here.

Colours tab
I’ve always hated that ugly purple background of gnome-terminal. You can get rid of it by unticking “Use colors from system theme”. I prefer the “Gray on black” built-in scheme. Under “Palettes”, I chose the “Linux console” scheme.

Edit -> Keyboard shortcuts…
Here untick “Enable the menu shortcut key (F10 by default)” and then you won’t have any problems with Midnight Commander. For opening new tabs, I prefer the “CTRL + T” shortcut.

Terminator: a cross-platform terminal emulator with advanced features

April 9, 2011 Leave a comment

Terminator is a cross-platform GPL terminal emulator with advanced features.

I’ve been using konsole for years but I think I will switch to terminator.


  • Arrange terminals in a grid (see screenshot below)
  • Tabs
  • Highly configurable
  • Drag and drop re-ordering of terminals
  • Lots of keyboard shortcuts (see the keybindings section)
  • Save multiple layouts and profiles via GUI preferences editor



sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

My config file:

See my config file here. Its location is $HOME/.config/terminator/config (rename it to “config“).


Update (20110511)
I was using terminator for a month but today I switched back to konsole. Terminator is not bad but I find some things annoying. I also sent two questions / feature requests to the developers and got no answers, so I don’t know if it’s still developed. Konsole is not that fancy but works just fine.

/ discussion /

Open Konsole from Nautilus

March 3, 2011 Leave a comment

The following entry is based on the post “Nautilus Script to Launch a Terminal” by Linerd.


For navigating in the file system, I usually use Midnight Commander. However, sometimes it’s useful to switch to a graphical file manager, which is Nautilus under Gnome. For instance, browsing images with Nautilus is easier since it shows thumbnails. After using Nautilus for a while, I want to continue my work in a terminal (my favorite is konsole) in the current directory. How to do that?

Related work

There is a plugin in the repositories called “nautilus-open-terminal”. By default, the plugin calls gnome-terminal and it seems konsole is not supported :(


In this post, I found a simple and working solution. Here is the script:

#  Nautilus script - terminal-here
#  This script will open a GNOME Terminal in the current directory.
#  Written by Linerd in August, 2009 -
#  Modification:
#  * konsole-here
#  * Open the Konsole terminal emulator in the current directory.
#  Save this script under $HOME/.gnome2/nautilus-scripts/terminal-here. Make sure that
#  you give this file executable permission. { chmod +x terminal-here }
#  This program is free software.  It is distributed in the hope
#  that it will be useful, but WITHOUT ANY WARRANTY; without even
#  PURPOSE.  See the GNU General Public License for more details.

if [ "$NAUTILUS_SCRIPT_CURRENT_URI" == "x-nautilus-desktop:///" ]; then
        DIR=`echo $NAUTILUS_SCRIPT_CURRENT_URI | sed 's/^file:\/\///' | sed 's/%20/ /g'`

# gnome-terminal --working-directory="$DIR"
konsole --workdir "$DIR"

exit 0

The konsole modification was suggested by James in a comment in the previously referred post.

Installation: Save it in the directory $HOME/.gnome2/nautilus-scripts under the name konsole-here.

Usage: Right click in Nautilus, then choose Scripts -> konsole-here.

Launch Nautilus from terminal

When I want to launch Nautilus from the terminal, I use the alias “nh”, which stands for “nautilus here”, i.e. open Nautilus in the current directory:

alias nh='nautilus . 2>/dev/null'

Simply put this line in your ~/.bashrc file.

With this alias and with the script above, you can easily switch back and forth between Konsole and Nautilus.


  • Linerd, original script with gnome-terminal support
  • James, konsole patch


There is one thing that troubles me. If I open a konsole from Nautilus, the newly opened konsole gets no focus :( That is, you cannot type immediately, first you need to click on its window. However, if you call the script from the Desktop, konsole gets the focus… If someone has a solution for this, please let me know.

Update (20110304): I think I have a solution for the problem. After switching off the visual effects, konsole gets the focus. Damn… Here is how to get rid of the eyecandy: right click on Desktop -> Change Desktop Background -> Visual Effects tab, select None.