LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 03-26-2011, 05:38 AM   #1
vmsda
LQ Newbie
 
Registered: Nov 2007
Posts: 24

Rep: Reputation: 0
pyLFS ???


I am more or less aware that I risk being labelled an heretic, at the very least, but I still have to ask the question:

Is it possible to install a fully functioning LFS desktop environment,
based solely on Python and not on Bash, without massive implications?

Thank you for hints and please forgive the sheer irresponsibility.
 
Old 03-26-2011, 06:19 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello and Welcome to LinuxQuestions,

Mind you this is just theoretical, no garanties nor proof whatsoever, but giving that you can choose your shell to install....

If you're building LFS and want to use another shell, then feel free to do so, but.....

Python is not a shell! So you'll need, in my opinion, at least A shell, whichever you choose to be able to use Python.

Again, just theory, I hope some of the more experienced LFS and source distro Gurus shed some light.

Kind regards,

Eric
 
Old 03-26-2011, 10:38 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by vmsda View Post
Is it possible to install a fully functioning LFS desktop environment, .....
Lets start with: LFS does not provide a desktop environment. In the LFS documentation the following is mentioned:
Quote:
A by-the-book LFS system is fairly minimal, but is designed to provide a strong base on which you can add any packages you want.
"A (fairly) minimal system" is exactly what you end up with after an LFS build. Hardly any configuration is done yet, only basic security, no network utilities/programs, no ftp/ssh/mail/db servers and no X (let alone a desktop or window manager). And python is also not provided.....

BLFS, which is build using the tools provided by the LFS system, does provide all the above and once you know how things are done, you can build whatever is available as source code (a package manager is not provided out-of-the-box in either LFS or BLFS).

Quote:
Originally Posted by vmsda View Post
....... based solely on Python and not on Bash, without massive implications?
Am I correct in assuming you are talking about automating the LFS, and possibly the BLFS installation process using a programming language (python in this case)??

If that is the case: I don't see anything wrong with using python to build LFS (BLFS is another story), as long as it can reproduce the steps that are in the book (and all the extras needed for automation). This will also mean that the shell (bash) is still used, whether you automate or not.

For the sake of simplicity I personally would not use a (scripting) language that is not already provided by LFS. When you boot LFS after finishing the build, python, for example, isn't yet part of the system. Perl, awk, sed, bash etc are. If you also want to automate (parts of) BLFS using python, you would first need to install it.

Hope this helps.
 
Old 03-26-2011, 04:24 PM   #4
vmsda
LQ Newbie
 
Registered: Nov 2007
Posts: 24

Original Poster
Rep: Reputation: 0
Thank you for your comprehensive approach, druuna, but

Quote:
Originally Posted by druuna View Post
Hi,
... Am I correct in assuming you are talking about automating the LFS, and possibly the BLFS installation process using a programming language (python in this case)?? ...
I am sorry to have given the wrong impression, but no, that is not my idea at all. This was probably because I was thinking of LFS as a project and not as the technical first step in the building up of a "personal" Linux system.

After quite a few years as a desktop user of Linux (my only system) I know how much Bash code lies "under the covers" (the startup procedures, the profiles, and so on). Now, for someone starting in the programming world, Python is a sort of dream come true; Bash is a daily nightmare revisited. So, if one has the chance - afforded by the LFS project - to build one's system from source material, the next desirable step would be to control that same system via Python programs or routines or whatever one wishes to call them. Python, as a tool, has the potential to help hook people into the Linux world; Bash will probably drive them away.

I hope I have clarified matters a little better this time. Thank you in advance for your comments/suggestions.
 
Old 03-27-2011, 03:37 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by vmsda View Post
After quite a few years as a desktop user of Linux (my only system) I know how much Bash code lies "under the covers" (the startup procedures, the profiles, and so on).
A shell, bash in this case, is compulsory. You might be able to use csh, ksh or dash instead of bash, but you do need a shell.

Quote:
Now, for someone starting in the programming world, Python is a sort of dream come true; Bash is a daily nightmare revisited.
That is an opinion, not a fact

My nightmare would be having to use python for everything..... Give me perl, awk, sed, etc and bash to tie it all together. Even if I look at it from a programmers point of view I would not use python (personal choice combined with a lack of python knowledge).

Quote:
So, if one has the chance - afforded by the LFS project - to build one's system from source material, the next desirable step would be to control that same system via Python programs or routines or whatever one wishes to call them. Python, as a tool, has the potential to help hook people into the Linux world; Bash will probably drive them away.
What it comes down to is this: Python is a programming language and not a shell, bash is a shell that can also be used to program (the is a shell being the important part). So to answer your initial question: Nope you cannot exchange bash (or any other shell) for python.

Hope this helps.
 
  


Reply

Tags
lfs, python based


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 11:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration