Wednesday, September 28, 2011
XBMC is an awesome media center solution but when you’re using it all over your house your library updates and watched-media lists get out of sync. Read on as we show how to keep all your media centers on the same page.
Why Should I Care and Who Is This Guide For?
XBMC has a built-in library system and it keeps track of media you’ve already watched. Unfortunately these things happen, in the default configuration, at the local level. If you have an XBMC unit in your living room and in your bedroom those two installations of XBMC don’t talk to each other. As a result if you watch some of your TV shows in the living room and some in the bedroom then the marked-as-watched function in XBMC will only show you what you watched on that specific television set. The pause/resume and bookmark functions are also local. If you pause a movie or set a bookmark to hold your place there is no way to access those things unless you’re sitting at the same media center you created them with.
Wouldn’t it be nice if you could stop watching a movie in the living room and resume watching it in the proper location somewhere else in the house? Wouldn’t it be awesome to not have to sit there and wait for each library to update but instead to have it load the library from a central location ensuring all your media is up to date and in sync? It sure would be pretty awesome and we’re going to show you how to do it with free tools.
Before we get to that, however, let’s clear up who will benefit from this the most and who can skip over it.
You should skip this project if…
- You only have one installation of XBMC in your house.
- You store your media on a local HDD attached to your XBMC installations and do not share that media across the network.
- You do not have an always-on (or nearly always on) desktop, HTPC, or server.
- You are running XBMC on the original Xbox hardware—only modern HTPC-based versions of XBMC are compatible with this technique.
You should take advantage of this project if…
- You have multiple installations of XBMC in your house.
- You store your media in a central location like a file server, always-on desktop, or a primary media center.
- You have a computer, such as the aforementioned media server, that is on whenever you’re watching media.
How Does It Work and What Do I Need?
The core of the synchronization magic we’re about to undertake is a MySQL database. Don’t panic if you’ve never used one before! While some of the HTG staff are old database pros I will confess to using MySQL for one thing and one thing alone—managing my media collection.
Follow along closely and you should have no problems. What we’re going to do is install a free version of MySQL database, create a database just for XBMC, and then instruct XBMC to start writing and reading all its library entries to the database. From that point forward when XBMC checks to see if you’ve seen a specific TV show episode or movie, paused media, or set a bookmark, it won’t just be answering for the specific media center you’re standing in front of but whether you’ve done those things anywhere in the house.
So what do you need for this project? You’ll need the following:
- More than one media center with XBMC installed (version 10.0 or above)
- A free copy of MySQL Community Server (version 5.5 as of this tutorial)
- An always on or nearly always on machine to run the MySQL server on.
You can install the MySQL server on any computer that will be consistently on while you’re using the media centers. In our case we’re going to install it directly to the media server itself as this means that anytime the media is available to our XBMC clients the database is too.
Installing and Configuring MySQL for XBMC
For this tutorial we will be installing MySQL on a media server running Windows Home Server. Our installation instructions should match for any version of Windows. For other operating systems please consult the MySQL 5.5 Manual.
The installation of MySQL is straight forward. Simply download the server installation app and run it. Accept the license agreement and, once it finishes installing, make sure “Launch the MySQL Instance Configuration Wizard” is checked before clicking Finish.
The MySQL configuration wizard will launch and present you with the option to select between Detailed and Standard Configuration. Select Standard Configuration and click Next.
On the next screen check Install As Windows Service, name it MySQL—or, if you’re running multiple MySQL servers for some purpose, give it a unique name—and check Launch the MySQL Server Automatically to ensure the MySQL server is always on when you need it.
On the next screen check Modify Security Settings, plug in a new root password, and check Enable root access from remote machines. Click through to the final screen and then click Execute to modify the database. Click finish to close the configuration wizard.
Now it’s time to create databases on the MySQL server for your media center. There’s one important note before we continue; XBMC does not store profile data in the library database and each profile has its own library. What this means in terms of this tutorial is that you need to create a MySQL database set for each specific profile you use. For example:
- If you use a single profile on each XBMC and/or are only concerned with syncing one library: Create one database set and use it for the single profile on every instance of XBMC. If every machine in your house automatically logs in or you enter the password for a single account, this is for you.
- If you use multiple profiles (one for you and one of your kids, for example): Create a database set for each profile you wish to sync across the network. If you
That said let’s get started creating the first profile (which will be your only if you’re a single profile user). Run the MySQL console; you should have an entry for it in your Start Menu if not look in the fire up the command prompt and paste in:
C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe” “–defaults-file=C:\Program Files\MySQL\MySQL Server 5.5\my.ini” “-uroot” “-p”
When the console opens enter the password you created in the previous step. You’ll then find yourself at the MySQL server prompt. Here’s where we roll up our sleeves and get busy creating users on the database servers and the actual databases. We’re going to create a pair of databases for each profile you want to synchronize—one for the video library and one for the music library. We’re going to start by creating a primary user and database set (which is as far as you’ll need to go if you’re a single profile user).
At the prompt type the following to create a user on the database server:
CREATE USER ‘xbmc’ IDENTIFIED BY ‘xbmc’;
The first quoted portion is the username and the second quoted portion is the password. While identical login/passwords are generally a huge security no-no in this case we’re comfortable using a matching pair for the sake of simplicity. A MySQL database, on a private server, that tracks which episodes of Dexter you’ve watched is hardly a high risk installation.
CREATE database xbmc_video CHARACTER SET latin1 COLLATE latin1_general_ci;
CREATE database xbmc_music CHARACTER SET latin1 COLLATE latin1_general_ci;
The above command set creates two new databases: one for the video library and one for the music library. We also indicated what character set we want the databases to use—latin1 is necessary for XBMC to properly write to the databases. If you make a mistake and need to remove a database simply use the command “DROP DATABASE databasename;”—sans the quotation marks.
GRANT ALL ON xbmc_video.* TO ‘xbmc’;
GRANT ALL ON xbmc_music.* TO ‘xbmc’;
In this step we’re granting the user ‘xbmc’ full access to both databases.
If you rely on XBMC for playback of your music collection there are a few additional tweaks you’ll want to make to the music database to improve performance.
ALTER TABLE xbmc_music.song ADD INDEX idx_idArtist(idArtist);
ALTER TABLE xbmc_music.song ADD INDEX idx_idGenre(idGenre);
ALTER TABLE xbmc_music.song ADD INDEX idx_idAlbum(idAlbum);
The above edits are only necessary if you want to speed up access for certain functions while using XBMC as a music player.
If you’re a single-profile household then you’re all done. If you need an additional profile for your roommate, kid, or other individual, simply repeat the above steps substituting all instances of xbmc with an appropriate alternative like roommate or kids to create databases for each entity.
Before we leave this step, let’s double check that the users and databases we created are in fact within the MySQL server. Type the following commands:
SELECT host,user from mysql.user;
You should see something like the screenshot above, adjusted for the number of users and new databases you created. Single-profile users should see the user ‘xbmc’ and the matching music and video databases. If everything looks good, we have one final step before going to configure XBMC: Make sure that Port 3306 (the MySQL server port) is open on the firewall of the machine you’ve installed MySQL onto. By default the Windows installer should open the port automatically but you’re going to save yourself a headache later on by double checking that now.
Configuring XBMC to Communicate with the MySQL Database
By default XBMC uses an internal SQLite database. In order for XBMC to communicate effectively across your home network we need to instruct it to use an external MySQL database. Before we get to that step, however, you’ll need to make an executive decision regarding whether or not you’re going to scrap your library and start fresh or backup and restore it.
If this is a brand new installation of XBMC and you’re configuring everything fresh you can simply skip to the next step. If you wish to save your existing library data you will need to export your library. From within your XBMC installation You’ll need to go to System –> Settings –> Video and System –> Settings –> Video and, at the bottom of the menu, select Export to export your library file. You should only export the library files from one machine on your network. Pick the machine with the most up to date libraries. When you are done configuring XBMC to accept the MySQL databases you will then repeat the above steps and choose to Import the libraries. Everyone else will just run a new scan on their media directories to repopulate the library.
Once you’ve backed up the library (or opted to not worry about it and start from scratch) you’re ready to start configuring. The specific file we’re interested in the the advancedsettings.xml. By default this file does not exist (although it is possible that, during the installation process, XBMC created one for you to deal with specific configuration issues). If the advancedsettings.xml file exists it will be in the following location, based on your OS:
Windows XP – C:\Documents and Settings\[username]\Application Data\XBMC\
Windows 7/Vista – C:\Users\[username]\AppData\Roaming\XBMC\
Linux/XBMC Live – $HOME/.xbmc/userdata
Mac OS X – /Users/[username]/Library/Application Support/XBMC/userdata
Check in that folder. Is there an advancedsettings.xml file there? Yes? Open it up. No? You’ll need to open a text editor and create one. Regardless of whether you’re editing the existing one or create a new one, cut and paste the following text into the file (note: if there is already some entries in your advancedsettings.xml file, leave those in place!):
Edit the above text to reflect the IP address of your server on your LAN and the username/password of your MySQL database.
If you are using multiple profiles you need to create a unique advancedsettings.xml file for each profile. Edit advancedsettings.xml file separately and then place it in the /profiles/[profile name]/ folder—a subdirectory of the folder noted for your OS in the step above. The master profile’s advancedsettings.xml file goes in the root folder, the other profiles all go in /profiles/[profile name]/. Again, you must have a unique file for each profile.
Once you have created the file and placed it in the proper directory, it’s time to reboot your XBMC for the new file to load. Once you reboot, you’ll need to either import your library or rescan your sources to begin populating the MySQL database. Do that now.
When your libraries are imported and/or done scanning, you can do a simple check to see if XBMC is properly communicating with the database. Return to the MySQL command prompt and, to check on whether or not your movies and television shows are in the database, type the following commands:
SELECT COUNT(*) from xbmc_video.movie;
SELECT COUNT(*) from xbmc_video.tvshow;
Each query will return the total number of movies and television shows, respectively, contained in your library (according to the the MySQL database). See the screenshot above for an example of a query into the TV show count. If the number of entries is zero there is a problem somewhere along the line. Here’s is a quick trouble shooting checklist of common mistakes:
- Did you double check that a unique user and database pair were created for each profile?
- Did you use the GRANT ALL command to apply the proper permissions for each user and their database?
- Did you set the CHARACTER/COLLATION settings to Latin1 for all the databases?
- Are all your shares defined as Samba shares (//somehost/sharefolder) and not local shares (c:\media files\)? MySQL doesn’t play nice with the \ symbol found in local share names.
- Did you open port 3306 on the MySQL host machine?
- If you’re having problem with a sub-profile’s database, did you place the advancedsettings.xml file in /profiles/[profile name] ?
- Are your sources valid and scannable when you remove the advancedsettings.xml file and revert to the local database? If not, you’ll need to troubleshoot your sources independently of your MySQL problems.
If everything looks good and your SELECT COUNT query pans out, that means you’re ready to start taking advantage of the cross-media-center syncing. Let’s take a peek at what that looks like.
XBMC Syncing Across Multiple Machines
One of the first changes you’ll want to make, if you haven’t already toggled this setting to begin with, is to alter what XBMC does in response to you pressing play on a file. By default XBMC simply plays the file from the beginning. Since we now have an XBMC system that remembers our place across multiple machines, we want XBMC to prompt us.
Navigate to Settings –> Video –> File Lists and set the Default select action to Choose. We want XBMC to ask us what to do when we’re opening a file instead of automatically playing it from the start.
Now that we’ve flipped that toggle it’s time to play around with XBMC and see how we can resume play and check our watched files across the network at multiple XBMC consoles.
We’re going to navigate to our directory of HDTV demo reels and mark one as watched, set a bookmark in another, and watch and pause the third reel. Then we’re going to leave the office and go into the living room and check the three files to ensure XBMC has properly flagged the first, bookmarked the second, and can resume the third. Here are snapshots of each action:
Now, when we travel to another XBMC console, we can take a peek at what each one of these things looks like. Let’s check to see that our first file has been marked as watched:
Excellent, there it is with a check mark beside it. The remote XBMC console is aware the file has been watched.
What about bookmarks? Did the bookmarks carry across via the database too? Let’s check and see if the action our action packed scene with the fire breather and rugby player is still bookmarked:
Looking good so far. Finally let’s check to make sure that the video we paused in our office will resume in the correct location (1:13) when we select it in the living room:
Success! Simply pausing/stopping the movie file in the office was enough to mark it in the database and prompt us to resume from that location when we returned to the file at the remote location.
From this point forward you’ll be able to check what movie and TV shows you’ve watched, where you left off, and what bookmarks you set, from anywhere within your house. Your media and associated libraries will be up to date regardless of where you are—no more fussing with manually syncing your library contents again!
Tuesday, September 27, 2011
Monday, September 26, 2011
There are plenty of ways to view and edit PDFs on a Mac, but Apple's built-in Preview application is phenomenal and often overlooked. While Lion didn't wow the crowd with most of its features, it brought some amazing additions to Apple's PDF viewer/editor that puts it over the top and makes it our choice for the best.
Note: There are a few ways you could define a PDF viewer/editor, as features can range from simple form-filling to complete PDF manipulation. For this post we're concentrating on the features the average person would use, meaning viewing, form completion, annotation, and so on.
- View and edit images in addition to PDF files
- Annotate, highlight, and mark up PDFs in several ways
- Digitally fill out forms
- Sign PDF documents with your webcam (read on for more info)
- Super-fast performance
- Super-fast search
- Insert new pages into PDFs
- View and edit PDF metadata
- Add and edit hyperlinks in a PDF file
Preview is fast. Mac OS X isn't exactly known for its speed and efficiency, so Preview's ability to blow through PDF documents is pretty impressive. But among its many handy highlighting and annotating features, which are all solid, its ability to fill out forms is especially impressive. This may seem like a mundane thing, but when you get to the signature line it is hard to eschew at least a little reverence. Preview (in Lion) has a feature where you can sign a piece of paper, hold it up to your computer's webcam, and it'll turn it into a high-quality signature you can place in a form. It can also save multiple signatures so you don't have to continuously repeat this process. Preview is solid all-around, but it's those sorts of features that make it amazing.
As incredible as Preview's webcam signature feature is, it seems kind of strange that there is no ability to sign with your trackpad as well. After all, Apple Stores let you sign for purchases with your finger on an iPod touch. Additionally, Preview wasn't exactly perfect prior to Lion and Lion isn't exactly perfect on its own. It's hard to justify upgrading to OS X 10.7 if Preview is the only draw. If you're sticking with Snow Leopard, your version of Preview isn't bad but it's certainly not the best PDF editor/viewer you can find. Apple fixed a lot of quirks in Lion, which make it a pleasure to use, but if you're not running Lion you're pretty much out of luck.
PDFPen costs $60 but is pretty great. If you need more features than Preview can provide, it'll get the job done. PDFPen makes page rearrangement, editing, multi-document assembly, and more very easy. While it's on the expensive side, consider it a cheaper alternative to Adobe Acrobat ($200). We've never loved Acrobat and it likely provides more features than you're going to need.
Wondershare PDF Editor ($50) is another pricey option, but it has the ability to convert PDFs to Microsoft Word documents. We're not sure how well this works, but you might want to give it a try if that's something you need.
Skim is a great choice if your primary focus is annotation as that's what it was design to do. It has an impressively long list of features to make annotation easy.
Got any other favorite PDF editor/viewer apps for Mac that you love? Share 'em in the comments.
Lifehacker's App Directory is a new and growing directory of recommendations for the best applications and tools in a number of given categories.You can follow Adam Dachis, the author of this post, on Twitter, Google+, and Facebook. Twitter's the best way to contact him, too.
Faster-Than-Light Discovery Raises Prospect of Time Travel | CERN Neutrino Experiment | Time Travel Potential & Barriers | LiveScience
If subatomic particles called neutrinos can go faster than the speed of light, as scientists reported Sept.22, it would require a rethinking of the basics of physics, including the possibility of time travel.
: Willem Dijkstra, Shutterstock
If a report of particles traveling faster than the speed of light turns out to be true, it will rock the foundations of modern physics — and perhaps even change the way scientists think about time travel.
But don't fire up the DeLorean just yet. Physicists are skeptical that the tiny subatomic particles, called neutrinos, really are breaking the cosmic rule that nothing goes faster than light. And even if they are, neutrinos don't make the best vessel for sending signals to the past because they pass through ordinary matter almost unaffected, interacting only weakly with the wider world. [Countdown of Bizarre Subatomic Particles]
So you may be able to send neutrinos back in time, but would anyone notice? "If you're trying to get people's attention by bouncing neutrinos off their head, you could wait for quite awhile," Seth Lloyd, a physicist at the Massachusetts Institute of Technology, told LiveScience.
'; } s += 'Discover Why Thousands of People are "Jumping" to Change Their LifeSave Thousands with Solar Energy. Try Our Solar Savings CalculatorAdam, first man per Bible records, archaeology dates him to 14,000 BP
That hasn't stopped physicists from imagining the possibilities in a world where faster-than-light travel is possible. If the neutrino experiment is confirmed, it opens the door to at least sending messages through time using those neutrinos, physicists say. You might even be able to send messages to "past you" with neutrinos, one physicist suggests. Experiencing time backwards, once thought impossible, might be outside the realm of sci-fi, another imagines. Of course, this is all predicated on the finding being true — and it raises thorny questions of how the universe would work if people were able to go back in time and, say, erase their own existence.
The news that European researchers had detected neutrinos traveling faster than light broke yesterday (Sept. 22), triggering both typical scientific skepticism and pure amazement in the physics world. In an experiment that zaps neutrinos from CERN in Geneva to the INFN Gran Sass Laboratory in Italy, scientists clocked the particles outrunning light by 60 nanoseconds over 453.6 miles (730 kilometers) — a neck-and-neck race to be sure. [Infographic: See How Neutrino Experiment Works]
According to Einstein's Theory of Special Relativity, neutrinos shouldn't even be able to match light speed, much less break it. Neutrinos have (very small) mass, and as Einstein posited in his famous E=mc squared equation, mass is equal to . As something speeds up, its energy increases, too. Because energy is equivalent to mass, its mass increases. Now you've got a heavier object, so you've got to add even more energy to get it going faster. Before you know it, you need "completely unreasonable" amounts of energy to keep inching your object toward light speed, said Harvard University physicist Gary Feldman.
"You keep accelerating but you just incrementally approach [light speed], so you have to add more and more energy to go faster and faster, but it becomes less and less effective," Feldman told LiveScience.
Some particles have been shown to exceed the speed of light when traveling in a medium rather than a vacuum, but neutrinos pass through the Earth as if it were a vacuum, so they shouldn't ever be able to zip past light speed. The buzz in the physics community is that they probably haven’t.
"Even though the experimenters have done a very careful job and it's a very impressive paper … it was a very complicated analysis and there's always a possibility that there's just an error in what they did," Feldman said.
One possible error could be in the calculations the scientists used to correct for the effect of the atmosphere in their experiment, Lloyd said. Light actually gets a bit bogged down when it isn't in a vacuum, while neutrinos zip through the atmosphere without any effect. It's possible that the CERN researchers miscalculated in correcting for the atmospheric effect and that neutrinos aren't actually going faster, but the light is just going a smidge slower than they realize.
If it's true ...
But if the results do hold, "it's major, it's humongous, it's the biggest thing in 100 years," said Michio Kaku, a theoretical physicist at the City University of New York.
"You're talking about a tidal wave hitting physics if it's true," Kaku told LiveScience. "There are two rocks upon which modern physics is based. One is quantum theory and one is relativity. If one of the pillars falls, we're in deep trouble."
What does that mean for time travel? In theory, it might be more possible than scientists had thought. Einstein pointed out that time is relative: As you approach light speed, your experience of time is not the same as it is for the folks chugging along at their usual speed. What feels like a second to you will feel like much longer to them. This idea, called "time dilation," spawned such sci-fi classics as 1968's "Planet of the Apes," in which what feels like 18 months to Charleton Heston and his crew is enough time for gorillas, chimps and orangutans to evolve language and complex societies back on Earth. [Top 10 Scary Sci-Fi Series]
There are a lot of barriers to approaching light speed, much less breaking it, but if you could, you could theoretically experience time running backward, Kaku said. Here's how it would work: As you approach light speed, you might time goes slower in the outside world than it does for you. When you hit light speed, the outside world goes so slow in relation to you that it stops (again, in relation to you; people in the outside world feel as if time is the same as always). So if you could push past that speed limit, the outside world would be so slow as to be moving backward in relation to you.
So far, this seems pretty much impossible, not least because some other side effects of faster-than-light travel should include reducing your weight and width to less than nothing, Kaku said. [Watch: Can You Time Travel?]
If the neutrinos are actually going faster than light, though, it might be possible to use them to with the past, Lloyd said. You could send off a faster-than-light message to someone moving at a rapid velocity with respect to you. They could then bounce the faster-than-light message back, and it would arrive before the signal you sent to them.
One way to think of this is like a mirror, Lloyd said. You send a message to the mirror, and it reflects it back, but so quickly that "past you" is the one who receives it.
Stuck in time
But all of this is moot if it's only neutrinos that can be coaxed past the speed of light, Lloyd said. Because they don't interact with much, your messages would likely go unnoticed by past generations. An April 13, 1865, warning to Abraham Lincoln not to go into Ford's Theater the next day would pass through the president like a ghost. [Read: 'Time Traveler' Spotted?]
Doing away with Einstein's theory would also complicate causality, the idea that things influence each other in chronological order. When you allow the past, present and future to interact, "that gets all messed up," Lloyd said, and you start to get paradoxes. A classic is the Grandfather Paradox: What if you went back in time and shot your grandfather, preventing your own birth and thus preventing yourself from ever shooting your grandfather?
It's a headache, to say the least. And not all researchers are convinced that the finding, even if true, would ultimately overturn the well-tested, century-old Special Theory of Relativity that keeps things from getting so messy.
"This effect is very small, it's two parts in 100,000," Feldman said. "If this is true, what it means is that there is some aspect of the Special Theory of Relativity that's been overlooked or not understood well, but I can't imagine that it really overtakes the Special Theory of Relativity."
Friday, September 9, 2011
Tuesday, September 6, 2011
Thursday, September 1, 2011
How To Install VMware Player On Ubuntu 11.04/Linux Mint 11 | HowtoForge - Linux Howtos and Tutorials
How To Install VMware Player On Ubuntu 11.04/Linux Mint 11
Follow me on Twitter
Last edited 08/16/2011
This tutorial provides step-by-step instructions on how to install VMware Player on an Ubuntu 11.04 or Linux Mint 11 desktop system. With VMware Player you can create and run guest operating systems ("virtual machines") such as Linux, Windows, FreeBSD, etc. on your desktop, i.e., you can run multiple operating systems on the same hardware which saves a lot of money.
Also, with VMware Player you can let your old Windows desktop (that you previously converted into a VMware virtual machine with VMware Converter, as described in this tutorial: http://www.howtoforge.com/vmware_converter_windows_linux) run under your Ubuntu/Linux Mint desktop. This can be useful if you depend on some applications that exist for Windows only, or if you want to switch to Linux slowly.
I do not issue any guarantee that this will work for you!
1 Preliminary Note
I'm using the user name falko with the home directory /home/falko here - please adjust this appropriately.
2 VMware Player
To download VMware Player, go to http://www.vmware.com/go/downloadplayer/ and click on Download:
On the next page, log in with your existing VMware account or create a new one:
Follow the on-screen instructions. At the end, you should receive an email with a link to your download page. On the download page, select the right VMware Player for your architecture (32-bit or 64-bit) and click on the Download button:
Select Save File in the Firefox download dialogue:
Then open a terminal and run the following command to install some packages needed by the VMware Player installer:
sudo apt-get install build-essential linux-headers-`uname -r`
Then go to the location where you saved the VMware Player file, e.g. /home/falko/Downloads (replace falko with your own username!):
Take a look at the contents of the directory:
falko@falko-virtual-machine ~/Downloads $ ls -l
-rw-r--r-- 1 falko falko 103561067 2011-08-16 13:49 VMware-Player-3.1.4-385536.x86_64.bundle
falko@falko-virtual-machine ~/Downloads $
We can start the VMware Player installation as follows:
gksudo bash ./VMware-Player-3.1.4-385536.x86_64.bundle
This will start the graphical VMware Player installation wizard. Just click your way through it:
Click on Install to start the installation:How To Install VMware Player On Ubuntu 11.04/Linux Mint 11 - Page 2Copyright © 2011 Falko Timme
All Rights Reserved.