Saturday, October 13, 2007

Edit Default Path

===Changing the default search path===
I always make a small change to my default $PATH because when I work with sudo I still can't use some of the system commands without typing the path to the command and then the command. A good number of the commands reside under /sbin, so I add /sbin to my $PATH. Here's what I do. Open a terminal as your regular user and edit the file .bash_profile in your home folder.
gedit .bash_profile
This is what the default file looks like.
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
I change the file to look like this, adding :/sbin to the end of the $PATH line.
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/sbin
export PATH
Save the file and exit the editor. Log out and back in to the desktop and you will now have access to the commands in /sbin by default.

Return to [[Fedora 7]]

Color Bash Prompt

===Color Bash Prompt===
I like to colorize my bash prompt. It's an easy way to see if you are working as your regular user or as root.
Open a terminal as your regular user, making sure you are in your home directory, and type
gedit .bashrc
Move to the bottom of the file and add this line
PS1="[\[\033[1;34m\]\u\[\033[0m\]@\h \W]\\$ "
The number 34 seen in that line gives you a blue prompt.
Save and exit the editor. Now log in as root in the terminal and make sure you are in root's home folder. Again type
gedit .bashrc
Move to the bottom of the file and add the same line that we added for regular user
PS1="[\[\033[1;31m\]\u\[\033[0m\]@\h \W]\\$ "
Left as it is, this line will give you a red prompt. Save and exit the editor.
The actual color code is "1;31" inside the PS1 variable. The 1 says make it '''bold''' and the 31 says the color red.

1;30 Black

1;31 Red

1;32 Green

1;33 Yellow

1;34 Blue

1;35 Magenta

1;36 Cyan

1;37 White (Don't think white would show up too well on this page)

Back to [[Fedora 7]]

Beryl

[[#Installing Beryl|Installing Beryl]]

[[#Auto Starting Beryl|Auto Starting Beryl]]

[[#Beryl Performance Tweak|Beryl Performance Tweak]]

===Installing Beryl===
Open a terminal and as root or using sudo type
yum install beryl beryl-manager emerald
This will install everything you need to get Beryl up and running on your Gnome desktop. Once everything is installed there will be a menu entry under

'''Applications > System Tools > Beryl Manager'''. Click on that item and the Beryl icon will appear on the top panel. From there you can configure Beryl to your liking.

=====Auto Starting Beryl=====
If you want Beryl to start automatically when you log in to your Gnome desktop add it to the sessions manager. Click on '''System > Preferences > Personal > Sessions'''. The sessions manager opens.

[[Image:sessions1.png]]

Click the '''new''' tab and the '''New Startup Program''' window opens.

[[Image:sessions2.png]]

Under '''name''' enter a name for the program. Beryl would be the logical choice, although you can call it whatever you like. Under '''Command''' enter '''beryl-manager'''. Click '''OK''' and click '''Close'''. Now whenever you log in to your '''Gnome''' desktop Beryl will start automatically.
=====Beryl Performance Tweak=====
It's been suggested that you can improve Beryl's performance with a few changes to the settings. Right click the Beryl icon on the top panel and select '''Beryl Settings Manager'''.

[[Image:berylmanager1.png]]

Uncheck '''Detect Refresh Rate''', set '''Refresh Rate''' to '''200''' and unckeck '''Sync To VBlank'''. I did this on one of my systems but the performance gains were not too noticeable , at least in my case. Your results may vary and you can always undo the changes.

Back to [[Fedora 7]]

Basic Display

====Fix My Display====
I see a lot of posts in the Linux forums about users who have just installed Linux and upon the first boot they get a blank screen and no GUI. The problem is often a misconfigured /etc/X11/xorg.conf file or a misconfigured default runlevel. Check your default runlevel first. There are three other areas that could be causing your display troubles. They are the '''Device''' section, the '''Monitor''' section and the '''Screen''' section. Following these steps will get you a basic GUI that you can work with.


[[#Runlevel|Runlevel]]

[[#Display|Display]]

[[#Monitor|Monitor]]

[[#Screen|Screen]]

=====Runlevel=====
If you boot your Fedora system and it doesn't go into GUI mode, it could be that you need to edit the '''default runlevel'''. If the '''default runlevel''' is incorrect you will be left at a command prompt with no error messages. This is runlevel 3. To boot to the GUI mode the system needs to boot to runlevel 5. To correct this malady login as root at the command prompt and type '''vi /etc/inittab'''. There will be a section that looks like this:
id:3:initdefault:
Change the line so that it looks like this
id:5:initdefault:
Save the file, exit the editor and reboot. Your Fedora system will boot to the GUI this time.

=====Display=====
Boot the computer and log in as root. At the command prompt type
vi /etc/X11/xorg.conf
Once the '''vi''' editor opens you will need to press the '''INS''' key to get into edit mode. Look for the section that is similar to this:
Section "Device"
Identifier "Videocard0"
Driver "intel"
EndSection

Change the driver to 'vesa'. Save the file with the following keystrokes: '''ESC : wq! ENTER'''. Back at the command prompt type
startx
and press enter. After a short delay while the system is working you should be presented with the graphical display that is at least ''close'' to what you expected. From there you can work to fine tune things like the proper video driver and screen resolution.

=====Monitor=====
To get the correct refresh rates for ''your'' monitor you need to edit the '''monitor''' section. Often times the screen refresh rates are incorrect and my cause an off center display or some other malady. Before you change the refresh rates make sure you know what the proper rates are for your particular monitor. These can be found on the back of the monitor, in the manual that came with the monitor or most certainly from [http://www.google.com Google]. Look for the section that is similar to this:

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 30-107
VertRefresh 48-120
EndSection

Changing the HorizSync and VertRefresh numbers to ones that accurately reflect your monitor will have a drastic effect on the quality of the display. Save the file and exit the editor. That will bring you back to the command prompt. Again, as we did in the '''Device''' section, type
startx
and press enter. Again after a short delay you should see a much improved GUI display.


=====Screen=====
To further improve upon the quality of the display and to get the correct or desired screen resolution you need to edit the '''screen''' section in the /etc/X11/xorg.conf file: Before you change anything here you need to know the limitations of your monitor. What is the maximum resolution that it will display? Trying to set a resolution higher than the monitor is capable of providing can and probably will cause undesired results. The maximum resolution for your monitor can be found on the back of the monitor, in the manual that came with the monitor or by searching [http://www.google.com Google]. Once you know what your monitor is capable of then you can go ahead and try to configure the display for the resolution that you prefer. Most of today's monitors are capable of a resolution of at least 1280x1024. I'll use this resolution in this example. In the xorg.conf file look for the section that is similar to this:

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768"
EndSubSection
EndSection

The part we're interested in is the Modes line(s). In the above sample the computer is configured to show a display of 1024x768 only. This will usually work well, but we want to use 1280x1024 because that is what our monitor will do and it's what we prefer. Change the Modes line so that it looks like this:
Modes "1280x1024" "1024x768"
Save the file and exit the editor. This leaves you back at the command prompt. As we did above, type
startx
and press enter. Again after a short delay you should see a much improved GUI at the desired screen resolution.

This is just a basic writeup on editing the xorg.conf file to resolve some of the issues that I see mentioned on a daily basis in the Linux forums.

Auto Login

If you use wireless to connect to the network and internet you may not want to use the auto login feature.
My preference is to be automatically logged in when I reach my Gnome desktop. Here's how to enable auto login for your user. On the top panel, select System > Administration > Login Screen. Enter the root password and the login window appears.

[[Image:login window1.png]]

Click on the '''users''' tab.

[[Image:login window2.png]]

and click the '''add''' button.

[[Image:login window3.png]]

Add your user name

[[Image:login window4.png]]

Click '''add''' once more. Now click on the '''security''' tab.

[[Image:login window5.png]]

On this screen you want to click the drop down boxes for '''Enable Automatic Login''' and '''Enable Timed Login''' and add yourself to the lists. Click the '''close''' icon and you are done. Now, every time you boot to your Gnome desktop you will be automatically logged in. No need to enter your user name and password.
Some people feel that auto login is a security risk. I'm sure it is on a multi-user system. My computers are all home machines. All the Linux boxes
are used by me and me alone except for the rare occasion where another family member might use the computer for a few minutes. No security issues here.


Back to [[Fedora 7]]

Adobe Reader

=====Adobe Reader 8.1.1=====
Download the Adobe Reader '''rpm''' file from [http://www.adobe.com/products/acrobat/readstep2_allversions.html Adobe Download]. I install from the /opt folder so I move the file there.
sudo mv /home/glenn/Desktop/AdobeReader_enu-8.1.1-1.i486.rpm /opt/

Change to the /opt folder
cd /opt
and install Adobe
sudo rpm -ivh AdobeReader_enu-8.1.1-1.i486.rpm
After these steps were taken I opened a '''.pdf''' file in Firefox without a problem. There were no additional steps that I needed to take to get Acrobat Reader to work.

--[[User:Glenn|Glenn]] 05:18, 21 September 2007 (EDT)

Monday, June 18, 2007

Two Weeks with Fedora 7

It's been 2 1/2 weeks since Fedora 7 was released. May 31 to be exact. I installed it on my Toshiba Satellite as soon as it was available, triple booting with Windows Vista and Fedora Core 6. Fedora 7 has been running very well to date. The display resolution is perfect at 1280x800 and I have all the applications I need. Internet, e-mail, etc. The IPW3945 wireless is even working flawlessly. Still, there's no sound volume. As far as I can tell music plays correctly, I just can't hear it. It's not really a big issue with me. It would be nice to be able to play some tunes, but I'll survive with out them. The built-in the bezel web cam doesn't work either, but I consider that a toy at best. I really have no use for it. Other than those two minor issues I'm very pleased with the latest release from the Fedora developers.

Check Out This Neat Linux Commercial

Another Linux commercial. Great to see Linux getting more exposure.

Sunday, June 10, 2007

Fedora 7 Wireless

My Toshiba Satellite laptop, the A205-S4577, uses the Intel IPW3845 wireless card. To get wireless working after installation of the OS all I needed to do was to go to the Services manager and enable NetworkManager and NetworkManagerDispatch. At this point the Network Manager icon appeared in the top panel. Clicking on that icon gave me a list of the wireless networks in my immediate area, including of course, my own. I selected my network, entered the security key and was connected. Other Fedora users have reported more difficulty. There is an alternative method posted by a user at www.fedoraforum.org which also worked well for me in the pre-release versions of Fedora.

Monday, May 28, 2007

Fedora 7 Test 4 and beyond

Documenting my experience with Fedora 7 Test 4 on my Toshiba Satellite Laptop. I bought this laptop about a month ago. A week later I installed Fedora 7 Test 4 in a dual boot with Windows Vista Home Premium. Here's how it went:

Windows Vista offers a nice partitioning tool under disk management. Use of that tool allowed me to create a 30GB partition to install Fedora to. Although I'm a Linux fan I have to say that the Windows Vista Disk Management Tool seems like a very good tool. Partitioning was fast, no errors, and I was installing Fedora in no time. After booting from the Fedora 7 Test 4 DVD and running the install I rebooted into Fedora and went through the first time boot up sequence, rebooted and started playing. I'm no Fedora newbie, but I was amazed at the ease of installation. Fedora setup a nice 1280x800 screen with no need for me to edit my xorg.conf file. Everything important was properly recognized. There were, however, two sticking points. One is sound. My mp3's seem to play perfectly but there is no volume. It's as if the sound is muted and I haven't found a way to fix this yet. The other was wireless. There was no way for me to use my wireless connection, but the wired connection was working fine. I found out, in a short time, that to get wireless working all I needed to do was to enable NetworkManager and NetworkManagerDispatch through system services. Once done I was able to use wireless, am using it now, and it's been stable from the start. All in all a good experience with the testing versions of Fedora 7. The final release will be out on Thursday. I can't wait!