Making Konsole more accessible for new users (and distro hoppers)

Are these not shell issues? I think actually that zsh makes a fine default shell for Konsole, though I prefer fish - it’s not a sane or reasonable choice for the default.

You have mixed Konsole specific issues (some of which are not issues on my system, with Konsole) with Shell issues, and compounded them confusing with Distribution choices.

  • You need more focus.

I do find it rather laughable that you are trying to bring in super-nOOb support into your ARCH terminal…

How is anyone expected to be able to run Arch if they think they can use ‘apt-get’. It isn’t reasonable for a NEW user to install Arch, then type ‘apt-get’ because they have no experience, so they wouldn’t just suddenly think of this command.

It seems you are suggesting the ‘CachyOS’ idea of putting some alias commands in (as they came up with your idea)

# Help people new to Arch
alias apt="man pacman"
alias apt-get="man pacman"
alias please="sudo"

I prefer their suggestion to yours… but I think their idea is a little annoying. It assumes that everyone used Debian, which is almost as annoying as just straight up saying ‘Ubuntu’ is the default.

However, for my ‘new’ distribution I’d prefer a smarter function:

function pacman_redirect() {
    echo "This is an Arch Linux system. Use pacman instead of $1."
    echo "Common commands:"
    echo "  Install:   sudo pacman -S <package>"
    echo "  Remove:    sudo pacman -R <package>"
    echo "  Update:    sudo pacman -Syu"
    echo "  Search:    pacman -Ss <package>"
    echo "For more info, see man pacman."
    return 1
}

But then you STILL have the issue of all those commands - apt apt-get nala dnf yum pamac etc.

So you could use a ‘command_not_found_handler’

Solution

My new zsh for my new nOOb Arch zsh:

# List of package manager commands from other distributions
foreign_managers=(
    apt apt-get aptitude          # Debian/Ubuntu
    dnf yum                       # Fedora/RHEL/CentOS
    zypper                        # openSUSE
    emerge                        # Gentoo
    apk                           # Alpine Linux
    slackpkg installpkg removepkg upgradepkg  # Slackware
    xbps-install xbps-remove xbps-query       # Void Linux
    pkg pkg_add pkg_delete        # FreeBSD / NetBSD
    pkgin                         # NetBSD
    brew port macports            # macOS
    nix-env nix                   # NixOS
    opkg                          # OpenWrt
    # Add others as needed
)

# Helper function that prints a helpful message and suggests pacman equivalents
function foreign_pkg_manager() {
    local cmd=$1
    shift
    local subcmd=$1
    shift
    local packages="$@"

    echo "This system uses pacman as the package manager."
    echo "You tried: $cmd $subcmd $packages"
    echo ""

    case $cmd in
        apt|apt-get|aptitude)
            case $subcmd in
                install)   echo "Try: sudo pacman -S $packages" ;;
                remove|purge) echo "Try: sudo pacman -R $packages" ;;
                update)    echo "Try: sudo pacman -Sy" ;;
                upgrade)   echo "Try: sudo pacman -Syu" ;;
                search)    echo "Try: pacman -Ss $packages" ;;
                show)      echo "Try: pacman -Qi $packages" ;;
                *)         echo "Please see 'man pacman' for more information." ;;
            esac
            ;;
        dnf|yum)
            case $subcmd in
                install)   echo "Try: sudo pacman -S $packages" ;;
                remove|erase) echo "Try: sudo pacman -R $packages" ;;
                update)    echo "Try: sudo pacman -Syu" ;;
                search)    echo "Try: pacman -Ss $packages" ;;
                info)      echo "Try: pacman -Qi $packages" ;;
                *)         echo "Please see 'man pacman' for more information." ;;
            esac
            ;;
        zypper)
            case $subcmd in
                install)   echo "Try: sudo pacman -S $packages" ;;
                remove)    echo "Try: sudo pacman -R $packages" ;;
                update)    echo "Try: sudo pacman -Syu" ;;
                search)    echo "Try: pacman -Ss $packages" ;;
                info)      echo "Try: pacman -Qi $packages" ;;
                *)         echo "Please see 'man pacman' for more information." ;;
            esac
            ;;
        emerge)
            case $subcmd in
                *)         echo "Try: sudo pacman -S $packages (for a similar effect)" ;;
            esac
            ;;
        apk)
            case $subcmd in
                add)       echo "Try: sudo pacman -S $packages" ;;
                del)       echo "Try: sudo pacman -R $packages" ;;
                update)    echo "Try: sudo pacman -Sy" ;;
                upgrade)   echo "Try: sudo pacman -Syu" ;;
                search)    echo "Try: pacman -Ss $packages" ;;
                info)      echo "Try: pacman -Qi $packages" ;;
                *)         echo "Please see 'man pacman' for more information." ;;
            esac
            ;;
        *)
            # Generic fallback for any other foreign command
            echo "This command is not supported. Please use pacman instead."
            echo "Common pacman commands:"
            echo "  Install a package:      sudo pacman -S <package>"
            echo "  Remove a package:       sudo pacman -R <package>"
            echo "  Update system:          sudo pacman -Syu"
            echo "  Search for a package:   pacman -Ss <package>"
            echo "  Show package info:      pacman -Qi <package>"
            echo "For more details, see 'man pacman'."
            ;;
    esac

    return 1  # indicate failure
}

# ----------------------------------------------------------------------
# Intercept non‑sudo foreign commands (they are not installed)
function command_not_found_handler() {
    local cmd=$1
    shift
    if [[ " ${foreign_managers[*]} " =~ " $cmd " ]]; then
        foreign_pkg_manager "$cmd" "$@"
    else
        echo "zsh: command not found: $cmd"
        return 127
    fi
}

# ----------------------------------------------------------------------
# Override sudo to catch foreign commands, even when options are used
function sudo() {
    # Parse arguments to find the first non‑option (the actual command)
    local args=()
    local cmd=""
    local found=0
    for arg in "$@"; do
        if [[ $found -eq 0 && $arg == -* ]]; then
            args+=("$arg")
        elif [[ $found -eq 0 ]]; then
            cmd=$arg
            found=1
            args+=("$arg")
        else
            args+=("$arg")
        fi
    done

    if [[ -n $cmd && " ${foreign_managers[*]} " =~ " $cmd " ]]; then
        echo "You used sudo with a foreign package manager: sudo $*"
        foreign_pkg_manager "$cmd" "${args[@]:1}"  # pass command and its arguments
        return 1
    else
        # Otherwise, call the real sudo
        command sudo "$@"
    fi
}

Next…

It’s a long time since I used a terminal that didn’t complete commands, if you think it’s helpful then you can set up various autocomplete and suggestions in your configs.

Manjaro has a good setup for an initial zsh configuration - and then a visit tot he forum can get you all the information you need how to deal with problems and issues.

When using a keyboard, it’s also very awkward to click. It’s a very ‘Windows’ centric habit, and a bad habit at that.

For sure, distributions (or users) can develop some kind of helper… using Manjaro I have this:

❯ apt-get install pacman

.😭 I cannot find 'apt-get'

💡 Search using Pamac, Yay, or Flatpak? [P/Y/F/A for All, Enter to skip]

This is obviously not suitable for a distribution, however, because obviously AUR is not supported - and the choice of ‘yay’ is a personal one.

But for autocomplete it’s really quite hard to beat this:

But obviously this is fish…

It would be extremely trivial to add a similar function or suggestion to a shell - depending on which distribution we’re talking about.

zsh is a little more sober:

And then there are a million other things you can think of… I remember in my early Manjaro days, I would misread and confuse ‘pamac’ and ‘pacman’… and it’s a recurring issue that some folks will run sudo pamac install fish unintentially using sudo for a software that is not supposed to be run as sudo.

However, I fixed that in mine:

The fixes which you propose are problematic also in terms of implementation for KDE, because KDE is a desktop environment - it has nothign to do with package management.

So if you correct ‘sudo apt-get install kitty’ then it’s not going to work on Debian. If you don’t, then people will fail when they run Arch.

This is a distribution issue - bring that up with your specific distribution as a suggestion, though with ‘apt’ being the most common default (Ubuntu/Debian) it would be wrong to correct it…

Fedora could consider suggesting ‘Apt is a Debian based tool, and you’re using Fedora - did you mean ‘dnf’?’

Manjaro could also offer suggestions - but then there are many good alternative options, so really it’s up to the user to decide.

Editing Text

In Konsole, I just typed ‘convertmkv’ to get my abbreviation… but I want to edit and instead of mkv, convert avi files to mp4:

So I click on mkv and type avi… this works as do the usual navigation keys (Home/End, etc)

Also, Ctrl_Backspace and Ctrl_Del will delete Word backward and forward - these are basic text editing skills some of us learned in the last century that are universal.

Screenshot_20260324_220609

middle-click I just dropped in here by selecting text in the terminal and middle clicking here… so I’m not sure why you need silly ‘Ctrl_C’ shortcuts in a terminal.

However, you can enter your own shortcuts if you don’t mind overriding potentially important system shortcuts.

For example, AltS prepends a command with sudo - but it won’t work if you have the annoying menu bar visible all the time.

Overall, I remember buying quite a few computers, the last of which was a HP desktop ‘Windows Vista’ machine which evolved into a Linux box.

Summary

It’s quite possible that I’m assuming too much, I installed Manjaro years ago which already came with some pretty advanced ‘tweaks’ which I always felt were huge upgrades to default/vanilla shells in any distributions I tried before.

They are extremely well thought out, and in my opinion one of the reasons that I still believe Manjaro stands (in many respects) head and shoulders above, despite some historical issues which are currently being finally ironed out (ah, the irony).

1 Like

So essentially most of these issues would be solved if KDE had its own terminal shell?

To gather all of the features I desire:
1- Modern I-Beam, instead of a rectangle on top of characters.
2- Repositioning the I-Beam by clicking.
3- Quick access toggle to replace Ctrl+Shift+C/V with Ctrl+C/V.
4- “Select all” being assigned to Ctrl+A by default and it only selecting editable text.
5- Deleting selected text by pressing [Del].
6- Replacing selected text by pasting over.
7- Corrections for the most common commands to help newbies/distrohoppers.
8- Automatically remove all previously entered duplicate commands.

Your post has a few issues - a big one is confusing which terminal you’re using ‘Konsole vs Kitty vs whatever’ with the shell, and second - trying to make terminal emulators work like GUI text editors.

  1. Your idea that the rectangular cursor is somehow old fashioned compared to the ‘i-beam’ cursor is purely subjective… i-beam is more an alternative to the blinking rectangle in text editors to precisely show where text will go in ‘insert mode’. I thought there was a setting for this, but apparently not… I know that in Kitty I have a bright pink vertical line for my cursor, but the block in Konsole is perfectly acceptable.

  2. I can already reposition the cursor by clicking in all my terminals, I’m not sure what you did to Konsole to prevent this.

  3. Toggle for Ctrl+Shift+C/V to plain Ctrl+C/V:

Ctrl+C is the interrupt signal in POSIX terminals. A toggle could remap these shortcuts, but it would conflict with standard job control unless the shell also intercepts the signal. Implementable as a user-configurable option with warnings.

This is easily changed in settings/keyboard shortcuts. If someone is too ‘noob’ to enter settings, then they’re too ‘noob’ to use Konsole anyway.

  1. Ctrl+A for “Select all” selecting only editable text: In readline-based shells, Ctrl+A moves the cursor to the beginning of the line. Overriding it to select all editable text (i.e., the current command buffer) would deviate from decades of convention. Feasible within a custom shell, not a sane default.

  2. This is the convention for a GUI text editor. In Konsole it’s bound to the terminal’s input handling, not GUI style text editing because, unlike editors, konsole doesn’t interpret selections and the shell responds to keystrokes.

  3. Same as 5…

  4. This is a custom shell issue, not a terminal emulator issue. I already have plenty of suggestions and corrections with my fish shell which i use in Konsole and other terminals.

  5. Again, not a Konsole issue - and my duplicate commands are already not entered into history, neither are commands which I start by typing a space… so again, look at your config for fish, zsh, or bash.

1 Like

Most can be done in Warp. And its LLM integration can surely help new users to Linux shell (despite AI hate, yeah).

Konsole is more of a “traditional” terminal emulator, so might be too much change for it.

2 Likes

So if a KDE Shell existed it could easily present a toggle between the default experience, and a extremely noob-friendly experience that equals everything else in KDE Plasma (especially Kate).

However it sounds like it would take way too much work to be even worth it.

This isn’t a huge deal-breaker, but is there a reason why word mode + Brahmic scripts characters are not enabled by default? Indic scripts appear broken without it which is a little surprising when the rest of KDE seems to render Indic scripts quite well. (Though this isn’t Konsole exclusive, as GNOME and Windows Terminal have the same problem too)

I can’t rename the title to mention the creation of a KDE Shell, instead of just mentioning Konsole.

9- Display a progress bar in Konsole’s Panel/taskbar icon when it’s using percentages.
10- The user-inputed text should never be dragged upwards by the real-time Terminal tasks, because it’s harder to proofread when it constantly separates every syllable.

Konsole can already do that but the program in question might not be or your version of Konsole is too old.
If you want to try manually, this will set the progress to 50%

$> printf "\033]9;4;1;50\033\\"

and this will reset it again

$> printf "\033]9;4;0;0\033\\"

Works here on Konsole 26.08.0

Your screenshot shows typing into output.
You’d need a separate input field, like a chat application. The question is what the consequences could be of breaking with the established terminal UI.

I guess that 9 would depend on the task itself being programmed to do that. Good to know it’s supported.

In regards to 10, I’m sure there’s a very specific case where it is needed, however I was thinking more about having all these settings behind a toggle, in order to not affect people who use the terminal and shell for decades.

I think you are on to something.
I agree for new Linux users we could have things to reduce the learning curve friction, but at the same time I believe we should not force those things on everybody by default.

I think the best approach would be to let the user decide.
Maybe during the first boot after installing or the welcome window asking the user if they would like “guidance for new to linux users” and from there have “Shell tips, helpers, corrections, suggestions” installed as a package. But not by default. That would be noisy for experienced users and many won’t like it.

11- Being able to select text at the bottom by simply holding a click and hovering down.

Surprisingly Kate doesn’t have this, I’ll make a wishlist.
However it would be much more useful for the Terminal since user text is always at the bottom.

I was about to ask what happens when you have ctrl_c as copy and need to break, since I have it like that, and haven’t thought about the lack of break (because I could still break without thinking about it). While when I changed it in securecrt I immediately realized why I couldn’t use ctrl_c as copy (I couldn’t break).

That’s a quite simple and genius solution. Break if text not selected.

Since it’s already works close to flawless, and if one only considers immigrants (“those planning/wanting to migrate to a Linux distro”) that’s mentioned in OP, I’d say 100% go for that switch.
It’s one of those things that break you (phun unintended) when new. When the most basic thing doesn’t work.
You try to fault handle something (in the scary cli), but you get interrupted (phun still not intended) by not being able to PASTE and have to look up THAT instead.
When not even the muscle memory works as expected, that’s when the bar gets raised big time (at least mentally), and I honestly think that is a hurdle that make people give up (how small it might seem with knowledge in hand and/or hindsight).

While people who’s already comfortable will have zero issues with having to 1. disable ctrl_c/v as copy/paste, or 2. find out you can just unmark text and then ctrl_c to break.
Ctrl+Shift+C and Ctrl+Shift+V could also still be there of course for those who’ve worked that into their muscle memory. No pain in having two different hotkeys for the same thing.


The moving the caret/pointer/marker with the mouse I don’t know if it helps newcomers, but I see it as a pure quality of life function for basically anyone.
I’m just used to it, and the “this is keyboard only” mentality of cli, but I really don’t see any backsides at all of moving the caret with the mouse. Having dual navigation methods have had zero negative effects on any other application or system for me, only made it simpler and me more effective.
And I noticed there’s already a function in Konsole that pops up a thumbnail on mouse hover and make files clickable if enabled under profile, so it’s not like it’s an impossibility. And just realized I (and I’m guessing most people) use the mouse when selecting text in Konsole 100% of the times. So it’s already a keyboard+mouse application for sure.

Some use full short-keys :

ctrl-r “string case sensitive” to find a former used command, e.g.: ctrl-r dash, cursor right to get the former command :
./yt-dlp.sh -f dash-1+dash-5 “https/tele5.de/mediathek/sliders/season-1-episode-77”

ctrl+alt+b to get the cursor position after the first space , cursor 1 position right, ctrl-k to delete the link and shift+ins to insert the new link, former copied.

What I want to say is, commands with all ways the same sequence, it is rewarding to learn use full short-keys.

When a command presents a [Y/n] option, pressing Y or N doesn’t do anything without additionally pressing Enter. Is that a Shell limitation or the command’s intentional design?

It is intentional design and the one which to my experience seems to be the convention, although I’ve come across some commands that take the input directly without an Enter press.

Also, in these cases, usually the uppercase letter is the default option if you press Enter without typing anything.

I know, but by eliminating the need for Enter, this uppercase thing becomes irrelevant.

That’s just the way it is; it’s historical convention for a variety of reasons. It’s also not KDE-specific, or centralized in any way; every script that asks such a question implements the functionality in its own way, internal to the script.

It’s one of those things that’s worth learning and getting used to, rather than letting it irritate you into dreaming of a better way. Because it simply isn’t going to happen.

You might as well be annoyed by passenger cars having 4 wheels, or the sun rising in the east. :smiley:

1 Like

So Y/n requiring pressing Enter is the script’s intentional design, since it’s already possible to remove the need of also pressing Enter. That’s great!

@skyfishgoo To delete a word what works for me is Backspace+Ctrl => \E\b