Mailinglist Archive: opensuse (2271 mails)
| < Previous | Next > |
Howto view several logs on a gnome-terminal windows
- From: "Carlos E. R." <robin1.listas@xxxxxxxxxx>
- Date: Wed, 28 Apr 2004 11:31:44 +0200 (CEST)
- Message-id: <Pine.LNX.4.53.0404281122370.3360@xxxxxxxxxxxxxxxx>
Hi,
I like to vie several logs on tabs of the same gnome-terminal window. For
this, I was forced to type the commands on every session: "tailf
/var/log/mail" on one, tailf /var/log/mail.debug on another, etc. I just
found another, better way, by chance.
First I created this script:
#!/bin/ash
gnome-terminal \
--tab-with-profile=small --title "One" --command "bash" \
--tab-with-profile=small --title=mail --command "tailf /var/log/mail" \
--tab-with-profile=small --title=mail.debug --command "tailf /var/log/mail.debug" \
--tab-with-profile=small --title=messages --command "tailf /var/log/messages" \
--tab-with-profile=small --title=localmessages --command "tailf /var/log/localmessages"\
--tab-with-profile=small --title=warn --command "tailf /var/log/warn" \
--tab-with-profile=small --title=alert --command "tailf /var/log/snort/alert" \
--tab-with-profile=small --title=Two \
--tab-with-profile=small --title=Three \
--tab-with-profile=small --title=Four \
--tab-with-profile=small --title=Five \
&
which launchs a gnome terminal with several opened tabs, each with the
appropiate command running. An added advantage is the tabs with the tailf
commands do not have a "bash" shell associated with them, so that memory
is saved:
3229 ? S 0:01 gnome-terminal --sm-config-prefix /gnome-terminal-DGCcaJ/ --sm-client-id 11c0a86402000108309048200000030940008 --scree
3292 ? S 0:00 \_ gnome-pty-helper
3293 pts/5 S 0:00 \_ bash
3294 pts/6 S 0:00 \_ tailf /var/log/mail
3295 pts/7 S 0:00 \_ tailf /var/log/mail.debug
3296 pts/8 S 0:00 \_ tailf /var/log/messages
3297 pts/9 S 0:00 \_ tailf /var/log/localmessages
3298 pts/10 S 0:00 \_ tailf /var/log/warn
3299 pts/11 S 0:00 \_ tailf /var/log/snort/alert
3301 pts/12 S 0:00 \_ bash
3302 pts/13 S 0:00 \_ bash
3318 pts/14 S 0:00 \_ bash
3319 pts/15 S 0:00 \_ bash
The interesting point is that, if the session is saved on exit, gnome
remember how it was done, and calls the terminal in the same way the next
session. Perfect!
--
Cheers,
Carlos Robinson
| < Previous | Next > |