LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   I have Two quesitons: 1.printer 2.startup (https://www.linuxquestions.org/questions/programming-9/i-have-two-quesitons-1-printer-2-startup-91909/)

captainstorm 09-12-2003 02:13 AM

I have Two quesitons: 1.printer 2.startup
 
Hello all,

I have another two questions here and wondering if I could get help.

1. I need to write (or copy:)) a simple program to send some texts to the printer connected to the parallel port. I have found this page to write program fragment in user mode : http://kernelnewbies.org/documents/k...book/x886.html
I do not need a complex driver (program). Do you have some other useful links?

2. What file(s) I should modify and how to modify to let linux start up directly into my account (without the name and password) prompt, and how to automatically excecute a program after this?

Again, Thank you for any help!

kev82 09-12-2003 05:15 AM

by captainstorm
1. I need to write (or copy) a simple program to send some texts to the printer connected to the parallel port. I have found this page to write program fragment in user mode : http://kernelnewbies.org/documents/...tbook/x886.html
I do not need a complex driver (program). Do you have some other useful links?


anything wrong with cat file > /dev/printerdevice

by captainstorm
2. What file(s) I should modify and how to modify to let linux start up directly into my account (without the name and password) prompt, and how to automatically excecute a program after this?

why does it need to log you in?? just put the command you wanna execute in your rc.local, rc.sysinit or whatever its called.

captainstorm 09-12-2003 07:39 AM

Thank you Kev82:) you are the best I believe.

The 1st program slice I should integrate into the main stream. Can you show me some directions how to use bash in C?, Or maybe just use the User-Level driver can do.

As for the second, I am also looking at this rc.sysinit, inittab, etc. But I think it is necessary to modify the after the last module has been loaded. In /etc/rc3.d the last module I think should be S99local. Do you mean I could modify here?

Many thanks to you for all the help:)

jinksys 09-12-2003 09:24 AM

It seems to me like he wants linux to automatically boot to his user account, without a display manager or command line prompt.
If you are using KDM as your display manager you can go into Kcontrol and tell KDM to automatically log you in when it starts up.

As for automatic execution ofyour program, the safest options would either to add a line to your rc.local but instead using the
command "su -l user -c command" , without quotes. If it is an program that needs X, id use either kde or gnome's autostart features...if you user kde/gnome that is.

captainstorm 09-12-2003 09:55 AM

Thank you all.:)


All times are GMT -5. The time now is 05:42 AM.