![]() |
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
Quote:
If you want the actual _programs_ you start to also get them, you have to export them to the (current process', that is, the shell's) environment first. Once you start another program, it will receive a copy of your environment and thus have a copy of the variable (its name and its value) in there, too. Actually, I don't know why it makes things better in this situation, because the script uses the shell to expand all the variables to their values anyway - so what use it exporting them if one is already passing them as arguments? On a slightly off-topic note, the way UNIX processes work is like this: As far as the kernel is concerned a process is a collection of: process ID, command line arguments, environment, current working directory, process running status, user ID, standard input, standard output, standard error, open files, memory blocks, disk image it was loaded from, other stuff we don't care about. The first process there is is called "init". It always has PID (process ID) 1. This "init" process doesn't want to do all the work on its own so it will clone itself (the function is called "fork"), and instruct the clone to do the dirty work. The only thing it does is to wait until the clones die and if so, launch new ones. This "fork"ing will copy the entire "process" information as-is except for the process ID (will get a new one). This includes the environment variables and that's why they are called "environment" variables :-) Clones (or more correctly: Processes) can instruct the kernel to load another image, at which point the memory blocks of ITSELF will be filled by loading the new disk image (and the process' command line arguments be updated). Then it executes the function "main" in the newly overwritten memory blocks (the function to do all this is called "exec"). This will not touch environment variables (would usually make no sense). So the way you can use this is to set some environment variables as early as possible (using "export" in shell or "putenv" in C) and all the other programs started by you (or your children) after that will see them (or at least see copies of them), whether they want to or not (and that later point is the principal difference to arguments). Note that they can change their copies of the environment variables but they cannot affect their parents (you probably couldn't make rules for your parents either ;-) ) Famous environment variables are PATH the search path for executables. HOME the directory where your user data is (i.e. the "home directory"). DISPLAY the display (roughly computer monitor) to display programs on JAVA_HOME which java VM to use, if anyone wants to use a java VM. |
Re: SMS-based stolen phone locator
Thanks for such a thorough explanation, danny. I was wondering why some upstart scripts were using "exec" instead of just running their external processes within script...endscript and now it makes sense.
What doesn't make sense is how no one has reported success for either the original script or the modified one with added "exports" (which shouldn't even doing anything). I've installed it on two different n900s using the same installation steps and it works flawlessly. Can anyone out there confirm that the script works for them? |
Re: SMS-based stolen phone locator
Quote:
You have transferred a file (probably from a Windows computer) containing a carriage return (or 30) to the UNIX platform and while Windows ignores it, UNIX actually knows such arcane controls. Therefore, it actually gives the carriage return to the started process (if it can in fact locate the disk image "foobar<carriage return>". One can tell by the wonderfully arcane way it overwrote the "line 22" by "<go back to the beginning of the line>: not found". Cute :-) No, on a more serious note: Windows (and DOS) text files are like this: blahblah<carriage return><line feed> blahblahblah<carriage return><line feed> UNIX text files are like this: blahblah<line feed> blahblahblah<line feed> Use "dos2unix" or your favourite hex editor (or a decent programmer's text editor) to get rid of the extra carriage returns. If you are on UNIX, remove them by: tr -d "\r" <XX >XXX |
Re: SMS-based stolen phone locator
Hello!
I have a problem. I send sms with alert code, n900 try to connect to gps. When it connected i don't get any sms and i don't know why. I think i make banana script good. Quote:
Help me please. Is there any way to send email also?? Sorry for my english. Waiting for replay. |
Re: SMS-based stolen phone locator
Quote:
Change HOME_PHONE to 0048601XXXXXX Change VALID_IMSI to an invalid one Reboot If the 0048 prefix works, we can make a small change to the python script to get alert-code SMS working too. Quote:
|
Re: SMS-based stolen phone locator
is there any else phone tracker app in case n900 stolen? simple one ;p
its a bit techy and i dont think so i am capable of doing it.. so any mighty job will be really appreciated.. thanks |
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
aww its tough to get it all in one day ,atleast to me ..
i bought this phone 3 weeks ago ,hopefully by the time i will be able to do all the good work . just wanted to have a simple app to locate my cell phone ..anyway thanks once i saw one app in extra devel ( i am here ) hope you have heard about it ..what do you think about that ? should that be the preference ? |
Re: SMS-based stolen phone locator
Quote:
http://wiki.maemo.org/Extras-devel The "I am here" is unsupported and might give you some trouble to uninstall. http://wiki.maemo.org/I_am_here |
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
Quote:
|
Re: SMS-based stolen phone locator
Quote:
http://talk.maemo.org/showthread.php?t=60729 http://wiki.maemo.org/SMSCON |
All times are GMT. The time now is 21:08. |
vBulletin® Version 3.8.8