Archive for the ‘HowTo’ Category

HowTo: Take Untethered Screenshots in Froyo

With the latest update of Android “Froyo”, it’s now possible to take screenshots/screen captures without the need to be plugged into a computer, mess around with the Android SDK or Root your phone. You are easily able to take screenshots of the home screen and while in any app. I have only been able to test this with a Samsung Galaxy S (I9000-GT) running

Froyo so comment on your results.

Here’s how to take a screenshot in Froyo:

Hold down Back and then press the Home button.

You should now see a pop-up near the bottom saying “Screen captured. Saved as image file” as in the following image. The files will be saved to a folder named ScreenCapture in your home directory as a .PNG.

By holding down the Back button it doesn’t actually go back if held down, it waits for you to press Home. After a few seconds of holding it down however(I can’t quite figure it out) pressing Home will continue the “going back” operation as if the Back button was tapped.

The list of sources could not be read – Ubuntu

E: Type ‘n’ is not known on line 2 in source list /etc/apt/sources.list.d/bean123ch-burg-lucid.list

E: The list of sources could not be read.

To fix this or similar errors open the file, for example “/etc/apt/sources.list.d/bean123ch-burg-lucid.list” and check for rouge characters. In this case there was new line with the letter ‘n’ in place, removing it solved the issue. Make sure to run “sudo apt-get update” to refresh the sources and everything should be fixed. I was also unable to see any software in the “Ubuntu Software Center” because of this.

HowTo: Fix “Briefly unavailable for scheduled maintenance. Check back in a minute.”

After installing an update to WordPress I received the error:

“Briefly unavailable for scheduled maintenance. Check back in a minute.”

I was unsure if this was down to my hosts servers being temporarily down, going down during the update or if WordPress had simply failed to update whatever it was updating. Turns out it was the latter and it’s really easy to fix, first log on to your ftp, file manager or whatever for your hosting and browse to your wordpress install, in the root of this there should be a .maintenance file, just delete this and everything should be back to normal. Once back in the WordPress dashboard you may be asked to reinstall whatever failed however sometimes it will have completed the install and just not managed to delete this file.

HowTo: Find Recently Used Commands in Linux

One of my most used commands in Linux is the history command, it lists all your recent commands. The problem with this is you might have to scroll through hundreds before you get to one of any interest, so adding grep to search through these and bring back only relative one’s is great.

Give it a try (just change searchcriteria for what you want like apt-get or tar):

history | grep searchcriteria

Manual pages:

HowTo: Fix Can’t Click on Flash in Ubuntu (64bit)

There is a pretty quick fix for not being able to click flash on websites such as YouTube, just simply add the line below into the following file and restart your web browser and all should be fine:

sudo gedit /usr/lib/nspluginwrapper/i386/linux/npviewer

Add in the line (above the last line):

export GDK_NATIVE_WINDOWS=1

HowTo: Install BURG in Ubuntu Lucid (10.04)

BURG if you didn’t notice is GRUB backwards and actually stands for “Brand-new Universal loadeR from GRUB” which was probably decided a while after picking the letters.. Basically though it’s a much nicer looking alternative to the very dated looking GRUB bootloader.

Installation

Until only recently it’s seemed far too much hassle of installing something which only gets displayed for a couple of seconds at boot and isn’t seen again unless something goes wrong, but now that a PPA has been created for it (for Lucid anyway) it seems like its worth the very little bother.

First add the PPA:

sudo add-apt-repository ppa:bean123ch/burg

Now type the following to install the loader, emulator and some themes:

sudo apt-get update && sudo apt-get install burg-pc burg-themes burg-emu

You’ll be prompted to do some configuration settings in order for it to install, for these I just hit enter for each with the default to options however make sure to double check!

Now that’s done try rebooting and you should now see a slightly different screen? If so you can get on to tweaking it to get it to look even nicer :)

Tweaking

Themes:

When on the new shiny bootloader hit the ‘T’ button to load a new popup menu which allows you to toggle between themes without the need to restart so pick a favourite (mine are Radiance and Sora Clean.)

Clean Up The Boot List:

If you’re like me and have a bunch of old kernels still cramming up your boot screen you might want to get rid of them, it’s easy enough just make sure to note down your current version and the older versions which you can see on the loader (the newest version will have the highest number). My versions were 2.6.32-22 and 2.6.32-21, so I wanted to remove the later and here’s how to do that:

Open Synaptic Package Manager (System-> Administration->Synaptic Package Manager)

search for the version you want to remove (eg mine was 2.6.32-21) right click on the checked ones and “Mark for Complete Removal”, if you are at all unsure about which version to remove it’s probably best you just leave it or ask someone to check.

Now in order to update BURG to notify changes have been made, run:

sudo update-burg

Set the BURG Screen Resolution:

Very simple to do, note down your screen resolution (you should be able to find that under System->Preferences->Monitors under Resolution) now you want to edit the following file and change the default size to the one that matches your screens.

sudo gedit /boot/burg/burg.cfg

Find the following line and replace the 640×480 with your resolution (for example I had to change mine to 1440×900)

set gfxmode=640×480

Save and close this file and you should be done.

If you want to try customising BURG more or if you’re having some problems you should check out their very useful help page:

https://help.ubuntu.com/community/Burg

Update:
Over at OMG! Ubuntu! they have found an even nice looking theme, so make sure to check that out: link

HowTo: Run .jar files in Ubuntu

To run a JAR file from the command line in ubuntu using the following command:

java -jar filename.jar

Otherwise it is also possible to enable double clicking to run jar files too by the following simple steps:

  1. Find the .jar file in the File Browser (a.k.a Nautilus)
  2. Right click the .jar file > Properties
  3. Click on the “Open With” tab along the top
  4. Change the bullet to be Sun Java 6 Runtime
  5. Click Close and you’re done.

Now you should be able to just double click the file and it will run just like most other files!

HowTo Fix: The file ‘/path/file.exe’ is not marked as executable.

The file ‘/path/file.exe’ is not marked as executable.  If this was downloaded or copied form an untrusted source, it may be dangerous to run.  For more details, read about the executable bit.

While re-installing Spotify on my Desktop I came across this error while trying to run the .exe through wine (shown above) and here’s a really simple way of fixing it:

  1. Right click the .exe
  2. Properties
  3. Under the Permssions tab make sure “Allow executing file as program” is checked
  4. Click Close and you should be able to now run it through wine..

HowTo Fix: “There is a problem with your sound card. Spotify can’t play music.” (Wine)

Quite a few times I have encountered this problem, which I think is caused when the soundcard was recently used by another program and might still be busy but it means Spotify can’t play music, so a quick fix for this is to load winecfg and test your sound card which seems to force wine into tacking control of the it.

  1. Close Spotify
  2. In terminal type winecfg
  3. Click on the Audio tab (should be in the top middle)
  4. Click “Test Audio” and if you hear a sound this should work..
  5. Re-open Spotify and check a track, if it’s playing it’s worked otherwise you may have a different issue..

HowTo: Stop Ubuntu Checking For Automatic Updates

At work I can’t afford to have my Ubuntu system update and possibly wipe out some important libraries I need, and I get pretty tired of closing the Update Manager every time it decides I need to update so here’s how to stop it:

  1. System > Administration > Update Manager
  2. Open Settings (in the bottom left corner)
  3. Under Automatic Updates
  4. Uncheck “Check for updates: “
  5. Hit Close and the settings should be saved.