Gentoo Archives: gentoo-user

From: Hilco Wijbenga <hilco.wijbenga@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [konsole] How to run a command, then leave the shell open?
Date: Wed, 22 Feb 2012 03:10:10
Message-Id: CAE1pOi1QDWQ-zWQD4o2PSsiNgUxCa_Kt-v2_Dz2zz-deXRCznw@mail.gmail.com
In Reply to: Re: [gentoo-user] [konsole] How to run a command, then leave the shell open? by Felix Kuperjans
1 On 21 February 2012 18:36, Felix Kuperjans <felix@××××××××××××××.com> wrote:
2 > Hi Hilco,
3 >
4 > answers and suggestions inline.
5 >
6 > Am 22.02.2012 03:03, schrieb Hilco Wijbenga:
7 >> Hi all,
8 >>
9 >> Every morning I start konsole, type "emerge --sync", and then go do
10 >> other stuff. Some time later I look at the output and usually run
11 >> "emerge ... world". I would like to automate that a bit more.
12 > Just a suggestion: Do you know the porticron script? Combined with a
13 > proper setup of ssmtp, it will sync you portage tree daily (in the
14 > background) and send you an email with all updates, and important
15 > security notes.
16
17 Thanks, no I did not know about this script.
18
19 I checked it out but I prefer to kick the sync off myself (syncing
20 really slows down the computer). Besides, I have my own little script
21 that does everything the way I want it. :-)
22
23 >> I can use kpart to start konsole on a particular desktop so that's
24 >> easy. What I can't seem to get working is the "$SHELL --login" +
25 >> "emerge --sync" part.
26 >>
27 >> If I run "konsole --noclose -e emerge --sync" then I get the output I
28 >> want but I don't get a prompt. If I run "konsole -e $SHELL --login"
29 >> then I get the prompt but, obviously, no emerge output.
30 >>
31 >> How can I combine these two? I would like konsole to run emerge --sync
32 >> and then leave a prompt open. Just like what would happen if I did it
33 >> all manually. Any ideas?
34 > I don't use konsole, but try out: konsole -e $SHELL -c "emerge --sync &&
35 > $SHELL --login"
36
37 Ah, the secret sauce is the quotes. Google had told me not to use
38 quotes. I must have misunderstood. Still, I thought I had tried
39 something like that.
40
41 Thanks!

Replies

Subject Author
[gentoo-user] Re: [konsole] How to run a command, then leave the shell open? Nikos Chantziaras <realnc@×××××.de>