9/23/10

Converting .gov

   

  The Cheese Webcam Booth application that comes pre-installed with Fedora 13 is a fun program that utilizes your webcam's capabilities in various ways.
Unfortunately, it saves video files in .gov extensions making it difficult for some programs to recognize. 

To convert your video files from Cheese Webcam Booth to .avi, as root, install mencoder.

#yum -y install mencoder

Then run the following command to convert the file to avi.

#mencoder -idx out.gov -ovc lavc -oac mp3lam -o output.avi





**For more in-depth information on mencoder refer to the man pages.



9/12/10

Fedora 13 Hangs After Install

   After installing Fedora 13 and restarting your PC, some may experience the computer to hang at a blank/black screen right after the Fedora boot logo restricting access to text mode or a command line. Briefly, this is caused by a bug that is associated with some Nvidia graphic cards.

    From experience, one method I've used to resolve Fedora 13 from hanging after a fresh install is to --> verify that only 1 video cable is plugged in the GPU(s). This applies to those who have a multiple monitor/GPU setup where you have 2 or more DVI,VGA,or HDMI cables connected to one or more GPUs.

    Once you have unplugged the extra video cables except for one, and have restarted the PC, you can now get passed the Fedora boot logo without freezing. You can also install the necessary graphic card drivers and your PC will boot correctly with multiple video cables plugged in.

9/2/10

Command of The Month - #chmod

USAGE:
#chmod 754 file_name.txt


    chmod is a command used to change the permissions of a flie(s). When using the ls -l command, permissions of a file are shown on the first column from the left. The first character in this column tells us what type of file it is. A dash for a normal file and "d" for directory. The rest describe a files permission. (fig 1)

fig 1:

-rw-------. 1 root root 1253 Jul 22 17:19 file1
-rwxr-xr-x. 1 root root  100 Sep  2 20:02 file2


r=read
w=write
x=execute


    After the first character, the next set of 3 positions represent the Users class. The following set of 3 represent the Group class and the last 3 set of characters represent the Others class.

fig 2:





     Class      Description
     ------       ---------------   
     user       owner of file
     group     users who are members of files group
     others    users who are not owners or members of the group


    To change permissions of each class, numbers are used to represent different types of permissions for the 3 different classes.

0 = no permissions
1 = execute only
2 = write only
3 = write and execute
4 = ready only
5 = read and execute
6 = read and write
7 = read, write, execute
  
    The example below gives full permissions (read, write, execute) to the User class, and only read and execute permissions to both Group and Others class.

#chmod 755 filename.txt

 


  
**For more in-depth information about chmod refer to the man pages.

Functions

What are functions?

-Functions are used to perform a repetitive task to reduce repetition within a shell script.

-Functions can be considered to be mini shell scripts that run within a shell script (think nesting).

-Arguments can be used in functions since they are essentially shell scripts themselves.


Example of a function:

#function.
see()
#Instructions to be performed when function is called.
echo "Here are users on $HOST"
echo
who -T | grep "+"
}

#calling the function in your script.
see

#end of example


-To run this function just type/call "see" anywhere in the script after your actual function and it will run.