Monday, April 22, 2013

How to Bring Linux-Style apt-get Installations to Windows with Chocolatey


There’s a lot to be said for app stores and the way they simplify the installation and updating of software, but Linux users can take advantage of the apt-get command to gain more control over things. With Chocolatey, Windows users can do much the same from the command line.
Chocolatey is PowerShell-based, but it can be installed from the command line – just type out or copy and paste the following code and then hit Enter,:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command “iex ((new-object net.webclient).DownloadString(‘http://chocolatey.org/install.ps1′))” && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
Wait for a second while a connection is established, and Chocolatey will be downloaded and installed for you.

Grabbing any new software you want to install is now a simple matter of bringing up a Command Prompt window and typing cinst [appname].
So if you wanted to install a copy of the FileZilla FTP client, you just need to type the following before pressing Enter:
cinst filezilla
This is obviously a good deal faster than heading over to the official FileZilla website, locating the correct download link, and then saving an executable to your hard drive before starting the installation.

The command needed to download and install apps in this way is pretty intuitive. Want a copy of Firefox? Type ‘cinst Firefox’. Want OpenOffice? ‘cinst OpenOffice’. There are also handy combination packages such as All Browsers (cinst allbrowsers) that install multiple applications at once – in this case Chrome, Opera, Firefox, and Safari.
For a full rundown of the packages that are available, head over to the searchable list on the Chocolatey website.

Had enough of an app and want to get rid of it? There’s a command for that too.
cuninst filezilla
Updating apps is similarly simple; to update FileZilla, for example, just type:
cup filezilla
You can also check for updates for all of your installed apps – those that have been installed through Chocolately, at least – with the following command:
cup all
There is a GUI available for Chocolatey (cinst ChocolateyGUI) – this kind of goes against the idea of replicating app-get, but it’s handy nonetheless.

How to Uninstall a Linux Dual-Boot System From Your Computer

uninstall-ubuntu
If you have installed Linux on its own partition in a dual-boot configuration, there’s no easy uninstaller that will remove it for you. You will need to delete its partitions and repair the Windows boot loader on your own.
How you uninstall Linux will depend on how you’ve installed it. If you installed Linux as your only operating system, you’ll have to reinstall Windows over Linux to get your Windows system back.

If You Used Wubi

If you installed Ubuntu or a similar Linux distribution like Linux Mint with Wubi, you’ll have an easy uninstaller. Just boot into Windows, open the Control Panel, and locate Ubuntu in the list of installed programs. Uninstall it like you would any other program and the uninstaller will automatically remove the Ubuntu files and boot loader entry from your computer.
Note that this entry will only be available if you installed Ubuntu inside Windows with Wubi.

If You Installed Linux on Its Own Partition

If you’ve installed Linux on its own partitions in a dual-boot configuration, uninstalling it requires removing the Linux partitions from your computer and then expanding your Windows partitions to use the now-free hard disk space. You will also have to restore the Windows boot loader, as Linux overwrites the Windows boot loader with its own boot loader, known as “GRUB.” After deleting the partitions, the GRUB boot loader won’t boot your computer properly.

Delete Your Linux Partitions

First, you’ll need to delete the Linux partitions. Press the Windows key to open the Start menu or Start screen, type diskmgmt.msc into the Start menu or at the Start screen, and then press Enter to launch the Disk Management application.

Locate the Linux partitions, right-click them, and delete them. You can identify the Linux partitions because they have no label under the “File System” column, while Windows partitions will be identified by their “NTFS” file system.
Be careful while deleting partitions here – you wouldn’t want to accidentally delete a partition with important files on it.

Next, locate the Windows partition near the newly available free space, right-click it, and select Extend Volume. Extend the partition so that it takes up all of the available free space. Any free space on your hard drive will remain unusable until you assign it to a partition.
You can also choose to create a new, separate partition instead of expanding your current Windows partition, if you like.

Fix the Windows Boot Loader

Linux has now been removed from your computer, but its boot loader persists. We’ll need to use a Windows installer disc to overwrite the Linux boot loader with the Windows boot loader.
If you don’t have a Windows installer disc lying around, you can create a Windows repair disc and use that instead. Follow our instructions to create a system repair disc in Windows 8 or create one in Windows 7.

Insert the Windows installer or recovery disc into your computer and restart your computer. You’ll need to access the Command Prompt from the disc. The instructions and screenshots here are for Windows 8, but you can follow these instructions to access the recovery Command Prompt with a Windows 7 disc.
Click the Repair your computer option after booting from the disc.

On the Choose an option screen, click the Troubleshoot icon.

Click the Advanced options tile, and then click the Command Prompt tile.

Once a Command Prompt window is open, type the following command and press Enter to run it:
bootrec.exe /fixmbr

You can now restart your computer. It will boot from its hard drive, starting Windows normally. All traces of Linux should now be erased.

Three More Releases of Ubuntu Reaching ‘End of Life’ for Support and Updates


As the growth and evolution of Ubuntu marches on three more releases of Ubuntu are due to reach ‘end of life’ for support and updates on May 9th. If you are running one of these editions, then it would be prudent to start making plans to update now.
The three releases are 8.04 LTS Server Edition (Hardy Heron), 10.04 LTS Desktop Edition (Lucid Lynx), and 11.10 Desktop Edition (Oneiric Ocelot).
Support for the Server Edition of 10.04 LTS (Lucid Lynx) will continue for another two years though.

HTG Explains: Why You Should Perform Clean Installs, Not Upgrades

windows-8-installer
Whether you’re installing the latest version of Windows or upgrading your Linux distribution, most geeks agree that you should probably perform a clean installation rather than try your luck with an upgrade.
New operating systems versions want to reduce the pain of upgrading and offer to bring your old files, settings, and programs along with you through an upgrade, but this can often cause problems.

Upgrade vs. Clean Installs on Windows

To a less-experienced user, an upgrade seems like the best type of install. If you want to install Windows 8 on a PC with Windows 7 already on it, you can perform an upgrade installation to bring many of your programs, settings, and files with you rather than reinstalling your programs, changing your computer settings, and copying over your files when you’re done.
In theory, an upgrade will save you time because you can skip much of the set-up work afterwards. In practice, upgrades have often caused problems. When you perform a clean installation, you get a fresh copy of Windows without any clutter. When you upgrade, Windows must attempt to bring your programs and settings with you. You won’t end up with a clean copy of Windows – you’ll end up with the latest version of Windows with your old programs and settings copied over.  Files you haven’t used in years, registry entries created by long since-uninstalled programs, and other junk will remain on your fresh copy of Windows. Some applications may not be compatible and may be uninstalled during the upgrade process or may not work afterwards – you’ll have to reinstall some things anyway.
Some benchmarks have found that upgrade installs perform more slowly than clean installs, which isn’t surprising. An upgrade install might have old bloatware and startup programs running in the background.
We don’t encourage running a registry cleaner and smart users shouldn’t have to reinstall Windows on a regular basis. However, when you’re switching to a new operating system, it’s the ideal time to start things out on the right foot with a fresh operating system.

How to Clean-Install Windows

To perform a clean installation of Windows, don’t select the Upgrade option when installing Windows. Select the Custom: Install Windows only (advanced) option and select the hard drive you want to install Windows on. You can even perform a clean install with an Upgrade license. The Upgrade license just requires that your computer must already have a valid license for a previous version of Windows; it doesn’t require that you perform an Upgrade installation.
Be sure that you have backup copies of all your important files before performing a clean installation, as a clean install will wipe your system partition.

Linux-Specific Problems

Clean installs are also useful on Linux distributions. We’ll refer to Ubuntu in particular here, as it’s the most popular distribution, but much of this also applies to other distributions, such as Fedora.
Mark Shuttleworth, who created Ubuntu, recently wrote that “Upgrading today is possible, but to keep the system clean over multiple successive upgrades requires an uncommonly high level of skill with APT.”
In other words, problems can also occur when you upgrade your Linux distribution. A new version of Ubuntu may have dropped a particular package from the default system because it offers duplicate functionality, but such packages will not necessarily be removed from your system during an upgrade. If you have packages from third-party repositories installed, they may prevent you from upgrading. Various package dependency problems can occur and old configuration settings may not be overwritten properly with new default settings if you’ve customized them.
Just as old files, settings, and programs can persist on a Windows machine, the same thing can happen when you upgrade your Linux distribution.
There’s no doubt that Ubuntu’s upgrade process works much better than the upgrade process offered by many older Linux distributions, but it’s nowhere near perfect, as Mark Shuttleworth himself says.

How to Clean Install a Linux Distribution

When you see an upgrade notification, you don’t have to upgrade to the latest version of Ubuntu with the built-in too. You can download the Ubuntu installer from Ubuntu’s website and burn it to a disc (or put it on a USB drive) before installing the new version of Ubuntu over your previous version of Ubuntu.
As with Windows, you should ensure you have backup copies of your important files before installing the new Linux distribution over the previous Linux distribution.

The Previous Version Rule

Note that you can generally only upgrade from the previous version of an operating system. For example, you can upgrade to Windows 8 from Windows 7, but not from Windows XP. Likewise, you can upgrade to Ubuntu 12.10 from Ubuntu 12.04, but not Ubuntu 11.10 – although you could upgrade 11.10 to 12.04 and then upgrade it to 12.10, if you felt like living dangerously.

Upgrading is tempting, and upgrade installs are becoming more reliable with each new operating system version release. However, clean installs are still the way to go if you want a fresh system without clutter from previous versions of your operating system. A new operating system release is a good excuse to start fresh with a clean OS, anyway.

How to Install Software From Outside Ubuntu’s Software Repositories

ubuntu-software-center
On Linux, you install software from package management applications like the Ubuntu Software Center. But not every piece of software is available in your Linux distribution’s software repositories.
You should only install software from sources you trust, just like on Windows. Much of this advice also applies to other Linux distributions, so we’ll note what’s Ubuntu-specific and what’s Linux-in-general.

DEB Package Files

Ubuntu software packages are in .deb file format. This includes packages you download from the Ubuntu Software Center and with apt-get — they’re all .deb files.
However, you can also install .deb packages from outside of Ubuntu’s software repositories. Many companies that produce software for Linux offer it in .deb format. For example, you can download .deb files for Google Chrome, Google Earth, Steam for Linux, Opera, and even Skype, from their official websites. Double-click the file and it will open in the Ubuntu Software Center, where you can install it.
Ubuntu is based on Debian, which created the .deb package format. Other Linux distributions will have their own package format if they’re not based on Debian. For example, Fedora and other Red Hat-based distributions use .rpm packages. Many companies that offer software for Linux offer it in a variety of package formats for different distributions.

Third-Party Package Repositories

Ubuntu runs its own package repositories full of open-source (and some closed-source) software compiled and packaged for Ubuntu. However, anyone can set up their own package repositories.
Third-party package repositories are often added to your system seamlessly. For example, when you install Google Chrome or Steam from a .deb file, the .deb file adds the official Google or Valve software repository to your system. When the package is updated in the repository, you’ll be notified of updates and can install them via the Software Updater application. Unlike on Windows, updates for all your installed software can be managed in one place.
You can view your software repositories and add more (if you know their details) from the Software Sources application included with Ubuntu.
Other Linux distributions also support third-party repositories, but repositories and the software they contain are distribution-specific.

Personal Package Archives (PPAs)

PPAs are another form of third-party package repositories. They’re hosted on Canonical’s Launchpad system, where anyone can create a PPA.
PPAs often contain experimental software that hasn’t been officially added to Ubuntu’s main, stable repositories. They may also contain newer versions of software that aren’t yet considered stable enough to make it to Ubuntu’s main repositories.
For example, Ubuntu’s Wine Team offers a PPA with the latest releases of the Wine software for running Windows applications on Linux. To add it, you would add the following line to the Software Sources application above:
ppa:ubuntu-wine/ppa
Each PPA page on Canonical’s Launchpad website includes instructions for adding the PPA to your system. Once a PPA is added to your system, you can install packages from the PPA using standard software like the Ubuntu Software Center, Software Updater, and apt-get command-line tool.

Compiling From Source

All binary software is compiled from source code. Ubuntu’s .deb packages contain software compiled specifically for the release of Ubuntu you’re using. These applications are compiled to use the software libraries available for your Ubuntu release.
The developers of a particular piece of software generally release the software in source code form. Linux distributions take the source code, compile it, and create packages for you. However, you can also download a program’s source code and compile it yourself. You shouldn’t normally need to do this on Ubuntu. Most experimental software you might want is probably in a PPA, where someone’s already done the hard work for you.
On other distributions, it may occasionally be necessary to compile a program to get the latest version you need or install a program that isn’t available in your repositories. However, the average Linux user — and even many geeky Linux users — will never have to compile something from source.
Source code files are generally distributed in .tar.gz format, but that’s just a type of archive — .tar.gz files could contain anything, just like .zip files can.

Binary Programs

Some programs are distributed in binary form, not source code form. This may be because the program is closed-source and the program’s distributer doesn’t want to do the hard work of packaging it for various distributions.
For example, Mozilla offers Linux downloads of Firefox binaries in .tar.bz2 format. (.tar.bz2 is just another archive format, like a zip file.) You can download this archive, extract it to a folder on your computer, and run the run-mozilla.sh script inside it (just double-click it) to run the downloaded Firefox binary.
However, you shouldn’t do this in the case of Firefox. Use the Firefox package that comes with your operating system — it’s probably better optimized, faster, and will update through your standard package management tools. Still, if you’re using an older distribution of Linux that comes with an outdated Firefox, you can download the Firefox binary to your computer and run it from a directory without needing any system-wide permissions to install it.

Much closed-source software (particularly older, unsupported closed-source software) is distributed in unpackaged binary form. Software like the Linux ports of Doom 3, Quake 4, Unreal Tournament 2004, and Neverwinter Nights are distributed in binary packages and even have Windows-like installers. These installers are actually just programs that extract the game’s files to a folder and create application menu shortcuts.


Of course, there are other ways to install software on Ubuntu. The Zero Install (also known as 0install) project has been trying to change Linux software installation for over five years, creating a system for installing desktop software that works across all Linux distributions. However, the Zero Install project hasn’t gained much traction. Most Linux users are well-served by their Linux distribution’s package manager — particularly if they’re using Ubuntu, which most software is packaged for.

Access All of Your Streaming Music in One Place with Tomahawk


There are probably countless streaming media services that you use regularly – YouTube for music videos, and any number of websites for listening to streaming music and live radio. Forget using endless apps and website after website; Tomahawk lets you access everything in the same place.
Download a free copy of the application (it’s available for Windows, OS X and Linux), run through the installation and then start to configure the services you would like to use in conjunction with Tomahawk.
Click the Settings menu and select the Configure Tomahawk option. In the Services section, there are an impressive number of music and streaming sites for you to choose from – just tick those you are interested in using.

There are a number of familiar names here –Grooveshark, Spotify, YouTube et al – and while in some cases you can simply tick the box to activate the service in question, some require that you have an account already in place (a paid-for account in some cases).
However, there are plenty of streaming services that require no sort of account, and there is also the option of connecting the app to your social networking accounts so you can not only share your currently playing tracks with your friends and followers, but also discover new music by browsing through what they have been listening to.

Linking to Twitter, Jabber and Google Talk is not essential, but it does open up a new world of music discovery, so it is certainly worth considering.
It’s likely that you already have a sizable collection of music stored on your hard drive and network devices. Tomahawk is not just about listening to online music, it’s about being able to access anything you might want to listen to.
Move to the Collection tab and select the folders in which you have stored music files. If you have files stored in network locations, you’ll have to map these to a drive letter so that they can be accessed through Tomahawk.

When you’re happy with the settings you’ve put in place, click OK and you’re ready to start listening to music. You may have to wait for a while as your local music collection is scanned and cataloged – you can keep an eye on this in the My Collection section of the main page.

Searching for music in your own collection is easy enough; just head to the My Collection section and enter your search term in the Filter box. Playlist and song queues can be built up by right clicking on a track a selecting the Add to Queue option.

Things start to get more interesting when you incorporate online music services in your searches. To do this, you need to use the search box at the very top of the program window. Enter the name of a song, album, or artist and Tomahawk will scour your own offline music collection as well as the online repositories you have enabled.
If you have opted to link Tomahawk to Google Talk and Twitter, head to the Super Collection section and you can perform a search of the music collections of your contacts in addition to your own.

In addition to regular playlists, Tomahawk also offers the chance to create ‘radio stations’. These pull in tracks that match the search terms you specify, and there is scope to get very specific or leave things more open if you prefer.
Click the ‘Create new station link’ to the lower left of the program window and enter a name for the station you would like to create.  Now use the first drop down menu to choose the criteria that should be used to set up the station – this can be a particular genre of music, artists that are similar to each other, length of track and much more.

You can get more specific by clicking the + button to the right and specifying additional criteria.
The Browse section to the upper left provides an interesting way to discover new tracks and artists. ‘Charts’ lets you know what is proving popular at the moment, while New Releases can be used to browse through the latest additions to iTunes and Rovi from the same place.

Has the emergence of ever more online music services changed the way you consume music? What are your favorites? Share your thoughts and experiences.

Why Ubuntu Doesn’t Come With Support for MP3s, Flash, and Other Multimedia Formats

image
Most Linux distributions come without support for MP3 audio, H.264 video, Flash content, and even commercial video DVDs. Patents, closed-source software, and even laws that make certain types of software illegal restrict what can be included in a Linux distribution.
Linux Mint’s inclusion of such restricted software out-of-the-box was one of the things that made it so popular when it was first released. Even if this software isn’t included, it’s very easy to install afterwards.

Closed-Source Software

Most Linux distributions strive to only include open-source software. However, some of the software many people use every day is closed-source software. The Flash browser plug-in is a closed-source program made by Adobe. While Linux distributions could include the Flash browser plug-in if they really wanted to, they would rather only include open-source software. Closed-source software can’t be audited for security and patched in the same way, and Linux distributions don’t want to be stuck supporting it.
Flash isn’t the only piece of closed-source software omitted by default in most Linux distributions. This also applies to Oracle’s Java plug-in (luckily, Java is no longer used as much and there’s an open-source alternative), Google Chrome (which includes some closed-sourced components, so Linux distributions opt to include the open-source Chromium browser Chrome is based on instead), and proprietary 3D graphics drivers for NVIDIA and ATI graphics hardware (these enable better 3D acceleration support).

Patent-Encumbered Software

Many multimedia formats are patented. Even the most popular formats like MP3 for audio and H.264 for video are subject to a huge number of patents. Patent holders form organizations that pool their patents and extract license fees for distributing such software. Linux distributions don’t want to pay patent licensing fees every time they let someone download their software for free.
To avoid all this trouble, Linux distributions don’t include support for these patented media codecs. You can still use certain types of media formats out-of-the-box, including FLAC lossless audio, Ogg Vorbis audio and Ogg Theora video. That’s why included audio tools will default to OGG audio format, not MP3 files.

You can still install the patented codecs later, and they’ll be picked up by the included multimedia applications and used seamlessly.
At one time, Linux distributions didn’t even include support for saving images in GIF format because the LZW compression algorithm required to create GIFs was patented. Unisys, the patent’s owner, went after people generating GIFs without licensing the patent. Luckily, this patent expired in 2003 in the United States.
MP3 patents are expected to  expire by 2017 in the USA, at which time Linux distributions and other software can include MP3 support without paying license fees or making themselves vulnerable to lawsuits. Most software probably infringes on hundreds of silly software patents, but multimedia patent consortiums are particularly aggressive.

Illegal Software

Support for commercial video DVDs is likely illegal in the USA thanks to the DMCA. Support for Blu-ray and HD-DVD video discs would also likely be illegal for the same reason. These formats all include encryption, and bypassing the encryption without paying a license fee is illegal. Rather than try to hold your hand, Ubuntu just refuses to play video DVDs properly.
It’s also possible that distributing support for DVDs, Blu-rays, and HD-DVDs would result in patent problems, were it legal.

Getting the Restricted Stuff

Most Linux distributions leave users to install these closed-source, patented, and otherwise restricted pieces of software after the initial installation process. Historically, you might install a distribution like Mandrake or Fedora and immediately hunt down a third-party software repository like the PLF (Penguin Liberation Front) or RPM Fusion, add the repository your system, and install the restricted software from there. Linux distributions didn’t want to help you install this software or even host it.
While Ubuntu doesn’t include these packages out-of-the-box, they’re easy to install. When you install Ubuntu, there’s a single checkbox you can click to automatically install Flash, restricted codecs, and other software.

Most of this stuff is available in the Multiverse repository, which is officially hosted by Ubuntu – although it’s considered “not free” and is  not officially supported. This allows you to install this software via normal package-management tools – you can even install the Ubuntu restricted extras package to quickly install the most commonly used restricted software later.

Ubuntu will also prompt you to install this software when necessary. If you visit a website that uses Flash, try to play a video or audio file you need a codec for, or have a graphics card that can benefit from a closed-source hardware driver, Ubuntu will prompt you and guide you through the installation process.

Support for commercial video DVDs is the one place Ubuntu falls flat and doesn’t hold your hand, as distributing support for playing DVDs could be a crime in various countries. Ubuntu’s wiki points you to a single script you can run to install support for video DVDs – the script downloads the required software from elsewhere, saving Ubuntu the legal troubles of hosting it on their own servers. The wiki advises that installing the libdvdcss software may be illegal in certain countries, which is another way Ubuntu is trying to protect themselves.

Installing Flash and various codecs used to be a pain point for new Linux users, who often had to learn about unofficial software repositories before they could play MP3s. This has improved dramatically in recent years, although support for many types of media formats still isn’t installed by default.