Open Konsole split screen on startup

When I login after a reboot, the first thing I do is open Konsole, split it into 4 views, and run btop and a tail of syslog. Then I use the other 2 split screens for other random things throughout the day.

Is it possible to have Konsole split the screen, and open btop and tail syslog without having to do it manually?

Are you using X or Wayland?

  • On X you could try the Session restore feature: Session Management
    Afaik this is not available on Wayland yet.

  • Probably a shell script that auto starts would also work

1 Like

Not sure 'bout starting it in a split view ( maybe by using a script), but starting it with predefined tabs is certainly possible. You could make a desktop application or change the launch command for konsole like konsole --tabs-from-file ~/.konsole/current-tabs. That file would look something like:

workdir: /home/john;; title: Htop;; command:htop
workdir: /home/john;; title: Ranger;; command:ranger
workdir: /home/john;; title: Cava;; command:cava
workdir: /home/john;; title: Shabbam;; command:/home/john/Scripts/shabbam.sh
workdir: /home/john;; title: Speedtest;; command:speedtest
workdir: /home/john;; title: Gdu;; command:gdu
workdir: /home/john;; title: Inxi;; command:/home/john/Scripts/inxi.sh

Would look like:

1 Like

I’m using X, but the save session does not start up the programs in the Konsole window, and Firefox opens to a pseudo-previous state.

You can save a Konsole layout: Chapter 2. Command Reference

then use konsole --layout and it will start a new Konsole application with the layout ( works with splitview)

Although I’m not sure yet how to start those programs in the splitview then :confused:

1 Like

That’s correct. You can save a layout as a json file. But that will only save the layout, not the commands. It would require a script to do that. Probably with qdbus. Can’t remember really but I think I posted something about this on the old forum.

1 Like