Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I did a google search on your problem and ran across your previous thread. I was a bit confused. Are you having trouble running the python program as part of the login script, or are you having trouble running the python program in general?
If it is the latter, I know that I have to type 'python /home/user/my_program.py' in order to run the code. As this is not necessary in Windows, it took me a while to figure that out.
If the commands run fine in the python shell (the >>> prompt), then I should think that they would run in the exact same manner when executed from a python script file. I can't think of any reason why the system would treat the commands any different in this case.
I would just insert the command 'python /home/user/client.py' into the file that you choose to try like jonaskoelker suggested and see if it works.
But it doesn't run automatically when I'm insert the command into one of this :
I tried to insert at begining or end of the bash script, but still not run my program (I've test it by logoff and login)
Except for something weird, if I insert the command at the beginning of .bashrc file then the the script automatically run when I open the Terminal.
What I need is the script is run on every user login automatically.
code = chr(203) + chr(214) + chr(201) + chr(198) + chr(001)
s.send(code + 'LINUX CLIENT PROGRAM MASUK MEJA ' + stationid);
if __name__ == "__main__":
and when I tried to run it on terminal :
Python 2.4.1 (#2, Mar 30 2005, 20:41:35)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import client
its work perfectly no error, so what is the problem really is, I'm really confuse, please Help