Tag Archive for 'linux'

SSH Shared-Key Setup - SSH Logins Without Passwords

SSH is a great tool for remotely accessing another machine, but entering your password every time you log into a remote box can be a pain if you would like to set-up some background scripts to connect to a server and do something (i.e. a backup script running as a cron job). Here’s how I set-up my Mac to be able to log into my server without the need for a password to be entered each time - the instructions should be good for any variant of Unix/Linux, but you need to take into account path names etc. on your machine.

Continue reading ‘SSH Shared-Key Setup - SSH Logins Without Passwords’

Getting Your DVDs Onto Your Mac/iPod/iPhone

I’d looked at Handbrake a while back but the GUI was far too confusing for a simpleton like me. It seems like it’s been cleaned up quite a bit now and looks rather useful! (The little video giving an overview of how to work things helps too!)

Handbrake is one of those applications that we adore here at TUAW HQ. It makes converting DVDs into a variety of digital files a snap (though only use it with DVDs you own. Don’t be pirates, kids). Chris Breen, of Macworld fame (and an amateur astronomer it would seem) shows us how to use HandBrake like a pro. Breen goes a step beyond ‘use the presets’ and delves into what many of the options HandBrake offers up actually do, and how they impact your files.

via

Install phpPgAdmin on Ubuntu 7.10

Update: These instructions have been tested and work fine in the latest version of Ubuntu (8.04, Hardy Heron).

phpPgAdmin is a web based GUI for administrating a PostgreSQL database server.

Here’s some quick notes on getting it installed easily on Ubuntu 7.10…

In the terminal enter the following:

$ sudo apt-get install phppgadmin

This will set up and install all of the phpPgAdmin packages. It will also set-up and configure Apache and php5 for you too if you haven’t installed these already.

Next we need to create a symlink to phpPgAdmin so that Apache can find it:

$ sudo ln -s /etc/phppgadmin/apache.conf /etc/apache2/conf.d/phppgadmin.conf

Now if you navigate to http://localhost/phppgadmin you should be greeted with the phpPgAdmin screen. If your user account has a PostgreSQL account however, you will be logged in automagically.

Optionally, if you would like to be able to use the phpPgAdmin interface as the default ‘postgres’ administration account,1 you will need to do the following2

$ sudo gedit /usr/share/phppgadmin/conf/config.inc.php

Now find and change the following line

$conf['extra_login_security'] = true;

to

$conf['extra_login_security'] = false;

Save and close gedit. Now all you need to do is restart Apache.

$ sudo /etc/init.d/apache2 reload

Now if you head on over to http://localhost/phppgadmin all should be ready for you.


  1. I am assuming here that you have set-up your PostgreSQL server using my set-up instructions and therefore have a password protected ‘postgres’ account and that logins require passwords. 

  2. Please make sure you have read the above footnote and understand the security implications of allowing this type of access to your database server - if you have not secured your administration accounts, do it now! 

Mount ISO Files With Nautilus

Here’s two short bash scripts that allow you to mount and unmount an ISO image easily within the right-click menu in Nautilus (the file manager in Gnome):

$ sudo mkdir /media/ISO
$ cd ~/.gnome2/nautilus-scripts/
$ gedit "Mount ISO Image"

Now paste this code into the file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo mount -o loop -t iso9660 $I /media/ISO
done
done
exit0

Save, and exit gedit.

$ gedit "Unmount ISO Image"

Then paste this code in this file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo umount $I
done
done
exit0

Save, and exit gedit. Now finally…

$ chmod a+x *

Now you can mount and unmount ISO files by using the ‘Scripts’ options in the right-click menu. :)

Thanks to the Ubuntu Blog for the information.

Installing Apache and PHP Troubles

I just recently set Apache up on my home server (more on the server at some point in the future), but I was having problems serving up php pages. Every time I tried to access a php based page, Firefox came up asking if I wanted to download a ‘.PHTML’ file!!! :(

Thankfully the answer (like most things with Ubuntu) was found on the Ubuntu Forums

Simply edit the file /etc/apache2/apache2.conf by adding the following line:

AddType application/x-httpd-php .php .phtml

Now php files should be handled by the server in the way that they were intended.

Creating New Accounts in PostgreSQL

Getting a new account set up on PostgreSQL is a simple process…

Create our new user:

$ sudo su postgres -c createuser daz

Then you have to give this new user role a name (I called it daz), and then say ‘y’ to the question “Shall the new role be a superuser?” if you want the user to be an administrator.

Give the user a database password (this does not have to be the same as their unix password):

$ sudo su postgres -c psql
postgres=# ALTER USER daz WITH PASSWORD 'mypassword';
postgres=# \q

Finally, give the new user a database to play with:

$ sudo su postgres -c createdb daz

Pretty straight forward… :)

Install PostgreSQL on Ubuntu 7.10

If you are using the latest version of Ubuntu (8.04 - Hardy Heron), you might find these slightly updated instructions useful.

This quick walk-through are my notes for installing the PostgreSQL database server and the PgAdmin administration application on Ubuntu Linux, and also set up the server so it allows access to other PC’s on your network.

Before we move on, this guide was tested on the current release of Ubuntu Linux, (7.10 - Gutsy Gibbon) and PostgreSQL 8.2, but it should also be applicable to older versions (of Ubuntu and PostgreSQL) and other Debian based distros.

Continue reading ‘Install PostgreSQL on Ubuntu 7.10’

EVE Online for Mac/Linux on Tuesday

Ohhhh, I always fancied looking at EVE. Now all I need to do is get the PhD thesis out of the way and I might have enough time to look into it. :)

The official EVE Online site has details of upcoming patch ‘Revelations 2.3’. Along with a number of bug-fixes to the PvP-focused Massively Multiplayer Online Game, this game fix will offer up compatibility with Mac OS X and Linux. Though the Mac client is a native port, Linux will require the used of Cedega. The post suggests that if you’d like a preview of what the game will be like on your rig, you can download the client and tool around the test server. System requirements are also listed, as are the distributions of Linux they are specifically supporting: Ubuntu 7+, Suse 10+, and Linspire 6.

via

Installing VMware Tools on Ubuntu Gutsy

I’ve just started to play about with the new Ubuntu (7.10 - Gutsy), I have to say that I quite like it - I was a big fan of Feisty and all other Ubuntu releases previously, so this is more of the same good stuff.

As I’m working with VMWare Fusion, the first thing that needs to be done is install the VMWare Tools. This is quite simply done with the following lines in the terminal once you have started your VM and mounted the tools image (Virtual Machine > Install VMWare Tools in the menu):

1
2
3
4
5
6
7
sudo aptitude update
sudo aptitude install build-essential linux-headers-$(uname -r)
cp -a /media/cdrom/VMwareTools* /tmp/
cd /tmp/
tar -vxzf VMwareTools*.gz
cd vmware-tools-distrib/
sudo ./vmware-install.pl

The just accept all of the defaults for the installation package.

Cheers to Ubuntu Tutorials for the info.