LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-10-2002, 03:00 AM   #1
Tom9K
LQ Newbie
 
Registered: Apr 2002
Posts: 4

Rep: Reputation: 0
Unhappy /etc/profile and include path


I have 2 small problems that I think I should know the answers to, but I don't

The first is, if I create a /etc/profile, it doesn't run. What do I need to do to run it automatically?

And the second, I have installed Qt 3 in /usr/qt3. If a C program has #include <qt.h> or something, gcc doesn't look in /usr/qt3/include for it. There doesn't seem to be an include path environment variable, do I need to copy /usr/qt3/include's content to /usr/include?
 
Old 05-10-2002, 06:24 AM   #2
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
Use Slackware's style:

/etc/profile is run on login

put these lines:

for i in /etc/rc.d/*.sh
do
. $i
done

and make a /etc/rc.d directory

then put scripts there, with names ending in .sh, as in qt3.sh . Do a

chmod 755 file

in every file in that directory.

Now you're done.

Looks like you need to create an /etc/rc.d/qt3.sh

containing:

#!/bin/sh
export QT3_DIR=/usr/lib/qt

I'm not sure, but this is the way you have to do things...

HTH,

vfs.
 
Old 05-13-2002, 01:57 PM   #3
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Re: /etc/profile and include path

Quote:
Originally posted by Tom9K
I have 2 small problems that I think I should know the answers to, but I don't

The first is, if I create a /etc/profile, it doesn't run. What do I need to do to run it automatically?

And the second, I have installed Qt 3 in /usr/qt3. If a C program has #include <qt.h> or something, gcc doesn't look in /usr/qt3/include for it. There doesn't seem to be an include path environment variable, do I need to copy /usr/qt3/include's content to /usr/include?
1) source the /etc/profile file in your ~/.bashrc and/or ~/.bash_profile file(s) by simply adding a line like this: source /etc/profile

Have a look at the bash man page - it will tell you exactly which files are read in which order, under which circumstances (depending on how bash is invoked, it will read different files).

2) To tell GCC to look in a directory like /usr/qt/include add an option to the gcc command line like this: gcc -I/usr/qt3/include <the rest here>

Note: there is no space between -I and /usr/qt3/include - it's all together.
 
  


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
how to set include path sibtay Linux - Newbie 3 12-07-2004 07:42 AM
G++: How to set the include path lavachequirit Programming 5 10-20-2004 08:56 AM
where did my include path go aot2002 Linux - Wireless Networking 2 01-24-2004 05:02 AM
Path to include? Mazen Alzogbi Red Hat 1 11-15-2003 06:25 AM
PHP Path include ..:eMa:.. Programming 4 09-25-2003 01:59 AM


All times are GMT -5. The time now is 08:53 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