Page 1 of 9 123 ... LastLast
Results 1 to 10 of 86

Thread: MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

  1. #1
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

    I have decided to create a script file to automate the task of testing your multimedia as suggested in this original message by RedDwarf:

    Check your multimedia problem in ten steps

    To Create the script file, copy and paste the following text into a text editor like kwrite and then save the file as mmcheck in your home area bin folder (~/bin/mmcheck).

    Code:
    #!/bin/bash
    
    #: Title       : /home/james/bin/mmcheck
    #: Date Created: Sun Oct 3 15:42:01 CDT 2010
    #: Last Edit   : Mon Oct 4 19:54:00 CDT 2010
    #: Author      : by RedDwarf & J. McDaniel
    #: Version     : 1.00
    #: Description : Check Your Installed Files for Mutimedia
    #: Options     : none
    
    # Written for the openSUSE forums on Sunday October 4, 2010
    
    # Copy and paste this text as the file mmcheck into the ~/bin folder.
    # Run the terminal command: chmod +x ~/bin/mmcheck, to make the file executable
    # Open up a terminal session and type: mmcheck, to start the program
    
    PROG="MultiMedia Check Version 1.00  -  Check for multimedia problems in just 10 steps  "
    
    # Determine program user, save home folder location, request root password
    
    USER="$HOME"
    
    # Menu Disply System function
    # Display up to 10 menu items and 0 is always Exit 
    # Menu must have at least two choices plus exit
    
    function print_menu {
    
    # You can adjust the starting position of the mmcheck menu.  
    # Using s_line=0 & s_col=0 would place the menu in the top left corner of your screen"
    
    # Starting Terminal Line Number for menu
    s_line=1
    # Starting Terminal Column Number for Menu
    s_col=1
    
    # Display Program Title
    tput clear
    tput cup $(( s_line )) $(( s_col ))
    tput setf 7
    tput setb 2
    tput bold
    echo "$1"
    
    # Fetch kernel version to display
    # uname -r > ~/kernel.dat
    # read kernel < ~/kernel.dat
    # rm ~/kernel.dat
    
    kernel=$(uname -r)
    
    # Display Menu, Present User home, kernel version
    tput sgr0
    tput cup $(( s_line + 2 )) $(( s_col ))
    tput setf 7
    tput setb 1
    tput bold
    echo "$2" "USER:$USER" " Kernel:$kernel" " "
    
    # Display Option for Line 1 (required)
    tput sgr0
    tput cup $(( s_line + 4 )) $(( s_col ))
    echo "$5"
    
    # Display Option for Line 2 (required)
    if [ $4 -ge 2 ] ; then
      tput cup $(( s_line + 5 )) $(( s_col ))
      echo "$6"
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 8 )) $(( s_col ))
    fi
    
    
    # Display Option for Line 3 (optional)
    if [ $4 -ge 3 ] ; then
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$7"
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 9 )) $(( s_col ))
    fi
    
    # Display Option for Line 4 (optional)
    if [ $4 -ge 4 ] ; then
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$8"
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 10 )) $(( s_col ))
    fi
    
    # Display Option for Line 5 (optional)
    if [ $4 -ge 5 ] ; then
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$9"
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 11 )) $(( s_col ))
    fi
    
    # Display Option for Line 6 (optional)
    if [ $4 -ge 6 ] ; then
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "${10}"
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 12 )) $(( s_col ))
    fi
    
    # Display Option for Line 7 (optional)
    if [ $4 -ge 7 ] ; then
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "${11}"
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 13 )) $(( s_col ))
    fi
    
    # Display Option for Line 8 (optional)
    if [ $4 -ge 8 ] ; then
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "${12}"
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 14 )) $(( s_col ))
    fi
    
    # Display Option for Line 9 (optional)
    if [ $4 -ge 9 ] ; then
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "${13}"
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 15 )) $(( s_col ))
    fi
    
    # Display Option for Line 10 (optional)
    if [ $4 -ge 10 ] ; then
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "${14}"
      tput cup $(( s_line + 14 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 16 )) $(( s_col ))
    fi
    
    # Display menu option request and get user input
    tput setaf 2
    tput bold
    read -p "Enter your choice [0-"$4"] " CHOICE
    tput clear
    tput sgr0
    tput rc
    return $CHOICE
    }
    
    # Main Program Loop starts here ...
    
    while true ; do
    
    # Setup Menu string Fields displayed for your menu
    
    MENU=" Mutimedia Test Selection - M E N U "
    EXIT=" 0 . Exit Mutimedia Test Selection Menu                                           "
    TOTL="10" 
    TST1=" 1 . Check if there are any missing dependencies for installed packages ...       "
    TST2=" 2 . Check if there are packages installed from the VideoLAN repository ...       "
    TST3=" 3 . Check your basic installed multimedia packages ...                           "
    TST4=" 4 . Verify you have xine installed and installed from Packman ...                "
    TST5=" 5 . Check your xine packages ...                                                 "
    TST6=" 6 . Verify you have all the gstreamer plugins (codecs) installed from Packman ..."
    TST7=" 7 . Check your gstreamer packages ...                                            "
    TST8=" 8 . Check your MPlayer package ...                                               "
    TST9=" 9 . Check your VLC packages ...                                                  "
    TSTA=" 10. Check your w32codec package ...                                              "
    
    # Call Menu and get user input selection
    
    print_menu "$PROG" "$MENU" "$EXIT" "$TOTL" "$TST1" "$TST2" "$TST3" "$TST4" "$TST5" "$TST6" "$TST7" "$TST8" "$TST9" "$TSTA"
    choice="$?"
    
    # Execute User Command Here
    
    case "$choice" in
    
      "1") tput setf 3
      echo $TST1
      tput sgr0
      echo 
      LC_ALL=C zypper ve
      echo
      read -p "Press <enter> to continue..." ;;
    
      "2") tput setf 3
      echo $TST2
      tput sgr0
      echo  
      rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN
      echo
      echo "Only libdvdcss should be installed from the VideoLAN repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "3") tput setf 3
      echo $TST3
      tput sgr0
      echo 
      rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "4") tput setf 3
      echo $TST4
      tput sgr0
      echo 
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs
      echo
      read -p "Press <enter> to continue..." ;;
     
      "5") tput setf 3
      echo $TST5
      tput sgr0
      echo 
      rpm --verify --query --all '*xine*'
      echo
      read -p "Press <enter> to continue..." ;;
    
      "6") tput setf 3
      echo $TST6
      tput sgr0
      echo 
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' gstreamer-0_10-ffmpeg gstreamer-0_10-fluendo-mp3 gstreamer-0_10-fluendo-mpegdemux gstreamer-0_10-fluendo-mpegmux gstreamer-0_10-plugins-bad gstreamer-0_10-plugins-base gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-extra gstreamer-0_10-plugins-ugly
      echo
      read -p "Press <enter> to continue..." ;;
    
      "7") tput setf 3
      echo $TST7
      tput sgr0
      echo 
      rpm --verify --query --all '*gst*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "8") tput setf 3
      echo $TST8
      tput sgr0
      echo 
      rpm --verify MPlayer
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "9") tput setf 3
      echo $TST9
      tput sgr0
      echo 
      rpm --verify --query --all '*vlc*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "10") tput setf 3
      echo $TSTA
      echo 
      rpm --verify w32codec-all
      tput sgr0
      echo
      echo "Note that this package only adds support for some rare formats, and only"
      echo "works on 32bits systems.  On a x86-64 system it will not make any difference."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "0") tput clear
      tput setf 2
      tput bold
      echo
      echo "To avoid problems... the most important thing I can say to you: even if YaST/zypper/updater gives you such an option...  ***NEVER*** "
      echo "ignore a dependency. Change vendor is ok, ignore dependencies is never is a good idea. See the following forum post for more details."
      echo
      echo "http://forums.opensuse.org/english/get-help-here/multimedia/400119-check-your-multimedia-problem-ten-steps.html#post1898049"
      tput sgr0
      echo
      exit 0 ;;
    
      *) ;;
    
    esac
    
    done 
    
    exit 0
    
    # End of Bash File
    After you have save the text, you need to make the script file executable. Open up a terminal session and type the command:

    Code:
    chmod +x ~/bin/mmcheck
    Once the script file has been created and made executable, you only need to open another terminal session, such as konsole and type the command:

    Code:
    mmcheck
    Here is what the mmcheck menu looks like.

    Code:
     MultiMedia Check Version 1.00  -  Check for multimedia problems in just 10 steps  
    
      Mutimedia Test Selection - M E N U  USER:/home/james  Kernel:2.6.35.5-6-desktop  
    
      1 . Check if there are any missing dependencies for installed packages ...       
      2 . Check if there are packages installed from the VideoLAN repository ...       
      3 . Check your basic installed multimedia packages ...                           
      4 . Verify you have xine installed and installed from Packman ...                
      5 . Check your xine packages ...                                                 
      6 . Verify you have all the gstreamer plugins (codecs) installed from Packman ...
      7 . Check your gstreamer packages ...                                            
      8 . Check your MPlayer package ...                                               
      9 . Check your VLC packages ...                                                  
      10. Check your w32codec package ...                                              
      0 . Exit Mutimedia Test Selection Menu                                           
    
     Enter your choice [0-10]
    Please let me know if you have any questions about the script, have any suggestions or any problems using this program.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  2. #2
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

    Hello James

    Thank you. It works. Helped me to clean up my installation.

    The only glitch I noticed is that the title line is longer than 80 characters and wraps around.
    Technology is 'stuff that doesn't work yet.' -- Bran Ferren

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

    Hello James

    Thank you. It works. Helped me to clean up my installation.

    The only glitch I noticed is that the title line is longer than 80 characters and wraps around.
    Thank you voodo for your kind words. If I should repost the script for any reason, I shall shorten all lines to 80 characters or less. I failed to check that this time. I will not forget next time.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Lightbulb MMCHECK 1.01 - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

    Here in version 1.01 I have added more color to the 10 tests and now present the actual command being run so you can see both the command and the result. Where I could, I did shorten displayed text.

    As before, copy the text in the following code block into a text editor and then save the file as mmcheck in your home area bin folder (~/bin/mmcheck).

    Code:
    #!/bin/bash
    
    #: Title       : /home/james/bin/mmcheck
    #: Date Created: Sun Oct 3 15:42:01 CDT 2010
    #: Last Edit   : Sat Oct 23 14:37:05 CDT 2010
    #: Author      : by RedDwarf & J. McDaniel
    #: Version     : 1.01
    #: Description : Check Your Installed Files for Mutimedia
    #: Options     : none
    
    # Written for the openSUSE forums on Sunday October 23, 2010
    
    # Copy and paste this text as the file mmcheck into the ~/bin folder.
    # Run the terminal command: chmod +x ~/bin/mmcheck, to make the file executable
    # Open up a terminal session and type: mmcheck, to start the program
    
    PROG="MultiMedia Check Version 1.01 - Check for multimedia problems in just 10 steps "
    
    # Determine program user, save home folder location, request root password
    
    USER="$HOME"
    
    # Menu Disply System function
    # Display up to 10 menu items and 0 is always Exit 
    # Menu must have at least two choices plus exit
    
    function print_menu {
    
    # You can adjust the starting position of the mmcheck menu.  
    # Using s_line=0 & s_col=0 would place the menu in the top left corner of your screen"
    
    # Starting Terminal Line Number for menu
    s_line=3
    # Starting Terminal Column Number for Menu
    s_col=33
    
    # Display Program Title
    tput clear
    tput cup $(( s_line )) $(( s_col ))
    tput setf 7
    tput setb 2
    tput bold
    echo "$1"
    
    # Determine Kernel Version
    kernel=$(uname -r)
    
    # Display Menu, Present User home, kernel version
    tput sgr0
    tput cup $(( s_line + 2 )) $(( s_col ))
    tput setf 7
    tput setb 1
    tput bold
    echo "$2" "USER:$USER" " Kernel:$kernel" 
    
    # Display Option for Line 1 (required)
    tput sgr0
    tput cup $(( s_line + 4 )) $(( s_col ))
    echo "$5"
    
    # Display Option for Line 2 (required)
    if [ $4 -ge 2 ] ; then
      tput cup $(( s_line + 5 )) $(( s_col ))
      echo "$6"
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 8 )) $(( s_col ))
    fi
    
    
    # Display Option for Line 3 (optional)
    if [ $4 -ge 3 ] ; then
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$7"
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 9 )) $(( s_col ))
    fi
    
    # Display Option for Line 4 (optional)
    if [ $4 -ge 4 ] ; then
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$8"
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 10 )) $(( s_col ))
    fi
    
    # Display Option for Line 5 (optional)
    if [ $4 -ge 5 ] ; then
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$9"
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 11 )) $(( s_col ))
    fi
    
    # Display Option for Line 6 (optional)
    if [ $4 -ge 6 ] ; then
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "${10}"
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 12 )) $(( s_col ))
    fi
    
    # Display Option for Line 7 (optional)
    if [ $4 -ge 7 ] ; then
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "${11}"
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 13 )) $(( s_col ))
    fi
    
    # Display Option for Line 8 (optional)
    if [ $4 -ge 8 ] ; then
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "${12}"
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 14 )) $(( s_col ))
    fi
    
    # Display Option for Line 9 (optional)
    if [ $4 -ge 9 ] ; then
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "${13}"
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 15 )) $(( s_col ))
    fi
    
    # Display Option for Line 10 (optional)
    if [ $4 -ge 10 ] ; then
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "${14}"
      tput cup $(( s_line + 14 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 16 )) $(( s_col ))
    fi
    
    # Display menu option request and get user input
    tput setaf 2
    tput bold
    read -p "Enter your choice [0-"$4"] " CHOICE
    tput clear
    tput sgr0
    tput rc
    return $CHOICE
    }
    
    # Main Program Loop starts here ...
    
    while true ; do
    
    # Setup Menu string Fields displayed for your menu
    
    MENU="Mutimedia Test Selection - M E N U "
    EXIT=" 0 . Exit Mutimedia Test Selection Menu                                         "
    TOTL="10" 
    TST1=" 1 . Check if there are any missing dependencies for installed packages ...     "
    TST2=" 2 . Check if there are packages installed from the VideoLAN repository ...     "
    TST3=" 3 . Check your basic installed multimedia packages ...                         "
    TST4=" 4 . Verify you have xine installed and installed from Packman ...              "
    TST5=" 5 . Check your xine packages ...                                               "
    TST6=" 6 . Verify you have all the gstreamer plugins/codecs installed from Packman ..."
    TST7=" 7 . Check your gstreamer packages ...                                          "
    TST8=" 8 . Check your MPlayer package ...                                             "
    TST9=" 9 . Check your VLC packages ...                                                "
    TSTA=" 10. Check your w32codec package ...                                            "
    
    # Call Menu and get user input selection
    
    print_menu "$PROG" "$MENU" "$EXIT" "$TOTL" "$TST1" "$TST2" "$TST3" "$TST4" "$TST5" "$TST6" "$TST7" "$TST8" "$TST9" "$TSTA"
    choice="$?"
    
    # Execute User Command Here
    
    case "$choice" in
    
      "1") tput bold
      tput setf 7
      tput setb 4
      echo $TST1
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: LC_ALL=C zypper ve"
      tput sgr0
      echo
      LC_ALL=C zypper ve
      echo
      read -p "Press <enter> to continue..." ;;
    
      "2") tput bold
      tput setf 7
      tput setb 4
      echo $TST2
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN"
      tput sgr0
      echo  
      rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN
      echo
      echo "Only libdvdcss should be installed from the VideoLAN repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "3") tput bold
      tput setf 7
      tput setb 4
      echo $TST3
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'"
      tput sgr0
      echo
      rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "4") tput bold
      tput setf 7
      tput setb 4
      echo $TST4
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs
      echo
      read -p "Press <enter> to continue..." ;;
     
      "5") tput bold
      tput setf 7
      tput setb 4
      echo $TST5
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*xine*'"
      tput sgr0
      echo
      rpm --verify --query --all '*xine*'
      echo
      read -p "Press <enter> to continue..." ;;
    
      "6") tput bold
      tput setf 7
      tput setb 4
      echo $TST6
      echo 
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n'"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' gstreamer-0_10-ffmpeg gstreamer-0_10-fluendo-mp3 gstreamer-0_10-fluendo-mpegdemux gstreamer-0_10-fluendo-mpegmux gstreamer-0_10-plugins-bad gstreamer-0_10-plugins-base gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-extra gstreamer-0_10-plugins-ugly
      echo
      read -p "Press <enter> to continue..." ;;
    
      "7") tput bold
      tput setf 7
      tput setb 4
      echo $TST7
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*gst*'"
      tput sgr0
      echo
      rpm --verify --query --all '*gst*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "8") tput bold
      tput setf 7
      tput setb 4
      echo $TST8
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command:  rpm --verify MPlayer"
      tput sgr0
      echo
      rpm --verify MPlayer
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "9") tput bold
      tput setf 7
      tput setb 4
      echo $TST9
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*vlc*'"
      tput sgr0
      echo
      rpm --verify --query --all '*vlc*'
      echo
      echo "No report is good, though not all problems are bad."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "10") tput bold
      tput setf 7
      tput setb 4
      echo $TSTA
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "Command: rpm --verify w32codec-all"
      tput sgr0
      echo
      rpm --verify w32codec-all
      echo
      echo "Note that this package only adds support for some rare formats, and only"
      echo "works on 32bits systems.  On a x86-64 system it will not make any difference."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "0") tput clear
      tput setf 2
      tput bold
      echo
      echo "To avoid problems... the most important thing I can say to you: even if YaST/"
      echo "zypper/updater gives you such an option...  ***NEVER*** ignore a dependency."
      echo "Change vendor is ok, ignore dependencies is never is a good idea. See the "
      echo "following forum post for more details."
      echo
      echo "http://forums.opensuse.org/english/get-help-here/multimedia/400119-check-your-multimedia-problem-ten-steps.html#post1898049"
      tput sgr0
      echo
      exit 0 ;;
    
      *) ;;
    
    esac
    
    done 
    
    exit 0
    
    # End of Bash File
    To make mmcheck executable, open a terminal session and type the terminal command:

    Code:
    chmod +x ~/bin/mmcheck
    To use mmcheck, open a terminal session and type the command:

    Code:
    mmcheck
    You can create an icon on your desktop to run mmcheck by doing the following tasks. Open a text editor and copy the following text in and then save the file as mmcheck.desktop in your home area Desktop folder (~/Desktop/mmcheck.desktop).

    Code:
    [Desktop Entry]
    Comment[en_US]=
    Comment=
    Exec=~/bin/mmcheck
    GenericName[en_US]=Multimedia Check - In 10 Steps
    GenericName=Multimedia Check - In 10 Steps
    Icon=video-television
    MimeType=                                                                                                                                     
    Name[en_US]=mmcheck                                                                                                                           
    Name=mmcheck                                                                                                                                  
    Path=
    StartupNotify=true
    Terminal=true
    TerminalOptions=
    Type=Application
    X-DBUS-ServiceName=
    X-DBUS-StartupType=none
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    X-SuSE-translate=true
    Once saved in the right place with the correct name an icon should appears on your desktop called mmcheck. I picked an icon of a monitor, but you could change it to anything you wanted.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Lightbulb MMCHECK 1.10 - Check Your Multimedia in 13 Steps - Script File, as proposed by RedDwarf

    Just in time for Halloween, I have updated mmcheck to 13 steps. These added steps include checking your Quicktime package, your Flash Packages (not 64 bit) and your Java packages. These are all helpful to know when using your Internet Browser. I have added text to explain the rpm --verify error messages should you get one. Just as before, copy and past the text in the following code block into a text file and save it in your home area as the file mmcheck (~/bin/mmcheck).

    Code:
    #!/bin/bash
    
    #: Title       : /home/james/bin/mmcheck
    #: Date Created: Sun Oct 3 15:42:01 CDT 2010
    #: Last Edit   : Tue Oct 26 20:13:05 CDT 2010
    #: Author      : by RedDwarf & J. McDaniel
    #: Version     : 1.10
    #: Description : Check Your Installed Files for Mutimedia
    #: Options     : none
    
    # Written for the openSUSE forums on Tuesday October 26, 2010
    
    # Copy and paste this text as the file mmcheck into the ~/bin folder.
    # Run the terminal command: chmod +x ~/bin/mmcheck, to make the file executable
    # Open up a terminal session and type: mmcheck, to start the program
    
    PROG="MultiMedia Check Version 1.10 - Check for multimedia problems in just 13 steps "
    
    function rpm_verify {
    
    echo " If everything verified properly there will be no output. If there are any "
    echo " discrepancies they will be displayed. The format of the output is a string "
    echo " of 8 characters, a possible "c" denoting a configuration file, and then "
    echo " the file name. Each of the 8 characters denotes the result of a comparison "
    echo " of one attribute of the file to the value of that attribute recorded in the "
    echo " RPM database. A single "." (period) means the test passed. The following "
    echo " characters denote failure of certain tests: " 
    echo 
    echo "     5 -- MD5 checksum "
    echo "     S -- File size "
    echo "     L -- Symbolic link "
    echo "     T -- File modification time "
    echo "     D -- Device "
    echo "     U -- User "
    echo "     G -- Group "
    echo "     M -- Mode (includes permissions and file type) " 
    echo "     ? -- Unreadable file "
    }
    
    
    # Determine program user, save home folder location, request root password
    
    USER="$HOME"
    
    # Menu Disply System function
    # Display up to 10 menu items and 0 is always Exit 
    # Menu must have at least two choices plus exit
    
    function print_menu {
    
    # You can adjust the starting position of the mmcheck menu.  
    # Using s_line=0 & s_col=0 would place the menu in the top left corner of your screen"
    
    # Starting Terminal Line Number for menu
    s_line=1
    # Starting Terminal Column Number for Menu
    s_col=1
    
    # Display Program Title
    tput clear
    tput cup $(( s_line )) $(( s_col ))
    tput setf 7
    tput setb 2
    tput bold
    echo "$1"
    
    # Determine Kernel Version
    kernel=$(uname -r)
    
    # Display Menu, Present User home, kernel version
    tput sgr0
    tput cup $(( s_line + 2 )) $(( s_col ))
    tput setf 7
    tput setb 1
    tput bold
    echo "$2" "USER:$USER" " Kernel:$kernel" 
    
    # Display Option for Line 1 (required)
    tput sgr0
    tput cup $(( s_line + 4 )) $(( s_col ))
    echo "$5"
    
    # Display Option for Line 2 (required)
    if [ $4 -ge 2 ] ; then
      tput cup $(( s_line + 5 )) $(( s_col ))
      echo "$6"
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 8 )) $(( s_col ))
    fi
    
    
    # Display Option for Line 3 (optional)
    if [ $4 -ge 3 ] ; then
      tput cup $(( s_line + 6 )) $(( s_col ))
      echo "$7"
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 9 )) $(( s_col ))
    fi
    
    # Display Option for Line 4 (optional)
    if [ $4 -ge 4 ] ; then
      tput cup $(( s_line + 7 )) $(( s_col ))
      echo "$8"
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 10 )) $(( s_col ))
    fi
    
    # Display Option for Line 5 (optional)
    if [ $4 -ge 5 ] ; then
      tput cup $(( s_line + 8 )) $(( s_col ))
      echo "$9"
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 11 )) $(( s_col ))
    fi
    
    # Display Option for Line 6 (optional)
    if [ $4 -ge 6 ] ; then
      tput cup $(( s_line + 9 )) $(( s_col ))
      echo "${10}"
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 12 )) $(( s_col ))
    fi
    
    # Display Option for Line 7 (optional)
    if [ $4 -ge 7 ] ; then
      tput cup $(( s_line + 10 )) $(( s_col ))
      echo "${11}"
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 13 )) $(( s_col ))
    fi
    
    # Display Option for Line 8 (optional)
    if [ $4 -ge 8 ] ; then
      tput cup $(( s_line + 11 )) $(( s_col ))
      echo "${12}"
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 14 )) $(( s_col ))
    fi
    
    # Display Option for Line 9 (optional)
    if [ $4 -ge 9 ] ; then
      tput cup $(( s_line + 12 )) $(( s_col ))
      echo "${13}"
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 15 )) $(( s_col ))
    fi
    
    # Display Option for Line 10 (optional)
    if [ $4 -ge 10 ] ; then
      tput cup $(( s_line + 13 )) $(( s_col ))
      echo "${14}"
      tput cup $(( s_line + 14 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 16 )) $(( s_col ))
    fi
    
    # Display Option for Line 11 (optional)
    if [ $4 -ge 11 ] ; then
      tput cup $(( s_line + 14 )) $(( s_col ))
      echo "${15}"
      tput cup $(( s_line + 15 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 17 )) $(( s_col ))
    fi
    
    # Display Option for Line 12 (optional)
    if [ $4 -ge 12 ] ; then
      tput cup $(( s_line + 15 )) $(( s_col ))
      echo "${16}"
      tput cup $(( s_line + 16 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 18 )) $(( s_col ))
    fi
    
    # Display Option for Line 13 (optional)
    if [ $4 -ge 13 ] ; then
      tput cup $(( s_line + 16 )) $(( s_col ))
      echo "${17}"
      tput cup $(( s_line + 17 )) $(( s_col ))
      echo "$3"
      tput cup $(( s_line + 19 )) $(( s_col ))
    fi
    
    # Display menu option request and get user input
    tput setaf 2
    tput bold
    read -p "Enter your choice [0-"$4"] " CHOICE
    tput clear
    tput sgr0
    tput rc
    return $CHOICE
    }
    
    # Main Program Loop starts here ...
    
    while true ; do
    
    # Setup Menu string Fields displayed for your menu
    
    MENU="Mutimedia Test Selection - M E N U "
    EXIT=" 0 . Exit the Mutimedia Test Selection Menu ...                                 "
    TOTL="13" 
    TST1=" 1 . Check if there are any missing dependencies for installed packages ...     "
    TST2=" 2 . Check if there are packages installed from the VideoLAN repository ...     "
    TST3=" 3 . Check your basic installed multimedia packages ...                         "
    TST4=" 4 . Verify you have xine installed and installed from Packman ...              "
    TST5=" 5 . Check your xine packages (Anything with xine in its name is found)...      "
    TST6=" 6 . Verify you have all the gstreamer plugins/codecs installed from Packman ..."
    TST7=" 7 . Check your gstreamer packages ...                                          "
    TST8=" 8 . Check your MPlayer package ...                                             "
    TST9=" 9 . Check your VLC packages ...                                                "
    TSTA=" 10. Check your w32codec package ...                                            "
    TSTB=" 11. Verify your Quicktime Package is installed ...                             "
    TSTC=" 12. Verify your Flash Packages are installed ...                               "
    TSTD=" 13. Verify your Java Files are Installed ...                                   "
    
    # Call Menu and get user input selection
    
    print_menu "$PROG" "$MENU" "$EXIT" "$TOTL" "$TST1" "$TST2" "$TST3" "$TST4" "$TST5" "$TST6" "$TST7" "$TST8" "$TST9" "$TSTA" "$TSTB" "$TSTC" "$TSTD"
    CHOICE="$?"
    
    # Execute User Command Here
    
    case "$CHOICE" in
    
      "1") tput bold
      tput setf 7
      tput setb 1
      echo "Before Checking Your Repositories, would you like "
      echo "to perform a Zypper Refresh right now? (Yes or No)"
      echo
      read -p "Enter your choice [y/N] " CHOICE
      if [ "$CHOICE" == "y" ] || [ "$CHOICE" == "Y" ] ; then
        sudo zypper refresh
      fi
      echo
      tput bold
      tput setf 7
      tput setb 4
      echo $TST1
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: LC_ALL=C zypper ve"
      tput sgr0
      echo
      LC_ALL=C zypper ve
      echo
      read -p "Press <enter> to continue..." ;;
    
      "2") tput bold
      tput setf 7
      tput setb 4
      echo $TST2
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN"
      tput sgr0
      echo  
      rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN
      echo
      echo "Only libdvdcss should be installed from the VideoLAN repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "3") tput bold
      tput setf 7
      tput setb 4
      echo $TST3
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'"
      tput sgr0
      echo
      rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "4") tput bold
      tput setf 7
      tput setb 4
      echo $TST4
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs
      echo
      read -p "Press <enter> to continue..." ;;
     
      "5") tput bold
      tput setf 7
      tput setb 4
      echo $TST5
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*xine*'"
      tput sgr0
      echo
      rpm --verify --query --all '*xine*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "6") tput bold
      tput setf 7
      tput setb 4
      echo $TST6
      echo 
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' 'gstreamer*'"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' gstreamer-0_10-ffmpeg gstreamer-0_10-fluendo-mp3 gstreamer-0_10-fluendo-mpegdemux gstreamer-0_10-fluendo-mpegmux gstreamer-0_10-plugins-bad gstreamer-0_10-plugins-base gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-extra gstreamer-0_10-plugins-ugly
      echo
      read -p "Press <enter> to continue..." ;;
    
      "7") tput bold
      tput setf 7
      tput setb 4
      echo $TST7
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*gst*'"
      tput sgr0
      echo
      rpm --verify --query --all '*gst*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "8") tput bold
      tput setf 7
      tput setb 4
      echo $TST8
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command:  rpm --verify MPlayer"
      tput sgr0
      echo
      rpm --verify MPlayer
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "9") tput bold
      tput setf 7
      tput setb 4
      echo $TST9
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*vlc*'"
      tput sgr0
      echo
      rpm --verify --query --all '*vlc*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "10") tput bold
      tput setf 7
      tput setb 4
      echo $TSTA
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "Command: rpm --verify w32codec-all"
      tput sgr0
      echo
      rpm --verify w32codec-all
      echo
    
      echo "Note that this package only adds support for some rare formats, and only"
      echo "works on 32bits systems.  On a x86-64 system it will not make any difference."
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "11") tput bold
      tput setf 7
      tput setb 4
      echo $TSTB
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*quicktime*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*quicktime*'
      echo
      echo "You should expect to have only one Quicktime Package Installed" 
      echo "called ----> libquicktime0 <---- from the Packman Repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "12") tput bold
      tput setf 7
      tput setb 4
      echo $TSTC
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*flash*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*flash*'
      echo
      echo "You should expect to have only two Flash Packages Installed which will be"
      echo "----------------> pullin-flash-player <---- from the openSUSE Repository."
      echo "----------------> flash-player <----------- from the openSUSE Repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "13") tput bold
      tput setf 7
      tput setb 4
      echo $TSTC
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' *java-*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*java-*'
      echo
      echo "You should expect to have only Sun Java files installed. If your files" 
      echo "include the name --> openjdk <--, it is suggested they be uninstalled."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "0") tput clear
      tput setf 2
      tput bold
      echo
      echo "To avoid problems... the most important thing to do is: even if YaST/  "
      echo "zypper/updater gives you such an option. **NEVER** ignore a dependency."
      echo "Change vendor is OK, ignore dependencies is never is a good idea.      "
      echo
      tput sgr0
      echo
      exit 0 ;;
    
      *) ;;
    
    esac
    
    done 
    
    exit 0
    
    # End of Bash File
    Next, you need to mark the mmcheck script as executable. Open a terminal session and run this command:

    Code:
    chmod +x ~/bin/mmcheck
    Finally, to use mmcheck, open another terminal session and type the command:

    Code:
    mmcheck
    See my previous message on how to create an icon on your desktop to run mmcheck if you like.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  6. #6
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Lightbulb Re: MMCHECK 1.20 - Check Your Multimedia in 13 Steps - Script File, as proposed by RedDwarf

    After posting mmcheck version 1.10, I almost had a problem trying to post here due to how long the mmcheck script had become. The main problem in it size was how the menu display function was working, having almost the same code over and over. Now in version 1.20, I have condensed the way the menu display is working, taking up a lot less room. This should allow for the ability to add even more multimedia checking steps in the future. I also had one bug in the header display for step 13, which as been corrected. I made a minor change in the sentence display when you exit mmcheck and to exit mmcheck just requires pressing <enter> though a 0 still works.

    Just as before, copy and past the text in the following code block into a text file and save it in your home area as the file mmcheck (~/bin/mmcheck).

    Code:
    #!/bin/bash
    
    #: Title       : /home/james/bin/mmcheck
    #: Date Created: Sun Oct 3 15:42:01 CDT 2010
    #: Last Edit   : Thu Oct 28 19:19:15 CDT 2010
    #: Author      : by RedDwarf & J. McDaniel
    #: Version     : 1.20
    #: Description : Check Your Installed Files for Mutimedia
    #: Options     : none
    
    # Written for the openSUSE forums on Thursday October 28, 2010
    
    # Copy and paste this text as the file mmcheck into the ~/bin folder.
    # Run the terminal command: chmod +x ~/bin/mmcheck, to make the file executable
    # Open up a terminal session and type: mmcheck, to start the program
    
    PROG="MultiMedia Check Version 1.20 - Check for multimedia problems in just 13 steps "
    
    #    "         1         2         3         4         5         6         7         8"
    #    "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
    
    function rpm_verify {
    
    echo " If everything verified properly there will be no output. If there are any "
    echo " discrepancies they will be displayed. The format of the output is a string "
    echo " of 8 characters, a possible "c" denoting a configuration file, and then "
    echo " the file name. Each of the 8 characters denotes the result of a comparison "
    echo " of one attribute of the file to the value of that attribute recorded in the "
    echo " RPM database. A single "." (period) means the test passed. The following "
    echo " characters denote failure of certain tests: " 
    echo 
    echo "     5 -- MD5 checksum "
    echo "     S -- File size "
    echo "     L -- Symbolic link "
    echo "     T -- File modification time "
    echo "     D -- Device "
    echo "     U -- User "
    echo "     G -- Group "
    echo "     M -- Mode (includes permissions and file type) " 
    echo "     ? -- Unreadable file "
    }
    
    # Determine program user, save home folder location, request root password
    
    USER="$HOME"
    
    # Menu Disply System function
    # Display up to $3 menu items and <enter> is always Exit 
    # Menu should have at least two choices plus exit
    
    function print_menu {
    
    # You can adjust the starting position of the mmcheck menu.  
    # Using s_line=0 & s_col=0 would place the menu in the top left corner of your screen"
    
    # Starting Terminal Line Number for menu
    s_line=1
    # Starting Terminal Column Number for Menu
    s_col=1
    
    # Display Program Title
    tput clear
    tput cup $(( s_line )) $(( s_col ))
    tput setf 7
    tput setb 2
    tput bold
    echo "$1"
    
    # Determine Kernel Version
    kernel=$(uname -r)
    
    # Display Menu, Present User home, kernel version
    tput sgr0
    tput cup $(( s_line + 2 )) $(( s_col ))
    tput setf 7
    tput setb 1
    tput bold
    echo "$2" "USER:$USER" " Kernel:$kernel  " 
    tput sgr0
    
    # Display All Menu Options 1 through $3
    maxnum=$3
    counter=0
    
    while [ $(( counter )) -lt $(( maxnum + 1 )) ] ; do
      let counter=counter+1
      tput cup $(( s_line + 3 + counter )) $(( s_col ))
      echo "$4"
      shift
    done
    
    # Display menu option request and get user input
    tput setf 2
    tput bold
    tput cup $(( s_line + 4 + counter )) $(( s_col ))
    read -p "Enter your choice [0-"$maxnum"] or Just Press <enter> to Quit: " CHOICE
    tput clear
    tput sgr0
    tput rc
    return $CHOICE
    }
    
    #
    # Main Program Loop starts here ...
    #
    
    while true ; do
    
    # Setup Menu string Fields displayed for your menu
    
    MENU="Mutimedia Test Selection - M E N U "
    TOTL="13" 
    TST1=" 1 . Check if there are any missing dependencies for installed packages ...     "
    TST2=" 2 . Check if there are packages installed from the VideoLAN repository ...     "
    TST3=" 3 . Check your basic installed multimedia packages ...                         "
    TST4=" 4 . Verify you have xine installed and installed from Packman ...              "
    TST5=" 5 . Check your xine packages (Anything with xine in its name is found)...      "
    TST6=" 6 . Verify you have all the gstreamer plugins/codecs installed from Packman ..."
    TST7=" 7 . Check your gstreamer packages ...                                          "
    TST8=" 8 . Check your MPlayer package ...                                             "
    TST9=" 9 . Check your VLC packages ...                                                "
    TSTA=" 10. Check your w32codec package ...                                            "
    TSTB=" 11. Verify your Quicktime Package is installed ...                             "
    TSTC=" 12. Verify your Flash Packages are installed ...                               "
    TSTD=" 13. Verify your Java Packages are Installed ...                                "
    
    # Call Menu and get user input selection
    
    print_menu "$PROG" "$MENU" "$TOTL" "$TST1" "$TST2" "$TST3" "$TST4" "$TST5" "$TST6" "$TST7" "$TST8" "$TST9" "$TSTA" "$TSTB" "$TSTC" "$TSTD"
    CHOICE="$?"
    
    # Execute User Command Here
    
    case "$CHOICE" in
    
      "1") echo 
      tput bold
      tput setf 7
      tput setb 1
      echo "Before Checking Your Repositories, would you like "
      echo "to perform a Zypper Refresh right now? (Yes or No)"
      echo
      read -p "Enter your choice [y/N] " CHOICE
      if [ "$CHOICE" == "y" ] || [ "$CHOICE" == "Y" ] ; then
        sudo zypper refresh
      fi
      echo
      tput bold
      tput setf 7
      tput setb 4
      echo $TST1
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: LC_ALL=C zypper ve"
      tput sgr0
      echo
      LC_ALL=C zypper ve
      echo
      read -p "Press <enter> to continue..." ;;
    
      "2") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST2
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN"
      tput sgr0
      echo  
      rpm -qa --queryformat '%{NAME} -> %{VENDOR}\n' | grep -i VideoLAN
      echo
      echo "Only libdvdcss should be installed from the VideoLAN repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "3") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST3
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'"
      tput sgr0
      echo
      rpm --verify --query --all 'libav*' 'libpostproc*' 'libswscale*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "4") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST4
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' libxine1 libxine1-codecs
      echo
      read -p "Press <enter> to continue..." ;;
     
      "5") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST5
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*xine*'"
      tput sgr0
      echo
      rpm --verify --query --all '*xine*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "6") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST6
      echo 
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' 'gstreamer*'"
      tput sgr0
      echo
      rpm --query --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' gstreamer-0_10-ffmpeg gstreamer-0_10-fluendo-mp3 gstreamer-0_10-fluendo-mpegdemux gstreamer-0_10-fluendo-mpegmux gstreamer-0_10-plugins-bad gstreamer-0_10-plugins-base gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-extra gstreamer-0_10-plugins-ugly
      echo
      read -p "Press <enter> to continue..." ;;
    
      "7") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST7
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*gst*'"
      tput sgr0
      echo
      rpm --verify --query --all '*gst*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "8") echo
      tput bold
      tput setf 7
      tput setb 4
      echo $TST8
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command:  rpm --verify MPlayer"
      tput sgr0
      echo
      rpm --verify MPlayer
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "9") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TST9
      echo
      tput setf 7
      tput setb 1
      tput bold
      echo "Command: rpm --verify --query --all '*vlc*'"
      tput sgr0
      echo
      rpm --verify --query --all '*vlc*'
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "10") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TSTA
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "Command: rpm --verify w32codec-all"
      tput sgr0
      echo
      rpm --verify w32codec-all
      echo
      echo "Note that this package only adds support for some rare formats, and only"
      echo "works on 32bits systems.  On a x86-64 system it will not make any difference."
      echo
      rpm_verify
      echo
      read -p "Press <enter> to continue..." ;;
    
      "11") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TSTB
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*quicktime*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*quicktime*'
      echo
      echo "You should expect to have only one Quicktime Package Installed" 
      echo "called ----> libquicktime0 <---- from the Packman Repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "12") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TSTC
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*flash*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*flash*'
      echo
      echo "You should expect to have only two Flash Packages Installed which will be"
      echo "----------------> pullin-flash-player <---- from the openSUSE Repository."
      echo "----------------> flash-player <----------- from the openSUSE Repository."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "13") echo 
      tput bold
      tput setf 7
      tput setb 4
      echo $TSTD
      echo
      tput setf 7
      tput setb 1
      tput bold 
      echo "rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' *java-*'"
      tput sgr0
      echo
      rpm --query --all --queryformat '%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH} -> %{VENDOR}\n' '*java-*'
      echo
      echo "You should expect to have only Sun Java Packages installed.  If your files " 
      echo "include the name --> openjdk <--, it is suggested that they be uninstalled."
      echo
      read -p "Press <enter> to continue..." ;;
    
      "0") echo 
      tput clear
      tput setf 7
      tput setb 4
      tput bold
      echo
      echo " To avoid package problems, the most important thing to do is to: **NEVER** "
      echo " ignore a dependency, even if YaST/zypper/updater gives you such an option! "
      echo " Change vendor is OK,  but ignoring dependencies is never a very good idea. "
      echo
      tput sgr0
      echo
      read -p "Press <enter> to exit mmcheck ..."
      exit 0 ;;
    
      *) ;;
    
    esac
    
    done 
    
    exit 0
    
    # End of Bash File
    Next, you need to mark the mmcheck script as executable. Open a terminal session and run this command:
    Code:
    chmod +x ~/bin/mmcheck
    Finally, to use mmcheck, open another terminal session and type the command:

    Code:
    mmcheck
    You can create an icon on your desktop to run mmcheck by doing the following tasks. Open a text editor and copy the following text in and then save the file as mmcheck.desktop in your home area Desktop folder (~/Desktop/mmcheck.desktop).

    Code:
    [Desktop Entry]
    Comment[en_US]=
    Comment=
    Exec=~/bin/mmcheck
    GenericName[en_US]=Multimedia Check - In 13 Steps
    GenericName=Multimedia Check - In 13 Steps
    Icon=video-television
    MimeType=                                                                                                                                     
    Name[en_US]=mmcheck                                                                                                                           
    Name=mmcheck                                                                                                                                  
    Path=
    StartupNotify=true
    Terminal=true
    TerminalOptions=
    Type=Application
    X-DBUS-ServiceName=
    X-DBUS-StartupType=none
    X-KDE-SubstituteUID=false
    X-KDE-Username=
    X-SuSE-translate=true
    Once saved in the right place with the correct name an icon should appears on your desktop called mmcheck. I picked an icon of a monitor, but you could change it to anything you wanted.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  7. #7
    Join Date
    Jan 2010
    Location
    Montreal, Quebec
    Posts
    103

    Default Re: MMCHECK 1.20 - Check Your Multimedia in 13 Steps - Script File, as proposed by RedDwarf

    That's really cool James! I'm sure it will help a lot of people that are new to openSUSE and somewhat confused by the multimedia situation (I know I was ). I'm going to translate your post and post it as a sticky in the French forum.

  8. #8
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: MMCHECK 1.20 - Check Your Multimedia in 13 Steps - Script File, as proposed by RedDwarf

    oysterboy
    That's really cool James! I'm sure it will help a lot of people that are new to openSUSE and somewhat confused by the multimedia situation (I know I was ). I'm going to translate your post and post it as a sticky in the French forum.
    oysterboy I really appreciate your support! Obviously I am no good at French, if you want to translate the whole thing you are welcome to do so. Also, if you need help in placing any modifications into the program, I can help there as well. I would need some sort of before and after for each line.

    Of course, you are welcome to do anything you want or can do. I really do think this script can help a lot of people with their multimedia problems. It would be better if one could just download a working script perhaps, but I was also hoping that others would use and modify the script as well. Anyway. Good luck and thanks so much for your support.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  9. #9

    Default Re: MMCHECK 1.20 - Check Your Multimedia in 13 Steps - Script File, as proposed by RedDwarf

    Hi James,

    Im new to using any linux systems. I have installed OpenSUSE 11.3_x64. i was facing problems with the audio....so when i googled the issue i jst chanced upon ur posts...

    rite nw i can hear the audio from webpages as a result of the test 1 from ur script...
    the other test results im not able to decipher if anything is wrong...requesting ur help...!!

    the following are the test results-


    3 . Check your basic installed multimedia packages ...

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    4 . Verify you have xine installed and installed from Packman ...

    libxine1-1.1.19-1.pm.44.6-x86_64 -> PackMan :: Startseite
    libxine1-codecs-1.1.19-1.pm.44.6-x86_64 -> PackMan :: Startseite

    5 . Check your xine packages (Anything with xine in its name is found)...

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    6 . Verify you have all the gstreamer plugins/codecs installed from Packman ...

    package gstreamer-0_10-ffmpeg is not installed
    gstreamer-0_10-fluendo-mp3-2-106.2-x86_64 -> openSUSE
    package gstreamer-0_10-fluendo-mpegdemux is not installed
    package gstreamer-0_10-fluendo-mpegmux is not installed
    package gstreamer-0_10-plugins-bad is not installed
    gstreamer-0_10-plugins-base-0.10.29-1.9-x86_64 -> openSUSE
    package gstreamer-0_10-plugins-good is not installed
    package gstreamer-0_10-plugins-good-extra is not installed
    package gstreamer-0_10-plugins-ugly is not installed

    7 . Check your gstreamer packages ...

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    8 . Check your MPlayer package ...

    package MPlayer is not installed

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    9 . Check your VLC packages ...

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    10. Check your w32codec package ...

    Note that this package only adds support for some rare formats, and only
    works on 32bits systems. On a x86-64 system it will not make any difference.

    If everything verified properly there will be no output. If there are any
    discrepancies they will be displayed. The format of the output is a string
    of 8 characters, a possible c denoting a configuration file, and then
    the file name. Each of the 8 characters denotes the result of a comparison
    of one attribute of the file to the value of that attribute recorded in the
    RPM database. A single . (period) means the test passed. The following
    characters denote failure of certain tests:

    5 -- MD5 checksum
    S -- File size
    L -- Symbolic link
    T -- File modification time
    D -- Device
    U -- User
    G -- Group
    M -- Mode (includes permissions and file type)
    ? -- Unreadable file

    11. Verify your Quicktime Package is installed ...

    libquicktime-1.1.5-3.2-x86_64 -> openSUSE

    You should expect to have only one Quicktime Package Installed
    called ----> libquicktime0 <---- from the Packman Repository.

    12. Verify your Flash Packages are installed ...

    flash-plugin-10.1.85.3-release-i386 -> Adobe Systems Inc.
    flash-player-10.1.53.64-1.1-i586 -> openSUSE
    pullin-flash-player-11.3-1.2-x86_64 -> openSUSE

    You should expect to have only two Flash Packages Installed which will be
    ----------------> pullin-flash-player <---- from the openSUSE Repository.
    ----------------> flash-player <----------- from the openSUSE Repository.

    13. Verify your Java Packages are Installed ...

    java-ca-certificates-1-5.3-noarch -> openSUSE
    java-1_6_0-openjdk-1.6.0.0_b17-7.3-x86_64 -> openSUSE
    java-1_6_0-openjdk-plugin-1.6.0.0_b17-7.3-x86_64 -> openSUSE

    You should expect to have only Sun Java Packages installed. If your files
    include the name --> openjdk <--, it is suggested that they be uninstalled.

    Thanks in advance for ur help....!!

  10. #10

    Default Re: MMCHECK - Check Your Multimedia in 10 Steps - Script File, as proposed by RedDwarf

    Hi... you might want to try this. Worked for me.

    Restricted formats/11.3 - openSUSE Community Wiki

    I originally did the one click install but for what ever reason it didn't fully work.

    I retried with the code option and solved my problems re: ripping cds to MP3.

    I am linux newbe though.

Page 1 of 9 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •