Posts filed under ‘Fedora’
Accessing Operating System Environment Variables in Apache (Fedora)
I was facing the problem of accessing the Operating System Environment Variables in Apache. After searching a lot, I got to know that there are environment variables in apache too. Although these variables are referred to as environment variables, they are not the same as the environment variables controlled by the underlying operating system. Instead, these variables are stored and manipulated in an internal Apache structure.
For setting the operating system environment variables to be used by apache, we will export these variables to the apache server when it starts. The procedure is as follows :
0. Switch to root.
1. Open /etc/init.d/httpd in vim
vim /etc/init.d/httpd
2. You will find following lines
# Source function library.
. /etc/rc.d/init.d/functions
Open /etc/rc.d/init.d/functions in vim
vim /etc/rc.d/init.d/functions
3. You will find following lines
# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
export PATH
Now append whatever environment variables you want to set and accessed by apache.
VAR="/path/to/var"
export VAR
For example,
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/cuda/lib
export LD_LIBRARY_PATH
You could have added these lines anywhere in the file.
4. Save the file and restart the apache server.
/etc/init.d/httpd restart
Hope it helps. I will add the fix for Ubuntu soon.
Setting NumLock on automatically in Fedora
The NumLock is not activated by default at start-up (in FC-9/10). I am not sure of the fact in other distros. Everytime when the computer starts, you have to manually activate the NumLock key.
The following solution works :
Execute the following commands as root in a terminal.
1. Install numlockx
yum install numlockx
or
Install using numlocx rpm.
rpm -ivh numlockx*.rpm
2. gedit /etc/gdm/Init/Default
3. At the end of the file you will find a line like
exit 0
Above this line add the following code
if [ -x /usr/bin/numlockx ];
then /usr/bin/numlockx on
fi
4. Save the file and restart the computer.
You will find the NumLock activated by default at startup.
Wireless Problem on fedora 8/9/10
This post is for those people who are not able to use wireless on Fedora 8/9/10. The problem arises in computers with Broadcom wireless cards as the drivers are not packaged with the Operating System. I first encountered this problem on Fedora 9. That time I had to use NDISwrapper to wrap the wireless driver. That was quite a tedious task.
After moving to Fedora 10, I had to again set up the wireless drivers. But what I found was that RPM’s are available for Broadcom 802.11 STA Wireless Driver from rpmfusion.org for Fedora 8, 9 and 10. It means that you now have an easy way to set your wireless working.
To install the drivers using yum, follow the following steps :
- Enable the rpmfusion non-free repository and rpmfusion non-free repository.
- Update & Install the driver.
- The installation is done. Reboot your computer. Enable Network Manager and you will see your wireless device working.
su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
su - yum update yum install broadcom-wl
P.S. The above procedure is applicable to Broadcom’s BCM4311-, BCM4312-,BCM4321-, and BCM4322-based wireless card.You can check your wireless card type by typing ‘lspci’ command.
If the last line of the output matches the following line, then you are
having a Broadcom based wireless card.
0b:00.0 Network controller: Broadcom Corporation BCM43** 802.11b/g (rev 01)
Recent Comments