From: J G Miller on
On Fri, 09 Apr 2010 17:01:11 +0000, Bit Twister wrote:

> Case statement in a script could even change colors based on target
> machine.

Yes or you use the -name flag on the command line to set the terminal
to the name of the host (or application), and then have an terminal
apps-defaults file with the colors set for the different hosts
(or applications run in the terminal). That way you can have
the scroll bar, pointer and all the other features in matching
colors without having to use gazillion of command line switches
with the specified colors.

For example I call my logged in as user root terminals with -name shell,
and then in the apps-default file for the terminal (in this case Urxvt)

shell.iconName: shell

shell.foreground: #ffd700
shell.background: #303060

shell.cursorColor: #ffe800
shell.cursorColor2: #eec600

shell.pointerColor: #9fff22

shell.scrollColor: #5ddd00
shell.troughColor: #3bbb00

shell.font: xft:Luxi Mono:autohint=true:pixelsize=16
shell.boldFont: xft:Luxi Mono:autohint=true:bold:pixelsize=16
shell.italicFont: xft:Luxi Mono:autohint=true:italic:pixelsize=16
shell.boldItalicFont: xft:Luxi Mono:autohint=true:bold:italic:pixelsize=16
From: Marc Haber on
"Chris F.A. Johnson" <cfajohnson(a)gmail.com> wrote:
>On 2010-04-09, Marc Haber wrote:
>> If only konsole would have a switch like "when the application running
>> inside the window terminates, immediately start it again", my issue
>> would have been solved, and yours as well.
>
>while :; do <COMMAND>; done

Nice idea. Stupid me. Now one would need to have konsole start this
instead of the default /bin/bash, but that would also need a shell
again. I need to ponder about this for a while.

Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Mannheim, Germany | Beginning of Wisdom " | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834
From: David Bernier on
unruh wrote:
> On 2010-04-08, Bit Twister <BitTwister(a)mouse-potato.com> wrote:
>> On Thu, 08 Apr 2010 21:30:54 GMT, unruh wrote:
>>> I can often discover myself buried 5 or 6 layers deep (ie I have to hit
>>> exit 5 or 6 times to finally close the window).
>>>
>>> Is there any easy way I can find out how deeply I am buried so I can
>>> close all but the last one?
>> Yes.
>>
>> click up a terminal
>>
>> env | sort > x1
>> bash
>> env | sort > x2
>> exit
>> diff -bBw x1 x2
>>
>> Maybe a shell level variable will show up.
>>
>
> I am using ssh to connect to the computer, not just opening another
> bash. However your suggestions shows that I get a change in the DISPLAY
> variable if I do what I do. (base is 0.0, then 10.0, 11.0,...)
> Unfortunately if I open one level deep on terminal 1 I get
> echo $DISPLAY
> localhost:10.0
> while on another widown, I do the same, I now get
> echo $DISPLAY
> localhost:11.0
> Ie, it does not count up separately on each terminal. But I guess
> getting something other than 0.0 tells me that I have dug in at least
> one level deep on that terminal.

The following works when iterating "/bin/bash/" :

[david(a)localhost ~]$ env|grep SHLVL
SHLVL=2

[david(a)localhost ~]$ /bin/bash
[david(a)localhost ~]$ env|grep SHLVL
SHLVL=3

[david(a)localhost ~]$ /bin/bash
[david(a)localhost ~]$ env|grep SHLVL
SHLVL=4

[david(a)localhost ~]$ /bin/bash
[david(a)localhost ~]$ env|grep SHLVL
SHLVL=5



David Bernier
From: Bit Twister on
On Mon, 03 May 2010 07:01:56 -0400, David Bernier wrote:
> unruh wrote:
>> On 2010-04-08, Bit Twister <BitTwister(a)mouse-potato.com> wrote:


Yea gadds, we need to get you into a speed reading class. Your almost
a month behind. :-D


> The following works when iterating "/bin/bash/" :
>
> [david(a)localhost ~]$ env|grep SHLVL

So does
echo "LEVEL=$SHLVL"
From: unruh on
On 2010-05-03, David Bernier <david250(a)videotron.ca> wrote:
> unruh wrote:
>> On 2010-04-08, Bit Twister <BitTwister(a)mouse-potato.com> wrote:
>>> On Thu, 08 Apr 2010 21:30:54 GMT, unruh wrote:
>>>> I can often discover myself buried 5 or 6 layers deep (ie I have to hit
>>>> exit 5 or 6 times to finally close the window).
>>>>
>>>> Is there any easy way I can find out how deeply I am buried so I can
>>>> close all but the last one?
>>> Yes.
>>>
>>> click up a terminal
>>>
>>> env | sort > x1
>>> bash
>>> env | sort > x2
>>> exit
>>> diff -bBw x1 x2
>>>
>>> Maybe a shell level variable will show up.
>>>
>>
>> I am using ssh to connect to the computer, not just opening another
>> bash. However your suggestions shows that I get a change in the DISPLAY
>> variable if I do what I do. (base is 0.0, then 10.0, 11.0,...)
>> Unfortunately if I open one level deep on terminal 1 I get
>> echo $DISPLAY
>> localhost:10.0
>> while on another widown, I do the same, I now get
>> echo $DISPLAY
>> localhost:11.0
>> Ie, it does not count up separately on each terminal. But I guess
>> getting something other than 0.0 tells me that I have dug in at least
>> one level deep on that terminal.
>
> The following works when iterating "/bin/bash/" :
>
> [david(a)localhost ~]$ env|grep SHLVL
> SHLVL=2
>
> [david(a)localhost ~]$ /bin/bash
> [david(a)localhost ~]$ env|grep SHLVL
> SHLVL=3
>
> [david(a)localhost ~]$ /bin/bash
> [david(a)localhost ~]$ env|grep SHLVL
> SHLVL=4
>
> [david(a)localhost ~]$ /bin/bash
> [david(a)localhost ~]$ env|grep SHLVL
> SHLVL=5

Nope. does not work at all.

info:0.0[unruh]>env|grep SHL
SHLVL=5
info:0.0[unruh]>ssh info
Last login: Mon May 3 00:23:12 2010 from xxxxxxxxxxxx
info:11.0[unruh]>env|grep SHL
SHLVL=1

(Note those numbers following the machine name are the DISPLAY which ups
its value when you go through ssh, because of the X forwarding.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Formatting External USB Drives
Next: KDE-3.5.10 automounting