ANtoine Posted April 27, 2017 Posted April 27, 2017 Hello guys, I'm a new user of opencomputers and I met a problem : I edited a prgm : password : local term = require("term") function begin() print("hello customer") print("enter password") password = io.read() if password == "password" then else begin() end end begin() My program is correct, I can run it but I wanted to set it on the boot so the customer must know the password to use the computer. How can I do that ? Quote
0 RandomRedMage Posted April 27, 2017 Posted April 27, 2017 In the /home folder, type ls -a, this will list all files in the home folder, one of them should be ".shrc" edit that file, on the last line, type the name of your program. It should launch the program at boot. Quote
0 ANtoine Posted April 27, 2017 Author Posted April 27, 2017 Well ok thank you. Can you just tell me what I am supposed to write in shrc cause I don't know ^^ Just the name of my program like that : alias etc alias etc alias etc alias etc (name of my program) Is there any needed syntax to write it ? Quote
0 RandomRedMage Posted April 28, 2017 Posted April 28, 2017 No, just type the program. The file just goes down line by line executing each command in the list. So if you end it with an application it will launch the application. Super simple. Quote
Hello guys,
I'm a new user of opencomputers and I met a problem :
I edited a prgm :
password :
local term = require("term")
function begin()
print("hello customer")
print("enter password")
password = io.read()
if password == "password" then
else
begin()
end
end
begin()
My program is correct, I can run it but I wanted to set it on the boot so the customer must know the password to use the computer. How can I do that ?