this post was submitted on 29 Oct 2023
9 points (100.0% liked)

KDE

5336 readers
142 users here now

KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.

Plasma 6 Bugs

If you encounter a bug, proceed to https://bugs.kde.org/, check whether it has been reported.

If it hasn't, report it yourself.

PLEASE THINK CAREFULLY BEFORE POSTING HERE.

Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.

founded 1 year ago
MODERATORS
 

I want to start Konsole in Split View which is possible using the --layout command but then also run a command like htop in one of the sessions. How do I do that?

top 2 comments
sorted by: hot top controversial new old
[–] wallybeavis@lemmy.world 4 points 1 year ago (1 children)

Off the top of my head, you could write a small function and place it in your shell's start up file (ex: .bashrc). The function would check to see if htop is running under your userid, and if not start it...although depending on the timing you may end up with htop in both sessions.

A second option would be to create a bookmark and set the location to something such as ssh://youruserid@localhost "htop" <- I've not tested this, I've only bookmarks to ssh into remote systems

It may just be easier to associate the command you need to a 2 or 3 letter alias and simply type that in

[–] mikazuki@lemmy.world 2 points 1 year ago

As for timing, one could use the flock function to ensure only one process starts. Something like this (untested): flock -n ~/.htop.lock -c htop