You are not logged in.
Hello everyone!
I'm trying to create a dedicated mostly terminal-guided server os. So far I installed the bare minimum packages following the guide.
In the current stage I need a file manager, but none of the ones listed by the guide answer my needs (if u want a more clear idea, I'm thinking of the Fallout (yes, the video game) terminal file manager). So I decided to just write it myself, Arch is a DIY after all, right?
It seems that I cannot find info on how to achieve my objective in the wiki or the guide. Even the classic google research "How to write file manager for Arch Linux from scratch" doesn't help at all, proposing guides and tutorial on how to Install the entire OS or the classic rated-lists of file managers to use (The BEST 30 + 5 file managers to use on Arch Linux in 2021 to have a supercomputer for hacking NASA).
I was wondering if you guys can help me out, linking guides or giving tips and suggestions on how to start.
Thanks in advice.
P.S. Sorry for my English, not my first language.
Last edited by Lonfo (2022-01-23 09:56:13)
Offline
Pick one of the established FMs that's close enough and start tweaking the code towards your preferences.
Otherwise the next thing you google is "To to recover deleted files on Arch Linux hlp pls!!!"…
Offline
Why would a server need a file manager?
Aside from that do you realize this is a damn near perfect match for the prototypical help vampire question. It cannot be given any meaningful or useful answer.
What programming background do you have? Do you have the experience necessary for such a task? Frankly, the way the question is asked makes the answer to this already apprent: you do not. Case in point, there is no reason to look for advice on how to make a "file manager for arch linux", you'd just look for advice on how to make a file manager. But that too is so broad and vague as to be unanswerable.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The idea is that any authenticated user can navigate the server and modify the files in it.
I didn't want to create any "help vampire" question, just find some suggestions to where to start looking/reading to achieve. Sorry that it went this way, how can I close the post in a correct way for this scenario?
For the background, I have over 10 years of experience in programming, with a CS degree. I know that I may not know well how to ask question (and language barriers doesn't help). I also already program a dedicated OS for university project (even tho it was never with Arch Linux or any UNIX kernel/distro).
I probably have misunderstood the guidlines for this forum, my apologies and again, I'd really appreciate help on how to close this post properly.
Offline
http://www.catb.org/~esr/faqs/smart-questions.html
The problem w/ your initial post is that it's equivalent to "how to be awesome".
If you want to write a FM and you've a formal education and a decade of experience and written an entire OS, I'd say: just start.
The problem with that scenario is that it's not real. Nobody w/ that background would ever ask questions on the extremely superficial level of "How to write file manager for Arch Linux from scratch"
You'd look at existing code and search for APIs and you'd certainly not ask about a specific distro.
If you wanted to ask "which is the best language", the answer is "your favorite one"
If you wanted to ask "should I use a toolkit and if so, which", the answer is "your favorite one"
If you wanted to ask "how to copy a file with <toolkit X> in <language Y>" then please fill in the blanks.
If you wanted to ask "how do file operations on posix systems work", I'd suggest to ask google that.
If your question is, as I understood it to be: "How do I even start?", I gave you an answer in #2
You'll slowly learn about how others have approached the problem, don't wander into a disaster (what for file operations is a VERY real danger) and get immediate results (what keeps you enganged) - forking existing stuff is actually how most software came to life.
Offline
In my experience the method "Fuck Around and Find Out" (or "Just Start") never actually work well.
The OS for the university project required a LOT of study of the architecture of the already existing part of the OS.
As I said, I know that I cannot ask question the right way.
What I wanted to know is if there is a guide or a wiki that explain in detail how Arch Linux and base things of this particular OS works. Like a "If u want to touch the FM you should look in this directory and absolutly not touch this other things and configurations" or similar.
The university project (my only background experience in the OS field) was a very restrained project. Before writing any line of code we had to study a lot of documentation and ask permissions and so on. I supposed that every OS has its own rules on how basic things (such as FM or DM) should work, should interact with other existing things and a lot of restraining rules on how you should implement your solutions to not break anything. Just wanted to know where I could find these indication/rules.
I'd probably download some established FM, study it and try to understand a "How you can write FM from scratch without breaking anything".
Should I mark the thread as SOLVED at this point, or since the question was not smart and vampire help there are other better solutions?
Thanks
Offline
Googling for Fallout FM screenshots did not turn up much except this Windows app: https://appsonwindows.com/apk/7427543/
Perhaps a modern approach would be to use Python and Textual/Rich (https://github.com/Textualize/textual) to create this kind of thing. Or just plain old ncurses for the more classical approach to terminal UIs.
What I wanted to know is if there is a guide or a wiki that explain in detail how Arch Linux and base things of this particular OS works. Like a "If u want to touch the FM you should look in this directory and absolutly not touch this other things and configurations" or similar.
So you mean the https://en.wikipedia.org/wiki/Filesyste … y_Standard ? Although after the merge of all binaries into /usr/bin/, I suppose it no longer applies completely to Arch.
I suppose generally it is always a good idea to stay out of all directories related to booting the system, e.g. /boot/, systemd-related files, kernel modules and so on. Don't mess around in /etc/ either.
But I hope you will test your file manager on a mostly empty user directory first before you start editing system files.
Last edited by Morn (2022-01-22 17:57:59)
Offline
The idea is that any authenticated user can navigate the server and modify the files in it.
And no file manager is necessary for this. Personally, I don't see any value in file managers on a unix/linux system at all - certainly not a server. A posix shell provides any authenticated user the ability to navigate the server and modify files in it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Lonfo wrote:The idea is that any authenticated user can navigate the server and modify the files in it.
And no file manager is necessary for this. Personally, I don't see any value in file managers on a unix/linux system at all - certainly not a server. A posix shell provides any authenticated user the ability to navigate the server and modify files in it.
It's easier to make horrible typos in the shell and accidentally delete the wrong files or directories. Wildcards can also expand in unexpected ways. Much harder to do this in a file manager, especially if it uses a trashcan instead of insta-deleting files.
Not to mention the thread on this forum a few years ago where someone accidentally deleted all EFI variables (which had been "helpfully" mounted read/write by systemd) and thus bricked his laptop.
Last edited by Morn (2022-01-22 20:17:42)
Offline
A really good shell asks back on suspicious™ rm operations ![]()
Though OT, I'd side with Trilby here - for a server there's a simple rule: whatever isn't there, doesn't get hacked.
If you wanted something that prevents you from major mistakes and command the system eg. after midnight
… people actually came up w/ something for that long ago and while certainly not perfect, it's likely more reliable than whatever somebody stumbled together last week that was driven by the likeness to a computergame.
Also not sure what the OP ponders about, but FMs manage files - they don't implement a specific dirtree (I can use any good filemanager and change the layout of / to add the typical structure of a MS Windows)
Back on topic:
if there is a guide or a wiki that explain in detail how Arch Linux and base things of this particular OS works
There is NOTHING Archlinux specific about this - it's mostly POSIX w/ some (optional) details for linux (and the linux specific FS)
https://en.wikipedia.org/wiki/Dired was created when Linus went to Kindergarten and can still be used on arch or any other linux distro.
OS has its own rules on how basic things (such as FM or DM) should work, should interact with other existing things and a lot of restraining rules on how you should implement your solutions to not break anything.
That would be around the layer of a desktop environment (but explicitly not in your case)
Offline
Googling for Fallout FM screenshots did not turn up much
Yeah, the Fallout thing was more of an "ideal concept". Basically I will have "normal PC users" on this server, that know only windows or IoS. To prevent them to get crazy with all the shell commands I was thinking a Fallout like solution could work. A classical Fallout terminal show the users the list of directories and files just as a list of plain text, selectable via arrow and enter keys. (Yes, I know Desktop environments exist, no, I cannot use one of them for reasons).*
There is NOTHING Archlinux specific about this - it's mostly POSIX w/ some (optional) details for linux (and the linux specific FS)
Thanks, I will start looking from this.
* This answer was to explain the Fallout thing only. The graphical think is not the only reasons I need this particular FM.
I would like to thanks everyone that answered my poor asked question, you all really helped me a lot.
Offline
...show the users the list of directories and files just as a list of plain text, selectable via arrow and enter keys.
So why not use one of the more than a dozen existing filemanagers that do just that?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
So why not use one of the more than a dozen existing filemanagers that do just that?
The reasons:
...but none of the ones listed by the guide answer my needs
The graphical think is not the only reasons I need this particular FM.
As I said, it's not just the graphical part. I also need to implement some things (that I won't explain here) that are not present in the already existing ones.
Offline
So you want specific details on how to implement "some things" that you wont explain. It shouldn't be a surprise that no one can help.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
So you want specific details on how to implement "some things" that you wont explain. It shouldn't be a surprise that no one can help.
No, as I already explained (and received answers) what I wanted to know was if there is specific documentation on how Arch Linux work to know where to touch, where not, if there were specific rules to pay attention to and similar.
I already marked as solved this post, so please prevent commenting if not for actually help expand the already received answers, thanks
Offline