From sean at b3solutions.co.za Wed Mar 22 15:48:22 2006 From: sean at b3solutions.co.za (Sean Bertinotti) Date: Wed Mar 22 08:49:39 2006 Subject: [Wd_general] Autorun application at startup Message-ID: <001701c64db7$493d5cf0$0c00a8c0@b3solutions.co.za> Hey all, I'm am new to Linux especially White Dwarf. I have written an app in Kylix using SVGALib which just displays some graphics on a little PC104 machine. The app runs without any problems, my only problem is getting the thing to automatically log in as root and then run the application. There will be no keyboards or mice attached to the device, it's purely for demo purposes, so I am not worried about security. Can anybody Help? Regards, Sean Bertinotti -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.6/287 - Release Date: 2006-03-21 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.emji.net/pipermail/wd_general/attachments/20060322/c4b74912/attachment.htm From Pascal.Charest at crc.ca Wed Mar 22 11:50:04 2006 From: Pascal.Charest at crc.ca (Pascal Charest) Date: Wed Mar 22 11:50:08 2006 Subject: [Wd_general] Autorun application at startup In-Reply-To: <001701c64db7$493d5cf0$0c00a8c0@b3solutions.co.za> References: <001701c64db7$493d5cf0$0c00a8c0@b3solutions.co.za> Message-ID: <4421803C.6000708@crc.ca> Hi Sean, It has been a long time since I've intalled White Dwarf, but I'll describe you the method that was working at that time. Note that it's not exactly the same procedure for every linux distribution. Basically, you just have to write an executable script in /etc/rc.d/. At startup, every file that is executable in directory /etc/rc.d/ is called with argument 'start'. At shutdown they are called with argument 'stop'. Make sure that your script return, i.e. add ampersand & to your command. Here is a sample script that I sometimes use. Change values of APP (absolute path of your application), APP_OPTS (application options) and APP_TTY (console output, ex: /dev/tty2 or /dev/null if none) and everything should be nice. ######################################################## APP='/path/to/your/app' APP_OPTS='-o options' APP_TTY=/dev/null #test -f $APP || exit -1 case "$1" in start) echo " " echo "Starting $APP..." $APP $APP_OPTS > $APP_TTY 2>$APP_TTY <$APP_TTY & ;; stop) echo " " echo "Stopping $APP..." killall $APP > /dev/null ;; *) echo "Usage: " $0 " {start|stop}" exit 1 ;; esac exit 0 ######################################################## After that, make sure that your script is executable: chmod a+x path_to_your_script I hope that it will help you, Pascal Charest Sean Bertinotti wrote: > Hey all, > > I'm am new to Linux especially White Dwarf. I have written an app in > Kylix using SVGALib which just displays some graphics on a little > PC104 machine. The app runs without any problems, my only problem is > getting the thing to automatically log in as root and then run the > application. There will be no keyboards or mice attached to the > device, it's purely for demo purposes, so I am not worried about security. > > Can anybody Help? > > Regards, > Sean Bertinotti > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.385 / Virus Database: 268.2.6/287 - Release Date: 2006-03-21 > >------------------------------------------------------------------------ > >_______________________________________________ >Wd_general mailing list >Wd_general@lists.emji.net >http://lists.emji.net/mailman/listinfo/wd_general > > From ccannell at mindspring.com Wed Mar 22 12:23:52 2006 From: ccannell at mindspring.com (Chris J Cannell) Date: Wed Mar 22 21:08:44 2006 Subject: [Wd_general] Autorun application at startup In-Reply-To: <001701c64db7$493d5cf0$0c00a8c0@b3solutions.co.za> Message-ID: <000a01c64dd5$641776f0$040aa8c0@prescott> Sean, If you want to autologin to root you can write a small program to do so. The code for the autologin program is very simple int main() { execlp( "login", "login", "-f", "root", 0); } I've attached a kdevelop project for you with the above code and a compiled binary. You should put the autologin program somewhere in your system like /usr/bin (make sure its executable, chmod +x /usr/bin/autologin). You will also need to add some instructions to your /etc/inittab file. You will want to add -l /usr/bin/autologin to the inferface you are using to login; serial ports are s1, s2, etc, and regular consoles are c1, c2, etc. I use this for logging in over the serial port so my inittab lines looks like this: s1:12345:respawn:/sbin/agetty -L -n -l /usr/bin/autologin -I '\033[2J\033[f' 115200 ttyS0 vt100 note that -l is lowercase L. I hope this helps. Good luck. ________________________________ From: wd_general-bounces@lists.emji.net [mailto:wd_general-bounces@lists.emji.net] On Behalf Of Sean Bertinotti Sent: Wednesday, March 22, 2006 8:48 AM To: wd_general@lists.emji.net Subject: [Wd_general] Autorun application at startup Hey all, I'm am new to Linux especially White Dwarf. I have written an app in Kylix using SVGALib which just displays some graphics on a little PC104 machine. The app runs without any problems, my only problem is getting the thing to automatically log in as root and then run the application. There will be no keyboards or mice attached to the device, it's purely for demo purposes, so I am not worried about security. Can anybody Help? Regards, Sean Bertinotti -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.6/287 - Release Date: 2006-03-21 -------------- next part -------------- A non-text attachment was scrubbed... Name: autologin.rar Type: application/octet-stream Size: 642387 bytes Desc: not available Url : http://lists.emji.net/pipermail/wd_general/attachments/20060322/4cc4f6b8/autologin.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: autologin.zip Type: application/x-zip-compressed Size: 680125 bytes Desc: not available Url : http://lists.emji.net/pipermail/wd_general/attachments/20060322/4cc4f6b8/autologin.bin From markphillips at alum.mit.edu Wed Mar 22 23:46:25 2006 From: markphillips at alum.mit.edu (Mark Phillips) Date: Wed Mar 22 23:47:46 2006 Subject: [Wd_general] SBC- 104+ WDLinux GCC support In-Reply-To: <00af01c560ee$9ce89ba0$296aa8c0@sumeet> References: <00af01c560ee$9ce89ba0$296aa8c0@sumeet> Message-ID: <44222821.1010309@alum.mit.edu> Sumeetp, You can use the "ldd" command to determine what libraries are needed for a specific binary. Simply do an "ldd and it will tell you the libraries that are required. Alternatively, you can link with the "--static" flag, which will resolve all dependencies from libraries available at compile time. While this results in larger executables, it removes the need for the libraries (as long as nothing else on the system needs them!) I've found that static linking can be particularly useful if, for example, you have a single C++ application, and you don't need all of linstdc++. You can get fancier; statically linking from some libraries, while dynamically linking from the libraries you're going to need anyway. sumeetp wrote: > To, > Dear Sir / Madam, > > Here, I have SBC 104+ with installed White Dwarf Linux. I checked > HardDisk space, used is 13 MB , Free 70 MB. > I want only GCC 2.3.2 for glibc 2.2.5 DevTools for Development,not all > DevTools. So,for this howmuch space is required. > How can I easily installed GCC on this SBC within available free space? > Which commands are required for this? > If I do my development / builds on a desktop Linux machine (REDHAT 7.2), > either > cross-compiling, or by using a WhiteDwarf installation on desktop PC, > and then just moving executible files over to the SBC. > Means I compile elsewhere and transfer binaries. glibc 2.2.5 is > supported. by White Dwarf Linux with availble SBC ? > > .But,how can I move -compiled (Binary)-executible files to SBC.What's > procedure is required for it ? > Please,reply as soon as possible. I am waiting a positive reply from > your side. > > Sumeet Pawnikar > Crystaline Infotek PVt Ltd, > Pune,INDIA > > > > ------------------------------------------------------------------------ > > -------------------------------------------------------------- > Crystaline Infotek Pvt. Ltd., Pune, India > Sent using PostMaster by QuantumLink Communications > One Internet account, unlimited personal e-mail addresses > Get your free copy of PostMaster at http://www.mailserve.net/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wd_general mailing list > Wd_general@lists.emji.net > http://lists.emji.net/mailman/listinfo/wd_general From sean at b3solutions.co.za Thu Mar 23 09:07:49 2006 From: sean at b3solutions.co.za (Sean Bertinotti) Date: Thu Mar 23 02:08:58 2006 Subject: [Wd_general] Autorun application at startup In-Reply-To: <000a01c64dd5$641776f0$040aa8c0@prescott> Message-ID: <003201c64e48$7ee9ef30$0c00a8c0@b3solutions.co.za> Thank you all very much for your help, I will experiment today with the different options you guys sent me. And post my feedback later :) Sean B -----Original Message----- From: wd_general-bounces@lists.emji.net [mailto:wd_general-bounces@lists.emji.net] On Behalf Of Chris J Cannell Sent: 22 March 2006 19:24 To: 'Sean Bertinotti' Cc: wd_general@lists.emji.net Subject: RE: [Wd_general] Autorun application at startup Sean, If you want to autologin to root you can write a small program to do so. The code for the autologin program is very simple int main() { execlp( "login", "login", "-f", "root", 0); } I've attached a kdevelop project for you with the above code and a compiled binary. You should put the autologin program somewhere in your system like /usr/bin (make sure its executable, chmod +x /usr/bin/autologin). You will also need to add some instructions to your /etc/inittab file. You will want to add -l /usr/bin/autologin to the inferface you are using to login; serial ports are s1, s2, etc, and regular consoles are c1, c2, etc. I use this for logging in over the serial port so my inittab lines looks like this: s1:12345:respawn:/sbin/agetty -L -n -l /usr/bin/autologin -I '\033[2J\033[f' 115200 ttyS0 vt100 note that -l is lowercase L. I hope this helps. Good luck. ________________________________ From: wd_general-bounces@lists.emji.net [mailto:wd_general-bounces@lists.emji.net] On Behalf Of Sean Bertinotti Sent: Wednesday, March 22, 2006 8:48 AM To: wd_general@lists.emji.net Subject: [Wd_general] Autorun application at startup Hey all, I'm am new to Linux especially White Dwarf. I have written an app in Kylix using SVGALib which just displays some graphics on a little PC104 machine. The app runs without any problems, my only problem is getting the thing to automatically log in as root and then run the application. There will be no keyboards or mice attached to the device, it's purely for demo purposes, so I am not worried about security. Can anybody Help? Regards, Sean Bertinotti -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.6/287 - Release Date: 2006-03-21 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.6/288 - Release Date: 2006-03-22 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.2.6/288 - Release Date: 2006-03-22