This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Zac13422's profile picture

zOS 0.2 alpha

Started by Zac13422, 18 July 2016 - 03:17 PM
Zac13422 #1
Posted 18 July 2016 - 05:17 PM
zOS 0.2 alpha


zOS is a securised system and an overhaul of craftOS. Currently, it's mostly based on craftOS programs but it will change in the future.

Features :
-Multi-user system with a root account
-Permission system (currently, the root can do everything and the other users can only edit their own personal folder. They can't access the /data folder for security reasons and they can't access the lua prompt)
-new shell (zsh) with new colors and a new prompt
-update system
-Work with advanced and non-advanced computers

Download version 0.2 :
pastebin run 4KUJMN3g

At the installation, it will ask you if you want to set the branch to testing. I highly recommend you answering no. The testing branch is used by me to test the new features i will add to the next stable version. The system can change quite fast on this branch while I am working on and can potentially make your system unusable. However if you want to help me by finding bugs or giving suggestions, there's no problem at all.

Remember to keep zOS up to date with the builtin update command.

zOS source code :
SpoilerInstaller : http://pastebin.com/4KUJMN3g
zOS : https://github.com/Zac13422/zOS

Screenshots :
SpoilerInstaller :







zOS in action :







On non-advanced computers:


List of new commands :
Spoiler-date
-logout
-passwd
-pwd
-update
-useradd
Nothy #2
Posted 20 July 2016 - 02:53 AM
This looks good so far. A nice user interface would be amazing, otherwise you've done a great job so far!

EDIT:
Upon further inspection, this looks like it's only using the shell programs. and ls/list does not work properly.
I'd recommend that you hardcode *some* commands such as ls, list, shutdown, reboot, etc.
Edited on 20 July 2016 - 12:55 AM
Zac13422 #3
Posted 20 July 2016 - 02:10 PM
Thanks for your reply.
I just want to know what's not working with ls/list. Were you connected as root or as another user?
About the GUI, I'm not focused on it now. Currently I'm just remaking the basic commands, the shell and a new program manager which will be able to install new programs, update and remove them.
For the next version, I will make zsh (the shell) more customizable and I will implement the package manager.
thecrimulo #4
Posted 20 July 2016 - 02:54 PM
Actually I prefer it CLI only, it looks nice. I'll try it out and take a look at the code ;)/>
Nothy #5
Posted 20 July 2016 - 03:32 PM
Thanks for your reply.
I just want to know what's not working with ls/list. Were you connected as root or as another user?
About the GUI, I'm not focused on it now. Currently I'm just remaking the basic commands, the shell and a new program manager which will be able to install new programs, update and remove them.
For the next version, I will make zsh (the shell) more customizable and I will implement the package manager.
I was logged in as root, and as a regular user. Seemed to work for neither, and a package manager would be amazing.
Zac13422 #6
Posted 20 July 2016 - 05:30 PM
Thanks for your reply.
I just want to know what's not working with ls/list. Were you connected as root or as another user?
About the GUI, I'm not focused on it now. Currently I'm just remaking the basic commands, the shell and a new program manager which will be able to install new programs, update and remove them.
For the next version, I will make zsh (the shell) more customizable and I will implement the package manager.
I was logged in as root, and as a regular user. Seemed to work for neither, and a package manager would be amazing.

Where were you on the computer (you can use the pwd command to see that)?

Currently the system is composed of those directories :
/api : The place for system APIs
/bin : The place for system programs
/data : The place for data files (such as the user list)
/home : The folder which contains all user's personals folder. When you log in as a standard user, it sets your current directory to /home/[your username]
/root : Root's personal folder. When you log in as root, it sets your current directory here
/tmp : Temporary folder. In a future release, all the files in this folder will be deleted on shutdown
/usr : User programs folder. Contains :
/usr/api : User APIs
/usr/bin : User programs
/usr/data : User data files

If we have a look at the prompt on login, we should have that :

[root@yourComputerName ~]# (as root)
or [yourUserName@yourComputerName ~]$ (as a standard user)

The "~" means "Your personal folder" eg. /home/yourUserName or /root
Currently, these directories are empty after the install, and this is maybe why you think the ls command doesn't work. Try "ls /" and see :)/>
Lyqyd #7
Posted 20 July 2016 - 07:39 PM
You might check out packman for package management if you're not dead-set on building your own.
Zac13422 #8
Posted 20 July 2016 - 08:23 PM
You might check out packman for package management if you're not dead-set on building your own.
Your package manager looks really interesting. It would make me gain a lot of time. However after a look at the code, I saw that we don't use the same directories. So how about a fork (anyway, I give you all the credits :)/> )? If so, can I change the name of the program and says it's a fork of yours.
I also made a wiki for zOS on my GitHub repo. You can check it out here https://github.com/Zac13422/zOS/wiki . It's WIP but I'm working on it so that users could know what's the changes between craftOS and zOS.
Lyqyd #9
Posted 21 July 2016 - 02:02 AM
Hmm. The directories are pretty closely aligned–that's why I had suggested it in the first place. I suppose they don't match up exactly, though. Packman does assume it's a userspace program, hence it wanting to reside at /usr/bin.

You are free to fork it, it's under the MIT license (which I'd neglected to include until tonight, whoops).