<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Respect Continuity</title>
	<atom:link href="http://obdit.com/pad/feed/" rel="self" type="application/rss+xml" />
	<link>http://obdit.com/pad</link>
	<description>del dot u equals zero</description>
	<lastBuildDate>Fri, 18 Jun 2010 16:48:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tic-tac-toe: Beginning Python</title>
		<link>http://obdit.com/pad/2010/06/18/tic-tac-toe-beginning-python/</link>
		<comments>http://obdit.com/pad/2010/06/18/tic-tac-toe-beginning-python/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 16:41:35 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=129</guid>
		<description><![CDATA[I found a script I made back while trying to learn Python. It&#8217;s a pretty basic example of the game. It&#8217;s not much but might be useful for someone learning Python.

#!/usr/bin/python
# PyTicTacToe
#

# Load the board
board = " 1 &#124; 2 &#124; 3\n-----------\n 4 &#124; 5 &#124; 6\n-----------\n 7 &#124; 8 &#124; 9"

# Set the winning [...]]]></description>
			<content:encoded><![CDATA[<p>I found a script I made back while trying to learn Python. It&#8217;s a pretty basic example of the game. It&#8217;s not much but might be useful for someone learning Python.</p>
<pre class="brush:python">
#!/usr/bin/python
# PyTicTacToe
#

# Load the board
board = " 1 | 2 | 3\n-----------\n 4 | 5 | 6\n-----------\n 7 | 8 | 9"

# Set the winning combinations. Paired off in threes
# For example: 123 is a winning combo. So is 147.
checkboard=[1,2,3,4,5,6,7,8,9,1,4,7,2,5,8,3,6,9,1,5,9,3,5,7]

# Set Space Holder
spaces=range(1,10)

# movehandler function

# This function takes the players choice and makes sure it
# has not been used. If not, set the move.

def moveHandler(board,spaces,checkboard,player,n):
	# set X for player one, or O for player 2
	if player==1:
		check="X"
	else:
		check="O"
	# Check if block is used.
	while spaces.count(n)==0:
		print "\nInvalid Space"
		n=playerinput(player)

	# Remove block from spaces array
	spaces=spaces.remove(n)

	# Replace block with check mark in board
	board=board.replace(str(n),check)

	# Replace space with check mark in checkboard array
	for c in range(len(checkboard)):
		if checkboard[c]==n:
			checkboard[c]=check

	# Run the checkwinner function
	status = checkwinner(checkboard,check)

	return board,status

# Checkwinner function

# This function checks whether or not a player has a winning
# combination based on the checkboard array.

def checkwinner(checkboard,check):
	# Set the array element variables
	a,b,c=0,1,2

	#Loop through checkboard to check winner
	while a<=21:
		combo = [checkboard[a],checkboard[b],checkboard[c]]

		# If we have three 'X' or 'O' we have a winner
		if combo.count(check) == 3:
			status =1
			break
		else:
			status =0

	# Iterate to the next combo
		a+=3
		b+=3
		c+=3

# Return status of the game
	return status

#
def playerinput(player):
	try:
		key = int(raw_input('\n\nPlayer ' + str(player) + ': Please select a space '))
	except ValueError:
		print "Invalid Space"
		key = playerinput(player)

	return key

#Start Game
while True:
	player = len(spaces)%2 +1
	if player == 1:
		player = 2
	else:
		player =1

	print "\n\n" + board
	key = playerinput(player)
	board,status =moveHandler(board,spaces,checkboard,player,key)

	if status == 1:
		print '\n\nPlayer ' + str(player) + ' is the winner!!!'
		print board
		break
	elif len(spaces)==0:
		print "No more spaces left. Game ends in a TIE!!!"
		print board
		break
	else:
		continue
</pre>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2010/06/18/tic-tac-toe-beginning-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Permanent Change to Terminal</title>
		<link>http://obdit.com/pad/2010/02/05/make-permanent-change-to-terminal/</link>
		<comments>http://obdit.com/pad/2010/02/05/make-permanent-change-to-terminal/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 16:44:31 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=114</guid>
		<description><![CDATA[My friend Nick was asking me how to customize the terminal which he was able to do. However, he was unable to keep the changes after he would restart his terminal. This is a little screencast that I did. He needs to edit his .bashrc and make permanent changes to the appropriate variable.
For optimal viewing, [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Nick was asking me how to customize the terminal which he was able to do. However, he was unable to keep the changes after he would restart his terminal. This is a little screencast that I did. He needs to edit his <a href="http://tldp.org/LDP/abs/html/sample-bashrc.html" target="_blank">.bashrc</a> and make permanent changes to the <a href="http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html" target="_blank">appropriate</a> variable.</p>
<p>For optimal viewing, watch in fullscreen.<br />
[See post to watch Flash video]
<p>A special thanks to Nick also for working on a Droid <a href="http://img2.me/z4a81" target="_blank">app</a> for obdit.com</p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2010/02/05/make-permanent-change-to-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check if current user is root</title>
		<link>http://obdit.com/pad/2010/02/03/check-if-user-is-root/</link>
		<comments>http://obdit.com/pad/2010/02/03/check-if-user-is-root/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:16:57 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=107</guid>
		<description><![CDATA[I have a script that mounts my campus network drive to my machine, but in order to mount successfully, I must have root/super user privileges and run the script as one. In order to do this, it is important to know that each user has a number assigned to it stored as UID. A superuser [...]]]></description>
			<content:encoded><![CDATA[<p>I have a script that mounts my campus network drive to my machine, but in order to mount successfully, I must have root/super user privileges and run the script as one. In order to do this, it is important to know that each user has a number assigned to it stored as <a href="http://en.wikipedia.org/wiki/User_identifier" target="_blank">UID</a>. A superuser is assigned 0 and all others are positive integers. Seeing this in practice:</p>
<pre class="brush:bash">
pjob@mario:~$ whoami
pjob
pjob@mario:~$ echo $EUID
1000
pjob@mario:~$ su
Password:
mario:/home/pjob$ whoami
root
mario:/home/pjob$ echo $EUID
0
</pre>
<p>To accomplis the task if a user is root, all you need to do is check if the user id is 0. This would look like:</p>
<pre class="brush:bash">if [[ $EUID -ne 0 ]]; then
        echo "You must be a root user" 2>&#038;1
        exit 1
else
        # Do something that requires root
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2010/02/03/check-if-user-is-root/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Version of GradeMate Released!</title>
		<link>http://obdit.com/pad/2010/02/02/new-version-of-grademate-released/</link>
		<comments>http://obdit.com/pad/2010/02/02/new-version-of-grademate-released/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:17:54 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[3Ten]]></category>
		<category><![CDATA[GradeMate]]></category>
		<category><![CDATA[img2.me]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=104</guid>
		<description><![CDATA[After months of hard work by Mike, Jason, Alex, and countless users, the team has released a new version of GradeMate. Some of the new features they list on their blog are:

Reporting tools for teachers and students
Exporting and importing GradeMate courses and information
Parent accounts and increased communication from Teacher &#60;-&#62; Parent &#60;-&#62; Student
Blog pages, Project [...]]]></description>
			<content:encoded><![CDATA[<p>After months of hard work by <a title="Mike" href="http://www.mikegioia.com/" target="_blank">Mike</a>, <a title="Jason" href="http://www.deroner.com/" target="_blank">Jason</a>, <a title="Alex" href="http://alexandertuller.com/" target="_blank">Alex</a>, and countless users, the team has released a new version of <a href="http://mygrademate.com" target="_blank">GradeMate</a>. Some of the new features they list on their blog are:</p>
<ol>
<li>Reporting tools for teachers and students</li>
<li>Exporting and importing GradeMate courses and information</li>
<li>Parent accounts and increased communication from Teacher &lt;-&gt; Parent &lt;-&gt; Student</li>
<li>Blog pages, Project pages, and new, exciting ways to share and collaborate</li>
</ol>
<p>GradeMate is free online organizer for teachers and students to keep track of homework, files, exams, and due dates. Currently there is no seed money but are willing to work with schools to provide a premium service. Get in touch with them at info@mygrademate.com</p>
<p>Be sure to also check out other products from the members of  3Ten Design: <a href="http://myapokalips.com" target="_blank">Apokalips</a> webcomic, <a href="http://img2.me" target="_blank">img2.me</a> image hosting, and <a href="http://sabrstats.com/" target="_blank">Sabrstats</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2010/02/02/new-version-of-grademate-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vectorize Your MATLAB</title>
		<link>http://obdit.com/pad/2010/01/26/vectorize-your-matlab/</link>
		<comments>http://obdit.com/pad/2010/01/26/vectorize-your-matlab/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 20:43:33 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[Matlab]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=82</guid>
		<description><![CDATA[The first time I heard of vectorizing loops in MATLAB was in a Convection Heat Transfer class where the project required thousands of iterations before the system would converge. In order for this to happen in a timely matter, it was important to vectorize iterations where applicable.
The following example randomly places points at different locations. [...]]]></description>
			<content:encoded><![CDATA[<p>The first time I heard of vectorizing loops in MATLAB was in a Convection Heat Transfer class where the <a href="http://nenes.eas.gatech.edu/CFD/1phase/PCCAV1/PCcav.htm">project</a> required thousands of iterations before the system would converge. In order for this to happen in a timely matter, it was important to vectorize iterations where applicable.</p>
<p>The following example randomly places points at different locations. The first 1000 points are then changed to another location. Finally, there is a count to see how many points are less than .5. </p>
<p>Observe the two code snippets<br />
First, using a &#8216;for&#8217; and &#8216;if&#8217; statement.</p>
<pre class="brush:plain text">tic;
clear;

N = 1e6;    % Number of points
mol = zeros(N,1);
mol = rand(N,1);

for i = 1:N

    % Change first 1000 elements
    if i <= 1000
        mol(i) = 2*rand()-1;
    end

    if mol(i) < .5
        count = count+1;
    end
end

 % Print result
fprintf('Number of points < .5 = %f\n',count)

toc;</pre>
<p>And now the vectorized version</p>
<pre class="brush:plain text">tic;
clear;

N = 1e6;    % Number of points
mol = rand(N,1);

% Change first 1000 points
mol(1:1000) = 2*rand()-1;
% Check for points less than .5
count = sum (mol < .5 );   

 % Print result
fprintf('Number of points < .5 = %f\n',count)

toc;
</pre>
<p>The vectorized code besides using less number of lines will also run quicker. Observe also that there are no <i>for</i> nor <i>if</i> statements in the second code.  It should be pretty easy to see where the vectorization comes into play. Be sure to leave a comment and perhaps show off your vectorized code.</p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2010/01/26/vectorize-your-matlab/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Solution to &#8220;cifs_mount failed w/return code = -22&#8243;</title>
		<link>http://obdit.com/pad/2009/12/05/solution-to-cifs_mount-failed-wreturn-code-22/</link>
		<comments>http://obdit.com/pad/2009/12/05/solution-to-cifs_mount-failed-wreturn-code-22/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 03:48:40 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=77</guid>
		<description><![CDATA[When trying to mount my network drive from campus at home I received the following message in dmesg:
CIFS VFS: cifs_mount failed w/return code = -22
Well it turns out that I needed to have the smbfs package installed. This quickly solved my problem.
sudo apt-get install smbfs
]]></description>
			<content:encoded><![CDATA[<p>When trying to mount my network drive from campus at home I received the following message in <strong>dmesg</strong>:</p>
<pre class="brush:bash">CIFS VFS: cifs_mount failed w/return code = -22</pre>
<p>Well it turns out that I needed to have the smbfs package installed. This quickly solved my problem.</p>
<pre class="brush:bash">sudo apt-get install smbfs</pre>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2009/12/05/solution-to-cifs_mount-failed-wreturn-code-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Remote Editing With Vim</title>
		<link>http://obdit.com/pad/2009/06/06/quick-remote-editing-with-vim/</link>
		<comments>http://obdit.com/pad/2009/06/06/quick-remote-editing-with-vim/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 14:59:00 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=51</guid>
		<description><![CDATA[I am sure that anyone who has created their own website has had to make simple edits. There are many ways that one may connect, edit, and then publish the changes and all of these ways accomplish the task at hand. I wish to show a quick and easy way to edit remote files using [...]]]></description>
			<content:encoded><![CDATA[<p>I am sure that anyone who has created their own website has had to make simple edits. There are many ways that one may connect, edit, and then publish the changes and all of these ways accomplish the task at hand. I wish to show a quick and easy way to edit remote files using <a href="http://en.wikipedia.org/wiki/Vim_%28text_editor%29">Vim</a>.</p>
<pre class="brush:bash">user@local~$ vim ftp://hostip/file.py</pre>
<p>OK that&#8217;s it. Told you it was quick. Save and quit (:wq) and your file is updated and published.</p>
<p>There is a huge learning curve to Vim but I think that with time, you will find yourself being more efficient.</p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2009/06/06/quick-remote-editing-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Youtube in Totem</title>
		<link>http://obdit.com/pad/2009/05/06/search-youtube-in-totem/</link>
		<comments>http://obdit.com/pad/2009/05/06/search-youtube-in-totem/#comments</comments>
		<pubDate>Wed, 06 May 2009 14:13:00 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Totem]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=50</guid>
		<description><![CDATA[I never knew this, but you can search youtube videos through Totem. Watch the video below

]]></description>
			<content:encoded><![CDATA[<p>I never knew this, but you can search youtube videos through Totem. Watch the video below</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GKxDcPJ1YTE&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/GKxDcPJ1YTE&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2009/05/06/search-youtube-in-totem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>March Madness on your Conky</title>
		<link>http://obdit.com/pad/2009/03/11/march-madness-on-your-conky/</link>
		<comments>http://obdit.com/pad/2009/03/11/march-madness-on-your-conky/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 23:15:00 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Conky]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Sports]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=47</guid>
		<description><![CDATA[March Madness is here and and what better way to keep track of the action than with a scoreboard tracker at the bottom of your screen.  Check out the image below:
This is accomplished by combining a python script with the conky variable scroll. The python script will get the data, parse it and put [...]]]></description>
			<content:encoded><![CDATA[<p>March Madness is here and and what better way to keep track of the action than with a scoreboard tracker at the bottom of your screen.  Check out the image below:</p>
<p><a href="http://2.bp.blogspot.com/_4a16bNKIp3w/Sbh3BzQcRAI/AAAAAAAABSU/NzF6I30Vkbc/s1600-h/Screenshot.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img id="BLOGGER_PHOTO_ID_5312126633306244098" style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 23px;" src="http://2.bp.blogspot.com/_4a16bNKIp3w/Sbh3BzQcRAI/AAAAAAAABSU/NzF6I30Vkbc/s400/Screenshot.png" border="0" alt="" /></a>This is accomplished by combining a python script with the conky variable scroll. The python script will get the data, parse it and put it into a acceptable format for conky to handle the display.  I&#8217;ve talked about conky <a href="http://fourlovesfour.blogspot.com/2008/04/conky-ultimate-system-monitor.html">earlier</a> and using displaying the last instant <a href="http://fourlovesfour.blogspot.com/2008/10/conky-display-last-pidgin-message.html">message</a>.</p>
<p>Copy the following code and save it as <span style="font-style: italic;">bottomscore.py</span></p>
<pre class="brush:python">
#!/usr/bin/python
import urllib
# Open html page
fweb = urllib.urlopen("http://scores.espn.go.com/ncb/bottomline/scores")

gamestr=''
score=''
# Manipulate str for unneccessary chars
raw=str(fweb.readline())
raw=raw.replace('%20',' ');
raw=raw.replace('^','');
raw=raw.replace('&#038;','\n')

# Open data storage
f=open('bottom.dat', 'w')
f.write(raw)
f.close()
f=open('bottom.dat', 'r')

# Parse each line, get game, create str, append str
for line in f:
    if line.find('_left')>1:
        gamestr=line[line.find('=')+1:-1]
        score= score + gamestr + '  |  '

f.close()
print score
</pre>
<p>My conky script is as follows. Save this</p>
<pre class="brush:plain">#avoid flicker
double_buffer yes

#own window to run simultanious 2 or more conkys
own_window  yes
own_window_transparent no
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager, above

#borders
draw_borders no
border_margin 0

#shades
draw_shades no

#position
gap_x 0
gap_y 0
alignment bottom_middle

#behaviour
update_interval 1

#colour
default_color  8f8f8f
#default_shade_color 000000
own_window_colour 262626

text_buffer_size 1400

#font
use_xft yes
xftfont bauhaus:pixelsize=10

#to prevent window from moving
use_spacer none
minimum_size 1400

TEXT
${color e0e0e0} ${scroll 2847 ${execpi 60 python ~/scripts/bottomscore.py}}</pre>
<p>Remember to edit your .conkyrc to run the right path to bottomscore.py. You may need to edit certain parameters for your screen resolution but this should give you a good start. Any questions, post a comment.<br />
<span style="font-weight:bold;">Pro Tip:</span>To run multiple conky screens:&#8221;conky -c .conkyrc2&#8243;</p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2009/03/11/march-madness-on-your-conky/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: MPD/MPC with Ubuntu</title>
		<link>http://obdit.com/pad/2009/01/30/how-to-mpdmpc-with-ubuntu/</link>
		<comments>http://obdit.com/pad/2009/01/30/how-to-mpdmpc-with-ubuntu/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 22:55:00 +0000</pubDate>
		<dc:creator>obdit</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mpc]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://obdit.com/pad/?p=44</guid>
		<description><![CDATA[For a few months now I wanted to try mpd mainly out of curiosity. Music Player Daemon (mpd) is a music server and mpc will be the client used to interact with the server. This how to will look at a localhost server of mpd.
Prereqs: Enable universal repositores in /etc/apt/sources.list
Installing &#38; Configuring Software:
In terminal:
sudo apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>For a few months now I wanted to try mpd mainly out of curiosity. Music Player Daemon (mpd) is a music server and mpc will be the client used to interact with the server. This how to will look at a localhost server of mpd.</p>
<p><span style="font-weight: bold;">Prereqs: </span>Enable universal repositores in /etc/apt/sources.list</p>
<p><span style="font-weight: bold;">Installing &amp; Configuring Software:</span><br />
In terminal:</p>
<pre class="brush:plain">sudo apt-get install mpd mpc paprefs</pre>
<p>Next we need to set up Pulse Audio.</p>
<p>Go to System-&gt;Preferences-&gt;Pulse Audio Preferences<br />
Check &#8220;enable network access to local sound device&#8221; &amp; &#8220;Don&#8217;t require authentication&#8221;</p>
<p>Set up mpd.conf (use your favorite text editor)</p>
<pre class="brush:plain">sudo gedit /etc/mpd.conf</pre>
<p>Add the following to the config file:</p>
<pre class="brush:plain">
audio_output {
type "pulse"
name "Local MPD Output"
}
</pre>
<p>In the mpd.conf file, look for &#8220;music_directory&#8221; and change the corresponding path to your music directory.</p>
<p>Next, we shall build the database.<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"> </span></span></span>In terminal, type:</p>
<pre class="brush:plain">sudo mpd --create-db</pre>
<p>Finally, restart mpd by:</p>
<pre class="brush:plain">sudo /etc/init.d/mpd restart</pre>
<p><span class="font-weight: bold;">Using mpc:</span> mpd/mpc is higly scriptable so I recommend create some bash files for yourself. You will find the manual to mpc here: <a href="http://linux.die.net/man/1/mpc">http://linux.die.net/man/1/mpc</a></p>
<p>Example: Add Radiohead to current playlist</p>
<pre class="brush:plain">mpc search artist Radiohead | mpc add
mpc play
</pre>
<p>Good luck</p>
<p>Further Reading:<br />
<a href="http://mpd.wikia.com/wiki/What_MPD_Is_and_Is_Not">http://mpd.wikia.com/wiki/What_MPD_Is_and_Is_Not</a><br />
<a href="http://mpd.wikia.com/wiki/Hacks">http://mpd.wikia.com/wiki/Hacks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://obdit.com/pad/2009/01/30/how-to-mpdmpc-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
