1

I am using the following command to start a konsole + execute a command at startup.

konsole -e 'bash -c "MY_COMMAND;bash"'

The goal is that the konsole stays open after executing the command (which does work as it is intended).

But after shutting down (or rebooting) my system, not only this 1 konsole with the command executed inside does open, but one additional (without any command executed inside).

With 2 of such startup scripts, if i don't close all konsoles mannually before shutting down, 4 terminals will open (2 as intended + 2 'clean').

Does anyone have an explanation why this happens? Why does each command open another bash if i don't close them manually before rebooting ?

I thought shutting down via KDE or using the shutdown command should close all terminals, so why is this even happening at all ?

1

Hello and welcome to this site!

It's been ages since I last used KDE, but if I remember correctly, it saves the current session on logout/shutdown and automatically restore every open application on login by default.

There's should be an option to disable this function under

Settings → Autostart → Session Management

KDE Setting for session management

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.