Sylvarwolf Linux Blog

Trials of a Linux Newbie

Receiving Podcasts in Gnome on Ubuntu 7.10

gPodder

1. Open a root terminal and type aptitude install gpodder

2. Type in the URL of the podcast feed in the bottom left window and there you go, it really couldn’t be easier.

I thought getting podcasts might be a little trickier but that is all there is to it! :D

Powered by ScribeFire.

November 25, 2007 Posted by sylvarwolf | linux, podcast, ubuntu | , , | No Comments Yet

Partitioning, Mount Points and other Gems in Ubuntu 7.10

Power Cuts

Two days ago we had several power cuts that completely managed to scrag my hard drives in logan and cerebro (the Fileserver), Ho hum… Time for a re-install, I guess. Good job the data on the file server was on a separate hard drive. Having done some research since the first install, now might be the time to add some security to the systems by utilizing several partitions to protect the data. The idea being that if the system goes down I can work on that and configuration as well as user data remains safe.

Partitions? Why bother?

When Ubuntu installs, it sets itself up in one large partition and up to this point I have used the Guided – Use Entire Disk option. So why use separate partitions for some of the installation? Well, I figure there are several advantages. It goes like this:

Partition Use

/ The root (/) partition stores the core system files and apart from some small additions and re-compiles will remain relatively fixed. Being separate from everything else should give it extra security.

/usr This directory holds user tools, compilers and other stuff. This will surely grow as I add stuff and being separate will allow easier and more secure re-installs.

/var This directory holds the log files, spool files and other stuff that changes a lot. Giving it a partition all to itself, it means that a runaway system generating loads of data will fill this small partition up rather than taking over the whole system. There is a type of system attack that generates millions of log entries with the aim of toileting free space so a separate storage space for these files seems a really good idea.

/tmp Temporary files could also possibly grow beyond belief, so that same logic applies here.

/home
Placing the home directories on their own partition prevents users from filling up the hard drive and enforces a primitive form of quota management. This will have to do until I can figure out how to get home directories on the server.

The Plan

Logan has a 250 Gb hard drive and that gives 236 Gb to Linux. During the installation process, I choose Manual rather than either of the Guided partitioning systems. The first step is to delete the suggested partitions before setting up my own plan.

/ 25 Gb
swap 3 Gb
/usr 50 Gb
/home 50 Gb
/var 50 Gb
/tmp 72 Gb

On reflection I might change the home directory to 72Gb and reduce /tmp to 50Gb.

Mount Points

As you set the size of a partition (25000 for 25 Gb, for example) the dialog asks for a mount point and doesn’t offer me any choices. A Mount Point is a directory in the file system where the new partition is going to live, so all I’ve got to do here is type in the directory names listed above for each partition.

All have been set up and I click the go button, the rest of the system install flawlessly. Brilliant!

Powered by ScribeFire.

November 25, 2007 Posted by sylvarwolf | Desktop, gutsy, linux, ubuntu | , , , , | 4 Comments

Installing the ePSXe Playstation 1 emulator in Ubuntu

Legal Note

Based on a tutorial I found here, I had the following results. This is the legal note that accompanies the tutorial:

Legal note: The installation and use of this emulator requires a Sony Playstation BIOS file. You may not use such a file to play games in a PSX emulator if you do not own a Sony Playstation, Sony PSOne or Sony Playstation 2 console. Owning the BIOS image without owning the actual console is a violation of copyright law. You have been warned. Do NOT ask in this thread, or message me, where to find the BIOS file or game images. Any such messages will be ignored and possibly reported.

This procedure will not work without a copy of the Playstation BIOS. The normal way to get one is to use the Action Replay cartridge and a cable to copy the ROM onto your PC.

Download Files

1. Open a root terminal and type:

2. aptitude install unzip

3. cd ~

4. mkdir ePSXe_install

5. cd mkdir ePSXe_install

6. wget http://www.epsxe.com/files/epsxe160lin.zip

7. wget http://www.pbernert.com/gpupetemesagl176.tar.gz

8. wget http://www.pbernert.com/gpupetexgl208.tar.gz

9. wget http://www.pbernert.com/gpupeopssoftx117.tar.gz

10. wget http://www.pbernert.com/spupeopsoss109.tar.gz

11. wget http://www.pbernert.com/spupetenull101.tar.gz

12. wget http://www.pbernert.com/gpupeopssoftsdl116.tar.gz

12. wget ‘http://www.ngemu.com/download.php?action=plugin&id=99′

13. wget http://members.chello.at/erich.kitzmueller/ammoq/down/padJoy082.tgz

Install the Software

1. export EPSXE=’/usr/local/games/epsxe’

2. mkdir $EPSXE

3. unzip -d $EPSXE ~/ePSXe_install/epsxe160lin.zip

I had a problem with this line. Until I realised that my root terminal set the home directory (~) to be /root and not /home/, so I changed it to /home/gary and it worked.

4. aptitude install libgtk1.2-common libgtk1.2

5. Apparently that should do it for 32-bit Ubuntu, but for 64-bit users the rest of the instructions can be found here in the original article.

Configuration

1. cd $EPSXE

2. chmod 777 cfg sstates snap memcards

3. touch memcards/epsxe000.mcr memcards/epsxe001.mcr .epsxerc

4. chmod 666 memcards/*

5. chmod 666 .epsxerc

6. tar xfz /home/gary/ePSXe_install/gpupetemesagl176.tar.gz -C $EPSXE/plugins/

7. tar xfz /home/gary/ePSXe_install/gpupetexgl208.tar.gz -C $EPSXE/plugins/

8. tar xfz /home/gary/ePSXe_install/gpupeopssoftx117.tar.gz -C $EPSXE/plugins/

9. tar xfz /home/gary/ePSXe_install/gpupeopssoftsdl116.tar.gz -C $EPSXE/plugins/

10. tar xfz /home/gary/ePSXe_install/spupeopsoss109.tar.gz -C $EPSXE/plugins/

11. tar xfz /home/gary/ePSXe_install/spupetenull101.tar.gz -C $EPSXE/plugins/

12. tar xfj /home/gary/ePSXe_install/omnijoy-1.0.0-beta2.tar.bz2 -C $EPSXE/plugins/

13. tar xfz /home/gary/ePSXe_install/padJoy082.tgz -C $EPSXE/plugins/

14. cd $EPSXE/plugins/

15. mv cfg* ../cfg/

16. mv *.cfg ../cfg/

17. chmod 666 ../cfg/*.cfg

18. cd /home/gary

19. rm -rf ePSXe_install

Remember to always change to gary to your username :)

Create a Startup Script

1. gedit /usr/local/bin/epsxe

2. Add the following code:

#!/bin/bash

export EPSXE=’/usr/local/games/epsxe’
export LD_LIBRARY_PATH=$EPSXE
cd $EPSXE
./epsxe
chmod 666 $EPSXE/cfg/*.cfg $EPSXE/sstates/* $EPSXE/memcards/*.mcr $EPSXE/snap/* 2>/dev/null

3. Save and close

4. Type: chmod 755 /usr/local/bin/epsxe

5. You should now be able to start the emulator by typing epsxe

Setting up the Emulator

The author then says:

  • In the menu, open “Config -> BIOS”, and set it to
    /usr/local/games/epsxe/bios/SCPH1001.BIN, click OK. (You must find and
    obtain ths file yourself. Once you have a copy of it, put it in
    /usr/local/games/epsxe/bios/)
  • Open “Config -> Video”, and select either “Pete’s MesaGL Driver
    1.76″, “Pete’s XGL2 Driver 2.8″ or “P.E.Op.S. Softx Driver 1.17″. Click
    configure, then OK to write a config file. Verify that it is working by
    clicking the Test button, then OK. (Which one you use depends on your
    computer.)
  • In “Config -> Sound” select “P.E.Op.S. OSS Audio Driver”,
    Configure, then OK. Verify that it is working by clicking the Test
    button, then OK. (The “NULL” driver are for those few games that just
    don’t seem to work with sound. Or if you have a slow computer, and
    figure you don’t care for the sound.)
  • In Config -> CDROM, set the path to your CD/DVD-ROM. In most
    cases it should be /dev/cdrom but in my case /dev/hdc. You can check
    your path by typing “mount |grep cd” in a console.
  • In Config -> Game Pad -> Pad 1 menu, you can set up the
    controls with the keyboard. If you have a real controller, use the
    “Config -> Ext. Game Pad” option, and pick either omnipad or padjoy,
    click configre, and set your buttons where you want them.

Failure

Well, it didn’t work for me. Another project then – try and find out why not….

Powered by ScribeFire.

November 15, 2007 Posted by sylvarwolf | emulator, linux | , , , | 3 Comments

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

October 31, 2007 Posted by sylvarwolf | linux, ubuntu | , | No Comments Yet

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.

October 29, 2007 Posted by sylvarwolf | linux, ubuntu | , , | No Comments Yet

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.

October 27, 2007 Posted by sylvarwolf | gutsy, linux, server, ubuntu | , , , , , | 2 Comments

Getting a Hostname to work on a home Dynamic IP system

Registering with DynDNS

The first step in giving my server a web-wide recognisable presence given that the ISP allocates the router a Dynamic IP is to register for a free account at DynDNS. This I do and once configured I should be able to reach my Apache website at http://sylvarwolf.homelinux.com. Cool, huh?

Command Shell on Webmin

Back on the server, I type in:

apt-get install ipcheck

Then click on Others>File Manager and navigate to /etc/ppp/ip-up.d/. I create a new file in this directory by clicking New and name it dyndns_update in the requester that pops up. Then paste in the following code:

 	#!/bin/sh

 	USERNAME=myusername
	PASSWORD=mypassword
	HOSTNAME=myhostname.dyndns.org

 	cd /root/
	if [ -f /root/ipcheck.dat ]; then
		ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
	else
		ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
	fi

replacing “myusername” and “mypassword” with my unique username and password. Also, replace the HOSTNAME field to the domain I have chosen, i.e. sylvarwolf.homelinux.com.

Then back to the Server’s CLI, and I type

chmod 700 /etc/ppp/ip-up.d/dyndns_update
sh /etc/ppp/ip-up.d/dyndns_update

This returned ‘update successful’ for me – more good stuff. Then

apt-get install ddclient

The only confusing thing that the install asked me was for the interface that would be used. I guessed that it would be the NIC that my 
internet connection was on, so I chose eth0.

Testing the URL

Testing is simple, just type http://sylvarwolf.homelinux.com into my browser and wait. It returns a very boring webpage but one that comes from my server. So Apache is working as well. Yay! All done.

 

October 24, 2007 Posted by sylvarwolf | Apache, dyndns, linux, server, ubuntu | , , , , | No Comments Yet

Installing Ubuntu Server 7.10 (Gutsy) on the Fileserver

Installing from CD

I downloaded the 7.10 Server CD and burnt it. Booting from it gave me a text based installation. All standard stuff. At the end of the installation I chose LAMP, SSH and Samba servers as additional modules to add on.

Testing the network

I then used ping to test the LAN and make sure that the Server was allocated an IP from the Router’s DHCP. ping 192.168.1.1 showed the Router alive and ping www.google.com showed Internet connection working.

Updating

I then used sudo apt-get update to update the package list and sudo apt-get upgrade to upgrade/update my installation. Only two packages were selected :)

All is going well so far, the next step is to get Webmin installed.

Webmin

As I was going to be doing a lot of ‘root’ work, I set up a root password using sudo passwd root and then logged in as root. To prepare for installation of Webmin I had to download and install the required support libraries, which I did with:

apt-get install openssl libauthen-pam-erl libio-pty-perl libmd5-perl

Peace of cake. The library libnet-ssleay-perl is no longer available. What to do? I found here that the version should be 1.30-1 – so it should be available. A bit of googling later and I found a download link for this version. So I typed:

wget http://ftp.fi.debian.org/debian/pool/main/libn/libnet-ssleay-perl/libnet-ssleay-perl_1.30-1_i386.deb

to download the packages and dpkg -i libnet-ssleay-perl_1.30-1_i386.deb to install it. Phew! That was close – didn’t think I’d get it going.

Then to get Webmin, I used:

wget http://garr.dl.sourceforge.net/sourceforge/webadmin/webmin_1.350_all.deb

To install Webmin, I used dpkg -i webmin_1.350_all.deb and, as promised, it said:

Webmin install complete. You can now login to https://Server:10000/ as root with your root password, or as any user who can use sudo to run commands as root.

“Server” is the name that I chose to call the server – now nobody said that I was imaginative! ;) Then, I noticed from the Webmin site that the latest version was 1.370 (d’oh!) so I am going to have to update it once I get in. I should have downloaded webmin_1.370_all.deb instead.

Anyway, trying to access Webmin across the LAN using https://server:10000 failed with a ’server not found’ message. Wonder what the IP of the server is?

Hmmm… A small bit of research later and I am no wiser as to what linux CLI command will tell me! Ho hum. Ah yes – log on to the Router and look in the DHCP client list to see which IP has been allocated to Server. Got it – it’s 192.168.1.8.

Updating Webmin

Typing https://192.168.1.8:10000 into a browser (Firefox) takes me to the login page and I can log straight into Webmin – yay! Now this is already one step further than before with 7.04 Feisty. Webmin opens up with some system details and a menu to the left. Clicking on Webmin in that menu and then Webmin Configuration I can choose Upgrade Webmin (Webmin>Webmin Configuration>Upgrade Webmin). I leave the “Latest version from www.webmin.com” selected and click the Upgrade Webmin button. It downloads and installs successfully. At the bottom of the page Webmin tells me that there are 1 updates for this version and I follow the click here link to download it. It is the acl (Access Control List) module and it donwloads and installs flawlessly. Now that was easy. Just to check, I click on System Information in the main menu and it tells me that I am indeed running 1.370. Success.

Samba file sharing

1. I go to Servers > Samba Windows File Sharing.

2. Then, I click on Create a New File Share and fill in the details as follows: Share name = public, Home Directories Share = unselected, Directory to share = /home/public, Automatically create directory = yes, Create with owner = root, Available = yes, Browseable = yes, Share comment = Fileserver stuff.

3. To make sure everybody has got permissions to this folder/share, I click on Others>File Manager and navigate to /home. Damn, Firefox tells me I have to download a plugin, now I know have Flash installed so I am guessing it is either Shockwave or Java, prob. Java. OK, let’s do it. Yup – it was Java.

4. I click on the Info button and check Read, Write and List boxes are ticked on User, Group and Other columns.

5. Lastly, I’ve got to make sure the configuration file is saying the right things. So I navigate to /etc/samba and click on smb.conf and then Edit. A little Java applet window pops up and I can edit the file here – cool, huh? So, what am I looking for? Looking for ; security = user I can now change it to ; security = share.

6. Now I can scroll down to the end of the file, and change:

[public]
comment = Fileserver stuff
path = /home/public

to be:

	[public]		
		comment = public		
		path = /home/public		
		public = yes		
		writable = yes		
		create mask = 0777		
		directory mask = 0777		
		force user = nobody		
		force group = nogroup

I then click on the Save & Close button. Phew - nearly there.

Windows Workgroup

Right. To check I am going to be part of the same Workgroup as trhe rest of my LAN, I click on Servers>Samba Windows File Sharing>Windows Networking in the Global Configuration section. Here I can set the Workgroup to MSHOME and click Save. That should be it – now to test the share from Windows…

Nah – it is asking for user name and password to get into the share and it shouldn’t do that. Interestingly, from another Linux box I can write to this directory – no problem. Hmm a small problem to solve. I shall be back.

Solution Found

Another dumb mistake easily solved. In the instructions above, you should notice a line in the smb.conf file that now reads ” ; security = share “. Remove the semi-colon at the front of the line! It all works beautifully now.

Job done. :)

October 23, 2007 Posted by sylvarwolf | Webmin, gutsy, linux, samba, server, ubuntu | , , , , , | 4 Comments

openSuse installs well, but what about Samba?

Laptops finally installed

Each of the two laptops have openSuse 10.2 installed on them. Amazingly, after they both rejected the other distros (and the HP pavilion rejected XP), they are both running openSuse well. OK, the slower laptop is a bit kludgy, but less kludgy than it used to be with Windows installed (which for some reason won’t go back on!).

Laptop 1 (the Toshiba Tecra) was an interesting install. The setup window was only two-thirds visible on the screen. In order to get to the Accept/Cancel buttons at the bottom of the screen, and therefore invisible, I had to press TAB and then Return – hoping that I had hit the right button. After several amusing, finally frustrating, attempts it installed very well. The graphical stage setup at the end of installation allowed me to set the screen resolution and even the screen ratio perfectly. I am very impressed with the result.

File Server Resurrected

After removing the 120 Gb drive, the old FS only had 80Gb left, but Suse 10.2 installed on it with no problems at all. I do notice that Suse uses a Reiser file system for formatting its partitions rather than ext2 or ext3 that Ubuntu used. This is still rather a mystery to me – what are the differences/advantages? Dunno yet.

How do I configure Samba in openSuse?

Ah yes, the system I learned from the Micro Mart magazine for Ubuntu did not, of course, work. So, I started browsing through the ‘Computer’ menu. This is the sequence that I have tried so far.

  1. Select Computer>More Applications…
  2. A window pops up with sections corresponding to the old familiar menus. I went to the System section and selected YaST (Administrator Settings).
  3. Enter the root password for Administrator privileges.
  4. Click on Network Services, which shows you two entries on the right hand side that have got to be important. Samba Server and Windows Domain Membership. Sounds easy so far.
  5. Click on Samba Server. It starts up, showing the Shares Tab.
  6. Reading the help bit on the left sidebar, I click on the Filter button and ‘Do not show System Shares’.
  7. That leaves me with two entries: /home/groups and /home. Mmmmm..
  8. I flick back to the File Browser and create a Folder in my home directory called ’smbshare’ that I intend to share and return to the YaST program.
  9. OK, so next I go for the ‘Add…’ share button.
  10. It wants a Share Name – I call it Share, a description – ‘Windows files’, leave the Directory radio button ticked and Browse for the Path.
  11. Leaving the other options unchanged, I clilck OK and return to the Shares Tab (Damn, I’ve got to select the filter again to clear the list), and there is my Share. I also put an X in the box to allow users to share their directories with other users. I’m hoping that enables the Linux machines to talk to each other.
  12. Click on the Start-up Tab and select start the service during Boot and Open Port in Firewall.
  13. On the Identity Tab, I set Workgroup as ‘MSHOME’ – the name of the Windows Workgroup the rest of my LAN is used to operating in. I also leave the Domain Controller section set to ‘Not a PDC’ as we’re just using workgroups and no domain serving.
  14. I’m not sure about the NetBIOS settings or any of the Advanced settings so I leave them alone. Phew!

Windows Domain Membership

  1. Domain or Workgroup is set at MSHOME. Wel, that’s got to be good.
  2. I then click Browse, expecting to see my workgroup listed, and disappointment strikes – nothing!
  3. On closing, it informs me that Samba-Winbind has to be installed, so I agree.

Well, that flummoxed me. Obviously, something is not working. In true Windows style, let’s try a Restart. ;)

 

September 30, 2007 Posted by sylvarwolf | linux, samba, suse, ubuntu | , , , , , , , , | 2 Comments

Linux on a FLash Drive?

This sounds cool!

These people not only have their own distribution (Pendrivelinux), but show you how to install Ubuntu from a 1Gb Flash Drive. Out of sheer fascination I’m going to have to give this a go…

Powered by ScribeFire.

September 30, 2007 Posted by sylvarwolf | Live CD, linux, pendrivelinux | , , , | No Comments Yet