Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: blue horse on January 26, 2012, 03:19:04 PM
-
--------------------------------------------------------------------------------------------------------
How do I start X apps on boot?
Add them to files in /home/tc/.X.d, one per file, backgrounded. Here's how to start Opera at boot:
opera &
--------------------------------------------------------------------------------------------------------
forgive my ignorance, can someone give an example of two entries? I am confused with the meaning of X, is it same as app name or is it a serial number? can't be literally X for more than one entry.
-
"X apps" refers to those applications that use the X-windows graphical system, as opposed to "console apps" which are text based and run independently of the graphical user interface (in "terminal mode" either on the console or in a terminal window).
X apps are started after the Xwindows system starts up, since they depend upon it. They can be autostarted from scripts in directory /home/tc/.X.d/
Non-X apps (console apps) can be autostarted by invoking them from within /opt/bootsync.sh
To autostart emelfm2 (an X application) you would simply place a script containing the following in /home/tc/.X.d
#!/bin/sh
emelfm2 &
It doesn't matter what you name the script, but it will need to have the execute permission set using the chmod command.
I don't actually use the the autostart functionality myself, so someone please correct me if I've missed anything.
-
thanks for the tips.
i was able to start X apps on start-up, particularly flit to show clock and speaker status.
there's more...
i installed printer driver through CUPS and gutenprint, see http://forum.tinycorelinux.net/index.php/topic,12399.0.html (http://forum.tinycorelinux.net/index.php/topic,12399.0.html)
however, every time i reboot, the printer disappears and i will have to go through CUPS to set it up. how can i make the printer persistent?
if someone suggests using extension, please be specific, like step-by step instructions, my understanding goes: build an extension to save information you want to restore when boot-up, but i do not know what to save and how to restore.
thanks.
-
try to read final part of cups.tcz comments
-
i do not use backup, the following link solved my problem.
http://wiki.tinycorelinux.net/wiki:printer_setup_using_cups (http://wiki.tinycorelinux.net/wiki:printer_setup_using_cups)
basically, it says to save two files as extension
/usr/local/etc/cups/printers.conf
/usr/local/etc/cups/ppd/printer_specific.ppd
the trick is: without properly installing the printer first, you wouldn't even see these files.
thanks for the reply.
-
Hi Lee,
I don't actually use the the autostart functionality myself, so someone please correct me if I've missed anything.
Not so much corrections, more observations based on my experience of autostarting via .X.d. I have used this to start various apps on a range of systems running TC 3.x and 4.x.
To autostart emelfm2 (an X application) you would simply place a script containing the following in /home/tc/.X.d
Code: [Select]
#!/bin/sh
emelfm2 &
It doesn't matter what you name the script, but it will need to have the execute permission set using the chmod command.
Not sure this is required. The files that autostart my apps are owned by an unprivileged user and have permissions rw_r__r.
Non-X apps (console apps) can be autostarted by invoking them from within /opt/bootsync.sh
This is indeed the case. They can also be run via .X.d. By way of example, the 4.x series introduced the pcspkr module. I use this on headless units to indicate when the boot process has ended. .X.d is at the end of the boot up sequence and is a suitable point at which to generate an audible notification.
Additionally, I am not certain that starting apps on a "...one per file..." basis is a strict requirement. I have certainly used it in this way, but have also successfully used a single file to start multiple apps. I never fully understood the reason for starting each app via its own file and simply assumed that it was perceived to be a simpler way of managing the process.
-
...basically, it says to save two files as extension
/usr/local/etc/cups/printers.conf
/usr/local/etc/cups/ppd/printer_specific.ppd
yes, perhaps you may read .Info of cups is more implicit, however, more or less the files are the same
"To persist across boots, add the following to your backup:
/usr/local/etc/cups/ppd/HP_OfficeJet_G85.ppd [for example]
/usr/local/etc/cups/printers.conf
/usr/local/etc/cups/cupsd.conf (only if you changed it)
/etc/shadow (if you want to save to root password"
You can create an extension of any file on your filesystem, compared to the backup file simply change the format and functionality.
-
Additionally, I am not certain that starting apps on a "...one per file..." basis is a strict requirement. I have certainly used it in this way, but have also successfully used a single file to start multiple apps. I never fully understood the reason for starting each app via its own file and simply assumed that it was perceived to be a simpler way of managing the process.
Yes, that one is just a style question.
-
Didn't know this but yes you can start many apps from the same file, and the file name is unimportant.
I followed the guide and have one file per each app in .X.d.
Also find that the startup files can be set tc:staff and 644