Throughout my various backup schemes, my id3 tags get clobbered. I wrote a script to rewrite the tags based on the filename and directory structure of an mp3 collection:
/*
* Music needs to be in /Users/username/Music/
* in format Artist/Album/00 Title.mp3
*
* id3lib required
*/
You can get id3lib with homebrew: `brew install id3lib`
Coming from Windows and Linux distros, I was used to using a tiling application with my desktop. This is a program that allows you to move windows to fill certain portions of your display with keyboard shortcuts. For example, in Windows 7+, holding down the windows key and pressing left or right will fill the left or right half of the screen with that window.
If you’re looking for this on Mac OS, check out Spectacle. It works great and it’s very customizable.
Update June 8, 2020: Spectacle is no longer supported so I have switched to Rectangle.
For a while now, I’ve had issues with my Raspberry Pi rebooting by itself. At first I thought I was drawing too much power with the items I had plugged into the USB ports. So I unplugged them both (an external hard drive and a USB WiFi dongle), but the Pi kept rebooting. Finally, I remembered that I had traded the power supply out to use as my phone charger a while back. It turns out that the new power supply I was using is only rated at 550 milliamps. That’s a lot less than the old supply I was using, which was 1 amp or 1,000 milliamps.
Even though the Pi uses micro USB for power, you can’t just plug in any charger or power supply that will fit. Look for a 2 amp supply, like this one: EasyAcc 5V 2A Micro USB Charger. Or check out other options on Amazon.
Install and configure minidlna on your Raspberry Pi and make sure it’s on the same network as your Smart TV. Your TV’s media playing application should see the Pi on the network and let you browse and play videos on the Pi.
More In-Depth Guide
First you need to install minidlna on your Raspberry Pi:
sudo apt-get install minidlna
minidlna’s configuration file is located at /etc/minidlna. We want to edit this to point to our video files:
sudo nano /etc/minidlna
Around line 25, your media folder is set:
media_dir=/var/lib/minidlna
You can either change that to something like
media_dir=/home/username/videos
or link your video folder there with this command:
If you’re looking to save some space on your Raspberry Pi (mine runs on a 4 GB SD card), run these commands to remove all desktop/gui-related programs:
While writing a backup script to back up my data from Mac OS to a Raspberry Pi, I ran into an issue with relative modification times of the files being transferred: rsync thought every file on the Mac side was always more recently updated than on the Debian side.
I was using the -a flag for archive mode, which includes, along with a few other things, rsync’s default behavior of comparing file size and last modification time. The two OS’s weren’t agreeing on the times, however, so each file was copied over every time I ran the backup command.
To avoid this, I started using the -c flag, which compares the checksum of each file on both systems. This resulted in what I wanted: if I changed only one file, then only one file was sent to the backup and it is now very fast. So if you’re having this problem, use the -c flag for faster backups. Here’s my rsync command and flags in case you’re curious:
I recently needed to print a document using a website that wanted to run a Java applet on a Windows machine. After a bit of work I had a Windows 7 virtual machine guest printing to a printer connected to the Ubuntu host machine. I’ll go through the steps to do this here in case I need to do it again or someone else is stuck trying to accomplish the same thing.
Install VirtualBox from Oracle
In the past I was fine using the VirtualBox version from Ubuntu’s repository. This works great if all you need is encapsulated in the VM you’re working with. However, once you want to interface the VM more closely with the host OS, you can run into trouble. Apparently there is some functionality missing when it comes to passing USB devices through to the guest machine using the open-source VirtualBox version. So make sure you go to Oracle’s VirtualBox download page and get the Oracle version: Download VirtualBox.
Install Guest Additions
Next install guest additions. After your guest OS (Windows 7) is installed, boot it up and click on the “Install Guest Additions” option in the “Devices” menu of the VirtualBox window running the OS.
Install the Extension Pack
Now you need to install the “Oracle VM VirtualBox Extension Pack”, also found on the Oracle VirtualBox download page. After downloading it, simply double click on it in your file manager. At this point I got an error saying
“The installer failed with exit code 127: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty’): No such device or address.“
It seems that VirtualBox needs different permissions to install the extension pack, so I closed VirtualBox, opened my file manager as root (sudo thunar or sudo nautilus) and double-clicked it again.
Add user to vboxusers
Add your user to the vboxusers group that VirtualBox should have created upon installation. Do this with the following command:
sudo usermod -aG vboxusers yourusername
Select the printer as a USB device
At this point I recommend shutting down the Windows 7 guest and rebooting your Ubuntu host, just to as superstitious way to make everything “kosher”. Now, after booting the VM again, you should be able to select your printer in the Devices>USB Devices menu. Once you select it, there will be check mark beside it and Windows 7 should see it and start installing drivers for the printer.
After that has completed, you should be able to print using your printer as if the VM were physically connected to it.