LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-24-2012, 01:54 PM   #1
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Rep: Reputation: 47
Trying to set up Xorg


I would like to set up Xorg on my LFS 7.1 system. I am attempting to follow the instructions here: http://www.linuxfromscratch.org/blfs...n/x/xorg7.html

When I try to run this bash script:

Code:
bash -e #exit on all errors
section=<proto>
version=7.6-2
mkdir $section
cd $section

# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5

# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
  packagedir=$(echo $package | sed 's/.tar.bz2//')
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
Nothing happens. No packages are downloaded. Has anyone completed these instructions on LFS 7.1? Am I missing something?
 
Old 04-24-2012, 02:06 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

The commands mentioned (it is not a script!) is an example of what is to come later on.

You start with the real commands at Setting up the Xorg Build Environment.

Do have a look at all the user notes in the upcoming chapters, they contain valuable information and also the commands to use for that specific chapter (of which the above is an example).

I mentioned it not being a script: You can copy-paste (or type if you want) those directly in the terminal.

Hope this helps.
 
Old 04-24-2012, 02:22 PM   #3
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 454

Original Poster
Rep: Reputation: 47
Thanks, I will continue on then. Just so I am clear, is the entire chapter 24 on BLFS required to completely set up xorg? Thanks.
 
Old 04-24-2012, 02:28 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by lewisforlife View Post
Just so I am clear, is the entire chapter 24 on BLFS required to completely set up xorg?
Yes. After that you might want/need a Window Manager and/or Desktop Environment.

Have fun building!
 
Old 04-25-2012, 09:49 AM   #5
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
The Xorg chapter has a lot of work to do. So using that template of bash commands for those five large groups of files is very helpful (essential, for me).

I only wanted to add that the example in the book, and that you posted, can be used almost "as is" for the Xorg Protocol Headers group. If you...

1. Change directories in your terminal to your /xc directory
2. Copy the .wget and .md5 files for the proto group to that directory
3. Change <proto> in the template to proto (get rid of the brackets)

...then you can paste the whole thing into the terminal, execute it, and things will happen.

The template also will work "as is" for the Xorg Fonts group since its build commands are the same as proto's. Only, change section=proto to section=font and copy the .wget and .md5 files for the fonts group to the /xc directory.

For the other three groups (Xorg Libraries, Xorg Applications, Xorg Drivers), you have to substitute their more complex build commands in place of the ones in the template. Example for Xorg Libraries...
Code:
bash -e #exit on all errors
section=lib
version=7.6-2
mkdir $section
cd $section

# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5

# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
  packagedir=$(echo $package | sed 's/.tar.bz2//')
  tar -xf $package
  cd $packagedir

case $(basename "$PWD") in
libXfont-[0-9]* )
                 ./configure $XORG_CONFIG --disable-devel-docs
                 ;;
   libXt-[0-9]* )
                 ./configure $XORG_CONFIG \
                     --with-appdefaultdir=/etc/X11/app-defaults
                 ;;
              * )
                 ./configure $XORG_CONFIG
                 ;;
esac &&
make
make install &&
ldconfig

  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
And so on for Xorg Applications and Xorg Drivers which also have different and complex build commands. So summarizing, you only need to change the section variable and the build commands in the command template for each of the five groups. I like to "fix up" the template for each section in a text editor and then paste it from there into the terminal. This is how I do this anyway. Considering the number of files being installed, it's worth the effort.

P.S.: A new bash shell is started by these, so remember to exit the shell when each one is done (exit).

Last edited by stoat; 04-25-2012 at 09:57 AM.
 
Old 04-25-2012, 10:12 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi stoat,

Why make it harder then it has to be/reinvent the wheel? Use the commands in the user notes links, this reduces the possibility to make mistakes.
 
Old 04-25-2012, 12:23 PM   #7
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Hi druuna,

Honestly, I never looked in those user links before. And it didn't register with me exactly to what you were referring in your earlier post. Sorry. But there probably isn't much difference or any less chance of error copying from there or from the main page in the book. I still think that template exists in the book for the purpose that I mentioned above. I don't think using it is re-inventing anything or even harder. But lewisforlife should do what you said. I just misunderstood earlier.

For this system I'm working on now, I decided to script the entire Xorg chapter in a single long bash script (except for the download stuff because I already had the files). I did that this time because I wanted to experiment with installing Xorg a second time after re-installing Python/Glib/pkg-config for several instances of circular dependencies in those. I don't know if it helped anything, but it didn't hurt either. The time spent scripting it was worth it (that script runs for an hour).

Last edited by stoat; 04-25-2012 at 05:31 PM.
 
  


Reply

Tags
blfs, xorg



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
Hot to set ModulePath of xorg TriggerHuang Linux - Desktop 0 11-01-2011 10:55 PM
How to set xorg default niceness? ndani Ubuntu 3 03-01-2010 10:00 AM
Set up Xorg for 2 Monitors (not at same time) Optimistic Linux - Hardware 3 11-04-2006 05:23 AM
xorg screen res not being set properly with Xorg 6.9.0 sgnome Linux - Laptop and Netbook 2 06-12-2006 02:26 AM
A Quick Xorg.conf set up mikz Slackware 1 10-25-2004 07:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration