From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CFBDC13838B for ; Sun, 5 Oct 2014 14:10:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ECB29E0959; Sun, 5 Oct 2014 14:10:10 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77174E0908 for ; Sun, 5 Oct 2014 14:10:09 +0000 (UTC) Received: from localhost ([84.133.163.250]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LfHs4-1Xz8xL3R5k-00oq5X for ; Sun, 05 Oct 2014 16:10:08 +0200 Date: Sun, 5 Oct 2014 16:10:06 +0200 From: meino.cramer@gmx.de To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Again some "headless" stuff/question Message-ID: <20141005141006.GD3856@solfire> References: <20141005043455.GA3856@solfire> <54313A7F.9050404@thegeezer.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54313A7F.9050404@thegeezer.net> User-Agent: mutt-ng/devel-r804 (Linux) X-Provags-ID: V03:K0:ddpICeg/t4lDFJg56bv35/UU/8qNwexx/jYxTHkzaGGc/u+P0jz WkwBI0J7g8CqFh9E5y21ao73+HyneNwi7dmJdOwsePaQKYEZMULzZ8asGInEeQKQ++s6bE8 pFPwX9aBIQ44L2OK88C6PRbJ96eIsW6MZNCfWiq5DrSbJlr8ZvaejDbZGF1UOw9RUvMP5Bx oE3yn1jxjwMLw8K7WXXmA== X-UI-Out-Filterresults: notjunk:1; X-Archives-Salt: 3fe28782-9085-4f4e-96fb-95e767331ffa X-Archives-Hash: ad02e5180160693019237605499f60a8 thegeezer [14-10-05 14:36]: > On 05/10/14 05:34, meino.cramer@gmx.de wrote: > > Hi, > > > > for starting and running a script on a headless system for me "nohup" > > works perfectly. > > For interactive session via ssh screen/tmux turned out to be the > > solution to detach from jobs started from the commandline. > > Both are hints/help I received from the community here. :) > > Thank you very much !!! :))) > > > > Since the screen/tmux thingie is THAT convenient I would like to start > > this as the default when logging in via ssh. > > I could write a script which is started by the shell (zsh) which in > > turn is started as part of the login process. > > Screen would start another shell and TADA!... > > But this is an embedded system... > > > > The result should be a running screen session right after login via > > ssh. > > > > Is there any "shorter path" to what I am trying to do -- without the > > cascade of shells which do nothing but waiting of the child process to > > end? > > > > Thank you very much in advance for any help! Have a nice Sunday! > > > > Best regards, > > mcc > > > > > > you can auto-start a program of your choice directly from an ssh > command. for example: > $ ssh -t myhost screen -R -d > will connect over ssh and then run screen to auto detach then reattach a > running a screen or start a new one if not. > you can of course name your screens so you can connect to > mycompilewindow or mycleverideasvimwindow > > alternatively, and if you tend to use a mobile device for ssh you can > but something like in your .bashrc > if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then > screen -R -d > fi > > which would check to see if ssh variables are set by openssh i.e. it is > an ssh session and then run screen for you > > hth Best! I dont wanted to experiment (and fail)...there were chances to get no access to the system anymore... THX! Best regards, mcc