This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to open several tabs simultaneously in Konsole?

Tags: None
(comma "," separated)
ivorobev
Registered Member
Posts
3
Karma
0
Hello there!

I have some real problem in Debian with Konsole: I need to open several tabs with different commands in Konsole simultaneously, but I can't do it! I have been spent already so much time!

What I have:

* I created executable file with the next code:

Code: Select all
#!/bin/bash

konsole --tabs-from-file /pathToFile/file.konsole


* Then the code of file above:

Code: Select all
# The lines beginning with '#' are ignored
# Tokens are separated by ;;
# Each line should contain at least one of 'command' and 'profile'
# Supported tokens are title, command and profile
#
title: tab1;; command: ls ;; profile: Profile1
title: tab2;; command: ls
title: tab3;; command: ls


So, when I execute executable file with double click, konsole opens, but only 1 default tab.

When I use option --hold for konsole, I see all my tabs (even commands executes), but after they become freeze. By the way, these commands are executed before .bashrc.

I don't know, how to solve really easy action (it must be).

Hope for your answer.

Reagrds, Igor.
airdrik
Registered Member
Posts
1854
Karma
5
OS
Previously: viewtopic.php?f=227&t=152305&p=398576
The additional tabs are running the "ls" command and exiting. You need to specify the shell to launch instead.


airdrik, proud to be a member of KDE forums since 2008-Dec.
ivorobev
Registered Member
Posts
3
Karma
0
airdrik wrote:Previously: viewtopic.php?f=227&t=152305&p=398576
The additional tabs are running the "ls" command and exiting. You need to specify the shell to launch instead.


I already tried to use "--hold" and "--noclose" options together with, for example:

Code: Select all
title: tab01;; command: sh -c "ls"
title: tab02;; command: sh -c "ls"
title: tab03;; command: sh -c "ls"


Yes, these commands are also executing, but before "/bin/bash" (even if I use konsole profile with such command), and then I can't use tabs, because I use --hold option.

So, the problem haven't solved.
airdrik
Registered Member
Posts
1854
Karma
5
OS
You didn't read through the comments very well. In my last comment I explained why it isn't working the way you expect: the commands you are running are just running and ending without going into interactive mode. If you want the tabs to present interactive sessions you need to invoke interactive commands (such as bash without a given command, or googling for ways to run bash in interactive mode with initial commands


airdrik, proud to be a member of KDE forums since 2008-Dec.
ivorobev
Registered Member
Posts
3
Karma
0
airdrik wrote:You didn't read through the comments very well. In my last comment I explained why it isn't working the way you expect: the commands you are running are just running and ending without going into interactive mode. If you want the tabs to present interactive sessions you need to invoke interactive commands (such as bash without a given command, or googling for ways to run bash in interactive mode with initial commands


Thank you for your answer, but I already tried to use such commands. No success!
airdrik
Registered Member
Posts
1854
Karma
5
OS
From you previous reply, you posted that you are using 'command: sh -c "ls"'. This command instructs the sh program to run "ls" and then exit.
The stackoverflow post I linked suggested a couple of ideas including:
* 'bash -c "ls;pwd;other commands;$SHELL"', which instructs bash to run a series of commands followed by the contents of $SHELL which should invoke an interactive bash session. If this doesn't work you may need to replace the reference to $SHELL with an explicit reference to bash (or whatever your chosen shell is)
* 'bash --init-file <(echo "ls; pwd")', which would instruct bash to start by running the init file provided through the temporary pip. (this may not work when used as the command as it relies on bash's interpreting the file redirect)


airdrik, proud to be a member of KDE forums since 2008-Dec.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]