ANtoine 0 Posted April 27, 2017 Share 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 Link to post Share on other sites
0 Solution RandomRedMage 5 Posted April 27, 2017 Solution Share 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 Link to post Share on other sites
0 ANtoine 0 Posted April 27, 2017 Author Share 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 Link to post Share on other sites
0 RandomRedMage 5 Posted April 28, 2017 Share 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 Link to post Share on other sites
0 ANtoine 0 Posted April 28, 2017 Author Share Posted April 28, 2017 Ok! Thank you for your time Quote Link to post Share on other sites
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 ?
Link to post
Share on other sites