[SOLVED] open Konsole after boot and login, run a command, keep Konsole open for use
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
open Konsole after boot and login, run a command, keep Konsole open for use
I want to ssh automatically to remote server by opening Konsole after login, runnning ssh command and using the shell from then on.
Google for solutions leads to lots of advice on running a command in a shell at boot and keeping it open with, for example, 'konsole --noclose -e <command>'. This does not help because the konsole has no command prompt.
I want to to do this without using screen, which I don't get along with. I get lost in a maze and bad things happen when I type something thinking I'm local when I'm remote or vice versa. I've tried to use screen for days and have had to restore from backup several times because of errors made.
I would like to do this because I have three servers in three shells and when I restart the saved session comes up with three shells containing three broken pipes.
I use KDE/Arch and Kubuntu on different machines. I would like to be able to do this on either machine.
My first approach to this problem would be with screen. Why, exactly, does it make you confused? I don't understand the difficulty, but maybe I'm missing something. Your explanation of some maze and local vs remote confusion makes no sense to me.
Last edited by suicidaleggroll; 10-19-2014 at 07:22 PM.
It's just me, I can't remember if I've got a screen that I can't see at the moment, which terminal window opened on which desktop or which shell I'm in when I resume after a few hours.
The only time I would use screen is for a large inter-server file transfer to ease resumption after a loss of connectivity.
I access three remote servers in up to six different shells, alongside shells for different tasks on three local machines, with 14 desktops between them. Everything has worked smoothly for years but adding screen to the mix makes it too confusing for me.
It would be convenient if those shells could ssh to their server and be fully ready for use after a session restore. At the moment, all I have to do is type a command in each shell. Using screen would make my day more difficult not easier. If konsole can open a new shell, execute a command and stay open, it can't be that difficult to have that shell that stays open be usable for more commands rather than just visible?
If I understand you correctly you want to open a number of shells that connects to one server each?
I do this with gnome-terminal, this command opens 3 tabs in a terminal and connects to 3 different servers:
(The commands "c0" "c1" are bash scripts that contains the ssh connection string.)
Using ssh keys I don't even need to type in password, I have 3 shells ready on one server each with that single command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.