Results 1 to 4 of 4
Hi Guys,
I'm running Fedora core 6 and have iinstalled WINE to run a weather program. The program collects data from a weather station connected to serial com port 1. ...
- 05-13-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 2
bash script for com port 1
Hi Guys,
I'm running Fedora core 6 and have iinstalled WINE to run a weather program. The program collects data from a weather station connected to serial com port 1. In order to get the program to "speak" to the com port I currently have to open the terminal window, log in as su and then chmod 777 /dev/ttyS0. I would like to be able to write a script that will run when linux starts to a) carry out the above chmod to the com port, and b) start wine and the program I need running at the same time. I am sure this is fairly easily done but have no idea where to start.
Any clues would be appreciated!!
Andy
- 05-13-2007 #2
Use sudo rather than su. Set up a line in /etc/sudoers (using visudo) to allow you to execute the command, then:
(Though you should set things up so you can get by with less than 777, probably 774 would work.)Code:sudo chmod 777 /dev/tty/S0
I would like to be able to write a script that will run when linux starts to a) carry out the above chmod to the com port, and b) start wine and the program I need running at the same time. I am sure this is fairly easily done but have no idea where to start.
Have you read the wine man page?
- 05-14-2007 #3Just Joined!
- Join Date
- May 2007
- Posts
- 2
Thanks for that I'll give it a go.
Haven't had time to read the Wine FAQ's yet as I was more concerned with getting the com port working on each reboot. As I said I'm sure it's easy to do.
Andy
- 05-17-2007 #4Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
> a) carry out the above chmod to the com port
put "chmod 777 /dev/ttyS0" in /etc/rc.local: it will be
executed on bootup
> b) start wine and the program I need running at the same time
well, look at "man wine" see if there'e an option "-e"
or something, that let's you start wine with your
program already loaded
exec wine -e programthe sun is new every day (heraclitus)


Reply With Quote
