Categories
Linux Ubuntu Uncategorized

Linux Mint: “Could not download all repository indexes”

When running

sudo apt-get update

or attempting to update via the Update Manager in Linux Mint (13), I was fronted with the following error:

Failed to fetch http://packages.linuxmint.com/dists/deb ... tion-en_US Unable to connect to packages.linuxmint.com:http:
Failed to fetch http://packages.linuxmint.com/dists/deb ... slation-en Unable to connect to packages.linuxmint.com:http:
Failed to fetch http://packages.linuxmint.com/dists/deb ... tion-en_US Unable to connect to packages.linuxmint.com:http:
Failed to fetch http://packages.linuxmint.com/dists/deb ... slation-en Unable to connect to packages.linuxmint.com:http:
Failed to fetch http://packages.linuxmint.com/dists/deb ... tion-en_US Unable to connect to packages.linuxmint.com:http:
Failed to fetch http://packages.linuxmint.com/dists/deb ... slation-en Unable to connect to packages.linuxmint.com:http:
Some index files failed to download. They have been ignored, or old ones used instead.

This is caused by missing repositories which are either old, broken or currently down. In order to fix it, simply run:

sudo apt-get update fix-missing

If this option doesn’t work, try changing the repository mirrors with the following guide.

Categories
Fedora HowTo Linux Ubuntu

Team Fortress 2 Segmentation Fault – Steam for Linux

After getting invited to join the Steam Beta for Linux, (after weeks of using the bypass) I decided to get playing some TF2. After the long install and download I booted it up. The Value splash screen with the tap-guy loads and the menu begins to load, but once it has finished, the game closed and returned to my desktop.

So I tried again, but this time ran steam through terminal in order to get some error messages. The following is what I found to occur when the game crashed:

response: CrashID=bp-ca59d62f-9c2b-47e4-8cd9-9d0b02121212
/home/alex/Steam/SteamApps/username/Team Fortress 2/hl2.sh: line 72: 4811 Segmentation fault ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 440 "Team Fortress 2", ProcID 4811
saving roaming config store to 'sharedconfig.vdf'
roaming config store 2 saved successfully

To fix it, there’s a pretty simple solution. This is to add the option “-nojoy” to the launch options of the game:

  1. Right click Team Fortress 2 in the Library pane of Steam.
  2. Click “Properties”.
  3. Click “Set Launch Options”
  4. Add the following: -nojoy
  5. Hit OK and launch the game, everything should be working!

If you’re running Fedora, some folk have found another solution to this fix, if the previous doesn’t work:

sudo setsebool -P allow_execheap 1

Where it seems SELinux isn’t allowing the game to start for whatever reasons.

 

Categories
Command Line HowTo Linux Ubuntu

HowTo: Restore Your Default .bashrc File in Ubuntu

If you’ve managed to find yourself deleting, overwriting or generally messing up your profiles .bashrc file there’s a really easy way to fix it. A default version of the file can be found under “/etc/skel/.bashrc”, simply coping that over your profiles one (found in your home directory) will restore it to default. Make sure to also source the file if you want to continue using it under that terminal or close and re-open the terminal.

I managed to have a blank bashrc after upgrading Ubuntu with a separate /home partition, while deleting all the old config files I must have also removed this.

The following commands should do this for you, be sure to make a back up of your current .bashrc file too, just to be safe.

cp ~/.bashrc ~/.bashrc.bkup
cp /etc/skel/.bashrc ~/
source .bashrc

You should be now back to a default terminal experience and continue to customise it how you like!

Categories
HowTo Linux Ubuntu

mlbviewer 2012 Installation guide for Ubuntu (MLB.TV on Linux)

Download mlbviewer:

Go and grab the latest version from the sourceforge page below:

http://sourceforge.net/projects/mlbviewer/

Unrar:

tar -zxvf mlbviewer2012.tar.gz

It doesn’t require any installation but you will need a few extras and the easiest way to install them is shown below:

Download PyXML:

PyXML is an XML processing tool for python which this project uses, sometimes it can be tricky to install python modules so we’ll be using setuptools which you can get from the link below.

If you’re unsure of what version you need, open terminal and type “python”, this will show the version of python you’re running. Mine was 2.7.4 so I downloaded “setuptools-0.6c11-py2.7.egg” I would imagine yours would be similar.

http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other

Once you have it, run it (replacing the version you downloaded for the one here):

sudo sh setuptools-0.6c11-py2.7.egg

Now to install PyXML it’s as simple as running:

sudo easy_install pyxml

That’s it, you’re done.

Optional – Install MPLAYER2:

MPLAYER2 offers at lot of advantages over MPLAYER however we’re most interested in it because it offers better streaming support and handle stream rate switches (important if you enable adaptive streaming in nexdef mode).

sudo add-apt-repository ppa:motumedia/mplayer-daily
sudo apt-get update
sudo apt-get install mplayer2

(Thanks to – Web Upd8)

Optional – Install mlbhls (for nextdef | HD):

Instructions as per in REQUIREMENTS-2012.txt in the mlbviewer package.

You’ll also need some extra packages which aren’t stated:

sudo apt-get install libconfig-dev libcurl4-gnutls-dev
svn co https://mlbtv-hls-nexdef.googlecode.com/svn/branches/experimental mlbhls
cd mlbhls
make
sudo cp mlbhls /usr/bin

Once that’s done, you should be able to get the higher bitrate streams too!

Using mlbplayer:

Setup:

The first time you run mlbviewer it will generate a config file which you’ll need to enter your Premium MLB.TV account details in, running mlbviewer will tell you where this file is located:

python mlbviewer.py

Go edit the file and enter your email as the “user” and your password after “pass”.

Now re-run mlbviewer and it should start up!

python mlbviewer.py

Sit back and enjoy!

Categories
Command Line Linux Ubuntu

Ubuntu 12.04 – Removing conflicting operating system files…

If you’re trying out the latest version of Ubuntu, 12.04 or Precise Pangolin and you want to keep your old /home partition, chances are you’ve come across the installation hanging on a process “Removing conflicting operating system files…”. No worries, this seems to be a common bug and there’s a pretty easy work around.

Continue with the installation, without asking for the /home partition to be mounted. Only set the root partition (/) and your swap space.

Once the installation is complete, reboot and load it up.

Now, you’ll want to find the partition that /home is mounted under, this will likely be /dev/sdxN, where x is the drive letter and N is the partition number (i.e mine is located under /dev/sda5).

If you’re unsure, you can list the possible drives using the following command:

ls /dev/ | grep sd

And then you can mount each drive under in a temp directory and check what’s in there:

mkdir temp
mount /dev/sda1 temp

Once you know which partition you want, it’s time to edit your /etc/fstab/

sudo gedit /etc/fstab

For those who don’t go digging around in the config files of linux, this may look pretty daunting, but it isn’t. All you really need to do is add a new line to mount your home partition. Here’s mine:

/dev/sda5	/home/		ext4	defaults	1	2

The first part is the partition that’s being used, next what the partition is. Next is the file system type. Followed by default options and then the dump and pass values.

Once you’ve saved this file with the appended line, reboot your system. Now you should find your old home partition is mounted normally and you can get on with your install.

Categories
Featured Linux Ubuntu

Toggle Touchpad With Keyboard Shortcut in Ubuntu

Install Jupiter

Instructions for Ubuntu 11.10, 11.04, 10.10, 10.04: http://www.webupd8.org/2011/09/jupiter-applet-finally-available-for.html

sudo add-apt-repository ppa:webupd8team/jupiter 
sudo apt-get update 
sudo apt-get install jupiter

Jupiter comes with a useful script to disable and re-enable the touchpad/track pad, it can be ran using the following command:

sudo /usr/lib/jupiter/scripts/touchpad

Now all you’ll need to do is add this command to a keyboard shortcut, below are instructions for several desktop environments.


In xfce:

Applications > Settings > Settings Manager

Click Keyboard

Click on the “Applications Shortcuts” tab.

Click Add:

Here you will be promped with a new window asking for the command you wish to run, enter the following:

sudo /usr/lib/jupiter/scripts/touchpad

Click OK and it will now ask for a keyboard shortcut. Simply press the key combination you want to assign to disabling the touchpad (for example, I used Alt+F1) the keys you’re pressing will show up and the window will close.

You’ll now see the command and shortcut in the list and you can now press that key combo to disable the trackpad and press it again to re-enable it.


In Gnome:

In Unity:

bish bash bosh.

Categories
Arch Linux Fedora HowTo Linux Posts Ubuntu

Setting Up Surround Sound in Linux

It’s been a while since I bothered, the reason being it’s always seemed like an un-worthwhile struggle to get it working but either things changed or I was doing something to overcomplicate the process but it’s actually pretty simple to get surround sound up and running on your Linux machine. Now, I’m not going to go in to how to install the drivers for your specific sound card, because there are so many and I don’t have them all and most times on most popular distributions (Debian, Ubuntu, Mint, Fedora, OpenSuse etc) you’re going to notice that the sound card is actually already supported. What I will be doing is showing you how easy it was to get my 5.1’s set up (and the same will be said for 7.1’s).

Step 1:

First off you’re going to want to edit the pulseaudio configuration file to add the number of speakers you’re using, it’s default is set to 2.

sudo gedit /etc/pulse/daemon.conf

Near the bottom of the file, there will be a line which looks like this:

;default-sample-channels = 2

The semi-colon is a comment, so this line isn’t actually doing anything unless you remove that. I would suggest leaving that line alone and adding a new line at the bottom:

default-sample-channels = 6

If you’re using 5.1’s the number of channels will be 6, 7.1’s will be 8 and I think you get where I’m going with this? So in this example, I’m using 5.1’s.

Now save and close that file. You’ll need to reboot your system now too, so that these changes will take effect.

Step 2:

So you’re back? Good..

Now you’re going to want to open up the Sound Preferences, usually you can do this by clicking on the little sound icon in your panel, or System > Preference > Sounds from the menu.

From here, you’ll want to click on the Hardware tab. Near the bottom it’ll say Profile: with a drop down box next to it. Here you can select the type of set up you have, as you can see in the screenshot I have an “Analogue Surround 5.1 Output”, yours might be different and that’s cool and if you don’t know feel free to try a few out. Next to that drop down box is a button which says “Test Speakers”, this didn’t work for me so I have to use an online test but give it a try as it might work!

That’s it, you should be done!

Categories
Android Posts

Android 4.0 (Ice Cream Sandwich) First Look / Impressions

It’s only been a couple of weeks since the first batch of Ice Cream Sandwich (ICS) loaded phones were released, the Samsung Galaxy Nexus, but already custom ROMs are being updated to allow users of other phones to use ICS.

Luckily for me, a Samsung Galaxy S (I9000) owner, development for this widely popular phone has been going strong for a while. Custom ROMs from Darkys ROM to CyanogenMod allow for quicker Android updates with much better features and a lack of Samsung’s bloat-ware.

So it seems the next version of CyanogenMod (CM9) will be ICS based and keeping up with the SGS development “Teamhacksung” have started porting over the new version which will soon become the latest version CM9. It’s still in its early stages and there are a few known bugs which need to be sorted but they’ve released a ROM for public testing.

After a day or so of testing, everything feels smooth and finished, it seems to be much more user friendly in comparison to previous iterations of Android. It’s kind of like they’ve realised it’s not just linux geeks using Android any more and it actually has a pretty large market share and they had to re-design it to be for everyone.

New Features:
Home Screen:

The home screen hasn’t changed dramatically and still follows the 4×5 grid of icons and widgets.

The biggest and in my opinion most needed change here though is the relocation of the search bar, no longer is the search bar a widget but it now sits directly under the notification bar and remains constant on all home screens. This clears up an extra row for other icons and widgets but doesn’t over crowd the place.

When editing the home screen icons and widgets (long pressing on one of them), the Remove section replaces the static search bar at the top of the screen. Additionally while editing some widgets, such as the Calendar, allow for resizing, by framing the widget with a blue border with dots in the centre of each which can be dragged to change the length or width of the object. It’d be good to see this as a standard across all widgets even if setting limits was also done.

Folders are still here and they are a bit more awesome, to make a folder you simply drag one icon on to another and they bunch up. Clicking on the bunch opens up a pop up with all the icons in.

App Drawer:

The app drawer is now 4×5 screens which can be switched left and right between, still organised alpabetically. Now however going past the last page of apps brings you to a list of widgets which can be held down on to drag to a home screen. The app drawer also has a quick link in the top left to the market place.

It’d be great to see more customisation here, allow for constant flow of apps from left to right rather than in pages or alternatively up and down scrolling.

Multi-tasking:

Multi-tasking is made much simpler in this iteration of Android, holding down the home button brings up a vertical list of running applications. Clicking on one will take you back to the app at its last used screen and also gives you a preview of the screen you’ll be heading back to. Sliding the appliaction left or right however will close it. This is a much simpler way for non-power users to understand what’s going on and might help them control over the occasional lag which can come about when you have too many applications open. It also really makes switching between two applications a breeze.

Settings:

The settings menu have been cleaned up dramatically and now provide a lot of the useful settings at a much easier level. Things are grouped rather than a huge list of things and are generally much easier to understand.

Face Unlock:

One of the biggest new features to this version is the addition of Face-recognition to unlock your phone. unfortunately because the current ROM used to review this doesn’t have a very stable front facing camera driver it wasn’t really working in my tests.

Essentially you hold the camera in front of your face for a few seconds while it calibrates to your data and then when you unlock your screen the camera will start up and it should only take a second to detect your face and unlock, if it fails it has a fail safe which allows you to also enter a pin or pattern to unlock.

Two main issues arise, firstly as pointed out by the setup, the fact that people with similar faces will be able to unlock your screen, so don’t expect that your siblings can’t frape you. Also a picture of your face would also work, since it’s not 3D detection a photograph will also work for unlocking your phone.

Screenshots:

Screenshots are built in to this verison of android (it really made this review easier ;)) Just hold down the Volume Down button and Power button at the same time, a second or so and the screen will flash and it’ll save a screenshot in a folder on your phone.

Browser:

The browser has had a few tweaks including the way tabs are handled.

Overall it’s a nice clean update, I can’t say the difference between honeycomb since I don’t own a tablet but I’m sure this will be a welcome change to both phone and tablet users.

Gallery after the jump..

Categories
Android Posts

How To Take Screenshots in Ice Cream Sandwich (Android 4.0.x)

Android 4.0 or Ice Cream Sandwich (ICS) finally brings screenshots natively to the mobile platform, to a lot of users of custom ROMs such as CyanogenMod or Darkys ROM it may seem like this has been a feature for a while but that isn’t the case.

To take a screenshot:
  • Simply hold down the Volume Down button and Power button for about a second.

 

You’ll see a flash and the screen will be framed which shows the screenshot was taken (I’ve tried grabbing a screenshot of this screen, but it’s pretty tricky and no luck yet!). The screenshot will be saved in a folder /Pictures/Screenshots on your phones internal SD card.

You’ll also get a new notification in the notification bar saying “Saving Screenshot…” and once it’s done there’ll be a “Screenshot captured.” notification in the pull down menu which will take you directly the screenshot in the Gallery.

For more screenshots, check out my first look and impressions post about ICS!
 HERE
Categories
Command Line Fedora Linux Posts Ubuntu

Linux USB Errors with usb-creator-gtk “stdin: I/O error stdin: error 0 /init: line 1: can’t open /dev/sr0: No medium found”

After installing Ubuntu on a USB stick with the Ubuntu USB Startup Disk Creator (usb-creator-gtk) you might encounter an error such as the following:

stdin: I/O error
stdin: error 0
/init: line 1: can't open /dev/sr0: No medium found

This is actually a bug with the software and isn’t anything you’ve done wrong. It seems to be a bug that’s effecting users running Karmic, Lucid, Maverick and Natty so it’s a pretty wide spread issue.

The best way I have found to get around this issue is to install and run unetbootin to create live USBs. If you’re using linux it should be found in the usual place you can install things.

Installation:

Ubuntu/LinuxMint/Debian:

sudo apt-get install unetbootin

Fedora/OpenSuse:

sudo yum install unetbootin
Create a live USB:

To install a distro it’s pretty simple, either select it from the “Distribution” option and pick a distribution and version, UNetbootin will then actually download it and install it for you. Alternatively you can pick an Diskimage and browse for the ISO file you download (and would usually burn to a CD/DVD) and install from that. Select the USB Drive at the bottom and hit ok and it’ll install a bootloader, the system and you’ll be up and running in no time.

Persistence File:

If you wanted a persistence install which allows you to save files, settings and installed programs you’ll have to do a little manual work as it currently doesn’t support that option.

Go to http://unetbootin.sourceforge.net/diskimg/ and download one of the files (128mb.zip, 256mb.zip, or 512mb.zip) corresponding to the amount of persistent space you want (make sure the size of the persistent disk image is smaller than the free space you have on your USB drive).

You’ll then need to edit the syslinux.cfg file that was created by UNetbootin in the root of the directory (just open it with a text editor) you should see something similar to the following:

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash —

So on the line that starts “appen initrd=” you’ll want to add the option of “persistent”, it should then look like the following:

NOTE: WordPress changes my double dash at the end of the last line to a single long dash, this won’t work. It’s easiest just to add the final word before the double dash in the file, do not copy and paste this in to your file. If you do, you will get more errors.

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent —

I added this line to all that used the “file=/cdrom/preseed/ubuntu.seed” option, since that’s the image that’s being opened and it should then change all options on the bootloader that will load the ubuntu install.