« August 2008 | Main | October 2008 »

September 28, 2008

Hidden Linux : Bypassing automatic updates


The problem with installing non-standard packages in auto-updating distributions is that you need a way of telling the package manager what you've done. Last time I showed you how to keep up to date with the latest OpenOffice.org releases, but that has an unfortunate side-effect. Here's how it looks in Kubuntu:



Adept Notifier thinks you've missed an update, and will tell you so if you click the icon:



The way around it in Ubuntu and other Debian-based distros is to edit /etc/apt/preferences, but before doing that, install apt-show-versions so you can list what packages the system thinks need updrading. (This step isn't essential. I just find it a convenient way of listing packages on the console.)

sudo apt-get install apt-show-versions

Now enter

apt-show-versions -u

for a list of upgradable packages.



The /etc/apt/preferences file requires three things: the Package, a Pin and the Pin-Priority in this format
     Package: <package name>
Pin: <pin definition>
Pin-Priority: <pin priority>

with each entry separated from the others by at least one blank line.

Package is quite straightforward. Pin and Pin-Priority are a little more complicated (for the full explanation check out man apt_preferences). For our purposes, simply regard Pin as "pinning" the package to a particular version number. And we'll just set Pin-Priority to "1001" which means "never replace this package".

Start up the editor (sudo nano /etc/apt/preferences) and enter the following;
 Package: openoffice.org-calc
Pin: version 2.4*
Pin-Priority: 1001
Save the file and check again with apt-show-versions -u. You'll see the prompt to upgrade OOo Calc has disappeared. Now add the other upgrades listed by apt-show-versions -- don't forget the blank line in between entries -- and the problem's solved. (Adept Notifier may take a little longer to catch up with your changes, but if you click it you'll learn there's nothing to upgrade.)


<--Previous Hidden Linux      Next Hidden Linux -->

September 22, 2008

Hidden Linux : Unadulterated OpenOffice.org

A number of distributions mess around with OpenOffice.org and release their own versions. The reasons vary. According to OOo, "Some distributions have strict policies around licensing, which means they have chosen to disable parts of OpenOffice.org which rely on software which does not meet their criteria (e.g. the Fedora rpms have disabled the parts of OpenOffice.org which require Java)." Personally, I prefer the unadulterated version. Not only do you get all the features, but you can also upgrade the moment the latest release is out and not have to wait for your distro's package maintainers to catch up.

In Ubuntu, the first step is to remove the existing packages. The quickest way to do so is to open a terminal session and paste in this command:

sudo apt-get remove openoffice.org-base-core openoffice.org-calc openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-impress openoffice.org-writer

(Don't worry, it won't remove the .openoffice.org file in your home directory -- the one that contains all your settings, templates, dictionary additions and the like.)

Next download the latest release of OOo and save it to your Desktop. Right-click the archive and choose Extract Here. When it's done, navigate to the new folder in your terminal session, go to the /DEBS directory and enter this command to install all the packages...

sudo dpkg -i *.deb

Now cd into desktop-integration and repeat the command to add OOo to your menus.

And that's it... except for one small problem. The Adept Updater will show your OpenOffice.org packages as "Upgradeable". I'll show you how to fix that in the next Hidden Linux...




Footnote: The latest beta of OpenOffice.org 3.0 is out. Get it here. And check here for Ubuntu installation (and removal!) tips.



<--Previous Hidden Linux      Next Hidden Linux -->

September 15, 2008

Remember the TDR

The Telecommunications Disputes Resolution service -- a free and independent service that mediates in disputes between consumers and telecommunication companies -- released its second Quarterly Report last month.

Complaint numbers were up 23% on the service's first quarter, (it was established in November 2007), and fell into the following categories;
  • 45% - Billing and credit.
  • 31% - Service and product delivery such as failures and delays in connection, disconnection and functionality.
  • 11% - Customer service complaints.
  •   8% - Network performance (including speed and service interruptions).
  •   3% - Faults.
  •   2% - Other complaints.
Most of the country's telcos are TDR scheme members including Boost, Call Plus, Eziphone, Gen-i, iHug, Kordia, Orcon, Slingshot, Telecom, TelstraClear, Vodafone, WorldxChange and Yahoo!Xtra.



What's covered:
  • Any service or product from a scheme member.
  • Complaints from residential and small business customers.
  • Complaints already made to a scheme member, as long as it's within 12 months of the original complaint.
  • Complaints involving compensation up to $12,000.


How to complain:
  • Raise the issue with your telco first. (Click here for a Customer Complaint form.)
  • If you're not happy with their response, or your complaint hasn't been dealt with within six weeks, go back to that link and download a Complaint to TDR form. (You can make a complaint online, post or fax the complaint form, or call freephone 0508 98 98 98.
  • The TDR's service is non-binding. If you're not happy with the outcome, you're free to ignore their findings and proceed to the Disputes Tribunal or even court.

September 9, 2008

Hidden Linux : DIY File Server


Networked storage is becoming a must-have for many home users. It's great for doing backups and sharing files between a variety of machines, irrespective of their operating systems, so over the weekend I added an old 60GB hard disk to an even older 386 PC and built my own. It's surprisingly easy!

Server-side Setup

  • Install it on your server. Near the end of the installation you'll be prompted for the server types to install. Choose Samba.
  • Log in and note the IP address ("inet addr") that's been assigned to it by typing ifconfig. (In my case this was 192.168.1.101)
  • Create directory to share the network. I typed mkdir shared_stuff to create the directory shared_stuff in my home directory, /home/geoff.
  • Add these details to the bottom of Samba's configuration file, smb.conf. To edit it, enter sudo nano /etc/samba/smb.conf. Here's what I added...
        [shared]
        path = /home/geoff/shared_stuff
        guest ok = yes
        read only = no

  • Force Samba to reload the new details: sudo /etc/init.d/samba reload



Client-side Setup : Linux

(You can go all of the following using GUI tools but these vary depending on your distro and window manager. Console commands will work with all Linux flavours.)

  • Install smbfs, which includes the more up-to-date cifs: sudo apt-get install smbfs
  • Create a folder to mount the remote directory: sudo mkdir /media/remotestuff
  • Test you can connect to it. Here's my command. The coloured bits are the parts you'll need to set for yourself...
sudo mount -t cifs //192.168.1.101/shared /media/remotestuff -o username=server_username,password=server_password,iocharset=utf8, file_mode=0777,dir_mode=0777
(Note: this command should be entered on a single line!)


Common Errors

mount error: can not change directory into mount target...

You either didn't create the folder /media/remotestuff or entered it incorrectly in the mount command.

mount error 13 = Permission denied
Your server username and /or password are wrong.

mount error 6 = No such device or address
The share name specified in your mount command isn't being found on the server.


You can continue mounting the share manually, but you'd have to do so every time you boot your PC. It's better to automate the process, so...
  • Create and edit a .smbcredentials file: sudo nano /root/.smbcredentials. Add the following lines:
        username=server_username
        password=server_password


  • Edit the File System Table: sudo nano /etc/fstab and add the necessary details. (If your folder names contain spaces, you must replace them with "\040". So folder name should become folder\040name.)
//192.168.1.101/shared /media/remotestuff cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
(Note: this command should be entered on a single line!)

  • Save and close /etc/fstab.
  • Type sudo mount -a to mount the remote share and you're done.




Client-side Setup : Windows

  • Open My Computer
  • Click on Tools / Map Network Drive
  • Choose a drive letter and click Browse.
  • Under Microsoft Windows Network, browse to the appropriate server and folder.
  • Click OK
  • Ensure Reconnect at Logon is ticked and click finish.


Remote Server Administration


Before I buried my file server away in a cupboard without keyboard, mouse or monitor, I ran this command to install SSH:

sudo apt-get install openssh-server

Now I can log in to the server from my desktop and administer it remotely. To connect, enter  ssh serveripaddress (so in my case I typed ssh 192.168.1.101)

SSH needs a little configuration. (You can do this remotely!) Edit the configuration file /etc/ssh/sshd_config and...
  • Disable remote root logins by changing PermitRootLogin yes to PermitRootLogin no
  • Disable X11 forwarding by changing X11Forwarding yes to X11Forwarding no
Restart SSH to incorporate these updates: sudo /etc/init.d/ssh restart


<--Previous Hidden Linux       Next Hidden Linux -->

September 2, 2008

Return of the browser wars: Google release Chrome

Talk about stealing the other guy's thunder: just days after Microsoft released Internet Explorer 8 with its built-in Google-spy-killing InPrivate function, Google has announced the release of its very own browser.

At the time of writing, the download link was still 404-ing, but release isn't scheduled till Tuesday US-time, so give it a few more hours. (The initial release is Windows only. Linux and Mac versions are to follow.) In the meantime you can read about Chrome's features and peruse a comic book detailing its rationale and development.
Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.