LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-15-2007, 05:10 PM   #1
SouthernGorilla
LQ Newbie
 
Registered: Mar 2007
Location: Augusta, GA
Distribution: ubuntu for the wife, Sidux and Ultima for me
Posts: 15

Rep: Reputation: 0
How many layers of programming are there?


This seems like the appropriate forum to ask this question even though it's not about a specific program. I'm just curious to know how many layers of programming there are between the kernel and what I see on the screen, and what the layers do. For example, I'm running ubuntu 6.10 so I have the ubuntu desktop which relies on GNOME which relies on metacity. What do these layers do? What is the difference between the ubuntu desktop and another distro's GNOME-based desktop? I'm not looking for performance issues, just trying to understand the fundamentals of how ditros work and how it's all tied to the kernel.

*I suppose I could have posted this in the newbie forum, but it doesn't really seem to fit there since it's not a "how-to" question. I have plenty of "how-to" questions to ask, but most of those aren't very newbie-ish either.
 
Old 03-15-2007, 05:36 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,743
Blog Entries: 4

Rep: Reputation: 76
Quote:
How many layers of programming are there?
Depends what you are running of course, and these 'layers' do not always match up cleanly or evenly, ie: there is a lot of overlap.

If we start with the kernel, then we have glibc on top of that, which abstracts the system calls. On top of that we have a shell to input commands. For an X desktop we also need the X server running. Then you need a window manager, or full-blown desktop environment, like KDE (WM: Kwin) or Gnome (WM: metacity,sawfish). Each of those will depend on an underlying GUI toolkit (ie: QT, GTK et al...). Any other app you may want to run may have dependencies on other libraries, and each of these libraries may have further dependancies.

The justification for all these 'layers' is twofold I suppose:
1: Modularity. Why force someone to run software they don't want to. IE: if you just want to run fluxbox there is no reason to install all the KDE code.

2. Code-reuse. Why rebuild the wheel everytime you want to write some software? If you want to write a neato DVD player, why not use xine-libs rather than re-writing the DVD-reading code from scratch?

That said, everything I wrote here is grossly oversimplified.

Quote:
What is the difference between the ubuntu desktop and another distro's GNOME-based desktop?
Not much. Perhaps some cosmetic/branding changes, and a few small patches to integrate it with the Ubuntu 'layout'.
 
Old 03-15-2007, 09:38 PM   #3
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
like what HE said == that was a great synopsis !
 
Old 03-16-2007, 07:38 AM   #4
SouthernGorilla
LQ Newbie
 
Registered: Mar 2007
Location: Augusta, GA
Distribution: ubuntu for the wife, Sidux and Ultima for me
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bulliver
Depends what you are running of course, and these 'layers' do not always match up cleanly or evenly, ie: there is a lot of overlap.

If we start with the kernel, then we have glibc on top of that, which abstracts the system calls. On top of that we have a shell to input commands. For an X desktop we also need the X server running. Then you need a window manager, or full-blown desktop environment, like KDE (WM: Kwin) or Gnome (WM: metacity,sawfish). Each of those will depend on an underlying GUI toolkit (ie: QT, GTK et al...). Any other app you may want to run may have dependencies on other libraries, and each of these libraries may have further dependancies.

The justification for all these 'layers' is twofold I suppose:
1: Modularity. Why force someone to run software they don't want to. IE: if you just want to run fluxbox there is no reason to install all the KDE code.

2. Code-reuse. Why rebuild the wheel everytime you want to write some software? If you want to write a neato DVD player, why not use xine-libs rather than re-writing the DVD-reading code from scratch?

That said, everything I wrote here is grossly oversimplified.

That certainly does seem to answer the question I asked. Now I need to look at wikipedia and my thesaurus to understand it all, heh.

I understand the benefits of modularity, even the biggest hard drives would fill up quickly if every program contained all the libraries and subroutines it needed. I can't help but wonder if there isn't too much of a good thing, though. It's easy to see how a system can become unstable. A single bug in one library can mess up a dozen programs, each of which can cause further disruption.

I'm still not entirely clear on the issue, but that's my fault. The last time I did any programming was high school, BASIC on an Apple II.

I also gather that I'm better off picking a distro based on the window manager since that's where I'll see more of a difference. I suspected as much since the only difference I see between most of them is their choice in wallpaper.

Thanks for feeding my brain.
 
Old 03-16-2007, 08:34 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Quote:
Originally Posted by SouthernGorilla
I also gather that I'm better off picking a distro based on the window manager since that's where I'll see more of a difference.
I disagree. I would also consider the package manager and how various utilities are set up to make administration easier.

Try several distros to see what you like---I'm running about 5 at the moment
 
Old 03-16-2007, 05:18 PM   #6
SouthernGorilla
LQ Newbie
 
Registered: Mar 2007
Location: Augusta, GA
Distribution: ubuntu for the wife, Sidux and Ultima for me
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany
I disagree. I would also consider the package manager and how various utilities are set up to make administration easier.

Try several distros to see what you like---I'm running about 5 at the moment
How many can I fit on a 750GB drive? I need to search around and figure out how to install multiple distros without messing up the one I have. I know it involves partitioning, but it's a new and scary concept. I've already had to reinstall ubuntu twice because it's developed issues.
 
Old 03-16-2007, 06:55 PM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by SouthernGorilla
What is the difference between the ubuntu desktop and another distro's GNOME-based desktop?
It’s not as brown.
 
Old 03-16-2007, 07:18 PM   #8
SouthernGorilla
LQ Newbie
 
Registered: Mar 2007
Location: Augusta, GA
Distribution: ubuntu for the wife, Sidux and Ultima for me
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by osor
Itís not as brown.
Now that's funny.

Is the difference between distros really that superficial?

Did a little more research, tell me if I've got this right. X puts up the window, moves it, sizes it, etc. Gnome controls the content of the window. Metacity puts the frame around it.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
the gimp - moving layers ungua Linux - Software 2 04-02-2005 02:50 PM
help to separate implemenation of IP and LINK layers in ip_output.c cranium2004 Programming 0 08-18-2004 05:02 AM
LAN security - how many layers of protection? svarreby Linux - Security 3 03-19-2004 06:41 AM
Gimp Gradiant Layers? BmxFace Linux - Software 3 08-20-2003 08:24 AM
Linux OSI Layers MelLinux Linux - General 8 10-29-2002 07:54 PM


All times are GMT -5. The time now is 11:13 PM.

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