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

XWin 2 - console-based OS with multitasking and user privileges.

Started by puzzletime, 04 November 2014 - 01:50 PM
puzzletime #1
Posted 04 November 2014 - 02:50 PM
XWin 2

Version 2.0 Beta


XWin 2 is a new console-based operating system for CC I am developing now instead of CCWin, which was a failue :)/>
It is planned to have modular structure, meaning that you can easily add or rewrite its parts. It is deployed with an improved shell, but without any graphical interface, which is being developed and will be released as a separate project.

XWin 2 currently has:
  • Multiple user accounts with different privileges
  • Cooperative multitasking
  • Shell
And a bunch of small but useful utilities like file archiver or task manager.
It also supports file permissions (similar to UNIX-like systems).
XWin 2 is partially compatible with CraftOS applications. When I fix all bugs, it will become fully compatible ;)/>

Please give feedback and report any bugs found!

Screenshots:
Spoiler



As you can see, folder "sys" is hidden from all users except root.

Download:
Setup utility can be obtained via pastebin:

pastebin run a7d17F00

Default user: root (no password needed)
Change root password: user -cp root <newpassword>
Create a new user: user -create <name> <password> (password is optional)


Manual:
SpoilerPermission format: rwxrwxrwx, where the first 3 letters represent root permissions, the second 3 - owner's and the third - all users'.
"-r" argument passed to some programs means recursive executing.
File names starting "/" are interpreted as global.

chmod - change file permissions. Syntax: chmod [-r] <path> <mod>
chown - change file owner. Syntax: chown [-r] <path> <owner>
cp - copy file. Syntax: cp <from> <to>
ls - show contents of a directory. Syntax: ls [path]
mkdir - make new directory. Syntax: mkdir <path>
mv - move file. Syntax: mv <from> <to>
pack - pack folder into one file. Syntax: pack <path> <filename> [-se], where [-se] means creating self-executable package.
programs - show contents of /bin
reboot - reboot system
rm - remove file. Syntax: rm [-r] <path>
runas - execute a command as another user. Syntax: runas <user> [-d] <…>, where [-d] means executing command in background
shell - opens a new instanse of shell. Syntax: shell <…>
shutdown - shutdown system
stat - show info about a file. Syntax: stat <path>
sudo - execute a command as root. Syntax: sudo <…>
tasks - list running processes.
unpack - unpack archive created by pack. Syntax: unpack <filename> <path>
user - manage users. Syntax: user -list - lists all users, user -create <username> [password] - creates a user, user -cp <username> [newpassword] - changes user password, user -remove <username> - removes user.
DannySMc #2
Posted 12 November 2014 - 02:06 PM
I like the idea!
Maybe an interface? or make it an API as this would be useful for other users!
tenshae #3
Posted 18 November 2014 - 09:55 PM
Honestly, I've got to say I'm disappointed at the fact that no one really paid much attention to this. The only problem is lack of user utilities.
DannySMc #4
Posted 19 November 2014 - 09:11 AM
Honestly, I've got to say I'm disappointed at the fact that no one really paid much attention to this. The only problem is lack of user utilities.

This is because it is just another version of CraftOS from the screenshots anyway, there needs to be more that will benefit users!
tenshae #5
Posted 20 November 2014 - 02:11 AM
Honestly, I've got to say I'm disappointed at the fact that no one really paid much attention to this. The only problem is lack of user utilities.

This is because it is just another version of CraftOS from the screenshots anyway, there needs to be more that will benefit users!
If you look at the code, you'll realize that for developers this is 3 billion times more featureful than the 'leading OSes'
DannySMc #6
Posted 20 November 2014 - 09:21 AM
Honestly, I've got to say I'm disappointed at the fact that no one really paid much attention to this. The only problem is lack of user utilities.

This is because it is just another version of CraftOS from the screenshots anyway, there needs to be more that will benefit users!
If you look at the code, you'll realize that for developers this is 3 billion times more featureful than the 'leading OSes'
Fair enough, but where does it say it? and if you are referring to the manual, yes there is some useful features, but not enough for someone to actually migrate to it.
Like I said I am not slating it, I like the idea but for the younger ones that play Minecraft and use ComputerCraft, this won't really benefit them…
It would be better to use it as an API for others, because then they can implement their ideas with using all the features that come with this OS, but I wouldn't call it an OS, more of a advanced terminal.
This is because it utilities no peripherals, and is based more on just making a colourful terminal clone.

NOTE: I DO LIKE IT, I AM JUST SAYING MOST OF THE YOUNGER ONES AND PEOPLE THAT PLAY IT WILL EITHER MAKE THEIR OWN OR USE A GRAPHICAL ENVIRONMENT!
Thanks :)/>
puzzletime #7
Posted 27 November 2014 - 09:08 AM
Honestly, I've got to say I'm disappointed at the fact that no one really paid much attention to this. The only problem is lack of user utilities.

This is because it is just another version of CraftOS from the screenshots anyway, there needs to be more that will benefit users!
If you look at the code, you'll realize that for developers this is 3 billion times more featureful than the 'leading OSes'
Fair enough, but where does it say it? and if you are referring to the manual, yes there is some useful features, but not enough for someone to actually migrate to it.
Like I said I am not slating it, I like the idea but for the younger ones that play Minecraft and use ComputerCraft, this won't really benefit them…
It would be better to use it as an API for others, because then they can implement their ideas with using all the features that come with this OS, but I wouldn't call it an OS, more of a advanced terminal.
This is because it utilities no peripherals, and is based more on just making a colourful terminal clone.

NOTE: I DO LIKE IT, I AM JUST SAYING MOST OF THE YOUNGER ONES AND PEOPLE THAT PLAY IT WILL EITHER MAKE THEIR OWN OR USE A GRAPHICAL ENVIRONMENT!
Thanks :)/>

Well, as I said, a graphical interface is coming soon, I'm just kind of overloaded with my exams right now… This was intended to be just a core implementing some basics that anyone can take (with my permission, I like giving permissions :)/>) and modify (add their own GUI, for example), that's why I focused more on the insides than on a complicated user interface.

Anyways, thank you guys for the feedback!
willwac #8
Posted 30 November 2014 - 03:06 AM
I love the shell. Could you also add TAB completion?
puzzletime #9
Posted 30 November 2014 - 10:34 AM
I love the shell. Could you also add TAB completion?
That sounds like a good idea, I'll consider it.
oeed #10
Posted 30 November 2014 - 10:57 AM
I love the shell. Could you also add TAB completion?
That sounds like a good idea, I'll consider it.

If you're wanting an example implementation I did one here a while ago.
puzzletime #11
Posted 30 November 2014 - 09:47 PM
I love the shell. Could you also add TAB completion?
That sounds like a good idea, I'll consider it.

If you're wanting an example implementation I did one here a while ago.

Thanks! :)/>