<?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"
	>

<channel>
	<title>Planet Nectarius &#187; Linux</title>
	<atom:link href="http://nectarius.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://nectarius.net</link>
	<description>Nectarines are tasty</description>
	<pubDate>Mon, 17 Nov 2008 16:45:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Oh yeah&#8230; Ubuntu 7.10</title>
		<link>http://nectarius.net/2007/12/28/oh-yeah-ubuntu-710/</link>
		<comments>http://nectarius.net/2007/12/28/oh-yeah-ubuntu-710/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 14:20:11 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[7.10]]></category>

		<category><![CDATA[fstab]]></category>

		<category><![CDATA[ntfs]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://nectarius.net/2007/12/28/oh-yeah-ubuntu-710/</guid>
		<description><![CDATA[A while back I upgraded to Ubuntu 7.10. It went so smoothly that I didn&#8217;t even think to mention it. 
There are significant improvements though, the graphics effects work really well straight out. They look great and aren&#8217;t over the top. Things seems snappier. The support for non-free binary drivers is improving. Plus support for [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I upgraded to Ubuntu 7.10. It went so smoothly that I didn&#8217;t even think to mention it. </p>
<p>There are significant improvements though, the graphics effects work really well straight out. They look great and aren&#8217;t over the top. Things seems snappier. The support for non-free binary drivers is improving. Plus support for non-free formats like mp3s, etc is smoother again. It really is Linux for everyone is that respect. One of the less mentioned and most useful improvements is the inclusion of the complete ntfs-3g drivers. So now if you&#8217;re dual booting an ntfs drive with winxp or vista (probably most people choose to do this), then you don&#8217;t have to worry about how to transfer data across the drives. It use to be that you could read the ntfs drive but not write to it. Obviously windows doesn&#8217;t even know about the ext3 linux partition. Now linux can safely and flawless write to the ntfs drive. </p>
<p>If you&#8217;re installing from scratch this will probably be setup by default, but if you&#8217;ve upgraded from 7.04 and you&#8217;ve previously setup the ntfs partition to be mounted you just need to edit your <code>/etc/fstab</code> file and change the filesystem from ntfs to ntfs-3g.<br />
I use the options: <code>defaults,locale=en_US.utf8</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nectarius.net/2007/12/28/oh-yeah-ubuntu-710/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Puzzle Pirates and NWN sound</title>
		<link>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/</link>
		<comments>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 07:04:40 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Neverwinter Nights]]></category>

		<category><![CDATA[Puzzle Pirates]]></category>

		<category><![CDATA[Sound]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/</guid>
		<description><![CDATA[Oh yeah&#8230;
Puzzle pirates commonly has sound problems in linux because it uses the java sound library which isn&#8217;t very smart with ALSA. It tries to use the sound card directly, which in my setup (usb sound card) it seems to do nothing at all. I wouldn&#8217;t be surprised if it was spitting sound at the [...]]]></description>
			<content:encoded><![CDATA[<p>Oh yeah&#8230;</p>
<p>Puzzle pirates commonly has sound problems in linux because it uses the java sound library which isn&#8217;t very smart with ALSA. It tries to use the sound card directly, which in my setup (usb sound card) it seems to do nothing at all. I wouldn&#8217;t be surprised if it was spitting sound at the onboard card though. This is fixed by wrapping the application in the <code>aoss</code> command, which tricks it into thinking it&#8217;s using the old OSS sound library, but really ALSA is handling it. Of course this assumes that ALSA knows what it&#8217;s doing, but I fixed that in my previous post. To use <code>aoss</code> simply append it to the start of the launch command in a desktop launcher, or run it from a terminal like so: aoss /path/yohoho</p>
<p>In Neverwinter Nights I had slightly different problem, it uses the SDL library, which also doesn&#8217;t seem to choose the card properly. Again I needed to force it with <code>aoss</code>. But I also had to add a weird environment variable to the launch script, which I somehow found by searching through nwn forums. The nwn script usually looks like this:<br />
<code>#!/bin/sh</p>
<p># This script runs Neverwinter Nights from the current directory</p>
<p>export SDL_MOUSE_RELATIVE=0<br />
export SDL_VIDEO_X11_DGAMOUSE=0</p>
<p># If you do not wish to use the SDL library included in the package, remove<br />
# ./lib from LD_LIBRARY_PATH<br />
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH</p>
<p>./nwmain $@</code></p>
<p>I changed it to this:<br />
<code>#!/bin/sh</p>
<p>cd /GAMEINSTALLPATH/</p>
<p># This adds a variable to make sound  work properly. NWN doesn't work with<br />
# select() function in the SDL sound library properly.<br />
# I think this means it doesn't know how to choose which sound card to use in<br />
# some setups.<br />
export SDL_DSP_NOSELECT=1</p>
<p># This script runs Neverwinter Nights from the current directory</p>
<p>export SDL_MOUSE_RELATIVE=0<br />
export SDL_VIDEO_X11_DGAMOUSE=0</p>
<p># If you do not wish to use the SDL library included in the package, remove<br />
# ./lib from LD_LIBRARY_PATH<br />
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH</p>
<p>./nwmain $@</code></p>
<p>The added path change allows you to run the script from a desktop or panel launcher in gnome, otherwise nwn thinks the current directory is the desktop. Obviously <code>/GAMEINSTALLPATH/</code> should be the path you installed nwn at.</p>
]]></content:encoded>
			<wfw:commentRss>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux usb audio problems.</title>
		<link>http://nectarius.net/2007/08/16/linux-usb-audio-problems/</link>
		<comments>http://nectarius.net/2007/08/16/linux-usb-audio-problems/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 17:18:07 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[alsa]]></category>

		<category><![CDATA[audio]]></category>

		<category><![CDATA[edirol]]></category>

		<category><![CDATA[Sound]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[usb audio]]></category>

		<guid isPermaLink="false">http://nectarius.net/2007/08/16/linux-usb-audio-problems/</guid>
		<description><![CDATA[I&#8217;ve had some linux usb audio trouble recently. I&#8217;ve noticed this is a common problem, so I figure I should detail my experience somewhere to add to the global self help desk.
Recently I bought an Edirol/Roland UA-1EX external usb sound card.

It comes more from the music world then the computer world, so it far better [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some linux usb audio trouble recently. I&#8217;ve noticed this is a common problem, so I figure I should detail my experience somewhere to add to the global self help desk.</p>
<p>Recently I bought an Edirol/Roland UA-1EX external usb sound card.<br />
<a href="http://www.allansmusic.com.au/Product.aspx?c=0A4DAF35-12D3-4C24-885D-3E546CC150E5&#038;p=139987"><img src="http://www.allansmusic.com.au/images/products/Edirol_UA1EX.jpg" alt="My usb sound card" /></a></p>
<p>It comes more from the music world then the computer world, so it far better audio then most sound cards. This also means that it has no internal mixer, as that&#8217;s not it&#8217;s job. This isn&#8217;t a problem in windows, as all the mixing is automatically done in software, but in linux sound is one of those areas that don&#8217;t just work (<a href="http://www.linux-foundation.org/en/Making_Sound_That_Just_Works">yet</a>).</p>
<p>The fact that people are looking at these issues seriously is a really good sign. Like so many desktop linux issues in the past I&#8217;m sure this will improve in the future.</p>
<p>USB sound cards basically confuse the hell out of linux. Or rather it just doesn&#8217;t do things automatically yet. I plugged it in optimistically expecting to get a nice prompt on whether I&#8217;d like to configure it or something. Hah! Some of the most common problems people had that I googled across, was that their card was detected, but they still had no sound, or for some applications sound would come out the usb card and for others apps sound would come out their onboard card.</p>
<p> So after many googles, I found a solution. For my problem anyway. Which I chronicle below for sentimental reasons.</p>
<p>The first thing is, in Ubuntu 7.04 the UA-1EX is only detected automatically by ALSA (advanced linux sound architecture) when the advanced driver switch on the card is off. It took a while for me to figure that out. I can live without whatever it is as long as I have pretty sounds, so I switched it to off.</p>
<p>Basically if it shows up in the file /proc/asound/cards it is working.<br />
Also, use <code>aplay -l</code> to display a list of currently available cards.</p>
<p>My /proc/asound/cards file looks like this:<br />
<code><br />
 0 [nForce2        ]: NFORCE - NVidia nForce2<br />
                      NVidia nForce2 with ALC650F at 0xeb002000, irq 17<br />
 1 [UART           ]: MPU-401 UART - MPU-401 UART<br />
                      MPU-401 UART at 0&#215;330, irq 10<br />
 2 [UA1EX          ]: USB-Audio - UA-1EX<br />
                      EDIROL UA-1EX at usb-0000:00:02.1-2, full speed<br />
</code></p>
<p>It&#8217;s important to note that since the UA-1EX is a USB card, it wont always be at number 2. USB things get loaded in all sorts of unpredictable orders at boot (or after boot if you plug it in late), sometimes I boot up and it&#8217;s 0. Since the standard way of referring to cards is by their number (which obviously wont always work), it&#8217;s best to use it&#8217;s name UA1EX instead.</p>
<p>So I have the card there, but there&#8217;s still no sound. What the fuck now? I noticed in gnome under system->preferences->sound, I can select USB audio for everything (except the mixer). Testing this, I have sound in esd (enlightenment sound daemon) applications, ie, the usual gnome applications for things, like rhythmbox, movie player etc, but not amarok (which I use because it shits over rhythmbox) or any other gnome unfriendly apps. Also the volume control in the system tray doesn&#8217;t do a thing. This is because I can only select the onboard sound card as the mixer.</p>
<p>The biggest problem though is that the sound will only work with one application at a time, second applications can&#8217;t open it because it&#8217;s busy. I did manage to get Amarok to work eventually, but I wont go into it since the way I fixed all this solved the Amarok problem too.</p>
<p>The problems with the gnome apps and the sys tray volume control was because like many usb sound cards the UA-1EX doesn&#8217;t have an internal hardware mixer. This isn&#8217;t bad, on the contrary it just means it doesn&#8217;t care about those fiddly things. It&#8217;s got more important things to do, like spitting out good audio. It means though that only one application can use the device at a time (until I add a software mixer that is). Windows is smart enough to do the software mixing automatically, these sort of desktop conveniences are one of the rare of things windows is actually good at. </p>
<p>The problems with the other apps, was because they are just talking directly to the ALSA or OSS (predecessor of ALSA) system rather then the ESD. As it turns out the ALSA system was just sending the sound to the onboard sound card because it was the first one in the cards list. So I had some apps with sound coming out the usb card, and others coming out of the onboard card. You&#8217;d think that gnome would tell ALSA where I wanted all the sound, but as we know, sound in linux doesn&#8217;t just work (yet). </p>
<p>The solution to all these problems is just make ALSA tell gnome what to do instead, and then tell ALSA what to do.  </p>
<p>Under System->Preferences->Sound->Devices set all the outputs and inputs to ALSA. The mixer I just left as the onboard card, so once again system tray volume control is now useless, but I couldn&#8217;t be bothered working around that since I have an amp sitting on my real desktop.</p>
<p>So all aware desktop linux apps will use ALSA. Now all we need to do is tell ALSA what device to use. I think it defaults to the first one in the /proc/asound/cards list. So we have to correct it with an <a href="http://alsa.opensrc.org/.asoundrc">.asoundrc</a> file. It&#8217;s a file that lets you tell ALSA to do fancy things. You can mix together multiple sound cards, all sort of things. I  only wanted to replace my useless on board sound card completely so I just needed a really simple file.</p>
<p>You can create a file called .asoundrc in your home directory which ALSA will look at, but I preferred, to use a system wide one as /etc/asound.conf. Otherwise I wouldn&#8217;t have sound till I logged in, thus missing out on the login prompt sound (oh no!), also of course then multiple users will get sound that works as long as they tell gnome to use ALSA in their preferences.</p>
<p>My asound.conf file started out like this:</p>
<p><code><br />
#/etc/asound.conf</p>
<p>pcm.!default {<br />
    type hw<br />
    card "UA1EX"<br />
}<br />
ctl.!default {<br />
    type hw<br />
    card "UA1EX"<br />
}<br />
</code></p>
<p>This tells ALSA the default device is UA1EX, and the default control (ie the mixer) is the &#8220;UA1EX&#8221;. Since the UA-1EX doesn&#8217;t have a mixer, this seems a bit silly. Still it sort of worked, the default device was now my usb audio card and I had sound with everything, everyone was happy. Unless of course two things tried to use it at once. This can be fixed though <img src='http://nectarius.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It might be worth pointing out, if this sort of setup works for someone with a different usb sound card and the mixer works then there is nothing more to do. You can test to see if your card has a mixer with this setup, by using the command, alsamixer. If it can&#8217;t find a control thingi (mixer) on the card specified it will tell you, other wise you will get a nice display that lets you adjust different volume controls.</p>
<p>So since I don&#8217;t have an internal hardware mixer, I want it to be done in software. ALSA can do this with dmix.<br />
See version two of my asound.conf</p>
<p><code><br />
#/etc/asound.conf</p>
<p>pcm.!default {<br />
	type plug<br />
	slave.pcm "dmixer"<br />
}</p>
<p>pcm.dmixer  {<br />
	type dmix<br />
	ipc_key 1024<br />
	slave {<br />
	    pcm "hw:UA1EX"<br />
	    period_time 0<br />
	    period_size 1024<br />
	    buffer_size 4096<br />
	    rate 44100<br />
	}<br />
	bindings {<br />
	    0 0<br />
	    1 1<br />
	}<br />
}</p>
<p>ctl.dmixer {<br />
	type hw<br />
	card "UA1EX"<br />
}<br />
</code></p>
<p>I got this off the ALSA website. The only thing I changed is the type to be plug, since it&#8217;s a usb card, and obviously the card name to be UA1EX instead of a number. I honestly have no idea what the details of this really means. But basically it sets dmix to be the main device thus giving us a software mixer. The default device is set to be a slave of the alias dmixer.</p>
<p>Anyway the important thing is, ALSA can set up software mixing. All apps using ALSA will just spit out sound, ALSA will mix them together and send it onto the usb audio device.</p>
<p>So now it all works! Starting the command alsamixer brings up the volume controls. The system tray gnome volume control doesn&#8217;t work but that doesn&#8217;t bother me. All the application volume controls talk to the software mixer in ALSA, so it&#8217;s really no big deal, Amarok even gets that pretty fade out when you close it.</p>
<p>Hurrah! right? Well not quite, as with all things linux there&#8217;s always exceptions. Some applications just aren&#8217;t smart enough to work intelligently with ALSA or whatever library they use (here&#8217;s looking at you Neverwinter Nights). Often they&#8217;ll try to use the old predecessor known as OSS (open sound system), yes I mean you Java sound library! (this has implications for Puzzle Pirates). These are pretty rare though, and there are often workarounds. I might make another post about this since this is kind of long. Specifically about Puzzle Pirates and NWN.</p>
<p>If anyone has any suggestions or improvements on this setup please let me know.<br />
Bleh that was long!</p>
]]></content:encoded>
			<wfw:commentRss>http://nectarius.net/2007/08/16/linux-usb-audio-problems/feed/</wfw:commentRss>
		</item>
		<item>
		<title>fortune</title>
		<link>http://nectarius.net/2007/06/26/fortune/</link>
		<comments>http://nectarius.net/2007/06/26/fortune/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 23:02:26 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[cookie]]></category>

		<category><![CDATA[fortune]]></category>

		<category><![CDATA[gnome]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nectarius.net/2007/06/26/fortune/</guid>
		<description><![CDATA[I have ubuntu setup to display a fortune cookie from the program &#8216;fortune&#8217; at each boot in a little window.
I really wish it would stop giving me Mark Twain quotes. He&#8217;s so pretentious.
For the curious, create a file with this in it:

fortune &#124; gmessage -font "georgia 10"  -file -  -wrap  -center  [...]]]></description>
			<content:encoded><![CDATA[<p>I have ubuntu setup to display a fortune cookie from the program &#8216;fortune&#8217; at each boot in a little window.</p>
<p>I really wish it would stop giving me Mark Twain quotes. He&#8217;s so pretentious.</p>
<p>For the curious, create a file with this in it:<br />
<code><br />
fortune | gmessage -font "georgia 10"  -file -  -wrap  -center  -geometry 520x180 -title "Fortune Cookie"  -buttons Close  -default Close<br />
</code><br />
Then make it executable and add it to the start up programs in gnome (or whatever you use).</p>
]]></content:encoded>
			<wfw:commentRss>http://nectarius.net/2007/06/26/fortune/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
