OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: jerrybme on September 07, 2004, 03:43:55 pm

Title: Starting Kismet with Script
Post by: jerrybme 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
Title: Starting Kismet with Script
Post by: pgas2 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...
Title: Starting Kismet with Script
Post by: jerrybme 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
Title: Starting Kismet with Script
Post by: Laze 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
Title: Starting Kismet with Script
Post by: rgrep 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
Title: Starting Kismet with Script
Post by: JedTheHead 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!
Title: Starting Kismet with Script
Post by: jerrybme 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 (http://www.kismetwireless.net/code/orinoco-0.13e-rfmon-dragorn3.diff) But I'm afraid patching drivers is a bit beyond me at the moment. Is there a work around?

Thanks,
Jerry