Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

2009/08/30

Boxee is teh pwn. (My new HTPC setup)

I just set up a new Home Theater PC this weekend. I was actually just going to use XBMC, which is what I would normally use for just such a task, but I saw the link to "Boxee" on the xbmc.org website and curiosity got the better of me. I'm really glad I decided to check it out.

Let me back up a little bit, though. For the HTPC, I dusted off my old AMD machine (I believe it's an Athlon XP 1500+ 1333MHz), which has an old ATI All-in-Wonder 9600 Pro video card. It has, between its two internal HDDs, approximately 370GB of storage, which will mostly go unused since all of the data is stored on our file server or streamed from the internet. Since the ATI card doesn't support any HD outputs, I only have standard definition going for now. I guess that will be something for when I upgrade the HTPC, but for now it's fine as it is.

So I went with OpenGEU (Linux) for the base operating system, for no reason in particular, just on a whim. I figured on the rare occasion that I do switch out of the Boxee interface to use the standard GUI, it's a nice one to show off on my TV (OpenGEU uses Enlightenment DR17). Well I installed Boxee and had to play around with Xorg's display (resolution) settings and Boxee's own resolution settings for a while before I could get it displaying correctly on my TV. Apparently, and I think this may have something to do with the TV, I had to independently set the Xorg and Boxee resolutions in order for the display to fit the actual size of the TV's screen. Xorg is set to 800x600, while the Boxee settings are 640x480, yet the TV is displaying in 480i 16:9.

Moving on now to Boxee itself, as I said I have never used it for HTPC setups before. Normally, XBMC is my primary choice. Now, before you say it, Boxee is based on XBMC, but adds a whole lot of new functionality to it in the form of pluggable "applications", which are basically channels you can add or remove according to your tastes, thereby customizing your content completely (in addition to your personal collection of media files). These applications are essentially just RSS feeds that point Boxee to online content. These will serve up media content, not a typical text feed, such as videos, music, pictures. There is also support for services such as Last.fm and Pandora, as well as your Netflix and even podcasts. Boxee even connects you with your peeps via popular social networks like Twitter, FriendFeed, etc. Just when you thought it couldn't get any better, there is an app available for for iPhone/iPod Touch to allow you to remotely control your Boxee, no server-side setup required and the app also automatically finds your Boxee server. I just so happen to have an iPod Touch, so it now serves the purpose of being my Boxee remote. Awesome.

I'll stop rambling on now, but just keep this in mind: if you ever decide you want to set up a media server/home theater PC, check out Boxee (www.boxee.tv). It's available for other operating systems, though I haven't tested it on any other system, and honestly I don't know why you would want to run anything other than Linux for a server anyway.



2009/08/23

How to enable digest authentication (Apache2)

Want to secure your Apache web server? Digest authentication (mod_auth_digest) is a much more secure way to authenticate HTTP (versus basic authentication, which sends the authentication information plaintext to the client-- not secure at all, really). To start with, you need to create a password file. First figure out where you want this file stored. Probably it would be best not to store it anywhere in the wwwroot path. Create the password file with the following command (repeat as necessary to add additional users, but leave off the -c argument):

sudo htdigest -c filename realm username

Above, the "realm" argument needs to match AuthName in sites-available/default (add -ssl if you use SSL). You will be prompted to input and verify the password for the user you created.

Next, create the rules in your Apache config. On more modern distributions, you will usually find your site's config in /etc/apache2/sites-available/. If you have only one site and no virtualhosts, you're probably just running off the "default" in the above-mentioned directory, so do:

sudo nano /etc/apache2/sites-available/default

or, if your site is SSL-secured:

sudo nano /etc/apache2/sites-available/default-ssl

and enter the following lines in the config (I placed mine below the <Directory /var/www/>... section):

<Directory /wwwpath>
AuthType Digest
AuthName "REALM"
AuthUserFile passwordfile
Require valid-user
</Directory>

It is important to note that Apache's own docs say to use AuthDigestFile to point to where your password file is located, but this produces an error when trying to reload/restart apache2 which results in a failure to load. Using AuthUserFile instead fixes this.

The world REALM in quotes for AuthName can be anything but MUST MATCH the "realm" argument in the htdigest command when adding a user to the password file. If anyone finds out otherwise, please let me know (give me as much details as you can), though for me it wouldn't request authentication at all if they didn't match.

The example in Apache2 docs also shows the use of AuthDigestDomain which is actually not required (use it if you actually need it, otherwise leave it out). Leaving it out will force authentication for the entire web server. If this is not desired, use AuthDigestDomain. Ex:

<Directory wwwpath>
AuthType Digest
AuthName "REALM"
AuthDigestDomain /private-area/
AuthUserFile passwordfile
Require valid-user
</Directory>

Where "/private-area/" = /var/www/private-area/ directory on your web server.

Once you have the Directory section saved in your config, do:

sudo /etc/init.d/apache2 reload

You should see:



If all went as expected, you should now get a login prompt when accessing your web server, according to how you configured it.

You can also do more advanced things with digest auth, which I won't be covering in this post. For more information on digest auth, please refer to Apache docs: http://httpd.apache.org/docs/2.0/mod/mod_auth_digest.html.



2009/08/21

10 Linux distributions you may not have heard of

I wanted to do a segment about some of the lesser-known (and arguably more interesting) Linux distros out there, for those of you who may be newer to Linux or maybe just aren't aware of just how many options you have with Linux distros. These are all, in my humble opinion, very nice distributions and have unique qualities that suit different people in different ways. Most of the distros you read about in this post will not be appropriate for you, but that's sort of the point: there's a Linux distro out there for everyone, even if that means "plain vanilla Ubuntu" to you. So without further adieu, here are 10 of the most interesting/unique ones I know of (in no particular order), starting off with...


1. CAINE (also known as C.A.IN.E.)

This is a very unique distribution, given that it is designed solely for the purpose of digital forensics, which is as far as I know a one-of-a-kind distribution. Hence the name "Computer Aided INvestigative Environment" or "CAINE". Its intended use is to be booted from USB (or optionally CD) and run completely from memory, "live" style. This way it can be booted on any PC, workstation, server, etc in order to perform investigative tasks, without "distrupting the crime scene" as the saying goes. 
Learn more, or download this distribution free at http://www.caine-live.net/


2. Lin-X

Lin-X is a distribution with one simple goal in mind. You guessed it: complete Mac OS X emulation. Emulation in the sense of its appearance, not so much in being able to run Mac OS X software. If you love the look and feel of Mac OS X's Aqua style, but don't want the hardware or maybe you can't afford it-- or whatever your reason may be-- then Lin-X may be the distribution for you. It's very nicely arranged to accommodate your Aqua-fanboyism with that Aqua feel, down to nearly every detail.
Learn more, or download this distribution free at http://lin-x.info


3. Qimo for Kids

Qimo is unique in its own way because it is tailored for children. What makes it different about other "edu" distributions is that its focus is on teaching kids, not just general educational use. It is designed to make computing as easy as possible for young children, with its larger icons and intuitive interface. If you have youngsters in the house, put that old Pentium III sitting in your closet to good use with Qimo!
Learn more, or download this distribution free at http://www.qimo4kids.com



4. Linux Mint

Probably one of the better-known of the lesser-known distributions (heh), Linux Mint is not too far removed from its Uncle Ubuntu, yet boasts its own line of system utilities to make Linux a bit easier to use and understand, and maybe even a little more consistent, such as mintBackup, mintDesktop and mintUpdate, etc. It has a very aesthetically pleasing, clean and user-friendly interface that is perfect for newcomers or those who just want a Linux distribution that does that little extra to make your life easier.
Learn more, or download this distribution free at http://www.linuxmint.com


5. Scientific Linux

Scientific Linux is, to quote their front page, "put together by Fermilab, CERN, and various other labs and universities around the world. Its primary purpose is to reduce duplicated effort of the labs, and to have a common install base for the various experimenters." That's right, no frills here, just pure scientific research. Boring right? I'm sure most people will think so, and this distribution probably would not suit most people reading this, but that's not the point here. This distribution is being used by top scientists around the world for work on very important scientific research. Ever hear of the Large Hadron Collider? While I doubt the LHC itself uses Scientific Linux, many of the researchers involved do.
Learn more, or download this distribution free at https://www.scientificlinux.org


6. GoboLinux

GoboLinux is a horse of a different color. It's not based on any other distribution, and it completely redefines the underlying file structure of the Linux operating system, what they call a "modular distribution". Everything in the filesystem is organized in a logical hierarchy rather than Linux's usual method of taking a program's files and arranging them in the filesystem according to each piece's function. GoboLinux does this while proudly proclaiming, "we transparently retain compatibility with the Unix legacy."
Learn more, or download this distribution free at http://www.gobolinux.org


7. Puppy Linux

The thing that makes Puppy Linux unique is that it is ultra-small and designed to use the minimum of resources allowing it to run incredibly fast. Small enough to fit and run live from a USB drive. The installation CD only takes up about 85MB of space on the disc. If I'm not mistaken, that's small enough to fit on a business-card CD or a mini-disc. Puppy Linux also runs completely from RAM, no hard disk necessary. You can even easily customize which applications to include in the live CD before you burn it. Puppy Linux follows you everywhere!
Learn more, or download this distribution free at http://www.puppylinux.com


8. 64 Studio

Another specialized distribution, 64 Studio is geared toward the multimedia geeks of the world. There something for the creative side in all of us in here, whether you're into graphic design or you're an audiophile/videophile, or whatever the case may be. Admittedly, there are other distributions that cater to multimedia production, but as far as I know 64 studio is the only one used in professional production studios. Of course you can get the included software in any distribution, but it's always nice to see a group dedicate their time and effort to make it all come together so you can concentrate on the important stuff.
Learn more, or download this distribution free at http://www.64studio.com


9. Easy Peasy

By now nearly everyone has seen this netbook-launcher program (left) in some form or another. I won't deny that a lot of "netbook" version of popular distros have been coming out of the woodwork lately, but mostly as an afterthought to their main release. However, there are few that are dedicated to concentrating solely on the netbook platform. Easy Peasy's maintainers and community do just that, and have done it rather well compared to a good majority of netbook releases. They strive to support all netbook hardware across the board and provide a lightweight and easy to use interface. If you own a netbook, you owe it to yourself to check out this distribution.
Learn more, or download this distribution free at http://geteasypeasy.com


10. Omnia

Last, but not least, Omnia (Sometimes referred to as Omnia XP and Omnia Linux). Look familiar? Good! They must be doing something right then. Omnia's primary goal is to provide a familiar look and feel to "[facilitate] the migration to the Linux world," as their website states. What a fantastic way to say "we made it look like Windows XP so you won't be scared of it." Seriously though, as much as I hesitate to admit it, there are still far too many people in the world who are afraid of unfamiliar territory and would never try something new if it weren't for cross-over projects like this. If it helps get more people to understand and appreciate Linux, I'm all for it. If you happen to be one of those people that is a little afraid to test the waters, you might consider starting here.
Learn more, or download this distribution free at http://omnialinux.com


And there you have it!


Please remember that these are all free software distributions, but they need the support of you and the community. If you like one or all of these projects please consider contributing in whatever way you can. Most of these projects accept knowledge and skill as well as even the smallest donations to help keep them going, so if you can help in any way, it's always appreciated (refer to the website of each individual project for the details on how to contribute).

That's all I have for you for now, thank you for taking the time to read this article, and hopefully I have opened at least a few eyes to something new and exciting.




2009/08/19

E16 window manager

I've been revisiting Enlightenment (E16) window manager recently. I haven't played around with E or WindowMaker or really anything but Gnome, KDE, and occasionally Xfce since 1998. Wow... Long time ago. I guess I just got comfortable with Gnome (mostly) since I first checked it out way back when, and it is a solid window manager, but I need to remind myself from time to time that there are other, potentially better window managers out there. Prior to Gnome, WindowMaker was my favorite, though admittedly I didn't spend a whole lot of time working in a GUI at all, then. Most of the time I lived purely in the terminals, but when I did need something graphical it was usually WindowMaker or Enlightenment before I started playing around in Gnome.

So I played around a bit with different combinations-- E16+Gnome, E16+KDE, E16 by itself-- and I have to say I'm not impressed with how well it meshes with Gnome or KDE, but that seems to be because they seem to want too much control by default. I would probably have to put in a lot of work to get them looking nice and playing nice together. The thing I notice the most, though, is how much faster E16 is by itself than when combined with Gnome or KDE (KDE especially). This could also be due to being run in conjunction with Gnome/KDE, but E16 definitely seems to run programs faster by itself than they do by themselves. Which is good, since that's one of the things the developers strive for-- a faster, less resource-heavy window manager-- so they must be doing something right.

I would be really interested to see if it's possible to get compiz-fusion running in conjunction with E16 to take advantage of the nice compositing effects of compiz. I don't see why I wouldn't be able to, but I haven't gotten around to trying yet. I will probably post again with how that turns out.



2009/08/17

Troubleshooting VirtualBox mouse integration (Ubuntu 9.04 guest)

Since many people have had issues getting the Guest Additions mouse integration to work, I decided to post a quick fix for this. Please refer to my previous post Troubleshooting VirtualBox 2.1.4 Guest Additions for help installing Guest Additions (then come back here if you are experiencing mouse integration problems).
All you have to do is add the following lines to /etc/X11/xorg.conf
Section "InputDevice"   
        Identifier  "vboxmouse"   
        Driver          "vboxmouse"   
        Option          "CorePointer"   
        Option          "Device"        "/dev/input/mice"   
EndSection
Then simply restart X by pressing Host+Backspace and your mouse integration should be working.



2009/07/31

Troubleshooting VirtualBox 2.1.4 Guest Additions (Ubuntu 9.04 guest)

I had a little fun trying to figure this one out today and it seems as though there wasn't any updated instructions on how to get the Guest Additions running in an Ubuntu 9.04 VirtualBox (Kubuntu 9.04 more specifically, but these directions will apply to all flavors of Ubuntu 9.04).

First of all, I'm running (as stated, but just for clarification) VirtualBox 2.1.4 on host: Ubuntu 9.04 and the guest is Kubuntu 9.04 (also verified it on Ubuntu Studio 9.04).

Here are some of the errors you may be getting:

(EE) Failed to load module "vboxvideo" (module does not exist, 0)
(EE) No drivers available.
Or
(EE) module ABI major version (1) doesn't match the server's version (5)
(EE) Failed to load module "vboxvideo" (module requirement mismatch, 0)
(EE) No drivers available.

...among the other log info. If you are getting either of these (or something similar, i.e. different version numbers than what is shown above), then you are in the right place! Maybe.

These errors should only appear (as far as I know) after attempting to install the Guest Additions into an Ubuntu guest machine or, as other people have reported, possibly also when adjusting the display resolution in the guest machine. The reason the error arises is because the additions modify your xorg.conf file with some new/modified entries in an attempt to enable to appropriate VBox modules for video and mouse support as well as the clipboard support (I think that part is included in the mouse driver).

So here's the solution. We'll assume you have already tried at least once to install the VBox guest additions and have attempted to reboot to finalize the changes as it instructs you to. When you booted back up you most likely wound up with a black screen, or a tty login prompt (in the case of Kubuntu), or the following message (as in the case of Ubuntu standard/Studio):

In any case, just ignore the error message if any and try get to a tty (try Host+F2 if you're having trouble) where you should be able to login normally. Once in, we'll need to mount the guest additions ISO and run the guest additions installer again, with a twist.

mount /dev/cdrom
cd /media/cdrom/
sudo mkdir /tmp/ga
sudo ./VBoxLinuxAdditions-x86.run --noexec --target /tmp/ga

It should do a quick dump of the driver files to /tmp/ga. Next, go ahead and check your X Server version:

dpkg -l xserver-xorg-core

You should see something like:

The part we're interested in is just the digits from the version number (2:1.6.0), in this case a 1 and a 6. This is important to determine which drivers to use later. Now, go ahead and execute these commands:

cd /usr/lib/xorg/modules/
sudo cp /tmp/ga/vboxvideo_drv* drivers/
sudo cp /tmp/ga/vboxmouse_drv* input/
cd drivers/
sudo ln -s vboxvideo_drv_16.so vboxvideo_drv.so
cd ../input/
sudo ln -s vboxmouse_drv_16.so vboxmouse_drv.so

Important: notice that the number highlighted above represents the version number we got from dpkg -l earlier? Make sure the numbers you enter match your version as well so the correct files are linked, or you will get errors starting X again. We copied all of the driver files just in case we need any of the others at a later time (i.e. if you upgrade your X Server), but you really don't have to. At this point I usually do a ls -l on the input and drivers directories to make sure I linked to the files properly.

Once you've completed these steps everything should be fixed, and we didn't even need to touch xorg.conf! Go ahead and try starting X with startx. If everything went well it should start right up. You may want to reboot just for good measure, though it's probably not necessary.

If everything is running now, save a snapshot and you're done! You now have your Ubuntu 9.04 guest OS running with VirtualBox Guest Additions installed, and a much nicer resolution to boot.

If you encounter mouse integration issues, continue with this post.



Install guest additions on Ubuntu (VirtualBox)

Just a quick how-to for installing the Guest Additions for VirtualBox in an Ubuntu 9.04 guest machine. These instructions are specifically for VirtualBox 2.1.4 but should also work with later versions of VirtualBox (and possibly earlier versions as well, with slight variation).

First of all you need to have a fully installed copy of Ubuntu 9.04 (or any of it's variants) in VirtualBox. If you do not, please complete that before continuing. I recommend also letting your guest Ubu do a full update if possible before moving on.

Save a snapshot now before attempting to install Guest Additions!

Once you have installed your guest Ubu and saved a snapshot of the virgin install, you'll need to first release your mouse by pressing the Host key, then go to your Devices menu and select "Install Guest Additions..." This will mount the ISO for you under /media/cdrom0.

Open up a terminal, or switch out of X Windows to a tty and log in. Go ahead and
cd /media/cdrom0/
sudo ./VBoxLinuxAdditions-x86.run
It should run through the install and ask you to reboot when it's done.


If you get the warning message above ("...unknown version of ... X Windows...") you may encounter problems after rebooting. If so, please read this post for help.



2009/07/27

What I've been up to lately

So I moved into a house a few months ago, which gave us the room to set up an official "office" room. At this point I have my desktop in there and 1 server. My girlfriend has her desktop set up as well (though much more recently) as well as an extra monitor on her desk for her work laptop for when she works from home.

Her iMac G4 (if I'm remembering that correctly) is currently out of commission because her boyfriend flipped a wrong switch causing the outlet it was plugged into to switch off, killing the power supply in the process. Sorry. Who knew Mac power supplies were so fragile? Or maybe it was just on the brink already.

So, all my computers run linux of course. I have my desktop, my netbook and the server (and another desktop and laptop that are collecting dust right now). The server is actually her old laptop, but she lets me use it as our server, 'cause she's cool like that. We had been using it as a file server already, but we acquired a second-hand printer not long after moving in, so of course it quickly became the print server as well. I did some optimizations on it and added TorrentFlux (you know, for downloading linux distributions) and a CRM suite for when we do freelance work on the side. Not to mention some other minor things.

Well that was all working out just fine for a while, but we decided, being as smart as we are, that maybe putting all our eggs (data) in one basket (server) was a bad idea. I know, novel idea. So I set out restructuring our home network.

I figured, since my desktop is the most powerful computer in the house (world) and since hosting the majority of our data (porn) elsewhere left me with the better part of a terrabyte unused, I could give my desktop's life more meaning by having it be the file server instead and relieve the print server of its file hosting duties. This way, I can repurpose the print server as a backup server (of course it will still serve printers), and that's what I'm working on currently.

So, that's it in a nutshell. More to come, soon enough.