Solving Yakuake not Loading .bash_profile

My Problem:

I use Yakuake (pronounced “yaw-quake”) as a drop-down terminal to give me quick access to a shell when working on other things. However, even though my regular terminal (GNOME Terminal as of this blog post) defaults to being an interactive terminal, thus loading .bash_profile, Yakuake wasn’t. None of my aliases, custom shell functions, or anything else in .bash_profile was loading.

My Solution:

Edit your Yakuake profile to launch your shell (probably bash) as a login shell. E.g. /bin/bash -l

The Long Story:

For those unaware, Yakuake is a terminal emulator application, pronounced “yaw quake”, that drops down from the top of your GUI in the style of the old terminal in the ID game “Quake.”

Mashing a simple key combination causes the terminal to drop down over your existing windows. Its quick access combined with the option of terminal transparency allows me to hammer away on problems while reading documentation, or keeping a casual eye on other things that are going on in the background (e.g. watching and contributing to a Slack conversation while I’m pecking away in a shell)

The Yakuake drop down terminal in action, dropping down over existing windows and then being pulled back up out of the way.
Yakuake comes in handy when you need a quick shell while working on other things.

The main problem was that .bash_profile wasn’t being sourced, so my familiar aliases and shell functions weren’t being loaded. Normally this is a sign that your terminal emulator isn’t loading your shell in interactive mode. For example, in GNOME Terminal, you need to edit your profile to “Run command as a login shell” to have .bash_profile consumed.

However, in my case, it was already selected. I was under the mistaken impression that Yakuake was a wrapper around GNOME Terminal. It is, in fact, not. Rather it’s based on KDE Konsole, is it’s own terminal emulator, and thus has it’s own terminal profile settings.

You’ll want to go to to the settings menu in Yakuake and select “Manage Profiles”

From there, you can select a profile to edit (probably the only one there). You’ll want to launch your shell (presumably bash) as a login shell. By default the command invoked with Yakuake launches is /bin/bash. You’ll want to add the -l option to make sure it’s a login shell.

For more information, you’ll want to check out your shell’s manual for information about invocation options. For bash, check this part of the man pages out:

2 thoughts on “Solving Yakuake not Loading .bash_profile”

Leave a Reply

%d bloggers like this: