I build custom assembly equepment at work and we have an application where we need to integrate a PC with some of our equipment. The PC will need to boot up and display an HTML page local to the machine. The PC will not be on a network and will not have the internet. The PC will not be connected to a keyboard and mouse. This is what I need help with:
The PC will have to log in without a username and password prompt (no keyboard and mouse)?
The PC will have to run a web browser (firefox, google chrome, or opera) upon startup, how do I do this?
The PC will be shut down when the power is disconnected and on restart I don’t want it to run a checkdisk application - does opensuse do this?
You can enable auto-login in openSUSE, this is an option during the installation or you can enable it later on via the SysConfig editor.
Depending on what desktop environment you are installing the method is slightly different - on KDE you can accomplish this easily by going to System Settings, Advanced, Autostart and Add Program then choose Firefox as a program to be added to auto start - you can then specify Firefox to use the URL of your choice as the “Homepage” so it will open it automatically.
You can edit /etc/fstab and change the last two numbers to **0 0 **which will disable fsck (chkdsk equivalent) on startup. Note that ext4 chkdsk is so fast you won’t even notice it.
Additional note; Since you wish to “cold kill” the system the next time the system starts Firefox might complain that it wants to try to restore the session, to prevent this you might want to go to Firefox -> about:config and change browser.sessionstore.resume_from_crash to false, rather than the normal true so it won’t ask you to restore the pages that were last open.
Wow… thanks so much. I didn’t even think about resuming the browser from the crash. You have been very helpful! Is KDE the prefered desktop environment? I have been using Gnome in Ubuntu. Thank again!
You can use either one - pick the one you are more comfortable with.
If you are only going to run a browser and nothing else, you could even consider not using a desktop environment at all, just running a window manager and putting Firefox as the only command to be run (and re-run if it crashes) maximized (or full screen, rather).
Will you be running the system off of a harddrive or ssd? I’m a little unclear as to what type of deployment scenario you have here, I’ve been building systems much similar to what you’re working on right now, mobile systems that have to survive pretty much anything thrown at them
You can do the same things in Gnome. If you are just killing the power to it, it will eventually get pretty hosed up. I would not disable fsck, and I too would use EXT4 for the file system to keep fsck fast enough that it is not an issue.
Just strip out everything you don’t need during the install to keep it all light and fast, and that should also decrease the boot time a bit.
If you don’t have power outages and the thing is never connected to a network, it should run for years without ever being rebooted.
Yes, please don’t turn off fsck(8) completely! Firstly mount ext4 with maximum filesafe saftey options against corruption in fstab(5) :
data=journal,barrier=1
Effectively that’ll mean < 5 secs data are in buffers before getting to disk. Do not use LVM as it still doesnt’ support barriers. Replaying the log is fast. Hopefully your application putting up the web page and doing (presumbaly logging) is using fsync(2) correctly. If 5 secs is too long, adjust the kernel disk flushing times (default are 5 meta-data, 30 data), or consider using filesystem for key data in synchronous mode (slow).
As you won’t be updating the machine, consider a seperate ‘/usr’ which you can mount read-only, once you’ve got it installed. That way you’ll reduce the size of “dirty” filesystems on power up. That’s the ‘ro’ option in fstab(5).
If the power off is same time every day, ie evening at 1900; then schedule a job to power-off the machine, a few minutes before. You can use PC BIOS option to wake up and boot the machine at a suitable time every morning. If that’s not possible and you want to avoid corruption issues, a cheap UPS could signal power off, soon after the mains supply is terminated.
if a touch screen you could run maybe run FF in kiosk mode and, teach
folks how shut the machine down, prior to rude power off and maybe
save some lost bits and links and such…
I would assume it’s a data reporting application. Some inputs are monitored, and then make a dynamic webpage. Using a browser, means you re-use all the dynamic content generation which is very well supported, rather than write custom infrastructure.
This PC will reside inside a piece of custom automated assembly equipment. The automation is run by a Mitsubishi PLC and the user interface is a Red Lion HMI. The machine is rather long and the customer has requested that a monitor be added to the end of the machine where the HMI cannot be seen well. It will display historic data and current runtime data relavent to the efficiency of the machine. The red lion HMI has the capability to be monitered remotely through a web browser when connected to a network. In this case the network will be this inexpensive PC running opensuse and the web browser. The web browsers homepage will be directed to the IP address of the Red Lion HMI, and will recipricate the information shown on the HMI. The pc will turn on when the equipment is turned on, and will power down when the power is cycled on the machine. Please let me know if you have any more questions. I appreciate the feedback much and would like to know about problems I may have with the system before I get it up and running. Curently I am downloading the ISO files required to produce the live disk so it is becoming a reality quickly. Thanks.
The user cannot change the web page. The monitor will update when changes are made at the HMI and that is all. It will run off a hard drive. It won’t be subject to shock or movement. It will be mounted inside the equipment.
provinceautomation wrote:
> I appreciate the feedback much and would like to know about
> problems I may have with the system before I get it up and running.
i think some of the other folks in this thread (the real gurus, i’m
not) need to talk to you some more about shutdown via pulling the
power, and help you sort though a way to minimize upsetting the file
system, creating a need to fsck…
they have said a lot but, i don’t know if they have already said all
that needs to be considered without details like:
how many years you expect this thing to run?
power cycled each day, week, month, never? only when interrupted by
storm etc…
i’m thinking a reasonable sized hard drive can probably take a lot of
lost nodes and what ever and still operate…but, at some point it is
gonna wake up one day and refuse to get out of bed!
so, you may need to build in a “maintance schedule” where it can take
the time to run some disk fixing…
like if you could get the customer to agree to once a month to allow
the machine to take (say) 10 minutes booting then you could set up a
cron job to run on (say) the selected day of the week…
OHHHHH…hey guys/gal, is there that forced fdisk every 60 days?? need
to undo that huh? or, he needs to understand it, why…and be able to
explain to the customer what/why…
I think the OP is probably sharp enough that he only needs to be pointed in the right direction. There has been plenty of that, and it is up to him to make the decisions as to how he wants to implement it.
As for shutdown, one can easily option the PC to do a shutdown when the power button is momentarily pressed. Much better than just pulling the plug so to speak.
Consider how much data flow there is. I don’t think fears about filesystem corruption are reasonable, as your application is not manipulating the filesystem to any great extent. Probably you don’t even need to keep the data on the PC.
Actually you could additionally use a tmpfs (virtual memory swap backed) filesystem for the data you won’t need to keep, most likely the auto-generated webpage. If you have issues with sudden shutdowns or worry about it an inexpensive UPS ought to suffice to shut the machine down cleanly.
You might even be able to run without a hard disk, booting from re-mastered Live CD perhaps create something special purpose with SuSE studio. Then shutting down simply looses all data in RAM, but on boot up, your software can just re-generate the memory backed filesystem, and then re-make the dynamic pages once it can read the data.
Yes I see the issue. I will have to have cron restart the PC everyday I think at 12:00 noon. Also I am now considering putting the OS on a thumb drive rather than a HDD that spins… What do you guys think?
I agree. Boot CD or thumb drive set read only would be good too. No need for a swap file just to run a browser. This would make it fail safe for power down by cutting the power to the whole piece of equipment.
If the new 11.2 release doesn’t install easy for you on the cheap PC, then give 11.1 a shot, just make sure you run updates to fix bugs; then it should be much more solid and stable after a years testing by 1000’s of people. The 11.2 release is very new, and whilst a decent one, it will benefit from a few months wide deployment and the sharing of bug fixes by FOSS community a 4 Major distro’s have all released in the last month.
This forum is very attentive and helpful. I would like to thank everyone. There is a bit of new development. this is going to sound silly… I need to alter the background to have our logo on it - is this simple to change in KDE (I can make the new image I just don’t know how to change it)? Also the resolution on the monitor is much more than the HMI and the infolrmation is only taking up part of the desktop. I am thinking I would like to run some “widgets” to display the time and date - is this simple also? I am running the instalation currently. Thanks again! Also I am going to install to a thumb drive. Maybe I will snag the HDD and take it home…
Great idea so long as you can boot it. A memory card reader, with SD card hidden away would be a possibility to for the system and your software. It’s less likely to be stolen than a visible neat USB key. There’s a Fate entry on booting from SD cards (only supported by a few BIOSes), though I suspect an cheap & ugly CD-ROM will be very effective.
ext3 & ext4 has performed well for me on flash drive. Basically you could buy a little more RAM and unpack your software and data files, every time the PC starts into memory, if you have no need for persistent files. The more system you have RO, the less there is to go wrong.
The BIOS can wake the PC when you expect power to be on. I don’t see why you would need to reboot the PC in middle of day, if it’s shutdown at night. Uptimes of years are not unknown for Linux boxes.
The Box sets will likely include suitable stickers wit “Geeko” on, and things like “Powered by openSUSE Linux” … etc