PS: I'm not lazy. I just don't know what scripting language to use. Please initiate me![]()
Is it possible to write a script, that works with an "out-of-the-box" Knoppix 3.3 harddisk installation, that executes a program. Once the program is closed, the scripts restarts the program.
Can this script be made?
PS: I'm not lazy. I just don't know what scripting language to use. Please initiate me![]()
Simple, use c++
"
#include <iostream>
using name space std;
void main()
{
system("your program path goes here");
main();
}
"
this will run your program, after that quits it will run the main function and that will run the program and so on for ever.
So all I do is create a text file, insert the code, and chmod it executable? Please don't smirk, I'm a newbie.
Since it's C++, you'll need to compile it first. Put it in a file called forever.cpp and run "g++ forever.cpp -o forever", and you will have an executable called "forever". Careful though - the "#include" line should read "#include <iostream>" (your web browser may think <iostream> is HTML). Oh, and no space between "name" and "space" in "namespace".
If you want to avoid C++, you can use the following bash script:
Type "man bash" in your shell to learn more about bash.Code:#!/bin/bash function doStuff { # your code or program call goes here doStuff } doStuff
Thank you all. I feel like a masochist because I hate ignorance![]()
Oh my, Bash resembles a mixture of Windows batch files and PHP. Smooth![]()
Erhm, sorry but neither of the proposed solutions seem to match the original
requirement, which implies looping. C++ sure is overkill here, a simple shell
(bash) script will do:
Code:while true do # your program invocation here done
With that C++ program, I think it would generate a stack overflow error eventually since it's a recursive function. Possibly the first bash script, too (although I don't know enough about bash to tell you either way).
I'm curious to what program you plan on running.![]()
You don't want it to run to the exclusion of all other programs, like a kiosk, do you?
I'm very interested in an easy way to set up a kiosk. The program I wish to run recursively is rdesktop. It has to be recursive because logging out of Windows also quits rdesktop.

Vintage Atari 1050 Disk Drive for Atari Home Computers w/ Box & Owners Guide
$175.00
5x Vintage SSS SCP1802D SCP1802LD Ceramic CPU 1802 COSMAC 1978 Gold IC
$299.99
Vintage NMB Technologies RT8255CW+ Mechanical Wired Keyboard - Tested
$74.95
Vintage Core CL9 Master Universal Remote Control Steve Wozniak (Apple) READ
$1048.88
Vintage 90’s Computer Stuff Package (MINT)
$100.00
GENIUS MOUSE Vintage PC Serial Mouse 3 Button Model # GM-6 Parts
$14.99
Vintage 3Com EtherLink III 3C509B-C ISA Ethernet Card RJ45 BNC AUI
$27.95
Vintage Atari 410 Program Recorder CIB Open Box Appears Unused 400 800
$194.99
Vintage IBM 3151 ASCII Display Terminal CRT Monitor Untested
$50.00
Vintage Apple Game TAXMAN I + TAXMAN II H.A.L. Labs
$1195.00