Archive

Archive for October, 2007

C# Adding an Object to a ComboBox

October 26th, 2007

I needed a control similar to the HTML <SELECT> menu where you can have a key - value pair. To do this in C#, you first create an object like the one below: Notice the “ToString” method, that is what will display in the dropdown.

public class area
{
public string areaName = “”;
public int aID;

public override string ToString()
{
return areaName;
}
}

Next, create your object and add it to your comboBox

area theArea = new area();
theArea.aID = areaID;
theArea.areaName = areaName;
comboAreas.Items.Add(theArea);

admin .NET

Naming a Mount Point in Ubuntu (ext3)

October 17th, 2007

To rename an ext3 partiton, type in this command:

sudo tune2fs -L NewLabel /dev/XXX

admin Uncategorized

Mounting a Windows Share (Ubuntu Feisty)

October 9th, 2007

Make sure to first install this:

sudo apt-get install smbfs

If you don’t you’ll recieve this error:

smbfs: mount_data version 1919251317 is not supported

admin Linux Tutorials

Virtualbox - Multiple Tap Interfaces (Ubuntu Feisty)

October 9th, 2007
Comments Off

Once you have host networking configured, adding more TAP interfaces is very simple. I also noticed that auto br0 needed to be placed above tap0 tap1 tap2 and eth0 in /etc/init.d/interfaces. issue a sudo /etc/init.d/networking restart after editing interfaces.

/etc/init.d/intefaces

auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
bridge_ports eth0 tap0 tap1 tap2

auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user chris

auto tap1
iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user chris

auto tap2
iface tap2 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user chris

auto eth0
iface eth0 inet dhcp

admin Linux Tutorials

Setting up Samba in Ubuntu:

October 2nd, 2007

Disclaimer:  This site is mainly an online repository for my notes.  I have very limited knowledge in dealing with Samba. So these instructions may not be viable or safe in other environments. (Or my own for that matter).

  1. Create a “Share” by using the GUI in SYSTEM -> ADMINISTRATION -> SHARED FOLDERS:
  2. By default encrypted passwords are supported. Before a user can connect to your share you must create an SMB password. Do this from the command line by typing sudo smbpassword USERNAME
  3. The user can now log in by hitting the ip address of your host.
  4. With this setup, you probably will not be visible on a “workgroup”
  5. You can modify your settings via /etc/samba/smb.conf

admin Uncategorized