Cleaning up unwanted files in Ubuntu

This is based on a tutorial found on the Ubuntu forums here and is a summary of the steps needed. For more explanation see the origina; 🙂

1. Go to System>Administation>Synaptic Package Manager

2. Click the Status button (bottom left) then click Residual config.

3. If anything comes up in the right hand window, select it and Mark for Complete Removal, then click Apply.

4. Click on All, then on any name on the right hand side. Type localepurge and check whether it is installed or not. If not, install it. When it install it asks you for your locale. I selected en-uk – this is the locale that it will leave on my system, getting rid of anything else.

5. Do the same for the deborphan package.

6. Open a Terminal and type: sudo apt-get autoclean

7. Type: sudo deborphan | xargs sudo apt-get -y remove –purge

Advertisements

How to get all those missing codecs and DVDs working, pt 1

[Don’t try this a home – not working at the moment]

I found this great little script called EasyUbuntu here. From their site, it says:

EasyUbuntu is an easy to use (duh!) script that gives the Ubuntu
 user the most commonly requested apps, codecs, and tweaks that are not
 found in the base distribution - all with a few clicks of your mouse.
EasyUbuntu is so easy to use in fact, that even your grandma could
 be playing encrypted dvds, streaming Windows Media, and sporting the
 latest Nvidia or Ati drivers in minutes! And yes, EasyUbuntu is GPL.
EasyUbuntu works on (X/K)ubuntu and on all the three architectures (x86, AMD64 and PPC).

Installation is as simple as downloading the deb file from here and following these steps:

1. Add the Medibuntu repository as shown in an earlier post here

2. Click on the download link and when you are given the choice, open the download with gdebi package handler. This will install the software easily.

3. Go to Applications>System Tools>Easyubuntu to run it.

And it doesn’t work 😦

 

What to do if an installation fails in Ubuntu

If you stop an installation half-way through, a lock file is created that prevents you from installing anything else. Before you can try again you need to manually unlock the download cache.

1. Open a root terminal and type nautilus /var/cache/apt/archives

2. Right click on the file called lock and delete it

That should sort the problem out.

Getting extra codecs to work in Ubuntu 7.10

Adding Repositories

The extra codecs that you might need for some media files are found in a repository containing a mixture of free and non-free software, i.e. software that has no available source code.

Open a Terminal and type:

sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

Then:

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add – && sudo apt-get update

Then:

sudo apt-get install w32codecs

Non-Native Media Formats

More detail can be found here.

Powered by ScribeFire.

Setting up NFS Server in Ubuntu

The idea of a NFS server appeals to me as not only will it allow native Linux shares (not relying on Samba) but will also allow me to centralise home directories and hopefully create true roaming profiles. Essential tools in a server’s armoury. I am working from tutorials found at ubuntuguide here and ubuntugeek here.

NFS Server

The first thing I need to do is set up the NFS server module on the server machine.

1. Type sudo apt-get install nfs-kernel-server

2. Type sudo dpkg-reconfigure portmap and it asks whether I want to bind to loopback and I select no. It then informs me I need to restart the service.

3. Restart using sudo /etc/init.d/portmap restart and it restarts beautifully.

Configure the NFS Server

1. As I don’t have a gui on the server, I’m going to try the work from Webmin.

2. I click on Networking>NFS Exports

3. I have no idea which NFS version I have installed so I’ll leave the 4 box ticked. Under Directory to export, I type /gary to try and make a network-wide home directory for myself. I assume I’ll have to make this directory manually, but I live in hope so I’ll continue with this export definition and see what happens.

4. I notice that It is Active and exported to Everyone – not sure about everything else in this category so I’ll leave it alone.

5. Under Export security, I tick No for Read-only (I want to be able to write to my home directory).

6. I don’t understand anything else so I’ll leave it all alone and click Create at the bottom of the screen.

7. As I guessed, It says directory does not exist. Ho hum. OK. I’ll go to File Manager and create it before trying again.

8. I create a new directory /export and then another in there, /gary. While I’m here I also create directories for my other users.

9. Back to NFS Exports and repeat 3-6. Mmmm – try something else, I delete the /export in NFSv4 Pseudofilesystem and add /export/gary to Directory to export. Check No for read-only and then click Create. This seems to work, the directory has gone green in file manager.


Installing the NFS Client

1. Back on my desktop, I open a terminal and type sudo apt-get install portmap nfs-common

2. Now to try and mount the share in my home directory. I type sudo mount 192.168.1.8:/export/gary /home/gary and it tells me permission denied. Drat!

3. I change the permission of the folder to 077 (all write) and the group to users and it still does not work.

Another Share method

From here, I’m going to try:

1. Go to File Manager in Webmin

2. Edit the file /etc/exports and add the line /export/files 192.168.1.1/254(rw,no_root_squash,async)

3. This shows up in Webmin’s NFS Exports as Network 192.168.1.1/254 as the Exported to.. entry.

4. Just going to create that directory first and then see if I can edit the /home/gary entry to reflect the network line.

5. Oh, and test it:)

6. Right, under the files Export tab, the Export to… field is set to IPv4 = 192.168.1.1 and Netmask = 254. So, I’ll change to the same values for the home share. That wasn’t accepted as it said 254 isn’t a valid netmask (which it’s not) but that is what it shows for the files export .. huh? I’ll also turn off the Clients must be on secure port radio button.

7. Let’s go and have a look at /etc/exports again. I’ll manually change the line to match the ‘files’ line, i.e. add 192.168.1.1/254(rw,no_root_squash,async) instead of (rw)

Finally! A Method that works!

I deleted all my previous attempts at adding Export shares under Webmin and went to create a new one with the following settings:-

1. NFS Version = 3
2. NFSv4 Pseudofilesystem.. = blank
3. Directory to export = /export/files
4. Active = Yes
5. Export to = IPv4 Network, IP = 192.168.1.0, Netmask = 255.255.255.0
6. Security level = None
7. Read-only = No
8. Clients on secure port = No
9. Disable subtree checking = No
10. Hide the filesystem = No
11. Immediately sync all writes = Yes
12. Trust remote users = Everyone

All other settings are default. Now when I sudo mount 192.168.1.8:/export/files /home/gary/files – it works!

I have just found out that NFS doesn’t validate users, just the hostnames or IPs of the workstations connecting to the server, so quite how I’m going to use it to centralise home directories, I don’t know yet.

Installing my Epson D78 in Ubuntu Gutsy

Download the Driver

After googling, I found a driver here that’s supposed to work. I downloaded the package but noticed that it is an RPM and not a DEB. So I’m going to have to learn how to convert it.

Converting the RPM

1.      Open a Terminal and type: sudo apt-get install alien

2.      Convert with: sudo alien –scripts gutenprint-5.0.1-1lsb3.1.i486.rpm

3.      This leaves the following file: gutenprint_5.0.1-2_i386.deb

Install the Driver

1.      dpkg -i gutenprint_5.0.1-2_i386.deb. This tells me that it installs well and has restarted cups.


Ubuntu install

1.      Go to System>Administration>printing.

2.      Click on New Printer

3.      Click on Windows Printer via Samba (my printer is connected to a Windows box).

4.      Then I click the Browse button to hunt for the printer. Once I have navigated to the printer and clicked OK, then I click on Forward.

5.      Mmm – I can’t find gutenprint, wonder where it’s gone to?

6.      OK, so I went to the normal list of printers under Select Printer from Database I choose the Epson D68 (being the model under mine, I assume) and when I go forward …  there is Gutenprint. Choose a driver and print a test page – piece of cake.

Powered by ScribeFire.