Author Topic: Starting Kismet with Script  (Read 3751 times)

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Starting Kismet with Script
« on: September 07, 2004, 03:43:55 pm »
I don't understand shell operations well enough to figure out why I can't use a script to first set TERM=xterm-color and then launch Kismet  
Code: [Select]
# Kismet startup script
export TERM=xterm-color
xterm -e kismet monitor


This will launch Kismet fine, but not in the color mode.

The export command seems to only work within the current instance of xterm or aterm. There must be a way to set this globally or am I just missing something simple?  

Thanks,

Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

pgas2

  • Newbie
  • *
  • Posts: 31
    • View Profile
Starting Kismet with Script
« Reply #1 on: September 07, 2004, 04:35:51 pm »
try xterm -e ' TERM=xterm-color kismet monitor'

export set the environement for running xterm, but xterm might set the variable TERM before runnig kismet...

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Starting Kismet with Script
« Reply #2 on: September 07, 2004, 07:05:56 pm »
Quote
try xterm -e ' TERM=xterm-color kismet monitor'

export set the environement for running xterm, but xterm might set the variable TERM before runnig kismet...
No, that doesn't work either. Thanks tho, anybody else have an idea?

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Laze

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • http://www.pdaXrom.org
Starting Kismet with Script
« Reply #3 on: September 08, 2004, 02:26:35 am »
The problem is probally that the export settings are related the term before - so you could try making 2 scripts - so the one calls the other.

1. StartKistmet:
xterm -e startkismet2

2.startkismet2:
Code: [Select]
if [ "X$DISPLAY" != "X" ]; then
    echo "Setting terminal to x-term color"
    ORGTERM=$TERM
    export TERM=xterm-color
fi
kismet
if [ "X$ORGTERM" != "X" ]; then
    echo "Setting terminal back to $ORGTERM"
    export TERM=$ORGTERM
fi
C760 running pdaXrom lastest ;-)
SL5500 Running Cacko Qtopia
512 MB SD Card, 128 MB CF Card, Prism2 CF Wlan.

Always visit http://www.pdaXrom.org for latest news.

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Starting Kismet with Script
« Reply #4 on: September 08, 2004, 06:24:46 am »
I have done something similar to Laze's suggestion in the script I use to run Kismet, but you can also just tell xterm (or aterm) to start with TERM set to xterm-color, like this:

Code: [Select]
xterm -tn xterm-color -e kismet
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults

JedTheHead

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • http://
Starting Kismet with Script
« Reply #5 on: September 08, 2004, 11:35:40 am »
I use a script to launch kismet, and always do it from another console (just bc I spend most of my time in the console):

Code: [Select]
#!/bin/bash
export TERM=xterm-color
iwconfig eth0 essid "xxxxxxx"
... (etc)

Works great for me each time!
SL-c860 / PDAXROM
pdaXrom Theme Site

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Starting Kismet with Script
« Reply #6 on: September 08, 2004, 02:13:41 pm »
Quote
Code: [Select]
xterm -tn xterm-color -e kismet
Thanks I didn't know about the -tn flag. Works great I just added it to my aterm.desktop file and now all consoles can display the color version of kismet.

But now for my other kismet related problem:
The channel hopping failure due to the orinoco drivers on my socket card (I think), it works only 30% of the time, mostly it gets stuck on channel -1. There is a patch for the drivers here But I'm afraid patching drivers is a bit beyond me at the moment. Is there a work around?

Thanks,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF