Ubuntu 10.4 / Fedora 13 Vmware Workstation 7

After much scouring the web i eventually found a fix for vmware workstation 7 on Ubuntu 10.4
Follow these to the T. and you should have no problem compiling vmware modules.

1. Switch to your temp directory

cd /tmp

2. Extract the vmware net source module

]tar xf /usr/lib/vmware/modules/source/vmnet.tar

3. Add #include “compat_sched.h” under the first set of includes

 gksudo gedit vmnet-only/vnetUserListener.c

4. Compress and save the source back to the original location

tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only

5. Extract Virtual Machine Communication Interface

tar xf /usr/lib/vmware/modules/source/vmci.tar

6. Add #include “compat_sched.h” under the first set of includes

gksudo gedit vmci-only/linux/vmciKernelIf.c

7. Add #include “compat_sched.h” under the first set of includes

gksudo gedit vmci-only/include/pgtbl.h

8. Compress and save the source back to the original location

tar cf /usr/lib/vmware/modules/source/vmci.tar vmci-only

9. Finally recompile the vmware modules

sudo vmware-modconfig --console --install-all

..


Ubuntu 10.4 / Fedora 13 Dell 1320C printer

To add the dell 1320c to Ubuntu 10.4
Download the following deb file fuji-xerox-docuprint-c525-a-ap_1.0-2_i386.

if your architecture is 64bit, your probably going to have a bit of an issue! wrong architecture? no problem, just use

sudo dpkg -i --force-install fuji-xerox-docuprint-c525-a-ap_1.0-2_i386.deb

once installed open up the add printer though system > administration > printing
Follow the steps as usual and when asked for the printer make, choose the ppd file from

/usr/share/cups/model/FujiXerox/en/FX_DocuPrint_C525_A_AP.ppd

Happy printing!

Screenshots – Process

Download CSIS Notes quickly!

This handy little script will download all your coursework in a jip

youll need php 5 and mod php_curl!

<?php

class csisDownloader
{
	private $courseTitles;
	private $courseLinks;

	private $moduleTitles;
	private $moduleLinks;

	private $documentCourseTitles;
	private $documentModulesTitles;
	private $documentTitles;
	private $documentLinks;

	public function __construct( $course , $modules )
	{
		if( strlen($course) != 0 )
		{
			$this->selectedCourse = $course;
		}
		if( count($modules) > 0 )
		{
			$this->selectedModules = $modules;
		}

		$this->fetchCourses();
	}

	private function fetchCourses()
	{
		echo "Start\n";

		$this->downloader = curl_init();
		curl_setopt( $this->downloader , CURLOPT_URL , "http://www.csis.ul.ie/currentstudents/" );
		curl_setopt( $this->downloader , CURLOPT_USERAGENT , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090829 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" );
		curl_setopt( $this->downloader , CURLOPT_TIMEOUT , '10' );
		curl_setopt( $this->downloader , CURLOPT_FOLLOWLOCATION , 1 );
		curl_setopt( $this->downloader , CURLOPT_RETURNTRANSFER , 1 );
		$this->store = curl_exec( $this->downloader );
		curl_close( $this->downloader );

		echo "Got courses\n";

		$data = explode( "UNDERGRADUATE COURSES" , $this->store );
		$data = explode( "</div>" , $data[1] );
		$data = preg_match_all( "/(<li>.*<\/li>)/" , $data[0] , $matches);
		preg_match_all( "/<a href=\"([^\"]*)\">(.*)<\/a>/iU" ,$matches[0][0] , $temp1 );
		preg_match_all( "/<a href=\"([^\"]*)\">(.*)<\/a>/iU" , $matches[1][1] , $temp2 );
		$courses = array_merge( $temp1 , $temp2 );
		$this->courseLinks = array_merge( $courses[1] , $courses[4] );
		$this->courseTitles = array_merge( $courses[2] , $courses[5] );

		for( $u = 0 ; $u < count( $this->courseLinks ); $u++ )
		{
			if( isset( $this->selectedCourse ) )
			{
				if( !stristr( $this->courseLinks[$u] , $this->selectedCourse ) )
				{
					continue;
				}
			}

			$this->downloader = curl_init();
			$url = "http://www.csis.ul.ie" . $this->courseLinks[$u];
			curl_setopt( $this->downloader , CURLOPT_URL , $url );
			curl_setopt( $this->downloader , CURLOPT_USERAGENT , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090829 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" );
			curl_setopt( $this->downloader , CURLOPT_TIMEOUT , '10' );
			curl_setopt( $this->downloader , CURLOPT_FOLLOWLOCATION , 1 );
			curl_setopt( $this->downloader , CURLOPT_RETURNTRANSFER , 1 );
			$this->store = curl_exec( $this->downloader );

			$data = explode( "COURSE STRUCTURE SECTION STARTS" , $this->store );
			$data = explode( "COURSE STRUCTURE SECTION ENDS" , $data[1] );
			preg_match_all( "/<a href=\"([^\"]*)\">(.*)<\/a>/iUms" , $data[0] , $mods );

			for( $y= 0 ; $y < count($mods[2]); $y++ )
			{
				$mods[2][$y] = trim( $mods[2][$y] );
			}

			$this->moduleLinks[$u] = $mods[1];
			$this->moduleTitles[$u] = $mods[2];

			curl_close( $this->downloader );

			echo "Starting the modules\n";

			for( $z = 0 ; $z < count( $this->moduleLinks[$u] ); $z++ )
			{
				print $this->courseLinks[$u] . " - " . $this->moduleLinks[$u][$z] . "\n";

				$moduletitle = preg_replace( "/\/coursemodule\//" , "" , $this->moduleLinks[$u][$z] );
				if( isset( $this->selectedModules ) )
				{
					if( !in_array( $moduletitle , $this->selectedModules ) )
					{
						continue;
					}
				}

				for( $w = 1 ; $w < 17; $w++ )
				{
					$url = "http://www.csis.ul.ie" . $this->moduleLinks[$u][$z] . "/?wkid=" . $w;

					$this->downloader = curl_init();
					curl_setopt( $this->downloader , CURLOPT_URL , $url );
					curl_setopt( $this->downloader , CURLOPT_USERAGENT , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090829 Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" );
					curl_setopt( $this->downloader , CURLOPT_TIMEOUT , '10' );
					curl_setopt( $this->downloader , CURLOPT_FOLLOWLOCATION , 1 );
					curl_setopt( $this->downloader , CURLOPT_RETURNTRANSFER , 1 );
					$this->store = curl_exec( $this->downloader );
					curl_close( $this->downloader );

					$data = explode( "MODULE MATERIAL SECTION STARTS" , $this->store );
					$data = explode( "MODULE MATERIAL SECTION ENDS" , $data[1] );
					$data = explode( "<h2>" , $data[0] );

					foreach( $data as $dt )
					{
						preg_match_all( '/<(a.*) href="(.*?)"(.*)>(.*)((<\/a>)/i' , $dt , $docs );
						if( isset($docs[2][0]) != "" )
						{
							$this->documentTitles[] = substr( trim( $docs[4][0]) , 1 , -1 );
							$this->documentLinks[] = trim( $docs[2][0] );
							$this->documentCourseTitles[] = $this->courseTitles[$u];
							$this->documentModulesTitles[] = $this->moduleTitles[$u][$z];
						}
					}
					print $this->courseLinks[$u] . " - " . $this->moduleLinks[$u][$z] . " - " . $url . "\n";
				}

				for( $t = 0 ; $t < count( $this->documentCourseTitles ); $t++)
				{
					$this->downloadFile( $this->documentCourseTitles[$t] ,$this->documentModulesTitles[$t] , $this->documentTitles[$t] ,	$this->documentLinks[$t] );
				}

				unset($this->documentCourseTitles);
				unset($this->documentModulesTitles);
				unset($this->documentTitles);
				unset($this->documentLinks);
			}
		}
	}

	private function downloadFile( $course , $module , $docTitle , $docUrl )
	{
		$course = preg_replace( "/\//" , "" , $course);
		$moduletitle = $module;
		$doc = $docTitle;
		$url = $docUrl;

		if( !file_exists( "coursework" ) )
		{
			mkdir( "coursework" );
		}

		if( !file_exists( "coursework/$course" ) )
		{
			mkdir( "coursework/$course" );
		}

		if( !file_exists( "coursework/$course/$moduletitle" ) )
		{
			mkdir( "coursework/$course/$moduletitle" );
		}

		$dir = "coursework/$course/$moduletitle";

		if( !file_exists( $dir . "/" . $doc ) )
		{
			$url = preg_replace( "/&/i" , "&" , $url );
			$url = preg_replace( "/amp;/i" , "" , $url );
			$url = "http://www.csis.ul.ie" . $url;

			$this->downloader = curl_init();
			curl_setopt( $this->downloader , CURLOPT_URL , $url );
			curl_setopt( $this->downloader , CURLOPT_USERAGENT , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090829	Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" );
			curl_setopt( $this->downloader , CURLOPT_TIMEOUT , '10' );
			curl_setopt( $this->downloader , CURLOPT_FOLLOWLOCATION , 1 );
			curl_setopt( $this->downloader , CURLOPT_RETURNTRANSFER , 1 );
			$this->store = curl_exec ( $this->downloader );
			curl_close( $this->downloader );

			$docurl = preg_match( "/action=\"(.*)\" /" , $this->store , $matches );
			$match = explode( "\"", $matches[1] );
			$match = preg_replace( "/&/i" , "&" , $match[0] );
			$match = preg_replace( "/amp;/i" , "" , $match );

			$fp = fopen( $dir . "/" . $doc , 'w' );
			$this->downloader = curl_init();
			curl_setopt( $this->downloader , CURLOPT_URL , $match );
			curl_setopt( $this->downloader , CURLOPT_USERAGENT , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090829	Ubuntu/9.04 (jaunty) Shiretoko/3.5.4pre" );
			curl_setopt( $this->downloader , CURLOPT_HEADER, 0);
			curl_setopt( $this->downloader , CURLOPT_FILE , $fp );
			curl_exec( $this->downloader );
			curl_close( $this->downloader );
			fclose( $fp );
		}
	}

}

$course = "LM051";
$modules = array( "CS4416" );

new csisDownloader( $course , $modules );

?>

Ubuntu 10.4 / Fedora 13 Logitech Dinovo Edge

The standard config doesn’t work all that well

1. Edit /lib/udev/rules.d/70-hid2hci.rules

sudo gedit /lib/udev/rules.d/70-hid2hci.rules

change the line directly after # Logitech devices and reboot!

# Logitech devices
KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[4abc]|c71[34bc]", \
  RUN+="hid2hci --method=logitech-hid --devpath=%p"

Fedora 13 ,14, 15, 16 PulseAudio M-Audio audiophile 2496

1. Edit the pulse rules

sudo gedit /lib/udev/rules.d/90-pulseaudio.rules

add the following line

SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1412", ATTRS{device}=="0x1712", ATTRS{subsystem_vendor}=="0x1412", 
ATTRS{subsystem_device}=="0xd634", ENV{PULSE_PROFILE_SET}="m_audio-audiophile-2496.conf"

2. Create the following file

sudo gedit /usr/share/pulseaudio/alsa-mixer/profile-sets/m_audio-audiophile-2496.conf
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

; M-Audio Delta Audiophile 2496
;
; This card, based on the Via ICE1712 chipset, has two stereo audio channels
; (1 in and 1 out) and a separate S/PDIF digital stereo channel. Like with
; all ICE1712-based cards, this is exposed by ALSA as a single 10-channel
; device with some of the channels not connected.
;
; See default.conf for an explanation on the directives used here.

[General]
auto-profiles = no

[Mapping analog-stereo-in]
description = Analog Stereo Input
device-strings = hw:%f,0
channel-map = front-left,front-right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9
direction = input

[Mapping analog-stereo-out]
description = Analog Stereo Output
device-strings = hw:%f,0
channel-map = front-left,front-right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7
direction = output

[Mapping analog-digital-stereo-out]
description = Analog/Digital Stereo Output
device-strings = hw:%f,0
channel-map = front-left,front-right,aux0,aux1,aux2,aux3,aux4,aux5,front-left,front-right
direction = output

[Mapping digital-stereo-out]
description = Digital Stereo Output
device-strings = hw:%f,0
channel-map = aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,front-left,front-right
direction = output

[Mapping digital-stereo-in]
description = Digital Stereo Input
device-strings = hw:%f,0
channel-map = front-left,front-right,front-left,front-right,front-left,front-right,front-left,front-right,front-left,front-right,front-left,front-right
direction = input

[Mapping digital-stereo]
description = Digital Stereo Input/Output
#device-strings = hw:%f,1
device-strings = iec958:%f
channel-map = left,right
direction = any

[Profile output:stereo]
description = Analog Stereo Output
output-mappings = analog-stereo-out
input-mappings =
priority = 80
skip-probe = yes

[Profile output:stereo-da+input:stereo-analog]
description = Analog Stereo Input/Output
output-mappings = analog-stereo-out
input-mappings = analog-stereo-in
priority = 100
skip-probe = yes

[Profile output:stereo-da+input:stereo-analog]
description = Analog Stereo Input/Output, Digital Stereo Output
output-mappings = analog-digital-stereo-out
input-mappings = analog-stereo-in
priority = 90
skip-probe = yes

[Profile output:spdif]
description = Digital Stereo Output (Analog Disabled)
output-mappings = digital-stereo-out
input-mappings =
priority = 60
skip-probe = yes

[Profile output:spdif+input:spdif]
description = Digital Stereo Input/Output (Analog Disabled)
output-mappings = digital-stereo-out
input-mappings = digital-stereo-in
priority = 70
skip-probe = yes

Don’t forget to turn up the device DAC 0,1

optionally, if this setting goes after reboot, make a startup script and put the following into it

amixer -c 0 sset  'DAC',0 100% 100%
amixer -c 0 sset  'DAC',1 100% 100%

Note* -c 0 might change depending on your setup!