Monday 26 August 2013

Change Hostname on uBuntu - Quick & Easy

Here's a quick and simple four step guide to changing your computers hostname on uBuntu.

1. In the terminal enter:  

sudo gedit /etc/hostname  

2. The file should be an empty text file. Save the file with the hostname you'd like to set.

3. In the terminal enter:  

sudo /etc/init.d/hostname.sh start  

4. Reboot.

Tuesday 13 August 2013

Rename Files in Bulk uBuntu

Short and sweet tutorial to install a mass-renaming tool with a GUI.

1. sudo apt-get install gprename

2. gprename

This should open the gprename GUI where you'll be able to scroll to your folder then rename as many files as you want within seconds.

Sunday 14 July 2013

How to install a Tar.gz file (or Tar.bz2 file) Easily

1. Extract your file into a folder such as your documents.

2. Read the Install text or Readme to see if there are any specific instructions or requirements for your package.

3. Make that directory your central directory using the cd command in the terminal.

For example, for one extracted in your documents.

cd /home/username/Documents/YourExtract

4. Run command: ./configure 

This should also tell you if there are any dependencies which are required to be installed.

5. Run command: make 

6. Run command: sudo make install

Tuesday 25 June 2013

Find a File by its Contents (uBuntu Contents Search)

So you can find a file by it's name pretty easily using Nautilus but how do you search for it's contents?

Enter the following code in the terminal:
grep -lir "search text" /path/to/directory
And it'll return a list of files containing your search terms within them.

Sunday 9 June 2013

Extracting/Unzipping a Zip Archive with .z01 Files

This is what you do when you've got a bunch of rar files, one ending in .zip then .z01, z02 etc.

1. Open up the terminal.
What we're going to do is compile all those weird .z01 files into one easy to open .zip file - which we'll then unzip via the command line.

2. Enter the following commands, replacing example with your file name.

cat example.z01 example.zip > example2.zip

unzip example.zip 


3. And there you have it - you should have your file!

Tuesday 28 May 2013

How To Require a Username at Login

I've always kind of liked the extra security that came with having to enter your username as well as your password at login. It also, I find, looks better.

Here's how to do it.

1. Open the following file in a text editor...

/etc/lightdm/lightdm.conf

2. Simply Add the following lines...  

greeter-show-manual-login = true 
greeter-hide-users = true 
allow-guest = false

3. Save, restart and see the effects!

Monday 27 May 2013

An Idiots Guide to Installing Truecrypt Quickly and Easily in uBuntu 12.04+

So Truecrypt isn't available in the software centre any more which is a bit of a pain but it's one of those bits of software you can't really do without.

Not to worry.

1. Open up the terminal and type:

For 32bit systems...

wget http://www.truecrypt.org/download/truecrypt-7.1a-linux-x86.tar.gz

Or for 64bit systems...

http://www.truecrypt.org/download/truecrypt-7.1a-linux-x64.tar.gz

2. Extract it... 

tar -zxvf truecrypt*.gz

3. And install it... 

sudo ./truecrypt-7.1a-setup-x86  

And your done!

Sunday 28 April 2013

Determine the size of each individual file in a folder from Terminal: ls -l

So for some reason you've got a folder with loads of files in it and you want to find out their contents using the terminal. The solution is quite easy.

1. Enter sudo -i & your password to prevent any annoying permission denied messages.

2. Enter ls -l /home/yourname/folder or whatever the path to your folder is. 

And that's it. Easy.

Quickly Cut and Trim Any Video File

So you've got this video file that's taking up a lot of space. You've noticed it's 2-3 hours long but really you only need 20-30 minutes of it. This is going to show you how to chop it up.

Open the terminal and enter this command, changing (00:15:00 -t 00:45:23) to whatever length you're looking for and original.mp4 & output.mp4 as appropriate.

ffmpeg -acodec copy -vcodec copy -ss 00:15:00 -t 00:45:23 -i original.mp4 output.mp4

So that command above would take the original.mp4 file and create a smaller output.mp4 file consisting of original.mp4's 15 minute mark to 45 minute 23 mark.

If you prefer a GUI can also do this using AviDemux available from the software centre but from my experience this takes a longgg time (it needs to build the file - or something) whereas in the terminal it takes a matter of seconds.

Monday 22 April 2013

How to play a Video with a Vorbis.acm (vo3+) Audio Codec - uBuntu 12.10

Lately I've been getting the following error when trying to play video files:

"No suitable decoder module: VLC does not support the audio or video format "vo3+". Unfortunately there is no way for you to fix this."

We'll see about that.

It's an audio codec problem (duh) and the absent codec is vorbis.acm, which if my casual Google searches are correct is a Japanese codec.


My initial thought was simply install the codec but I found a faster method. However, it's available here, if you're willing to go that route.



But here's what I did (this should take about 20-25 minutes)

1. Install Avidemux from the software centre.

2. Open the file and rip the audio.

   Open -> File (Open the video file with the vo3+ audio)

   Audio -> Save (This'll rip the audio to a location of your choosing)

It's a good idea to save the audio in Home to make the next step easier.

3. Download ogmtools (available from software centre) and run ogmdemux.

   ogmdemux -nv -v /home/username/sample.ogg (or wherever your file is located)

(-nv because there's no video stream, -v to show the process in terminal)

The output file should be in your home folder, regardless of where the input file was.

4. Install Sound Converter from the Software centre.

So by now you should now have a working audio file still in .ogg format.
All that's left is to tack it back to the original video.

Open the audio file in Sound Converter then go

   Preferences -> Type of Result -> mp3

Then hit convert. This should take a few minutes depending on how big your file is and the quality you want it to be in. Afterwards you should have a working .mp3 audio file.

5. Last step - Open Avidemux again then open the video file.

   Audio -> MP3-Lame (Drop down menu - Change from Copy)

Now this time from the top menu:

   Audio -> Main Track -> External Mp3 -> (Select mp3 File)

Finally:

   File -> Save -> Save Video

And you should now have a video file with working audio.

Sponsored Links

Wednesday 13 March 2013

Change Background of Login Screen in uBuntu 12.10

Annoyed and bored with the same standard login screen? Here's how to turn it into one of your own images.

1. Open the Terminal

2. Type sudo -i and enter your password.

3. Type xhost +SI:localuser:lightdm

4. Type sudo su lightdm -s /bin/bash

5. Type gsettings set com.canonical.unity-greeter draw-user-backgrounds 'false'

6. Type (replacing imagelocation.jpg with the location of your chosen image) gsettings set com.canonical.unity-greeter background '/imagelocation.jpg'

7. Type gsettings set com.canonical.unity-greeter draw-grid 'false' to remove the dotted lines uBuntu that appear.

Restart uBuntu and you should be good to go!

Friday 1 March 2013

How to Adjust Launcher Icon Size

You can adjust the size of the icons on your uBuntu 12.10 launcher.

1. Click the Control Gear in the top right hand corner.

2. Select "System Settings"

3. Then "Appearance" under "Personal".

4. In the Look tab it should display your desktop background.
At the bottom drag there should be a slider "Launcher Icon Size" which will allow you to change the icon size.

Tuesday 26 February 2013

Disable Unnecessary Startup Applications

A simple one, more of a reminder than an instructional.

1. Open Startup Applications from the Unity dashboard.

2. Select the applications you no longer want to run and select Remove.

3. You can also use Boot Up Manager to disable unnecessary services and applications by putting

sudo apt-get install bum

into the terminal.

Saturday 9 February 2013

Solution To A Text-Based Script That Won't Run

So you've downloaded (or created) a script in the form of a text file but you can't seem to run it. Here's a possible solution.

In the folder containing the script:

1. Edit - Preferences
2. Go to the tab Behaviour and check Run executable files when they are opened.

Now go back and try to run your script and it should work.

Thursday 7 February 2013

One Simple, Easy Fix for Smoother HD Videos in VLC


I'm been having problems playing HD videos in VLC player recently, the main ones being tearing lines and flickering.

But I've found a simple fix.

1. Go to Tools then Preferences

2. Change "Show Settings" in the bottom left corner from "Simple" to "All"

3. Open "Input/Codecs" and go to "Video codecs" then x264

4. Enable "Skip loop filter"

And hopefully your HD videos will start playing smoothly.

Tuesday 5 February 2013

How To Sync an IPhone in Ubuntu

I've recently switched back to using uBuntu after a long period of Windows Vista. So far I still love it, even the sidebar which I wasn't too keen on to begin with has grown on me. The only real problem I've had has been syncing my beloved iPhone. It was a bit of a struggle but I eventually solved it. If your struggling with it as well hopefully this post will save you the same struggle.

Ways that won't work #1: Media players on uBuntu (Banshee, Rhythmbox...) I saw a few articles sayin you can finally update your iPhone in 12.10 with these players but I haven't managed it. Yes, it connects and yes they recognise the device as containing music. You can play the music from the device, I was even been able to delete some tracks but for some reason you can't sync it. You should probably give this a go anyway. It takes about five minutes and if it works then aren't you lucky. You've made me slightly jealous.

 Ways that won't work #2: iTunes with playonlinux
playonlinux is a program that allows you to run various Windows programs on uBuntu, among which is iTunes. So far so good but the problem is iTunes isn't going to recognise your device. As far as I know there's no way to work around that.  

Here's How I Did It...

So far I've only found one method that works but it's not painless. The good news: you can finally update your iPhone. The bad news: you'll need a Windows OS install CD, a memory stick and a sizeable chunk of free disk space. If you don't have these then sorry, the rest of my post isn't going to be of any use to you.

1. Install VirtualBox from uBuntu software centre. VirtualBox is basically allows you to run Windows within uBuntu. Imagine having a computer running Windows within uBuntu. This is actually a pretty handy application if you need to run Windows programs on a regular basis. Install whichever operating system you want to use with the boot disks.

2. Install the VirtualBox extension from their website. You'll need the extension so that VirtualBox will recognise external devices. This should only take a couple of minutes.

3. Find somewhere to put your music. You can't access your files in uBuntu through VirtualBox which means you have to find a means to transfer them. I've been using a memory stick. The device only connects to one OS at a time so don't load Windows while you're still transferring your files to your memory stick or it'll mess up.

4. Install iTunes, add your music and update. Go online, find and install iTunes (or install it from a device, whatever is easiest for you), transfer your library and now finally you can sync your iPhone. I hope that helps you and if you've read this laughing to yourself because you know a far better way then please do tell me.

How to Block a Website Using the Hosts File in uBuntu

If you’ve ever wanted to block a website more comprehensively than a Firefox add on then this might be for you.

1. Hit Alt + F2 to bring up Run.
2. Type the command:
gksu gedit /etc/hosts
3. To block the website add 127.0.0.1 then the website. Tab to create the space, if you were wondering.
127.0.0.1 facebook.com
127.0.0.1 http://www.facebook.com
4. Save and you’re done. Obviously, you can always go back and remove those lines if you want to use those sites again.