Easy samba config and NTFS mounts!

Add users with smbpasswd then sudo vi /etc/samba/smb.conf

Add a line like this or replace “[home]” with it:

[shareName]
path=/location/of/share
valid users = username
pubilc = no
writable = yes

To mount an NTFS partition every boot, sudo vi /etc/fstab and add this below your first mount:

/dev/sdb1       /where/you/want/to/mount  ntfs    defaults 0 0

realvnc 5.4 on ubuntu 10.04 x64

Ever try to install this and get the error “Package libstdc++5 is not installed”? Try to apt-get that and it doesn’t exist? Well it’s an easy install but there are no easy instructions so I made some:

Download vnc-e_4.5_v4_amd64.deb or whatever the current version is from RealVNC’s site. Don’t install it yet. Download libstdc++5_3.3.6-18_amd64.deb (or the current version) from a Debian mirror (google it).

sudo dpkg -i libstdc++5_3.3.6-18_amd64.deb
sudo dpkg -i vnc-e_4.5_v4_amd64.deb

You can now start vncviewer with “vncviewer <server name> &” and the rest of it. If vncviewer won’t run without sudo, delete the .vnc directory in your home directory. Icons install to the internet directory of the gnome start button.

ESXi 4.0 Server for $250

I built a VMware ESXi server a couple months ago for very little money with used parts. It’s been running for the last couple months, is fast enough for me and houses systems I use every day.The biggest caveat: It’s 32 bit only. If you need 64bit systems this won’t work for you.

Part list:

ebay (used equipment bids)
HDAMA motherboard including dual Opteron 2xx CPU, PSU $40 shipped
8GB DDR 2100 ECC RAM: $100 shipped

NCIX.com/newegg
500 GB SATA Hard disk: $50 on sale
Dynatron A43/A43G 70mm 2 Ball CPU Cooler: ~$35 for two shipped
Syba SD-SATA-150R 2 Channel SATA Controller Card (Part#: SD-SATA150R): $15

The last part was the really necessary part. ESXi is very difficult to install on anything but hardware RAID controllers which can be very expensive. According to the ESXi Whitebox HCL it supported a very inexpensive chipset, the Silicon Image Sil3512. The SD-SATA150R card I bought had a Sil3512 chip. There are probably many others on the market but this one works for sure.

The Dyantron heatsinks are very quiet and cool the CPU well. The HDAMA motherboard is not the best but it was used in some now defunct blade servers which makes them very cheap. I actually bought two shipped for $40 on ebay. The opteron 2xx CPUs are good.  For 64bit emulation, you need something in the 2xxx range of opteron but look at about $400-500 for one of those systems.

ESXi 4.0 installs without any problems, no tinkering required on this system and it hasn’t crashed in two months.

automated ogg to mp3 conversion

UltimateZer0 from www.linuxquestions.org put down the groundwork for this. I’ve modified it somewhat. Usage: CD into a directory and run this script. It’ll create the mp3s for you from the oggs.

sudo apt-get install vorbis-tools lame will get the required tools for this.

The ogg files don’t auto-delete on their own, this is so you can test them.

#!/bin/bash
#credit: UltimateZer0 from www.linuxquestions.org
#sudo apt-get install vorbis-tools lame

oggdec *ogg
for f in *.wav ; do lame –preset 192 -ms -h “$f” ; done
#lame –preset 192 -ms -h *wav
#rm *.ogg
rm *.wav
#the filenames are .wav.mp3, changes to just .mp3
rename -v ’s/\.wav.mp3$/\.mp3/’ *

Customizing wordpress default theme

I’m currently running the default wordpress theme with some minor modifications. The current version can be downloaded here.

SSH Tunneling in Putty

I’ve tried this before but have never been sucessful. With this guide I was able to tunnel VNC over SSH in under 1 minute:

http://martybugs.net/smoothwall/puttyvnc.cgi

Manual NVIDIA graphics driver install

Download the latest driver from nvidia.com/drivers

Log out of Ubuntu, press CTRL+ALT+F1

Login, change to sudo -i and stop /etc/init.d/gdm

Run sh NVidia driver name

Install it saying yes to everything, especially 32bit drivers if it asks (this will prevent Gnome from running in 8.10 with Nvidia 180.22 drivers).

You could probably start the xserver back up but I haven’t experimented with this part enough.

I recently found an issue where a clean install of 64bit ubuntu 8.10 will lose it’s mouse focus in OpenGL fullscreen apps. The workaround is to disable desktop effects. The fix is to manually install the 180.22 driver.

Mouse not working in OpenGL games

I ran into this problem in Ubuntu 8.10 64bit. This doesn’t happen on the same harwdare with Ubuntu 8.10 32bit or 9.04 alpha 3 64bit. In games like Nexuiz and OpenArena I could see my mouse cursor but couldn’t move it. The keyboard worked fine.

A workaround was to disable the Visual Effects under system preferences. Easy enough and I know it’s resolved in 9.04 as I didn’t have this issue there.

Moving /home to it’s own partition

This is an excellent step and really recommended if you make many changes to your system (different distros, distro upgrades). Moving forward, I plan on setting up all new systems with their own /home partitions.

Step 1: Partition the drive
I used the following Scheme:

primary 1 - 40G - ext3 - Ubuntu 8.10 64bit
primary 2 - 40G - ext3 - future OS usage
primary 3 - 8G - swap
primary 4 - * - xfs - remainder used for /home

Step 2: Copy your data
Boot back into your OS, mount the home parition and copy the data over.

find . -depth -print0 | cpio –null –sparse -pvd /media/newhome
source

This works pretty well. It seemed to have missed a gig of data with du -s checking. This needs to be improved on. Also it didn’t get all permissions. I had to do sudo chown -R user:user .* to get all files that start with “.”

After this procedure, I installed my OS on the first primary partition. After booting into my new install, all of my old settings were there. It was sweet.

Ubuntu Manual NVIDIA driver install

In 9.04 The proprietary hardware driver didn’t find my Geforce 8400 GS card that 8.10 detected. I manually installed the driver from NVIDIA’s website (referred to as NVIDIA-driver-file.run).

You need to stop GDM to install this driver:

ctrl+alt+F11 then  ctrl+alt+F1
sudo /etc/init.d/gdm stop
sudo sh ./NVIDIA-driver-file.run
This installer will update your /etc/X11/xorg.conf file. Add the following to the bottom of that file:

Section “ServerFlags”
Option “IgnoreABI” “True”
EndSection

I had ABI errors and the driver wouldn’t load until I added those three lines to the bottom. OpenGL now works great.