MortalPowers, Inc. Logo
I'm running the Lucid Lynx alpha, so keep that in mind. Recently my installation of Vuze / Azureus stopped being able to launch properly. Running the command in the console provided me the following:

                                                                                                                                            
[warning] /usr/bin/vuze: Unable to locate swt in /usr/share/java
file:/usr/lib/jni/ ; file:/usr/lib/java/ ; file:/usr/share/java/Azureus2.jar ; file:/usr/share/java/log4j-1.2-1.2.15.jar ; file:/usr/share/java/commons-cli-1.2.jar ; file:/super/workspace/
java.lang.reflect.InvocationTargetException                                                                                                                                                 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                      
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                                                                    
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                            
        at java.lang.reflect.Method.invoke(Method.java:616)                                                                                                                                 
        at org.gudy.azureus2.ui.common.Main.directLaunch(Main.java:229)                                                                                                                     
        at org.gudy.azureus2.ui.common.Main.main(Main.java:132)                                                                                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                      
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                                                                    
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                            
        at java.lang.reflect.Method.invoke(Method.java:616)                                                                                                                                 
        at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)                                                                                                            
        at java.lang.Thread.run(Thread.java:636)                                                                                                                                            
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Shell                                                                                                                    
        at org.gudy.azureus2.ui.swt.mainwindow.Initializer.(Initializer.java:111)                                                                                                     
        at org.gudy.azureus2.ui.swt.Main.(Main.java:88)                                                                                                                               
        at org.gudy.azureus2.ui.swt.Main.main(Main.java:255)                                                                                                                                
        ... 12 more                                                                                                                                                                         
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Shell                                                                                                                  
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)                                                                                                                           
        at java.security.AccessController.doPrivileged(Native Method)                                                                                                                       
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)                                                                                                                       
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)                                                                                                                            
        at com.aelitis.azureus.launcher.classloading.PrimaryClassloader.loadClass(PrimaryClassloader.java:103)                                                                              
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)                                                                                                                            
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)                                                                                                                    
        ... 15 more                                                                                                                                                                         
Start fails:                                                                                                                                                                                
com.aelitis.azureus.core.AzureusCoreException: Azureus core already instantiated                                                                                                            
        at com.aelitis.azureus.core.impl.AzureusCoreImpl.create(AzureusCoreImpl.java:120)                                                                                                   
        at com.aelitis.azureus.core.AzureusCoreFactory.create(AzureusCoreFactory.java:46)                                                                                                   
        at org.gudy.azureus2.ui.common.Main.main(Main.java:160)                                                                                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                                                      
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                                                                    
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                                                            
        at java.lang.reflect.Method.invoke(Method.java:616)                                                                                                                                 
        at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)                                                                                                            
        at java.lang.Thread.run(Thread.java:636)                                                                                                                                            

Fixing this issue with vuze and swt

It turns out that the temporary solution was to make a link to the correct placement of the swt.jar file. For me this meant running the following:

sudo ln -s /usr/share/java/swt-gtk-3.5.1.jar /usr/share/java/swt.jar

With this change, Azureus is able to find the swt jar, and is able to launch successfully. This will hopefully get overwritten when the package maintainers fix the issue and solve the problem in a more long-term manner.


comments | permalink

Basic Ubuntu Network Hardening

(by PeEll)2010.02.27

Hardening a linux system is something easy to do, and can have a lot of additional security benefits for the paranoid, and for those who might be targets. There are a lot of guides to hardening different parts of the system. I'm going to review the steps I took recently in order to harden one of my desktop computers.

Understand what is open

Before you can harden anything, you need to understand how exposed your currently are. There are a few ways of doing this, and I recommend you try at least a couple. The first way is to use nmap to scan your IP address. You will need to do this from another computer, preferably in your local network. This scan will provide information about all of the ports your computer responded on. The second way I recommend you understand what your system is exposed to is to run the command netsat -atuv. This command will return a list of listening and active connections your computer has.

Review the open ports list

This step will require some knowledge of your system and of networking. Each port typically serves a standardized purpose. This means that you will need port 22 open, for example, if you want to allow incoming ssh connections. You will need port 25 open if you want to run a mail server. You will need port 80 or 443 open if you want to run a web server. Unless you want no remote access on your machine (a valid assumption for some people), you will need to be careful what you disable.

In my default install ports list, I have ssh, smtp, mdns, bootpc, and port 37319 open. You can tell a port is open from netstat, as it will look as follows:

Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN

In this output, the "*:ssh" means that SSH is listening on all network addresses, and that any computer that can connect to mine can open a connection with SSH. THe "localhost:ipp" means that my CUPS printer setup is NOT listening on any address, and that only programs local to my machine can open connections. Localhost servers are generally safe and won't expose your machine to malicious remote users, unless they break your user authentication, or already have a local user.

Secure smtp or Postfix (port 25)

Postfix by default listens to your network and trusts mail reporting that it is coming from your local network. This typically isn't needed, and you can secure postfix to only listen to the local machine for additional security. Open the file /etc/postfix/main.cf find a line containing "inet_interfaces = all", and change it to "inet_interfaces = localhost". You then restart postfix with sudo postfix stop and sudo postfix start. You should check netstat -atuv again to ensure this worked.

Secure mdns (port 5353)

After researching mdns briefly, it seems this is something I wish to keep. This allows computers on the local network to find other computers using friendly names. This means that your computer will auto resolve when using "hostname", rather than always having to rely on your router, or needing to use the IP directly. This is useful to me, and worth the security risk to leave open.

Secure bootpc (port 68)

Bootpc is a part of the standard DHCP system. How DHCP works is that you send out a multicast UDP packet to the network requesting information from any available server. This means that you must also have a process listening for responses. This is a standard part of linux networking. You could remove your DHCP capabilities, but the boopc listener shouldn't be a security risk.

Remember to use a firewall

One of the important things to remember is that you should always use a separate firewall between yourself and the internet, and only use port forwarding for the things you absolutely need to be able to forward. I recommend only forwarding SSH, as you can use SSH to tunnel any other sorts of traffic. I also recommend running SSH on a nonstandard port, as this will reduce the amount of "doorknocking" your computer receives. These security steps are primarily designed to protect you if someone else has gained access to your network, or if there is another compromised machine somewhere behind your firewall.


comments | permalink

As modern web development methodologies continue to improve and optimize our workflows, one of the workflows that has risen to the top is a development deployment model using git.

Making it Secure

Before you do any of these steps, make sure you add the following to your .htaccess, and that URL Rewriting is working in your apache setup.

#Secure GIT Deployment Methods
RewriteRule /?.git/ - [R=404,L]
RewriteRule /?.gitignore - [R=404,L]

Without doing this, anyone will have read-access to all of your code, and your entire source history.

Use git

This guide assumes a lot of knowledge about source control, management, and is not a guide to git. This guide assumes you can figure those parts out, but that you want to know more about one specific workflow that works very well in my opinion.

The main idea behind this workflow is that you will have a central repository, a development version of the software, and a published version of the software.

Convert something else to git

If you want to keep any history, the first step is going to be to convert the source control history to git. If you are using cvs, you will need to convert to SVN, and then to git. If you use SVN, simply use git to do a git svn clone of the repository somewhere on your local system. From there I recommend you move the .git folder to the remote production server, and make a copy in the development folder. If you go into each of these folders and type git status, you will see any differences that have not yet been committed to the repository, but you will be ready to make and receive changes.

Now that you are setup, time to develop

From there, things are relatively simple. Simply make any changes you want in your development environment. When you are finished with your changes, and they have been tested to your satisfaction, commit the changes, and push them to the repository. You can then enter your production server, and pull the changes from the repository. You can also simply pull directly from the development server, but organizations I have worked with tend to like a 3rd copy of the source, somewhere separated from the hosting environment.

If you want to, you can make emergency or urgent changes directly on the production, following any existing workflow you have for ensuring something is not broken. When these changes are complete to your satisfaction, simply commit and push them, and do a pull from the development environment.
comments | permalink

I recently installed copies of AutoPano Pro and AutoPano Giga, which are some great panorama stitching programs that I would highly recommend, as they work on Linux, Mac, and Windows. After installing these programs, there was a horrible font problem that made all of the text in the application illegible.

The solution I believe was to install qt4-config, run qtconfig, change the font size up to 9, and then back down to the default of 8. When you launch the program again, all of the fonts and text should be fixed and legible. Have fun using this awesome program!


comments | permalink

Upcoming talk on Linux Browsers

(by PeEll)2010.02.05

In March I'm going to be giving a talk on Browsers in Linux, with a lot of specific examples and demos from Ubuntu. Hopefully this talk will cover some of the basic things for beginners who need to know things like "What are the options", and "how to install new browsers in ubuntu", as well as advanced options detailing some of the more unique and advanced features of the available browsers, as well how to get started with development for browsers.

This talk will be at the Penguins Unbound Linux users group in Falcon Heights, Minnesota on the last Saturday of the month. I will post additional details and documents closer tot he date.


comments | permalink

In a default Kubuntu install, Dolphin is a great file manager. It typically works with many different file types seamlessly. One of the things it doesn't seem to handle out of the box is previews/thumbnails for video files.

How to install video thumbnails

The first step is to install the mplayer thumbnails package. My research indicates that this has been in the standard repos since Jaunty.

sudo apt-get install mplayerthumbs

This will change dolphin so that that when you click on a video, it will be previewed in the preview panel. To make thumbnails show up in the icon view, you need to do a little more configuration. Go into Settings->Configure Dolphin. Click on the "General" section from the list of sections on the left, select the "Previews" tab, and check the box next to "Video Files (MPlayerThumbs)".

That's it, enjoy your video thumbnails in dolphin on KDE


comments | permalink

A few weeks ago I installed the Ubuntu Lucid Lynx second alpha. Typically Ubuntu alphas and betas have quite a few bugs, and I have been burned in the past by upgrading Ubuntu versions prematurely. This time I decided to try it out a little early by installing it in a separate partition where I had cleaned up some space and taken it back from my ntfs partition.

Lucid Lynx - Ubuntu Alpha 2

So far, Lucid Lynx has been extremely stable. For the entire release cycles of Jaunty and Karmic, as well as alpha 1 of Lucid Lynx, the Live CD wouldn't work on my system. It wouldn't boot at all, regardless of using the alternative installer, or the live CD with a plethora of boot flags attempted. Lucid Lynx went so far as to work in my system without the Kernel flag acpi=off which I have needed for my entire life with Ubuntu.

The installer was nice, easy to use, and although my Nvidia drivers weren't installed properly by the Jockey (KDE) GUI, they were very easy to install with sudo apt-get install nvidia-current

In addition to this, Kubuntu installed ALSA without PulseAudio by default, which in the past hasn't worked with my microphone, but this install seemed to fix everything I have been fighting with for the past few years. Once again we will see how long it lasts, and I had almost gotten used to the per-application controls of pavucontrol. Who knows, maybe I will install PulseAudio a year from now and everything will just work with ALSA + PulseAudio in perfect harmony. I'm not holding my breath.

KDE 4.4

A couple of the features I was waiting for with KDE have finally landed. The first which I wanted, but I had no idea why I wanted it is a feature that is most easily described as "Windows 7 Snap". This means that I can drag windows to the left or right edges of my screens, and they will "snap" into place at 100% height and 50% width. You can also drag windows to the top of the screen and they will maximize. This hurts my workflow a little bit in that it isn't instant to drag and drop maximized windows between monitors, but I believe I will get used to it. This also works for multiple monitors, which is surprising because as of a week ago (before I ran some package updates) wasn't working for the middle bar between the monitors.

Another improvement that I wasn't expecting is that they remade (or finished) the Add Widget menu. Now when you add a widget, whether to the desktop or a panel, a very nice bar pops out that is easily navigable, and uses drag-and-drop for placement.

The final thing I didn't expect was that moving files and deleting files is much smoother. In Karmic and before, when I deleted a set of files in Dolphin (or sent them to the trash), they would remain on the screen for a few moments while KDE worked in the background. Now these types of processes are instant, as they should be. The notifications for file transfers and activities have also been much improved. Now the useful data is presented first, with the option to expand the notification to show the rest of the information. Biggest of all about the notifications, they actually seem accurate now.

Hopefully I will be able to write more about any new features of KDE I discover as I continue this dangerous journey through the Ubuntu 10.04 alphas.


comments | permalink

Abandon Internet Explorer

(by PeEll)2010.01.28

Internet Explorer usage continues to decline, losing somewhere between a tenth of a percent and half a percent each month to better browsers such as Firefox and Chrome. My prediction is that this is going to slow and eventually come to a stop. The problem is that there is a solid percent of internet users that have no idea what a brower is, and don't want to know, and will probably never learn. This block of users will never be persuaded by functionality or speed or new features.

In response to this inevitability, I propose people that write about or involve themselves in the Linux, or even in the general power user populous, stop supporting all versions of Internet Explorer immediately. I will admit that my website still has around 20-30% usage of Internet Explorer, but I am coming more and more to the opinion that those who continue to use it, probably wouldn't understand anything I'm writing about. This leads me to believe that this traffic ends up being people that are confused, as well as web spyders disguising themselves as a normal user, artificially inflating the numbers for IE.

Benefits of abandoning IE

By abandoning IE, it makes web development and testing easier. Development can focus on the standard DOM, and on leveraging some of the more advanced functionality of the web, such as new request types, as well as little things like rounded corners, or every-other CSS selectors.

Abandoning IE as a web developer or publisher is going to send a message to Microsoft and indirectly to uninformed users about their computing choices. When a percentage of the websites a person visits in a day stop working, they are going to ask why. If the answer is that their browser is broken (which it truly is), they will be much more likely to make a switch. The message it sends to Microsoft is that shipping a broken browser that is out of touch with the modern internet is going to hurt their users. This would also tell them that if they want to ship a working browser (which is what Apple and the open source community had to do in the past), they are going to have to adopt the features and usability of the other browsers, which in this case would be primarily based on standards and extensibility.

Problems with abandoning IE

By abandoning IE, you may make your website unusable for users that don't know, or can't upgrade (some corporate offices still require everyone to run IE6). This could also decrease your traffic. There is also a chance that Microsoft will just ignore any sites that do this, which is a definite probability based on their past behavior.

Summary and Philosophy

In theory by abandoning IE you will be able to focus on innovating for your best users, rather than hacking and making workarounds for your worst.


comments | permalink

Install Firefox 3.6 in Ubuntu

(by PeEll)2010.01.27

Installing the latest Firefox 3.6 release in Ubuntu is easy. You have to get the packages from Mozilla rather than Ubuntu, as Ubuntu is much more cautious with their release cycle, and with the rate they import packages into their system. This is a step you will only have to do once, and then you will have access to all of Mozilla's releases designed for ubuntu. Simply type the following commands to install Firefox 3.6:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 247510BE
sudo add-apt-repository ppa:ubuntu-mozilla-daily
sudo apt-get update
sudo apt-get remove firefox
sudo apt-get install firefox-3.6

The step to remove existing firefox installations may or may not be necessary for you. On the machine I tried it on, I had to remove "firefox" before the new required packages for firefox-3.6 would install properly. Don't worry, as installing/uninstalling software should never affect your user preferences.

What's awesome in Firefox 3.6?

One of the best things about Firefox 3.6 is their new concept of "personas". Rather than a full theme, personas are more similar to a desktop background. This means the persona is going to affect the color and images used in the browser, but not much else. The best thing about personas is that they can be previewed live in the browser simply by hovering over each of the themes, and apparently there are already 30,000 themes, most of which are pretty cool looking. Check out getpersonas.com to browse the entire catalog.

The second most interesting thing is that Mozilla has continued improving the speed of the browser overall, and apparently it's 20% faster than Firefox 3.5, which is great for a browser that most people love, but has been receiving a lot of flak for being slower than Chrome.


comments | permalink

One of the built-in pieces of security in many linux machines is a piece of software called denyhosts. This piece of software works with the SSH daemon to catalog the types of requests and failures come in. If it detects an IP trying to connect to the computer that has exceeded certain thresholds, it adds it tot he /etc/hosts.deny file, which immediately bans an IP from connecting with ssh.

In the default settings in Ubuntu, valid users are only allowed 10 failed valid-username attempts over a period of 5 days, or 5 failed invalid-usernames over the same period.. This may seem like plenty, but occasionally when travelling you will repeatedly use the wrong password or the wrong username, you can get your entire IP blocked. At this point you have to use another machine (or another IP) to connect to the server to fix the problem.

How to unban yourself in DenyHosts

The easiest way to temporarily unban yourself is to delete the entry containing your IP in /etc/hosts.deny. This will work for a few seconds, before DenyHosts regenerates the file. It should be enough to connect and fix the issue from your main host. You will also want to do this in combination with the next step.

How to fix the problem permanently

In my opinion, the problem with DenyHosts in a default Ubuntu install is that successful connections don't reset any of the failure counts. This means that if you attempt to connect each day, and fail twice, and succeed on the third attempt, by the 3rd day of this, you could be banned from your own server.

The fix involves editing your /etc/denyhosts.conf. Open this file as root in your preferred editor, and locate the configuration option RESET_ON_SUCCESS and make the line read as follows:

RESET_ON_SUCCESS = yes

After making this change, and restarting denyhosts with /etc/init.d/denyhosts restart, you will want to unban your IP, and connect again successfully so that your fail counts are reset. Hopefully from there, you won't be banned by your own innocent login failures.


comments | permalink

The browser wars are ongoing, but there is a clear leader on Linux at this time. This winner is Chromium. Chromium is the open source base that Chrome is built from, but it doesn't have any of the proprietary parts or unknown data reporting built into Chrome.

Chromium includes a super-fast webkit rendering engine, their own v8 javascript engine, and process-separated tabs. Chromium also includes support for HTML5 tags, including the video tag, supporting both Ogg Theora/Vorbis, as well as the controversial .h264 / mp4.

How to install Chromium on Ubuntu

The easiest way to install it is to add the PPA to your repositories. You can follow the instructions on the PPA directly, or follow the instructions below, assuming you are running Karmic or later.

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4E5E17B5
sudo add-apt-repository ppa:chromium-daily
sudo apt-get update sudo apt-get install chromium-browser chromium-codecs-ffmpeg-nonfree

How to Get Started

Either run chromium-browser directly, or choose it from your menu. Chromium supports extensions, as well as bookmark sync that uses your existing google account. Find these things in the preferences menu, which can be opened by clicking on the wrench icon in the upper right hand corner.

Youtube HTML5 Videos

Until youtube offers full support for HTML5 rather than Flash for videos, you can install the following extensions which swaps out the page components for you: YouTube HTML5-ifier which is in development by Mark Renouf and myself.


comments | permalink

One of the longest and most time consuming parts of the bootup process for any computer is the fact that the default reboot process completely turns off the computer, and returns the CPU to the very first startup task, the BIOS. BIOS initialization and POST does a lot of steps involving test and hardware detection and initialization. When rebooting the computer, this doesn't really add any value, as these devices have already been detected and had their first initialization done.

This is where kexec comes in. kexec is a tool that allows Ubuntu (or any Linux distribution) to pass control between kernels directly. This means that when rebooting, control never get's passed back to the BIOS for reboot, and no additional device testing or detection (beyond that required by linux) needs to be done. For me, all of the initialization steps in the BIOS and GRUB before Linux takes over takes around 30-40 seconds. This is a little bit longer than the average case, but I'm sure this is a problem for a lot of people.

How to install kexec

You can install kexec in Ubuntu using the following command:

sudo apt-get install kexec

The installation will ask you if you want to replace the reboot process. In order to have the benefits of skipping unnecessary steps in reboot, you need to choose the option that uses kexec for your reboot.

What could go wrong?

The only problem with this is when you are attempting to actually return to the BIOS, or if you want to go back to GRUB to choose another operating system in the case where you dual boot. This isn't that big of a deal though. Although I haven't found a way to pass control directly to GRUB or back to the BIOS, it is possible just to choose shutdown, and then turn the computer back on after the shutdown has completed. It doesn't take any extra time, it just takes more effort as you need to press the power button on the computer.


comments | permalink

Running VirtualBox this evening failed completely with this error, as well as Failed to create the VirtualBox COM object.The issue appears to be again with VirtualBox's integration with the Linux AMD64 Kernel.

Solution

The solution (however unfortunate) appears to be simply to restart the machine.


comments | permalink

In a continuing struggle to try to get my audio stack to work with all of my applications without issues, I have reset my entire pulseaudio configuration (purged pulseaudio and reinstalled it). Based on the recommendation of https://help.ubuntu.com/community/HdaIntelSoundHowto, I have added the following line to /etc/modprobe.d/alsa-base.conf:

options snd-hda-intel model=alc883-6stack-dig

I did this, replacing the line that was there because this was the model that was listed in http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt, after finding out that my audio codec was Realtek ALC883 from cat /proc/asound/card0/codec#* | grep Codec.

For now, everything seems stable, but it always seems that way for a few days, until I find something else that doesn't work with it, or until it just breaks to bits on its own.


comments | permalink

The short answer: Updated your package sources.

The default install of Ubuntu does some basic package source modification based on your language and location. For me, this meant that my package source for all of my packages was us.archive.ubuntu.com. This is a very commonly used repository, and most likely isn't anywhere near you. I highly recommend you change this to a repository closer to you. You can find one using this mirror list from Canonical.

I used to simply jump into a graphic editor like Kate, or a command line editor like Vi (vim) to make this change. The problem with this is that it is slow, you have to run the editor, jump to each line containing the string, edit it, and save when I'm done. This can still take minutes if you have a find a replace feature. It took me a couple tries, but memorizing the following command has made my life easier. This command uses sed to edit the file in place, and to do a find and replace, all using only a single command.

sed -i 's/us.archive.ubuntu.com/mirror.cs.umn.edu/g'

Before running this command, package upgrades took 5-10 minutes for a medium sized set. The transfer was around 140kB/s from the standard US archive. After switching my package sources and updating, I was able to get my upgrades at a rate of 1500-2000kB/s, which is over 1000% faster.


comments | permalink

For the past year, every time I have tried to adopt PulseAudio, I have had issues where it wouldn't allow me to independently control sound channels, or some types of audio streams would simply crash the entire audio stack, and force me to restart it. The main symptom of this would be that all I would hear is crackling, somewhat consistent with the sound that should have been coming through the sound mixer.

As of today, I believe I have found a solution, following the instructions located on http://ubuntuforums.org/showthread.php?t=1305889

I'm not quite sure why these items fix the problem, but for now they are working. It will be interesting to see what implications this has on the controls, and if it works long term.

Steps I took

Edited and uncommented the line with "load-module module-alsa-sink" to read "load-module module-alsa-sink control=PCM". Modified "load-module module-udev-detect" to read "load-module module-udev-detect ignore_dB=1".

I then restarted alsa and pulse with sudo alsa force-reload and sudo /etc/initi.d/pulseaudio restart


comments | permalink

My long time quest for the perfect media server had me purchase a new motherboard, processor, and memory stick two days ago. Since then, I have been fighting repeatedly with the Linux install that will work with this computer, these hard disks, the TV I want to use, and the streamed media I want.

Install Woes

There were two major problems whenever I tried to run the installer. The first was that the hard disk wouldn't show up in the installer. It showed up in Nautilus and Dolphin just fine, but for some reason Ubiquity couldn't see it. After 6-7 hours of debugging, and several forum posts and responses, I found the answer. I had to run sudo apt-get remove dmraid before launching the installer. I'm not quite sure why this works, but it does.

The second major woe was that Kubuntu's detection of my screen size was atrocious. I tried both VGA and HDMI, and neither way was I able to configure the screen to look like a normal computer. Ubuntu faired better, but I still had to do some manual configuration of the resolution. I still haven't been able to determine if it is a problem with the EDID reported by the TV, or something else.

Media Player

This was weeks ago, but I have tried 6 or 7 of my older computers, trying to repurpose them as a media player/server. It seems that the toughest part of decoding 720p video encoded in x264 and wrapped in a Matroska container is CPU speed. Each of the computers I had tried before couldn't play video off of a local disk using VLC or Dragon or Totem without dropping 70-90% of the frames.

Finally having a computer capable, with a kind-of working install, I wanted to try Moovida as the main program on the machine. Moovida is pretty high-level, running on top of everything I had set up. This meant that the video resolution issues I had been having with Kubuntu didn't go away. At this time I was pretty sick of these issues, so I thought "hey, I'll try Mythbuntu. Hopefully that will autodetect my TV properly.". When I booted the installer, it didn't autodetect the best settings, but it at least had them as an option. This combined with the remove dmraid fix allowed me to install Mythbuntu.

The next step was to boot into Mythbuntu and see it's capabilities. All of my media is local to my network and shared via Samba. I spent about 10-15 minutes looking for a Samba share browser in MythTV, and apparently one doesn't exist. The internet suggested I try adding an entry to fstab for the samba share. This fstab entry mounted just fine, but still wasn't listed or parsed anywhere in MythTV. Also, reading the menus revealed to me that the real purpose of having MythTV is to watch live or recorded television, which for now, I am completely uninterested in. There was also the minor problem of the untested audio, and the video resolution now being stuck back at 800x600.

Back to Moovida

Having again given up on a solution, I was back to Moovida. Moovida would be perfect in theory for my setup, because I want to navigate my network media, and the internet video/audio plugins would be nice too. I decided to try out Moovida again on my main desktop, before attempting another wipe/reinstall on the server.

When I launched Moovida, and selected Other Computers, nothing happened. Some plugin updates finished, so I restarted and tried again. This time I received the error no module named coherence.upnp.core. This error made no sense to me because I had the upnp plugin installed. After googling this issue for a minutes, I tried running Moovida at the command line, and found out that Moovida had a missing dependency on Coherence. I found Coherence in apt and installed it and tried again. Now I was missing dependencies for hildon and twisted, which was again weird, but this time because I already had python-twisted-bin, python-twisted-core, python-twisted-conch, python-twisted-web, and python-twisted-web2 installed. The solution this time was to sudo apt-get install python-twisted python-hildon.

Okay, now I started up the other computers browser, it would scan 400 media files (which ones?), and would report I had no media. Checking the command line again reported the upnp was working, but that the smb:// protocol wasn't found. At this point I gave up on an automated SMB browser and would attempt to install a fresh Linux Mint 8 Desktop, install Moovida, and manually setup the mount point for Samba.


comments | permalink

Two days ago, it was Black Friday and my local Best Buy was having some great deals on movies. They had a bin of movies for $3.99, and I was shocked to find "The Dark Knight" in this bin. Typically I try to avoid feeding my ever-growing DVD collection, as I am trying to wait for physical media to disappear. I thought that in this case, it would be worth it to give the companies involved in the production and distribution of this film a meager $3.99 for their efforts.

Fast forward to today, when I tried popping the DVD into my computer to watch the movie. The first thing I notice is that there is a handy pamphlet in the box stating 'How to get your digital copy of The Dark Knight". I have run into this before, where they offer a free digital copy of the movie, but you have to download it and watch it all using software they wrote, and they require you to install on your computer. These options are typically thrown right out for me. One would think that the main reason to throw this out is because of the incompatibility on Linux, but this is only secondary. The main reason is that I don't want to install some unknown untested junk software on my computer and rely that the movie publishing companies know what they are doing when designing spyware and adware free software that won't negatively affect my performance. This has been my philosophy since the first days of DVDs on Windows when each disk you bought came with a copy of "PowerDVD".

So even though I have this general prejudice against downloading copies of movies from the distributer, I figure "why not try it out". I visited the Warner Brother's digital copy website to see what they had to offer. A price pops up on the screen, telling me that for the low price of $1.99, I can have a copy of the movie that I already bought a license for, and that I already bough the physical media for, and that US law states I am legally enabled to make a free backup of. This is just laughable, so I quickly move on to start watching my new DVD.

I start up my preferred media playing program, VLC, and select that I want to watch a DVD. Nothing happens. I try again and again, reading through various error messages and blog articles discussing the problem. It appears that the Digital Rights Management (which is short for "How we stop you from watching your DVD") is incompatible with my media player. This is unacceptable, and I'm almost certain I will never purchase another DVD without first checking its DRM status.

There is a fair bit of irony, in that the majority of the blog and internet posts I read suggested simply downloading a copy of the movie using a filesharing network. I won't admit to having used any of these before, but I have heard that they always have quality digital copies for download in standardized format that you can have, and keep, and play using whatever software and operating system you want. It almost sounds like something I would have paid for, but Warner Brothers had their chance already.


comments | permalink

There appears to be an issue with the new GTK in applications such as Eclipse that try to ignore the standard GTK structure, and have their own attempts at "magic" to improve the look. When GTK was upgraded in Karmic, this caused these magic tricks to stop working, breaking a lot of applications. Specifically whenever I would hit "Apply" or "Ok" in a dialog box, the button would depress, but would never trigger an action.

Solution

The quick fix is to change the way the application is called. For me, this involved going into the menu editor (right click on the launcher in your panel), and finding the application. I then found the "Command String" that looks like /path/to/eclipse and changed it to:

export GDK_NATIVE_WINDOWS=1;/path/to/eclipse

What this does is to tell the application's GTK framework to use native windows instead of the "magic" positioning and functionality that it used to rely on.


comments | permalink

I have a laptop that until recently would always crash upon startup. It always had some type of ambiguous message like "An application has temporarily disabled compositing". Hitting alt+shift+f12 would always work to re-enable it, and nothing showed up in any logs. Although not a killer, it was extremely frustrating for my fiancee. I figured out that it is related to her KDE install and application stack on top of fglrx drivers for her Radeon HD Mobility 3400. I have tried several times over the past year to update her to newer drivers in an attempt to fix the problem, but nothing worked.

Solution

In the end, the solution was simply to disable KDE's (or KWin's to be specific) step where it checks if compositing is running too slowly. This check was failing mistakenly, and disabling it hasn't caused any issues for me. The specific change I made to disable this compositing check was in the file /home/<user>/.kde/share/config/kwinrc and I added the following lines to the section at the top called [Compositing]:

DisableChecks=true
Enabled=true

comments | permalink

This afternoon I started becoming increasingly frustrated by the fact that all of my GTK applications make noises upon mouse click. A couple prevalent examples of this are Firefox and Chromium-Browser. In each case, adding a new tab, or clicking refresh, made a small "dunk" sound. The sound has always been there, but I wanted to focus on the audio I was listening to. I began looking through preferences, and it seemed that there was no way to make this sound go away. Google searches for Gnome/gtk mouse click sound weren't very helpful either.

Eventually, I found a way to eliminate these small annoying noises for good. I needed to add the following to my ~/.gtkrc-2.0-kde4 file:

gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0

And restart any running Gnome/GTK applications, and the annoying sounds are gone! I hope this helps others experiencing this issue.


comments | permalink

Encrypted Filesystems Ubuntu

(by PeEll)2009.10.24

Encryption is a pretty common operating system task. The assumption should always be that your data is important and needs securing, as it is much easier to deal with problems with over-encrypted data, than to deal with data that wasn't encrypted and should have been. Ubuntu has some eally easy encryption using a fuse filesystem. The command to look at is called "encfs". It takes a directory on your system, and creates a userland filesystem on top of it. The filesystem you use is encrypted to the data folder, so when it is unmounted, all you have left is the unreadable encrypted folder.

Point of Caution: encfs keeps the same file structure as the true data, although it encrypts the contents of the files and the filenames themselves, if there is any information that can be gleaned from your filesystem layout, or the number of files, or the dates of the files, these will not be protected with this encryption method.

encfs /path/to/folder/raw /path/to/folder/disk

This command will create an encrypted fileystem that stores its raw data at /path/to/folder/raw, and will mount the temporarily-unencrypted fileystem at /path/to/folder/disk. The directory names don't really matter, but as a matter of practice, I prefer to use the folder names "raw" and "disk" in the same folder, so that is clear what I'm looking at.

The first time you run this command, will ask to create a password. Every time after that, you will have to enter the original password. Beware, if you lose the password, you will be unable to recover the data. This feature is exactly why encrypted filesystems are mostly secured from attack. Someone could always bruteforce your data, but that could be done with any sort of filesystem encryption.

When you are done using the data, unmount it so others don't have access:

unmount with fusermount -u /path/to/folder/disk

Why use encfs?

There are a lot of encrypted filesystem tools and techniques in linux, but I prefer this one. Most of the other tools and techniques are integrated into your window manager, and most of them will automount and decrypt your secured folders. I don't like this because it defeats the purpose of use encryption, because in those cases where it doesn't require a password, hackers/people that want your data can simply look up the automounting procedure to decrypt your data.


comments | permalink

I recently upgraded from 8.10 to 9.04, and one of the changes that came with this was an "upgrade" to Amarok 2. Although this is the latest version of Amarok, the developers made a similar change to the upgrade from KDE 3.5 to 4.0 where by removing a lot of features and rebuilding important components, they have created a strong base to move forward with.

One of the side effects of this change for me was that my keyboard and volume sliders no longer affected Amarok. The problem is relatively simple; after the upgrade, Amarok is only affected by the Master Channel, rather than PCM (which I believe used to be the default). The solution to the problem is to right click on the volume icon, and choose "Select Master Channel...". Then select the radio button at the top next to "Master" and hit okay.

Now when you use your standard volume keyboard shortcuts, or the volume slider, Amarok will be affected as expected.


comments | permalink

Linux is for girls!

(by PeEll)2009.04.11

I recently convinced my fiancée to adopt Linux (Ubuntu) when her laptop kept having problems accessing our wireless network. It has been a little bit of a rough ride for her with numerous issues. I was a little too ambitious with my first install, and I tried to install a Jaunty Jackalope beta, which didn't boot after installation. Downloading and installing Intrepid Ibex worked. She was very excited that Photoshop CS4 works on Linux, but she was disappointed that Wine can't enable Illustrator to work properly.

We have encountered a lot of difficulties that we have overcome:

  1. KDE didn't have the types of transparencies she had gotten use to in Windows 7. We attempted to configure KDE 4.x's compositing, but our first couple of tries installed the wrong proprietary drivers for 3D acceleration on her Radeon card. We finally found the right drivers, and it appeared that there was a graphic glitch on the K-start menu. We even installed Gnome in an attempt to work around the problem. Although she liked gnome, and made a very nice pink theme, she continued to prefer KDE, so we switched her session back. After a lot of frustrating troubleshooting, we discovered that it was a problem unique to the theme she had chosen. We chose a new theme and the problem was resolved.
  2. The next biggest issue we had was connecting her Linux machine to the samba share on our server. Whatever we tried, she couldn't login with her username and password like she had in the past. Several hours of troubleshooting resulted in the discovery that I had mis-configured the samba shares. After attempting to figure out the correct configuration, we decided to give up and remove the security restrictions. As I was removing the security restriction, I decided spontaneously to attempt a new, simpler configuration. I browsed to the network on her laptop, and everything began to work.
Her desktop environmentHer Desktop Environment
My desktop environmentMy desktop environment
 

comments | permalink

Since my switch to Ubuntu over a year ago, I have had slightly annoying problems with my sound. I have two setups for my main desktop. The first is on the second story of my house. There I have two monitors and a nice sound system setup. The second setup is makeshift, but involves a single monitor borrowed from upstairs and the speaker built into the monitor. The problem is that with ALSA, plugging in headphones into the front jack on the computer has no effect on the sound coming from the rear to my speakers.

Effective Speaker ControlsThis isn't a problem on my nice sound system setup, as one of the speakers has a built-in headphone jack and power button that is closer to my head than the front panel of my computer. The speakers themselves handle the muting of the speakers when headphones are plugged in.

On my second makeshift setup, it is a different story. The volume controls and the on/off switch for the speaker in my monitor is buried in monitor control menus, and are completely impractical for actually controlling the sound I hear. In this second setup, my headphones also get plugged into the jack on the front of my computer, as this is the most convenient spot.

The software-based controls for volume and mute work great, with one exception. When I plug my headphones into the front jack, the sound from the speakers isn't muted, and any control that mutes the standard speakers also mutes the headphone. I began looking into the problem thinking that my sound card wasn't detected properly or that there was some configuration setting I had missed. After a few hours of searching, I found this to be untrue. I nearly gave up, but I had an idea. Standard 6 channel sound configuration I moved the speaker jack from the standard green port which my computer understands to be "front" to each of the other ports to see if I could hear the music I had playing. I first made sure that none of the channels my computer could detect were muted.

Success! I found that the black port worked. Through a sequential muting of each of the channels, I found that ALSA calls this port "Surround", and that I was able to mute it independently of the headphones. I was a little worried that this channel would only receive sound from some applications, but so far my testing has revealed that all sound that was previously sent through "front" or my headphones, still is sent through the "Surround" channel.


comments | permalink