I don’t know if you, like me, have a development box running Visual Studio 2010 and VMWare workstation. I develop in C# and WPF, and test the product in a VM. Then sometimes, when I work from home, I remote desktop into my development box.
When I am using RDP to remote control a VMWare Workstation host, and I run a WPF Application inside a VM, the WPF application doesn’t display. The window opens, and you see the frame of your windows, but the inside is just blank or a white/gray box. None of the WPF Controls are visible.
I have found two ways to fix this. One is permanent and one is temporary.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Avalon.Graphics]
"DisableHWAcceleration"=dword:00000001
Option 2 – (Temporary) Or just reboot the VM while connected to the VMWare Workstation host via RDP. It seems that the VM boots and the OS detects the lack of support and disabled hardware acceleration. However, once you reboot when you are not RDP’ed into the VMWare Workstation host, you have hardware acceleration back.
I took me a long time to figure this out, because there was little to nothing in a Google search. I came across this solution while looking for something else a month or so ago, and needed to use it again when working from home last night. I thought I would post it so I never have to look for it again.
FreeBSD has strong support for wireless devices. Here is a quick overview of how to manage wireless interfaces on FreeBSD.
Prerequisites
For Wireless access requires the following:
A wireless interface card
wpa_supplicant
An Access Point
Note: In later of versions of FreeBSD, since 2008, wpa_supplicant was included in base. If you are running an older version of FreeBSD, then wpa_supplicant was a port. So if you are on FreeBSD 8, you have wpa_supplicant.
To complete this guide, we will also use:
A FreeBSD desktop environment.
wpa_gui
Note: wpa_gui is not included in the base system but is found in ports.
Step 1 – Determine what wireless interface card you have
Some wireless cards are built into the kernel, and may already be loaded. If you know what card you have, skip this step.
First, we need to find out what wireless card you have. Run ifconfig and look at the network cards you have. Then to see which one is your wireless card, compare them to the wireless kernel module list here: http://www.freebsd.org/releases/8.1R/hardware.html#WLAN
Most wireless cards are PCI devices. Run pciconf to look for your wireless network card type. This outputs a lot of information, I have snipped my output to isolate only the information about the wireless PCI card.
Note: I searched for 4965AGN and found my kernel module immediately.
Keep the link open as you move to Step 2.
Step 2 – Make sure the kernel module is loading
If your wireless card is already detected and loading, skip this step. If not, configure /boot/loader.conf to load your wireless card.
Read the man page for your wireless kernel module, there is a link to it in the hardware notes, to see any special information about loading the kernel module for your kernel module.
Configure the /boot/loader.conf to load the kernel module and make any other required settings to use the kernel module.Example 1 – The Intel iwn kernel module requires a line to load the kernel module and a second line to load the firmware.
# Wireless
if_iwn_load="YES"
iwn4965fw_load="YES"
Example 2 – The Intel iwi kernel module requires that you accept a license agreement:
Now you can either reboot, or you can use kldload to load the kernel modules without rebooting.
Step 3 – Configure the wireless settings in /etc/rc.conf
The rc.conf is where the wireless network card is configured.
In FreeBSD 8 and later, all wireless interfaces should be configured to use the generic wlan device. Then to enable wpa_supplicant, the wlan should be configured to use WPA.
To make these configurations, add these lines to the /etc/rc.conf.
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
Save and close /etc/rc.conf.
Step 4 – Add your Access Point’s (AP) SSID to your /etc/wpa_supplicant.conf
There is a lot of information on how to add an SSID to your /etc/wpa_supplicant.conf file in the man page for wpa_supplicant.conf. But the process is simple.
If you don’t know the SSID, discover or scan for the SSID by running ifconfig wlan0 scan. Below is an example.
$ ifconfig wlan0 scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
MyWifi 00:20:e1:96:54:32 6 11M -75:-95 100 E
OpenNet da:ce:41:d3:af:3a 6 54M -85:-95 100 IS
MyWPA 00:24:7b:6b:71:27 1 54M -89:-95 100 EP RSN WPA WPS
00:00:00:00:00:00 1 54M -89:-95 100 E
Now add a network entry for the desired wireless device. Examples are below:
Open or no authentication
network={
ssid="MyWifi"
key_mgmt=NONE
}
WPA or WPA2
network={
ssid="MyWPA"
psk="SomeP@sswd!"
}
More examples
For more examples, read the man page for wpa_supplicant.conf.
$ man wpa_supplicant.conf
Once the SSID is configured properly in the /etc/wpa_supplicant.conf, then an automatic connection to this AP will occur whenever the device is within range.
Step 5 – Install wpa_gui from ports
Often you don’t always know what wireless you are going to connect to and also often you don’t care to store the SSID configuration permanently in the /etc/wpa_supplicant.conf. This is common if you are getting online at an airport, coffee shop, or any hotspot that you don’t frequent. It would be nice to have a graphical interface that shows you the SSIDs available, allows you to connect, but doesn’t store the information. wpa_gui is this tool.
Install wpa_gui from ports
# cd /usr/ports/net/wpa_giu
# make install
Add the following two lines to the top of the /etc/wpa_supplicant.conf.
Restart the wpa_supplicant.# /etc/rc.d/wpa_supplicant restart wlan0
Run wpa_gui.
$ wpa_gui
Selected interface 'wlan0'
Trying to connect to '/var/run/wpa_supplicant/wlan0'
wpa_gui opens.
Click Scan and a window listing the available SSIDs appears.
Double-click on an SSID to get the configuration windows. It will try to select the correct settings as best it can, so often you only need to add the psk or passkey, which is essentially a password.
This will connect you to that SSID.
Note: If you do want to save the networks to the wpa_supplicant.conf by default, then add this line. Otherwise, they are not saved. You may or may not want them to be saved.
update_config=1
Additonal Notes
Note 1: PC-BSD has a network configuration tool, so if you are running PC-BSD, wpa_gui is not necessary.
Note 2: There is a command line tool called wpa_cli that is included in the base system. wpa_cli is useful if you don’t have a graphical environment.
Note 3: I also configured link aggregation, or lagg, so my wired and wireless interfaces share the same MAC.
http://www.freebsd.org/doc/handbook/network-wireless.html
http://www.freebsd.org/releases/8.1R/hardware.html#WLAN
man wpa_supplicant
man wpa_supplicant.conf
man iwn
man iwi
Copyright ® Rhyous.com – Linking to this page is allowed without permission and as many as ten lines of this page can be used along with this link. Any other use of this page is allowed only by permission of Rhyous.com.
Ok, so if you have been on my site, you know that I started with Red Hat and never really got into it, and then, settles on FreeBSD. Why would I choose FreeBSD over Linux? It fit me better.
I actually think that everybody needs to use what suits them.
This is NOT a FreeBSD versus Linux post. It is a site to help others who are trying to decide whether to use FreeBSD or Linux see some pros and cons and get my recommendation.
FreeBSD
FreeBSD is not Linux or Unix exactly. It is BSD. It has its own bsd kernel and an is surrounded by a base system.
Here are a list of positives about FreeBSD
It is open to proprietary code that just can’t be used in Linux, such as Sun’s ZFS.
It is easy to get a small install of just the base system with minimal to no features installed. (Security! Attach surface area is minimized when less software is included.)
Jails
The ports tree for compiling from source is unmatched by any Linux operating system, but if you prefer binaries, yes, it has them too.
Installing software has less problems as you compile it on the system, with the settings you need (rather than get binaries that may have been compiled for a different system or without the settings you need).
The documentation is far better than most other open source projects and better than most projects commercial or open source for that matter!
OS X chose to use much of FreeBSD in its underlying operating system and so when combining the OS X and FreeBSD market share, FreeBSD code is actually used on more systems than any operating system other than Windows.
There are not that many BSD distributions, and the ones that exist have clear focusses different than the others, that later they share. FreeBSD is a solid server. PC-BSD is a desktop focussed on avoiding dependency problems with its software. OpenBSD is extremely securee. NetBSD is extremely compatible with lots of hardware. They contribute back to each other often.
The License is free and gives everyone who uses it true freedom.
The License is free for commercial use.
Easy Editor. Newbies can actually use this editor included in the FreeBSD base system. Don’t forget to learn vi though.
Patching is as simple as running freebsd-update.
Here are a list of negatives about FreeBSD
Hardware companies tend to make drivers for Windows and Linux first and often don’t include FreeBSD, though most hardware is soon supported.
There is not a native Flash Player in FreeBSD, instead the Linux version of Flash must be used.
There Desktop options for FreeBSD are not as rich as those for Linux (Example: KDE network settings doesn’t work on FreeBSD, but PC-BSD has their own settings now.)
IT/Developers forFreeBSD are harder to come by.
Linux
Linux was originally just a kernel. The userland was separate. Now there are plenty of projects that make a nice complete operating system using the Linux kernel and a nice base system surrounding it.
Here are a list of positives about Linux
It has a large user base.
Free to use.
There are plenty of distros to choose from.
It is no longer just a kernel but many different groups put out an actual system: Red Hat/Fedora, Debian/Ubuntu, CentOS, SUSE, Arch, Gentoo, etc…
A lot of work is going into the desktop environment
Development for any Linux platform could benefit all Linux platforms.
More and more hardware companies are including Linux drivers
Some Software companies make Linux software as well, and the number is increasing
Strong commercial backing (which doesn’t make sense for software licensed under the GPL)
Here are some negatives
There is often a lot of binary packages that just don’t work.
Lack of consolidation. There are a lot of distributions of Linux and they are not the same. Which one do you choose.
Many Linuxes (not all) are now installing desktop software by default, and no longer are minimalistic. (Security! Attach surface area is increased when more software is included.)
The inability to write and distribute software that touches GPL software, without having to release your software as GPL too.
If you hope to do anything other than use the software or help the community, you need a lawyer to figure out how to interact with the various versions of GPL.
The security settings are usually not easy to use and are result in users just turning them off (i.e. SELinux)
Are Red Hat and SUSE open source or commercial, they sell support but the software is free, except you can’t get updates without buying support…confusing!
IT guys who claim to know Linux usually have done little more than run Ubuntu for a few days.
This is not a flame post and any responses that appear to be trolls will be deleted.
My recommendations
Ok, so what would I recommend if I were paid by a company for consulting?
Server (LAMP)
For a Server running Apache, PHP, SQL, often mis-termed LAMP (Linux Apache MySQL PHP) but really means any OS, Web Server, SQL, Script language.
Recommended OS: FreeBSD
Commerical Appliance
If you work for a company and you need a commercial appliance. Stay away from the dangers of the GPL, just don’t go there.
Recommended OS: FreeBSD
Open Source Desktop
For a quick desktop for a home user that has PC hardware but doesn’t have a license for Windows and doesn’t want to buy one.
Recommended OS: Ubuntu
Note: Sorry PC-BSD friends. Keep working on it.
Commerical Desktop for Employees
If you want a good commercial desktop, you should go with one of the following depending on certain factors, the primary being that some software you may need to use only runs on these two platforms.
Recommended OS: Windows 7 or OS X
However, Ubuntu, Red Hat, SUSE, Fedora, PC-BSD, are all very usable replacements depending on the situation.
Point of Sale (POS) Device
If you need to have to have a POS device for handling sales.
Recommended OS: Depends on needs
Share your thoughts
Hey, please comment. No flame wars though. I repeat, this is not a FreeBSD versus Linux post, but a FreeBSD or Linux post, with just some information from my experience. I appreciate all technology and any rude comments will be deleted. However, feel free to challenge and provide facts, demand facts, etc…
So this works on FreeBSD but it probably works on OS X, most Linuxes, Solaris, and other Unixes as well.
Installing prerequisites
In order to create a password protected zip file and later open it, two ports are needed:
zip
unzip
To install these using packages, do this as root:
#
#
pkg_add zip
pkg_add unzip
Or using ports:
#
#
#
#
cd /usr/ports/archivers/zip
make install
cd /usr/ports/archivers/unzip
make install
Creating a password protected zip file
There are a couple of different ways you may want to create a zip file. You may want to zip a sing file, or two or more files, or and entire directory and all its contents. You may also want to add a file to an existing zip file.
All of these actions can be done with a binary called zip.
Example 1 – Creating a password protected zip file containing one file
The syntax is simple. The -e parameter is to encrypt with a password. Always put the zip file first and the file to be zipped second.
# zip -e myarchive.zip myfile1
Example 2 – Adding a file to your password protected zip file
Since your zip file already is encrypted with a password and adding a file does not require decrypting, you don’t need the password to add a file to the zip file.
# zip myarchive.zip myfile2
Example 3 – Creating a password protected zip file containing multiple files
This is very similar to Example 1. The -e parameter is to encrypt with a password. Always put the zip file first and the files to be zipped last separated by a space.
# zip -e myarchive.zip myfile1 myfile2 myfile3
Example 4 – Creating a password protected zip file containing a directory and all is contents.
The -r parameter is to do a recursive zip (recursive means to include the folder and all its contents). The -e parameter is to encrypt with a password. Always put the zip file first and then the directory name.
# zip -r -e myarchive.zip mydirectory
Example 5 – Delete a file from the zip
This is easier than you think. Because you are not actually reading the contents of a file in the archive, the password is not needed to delete a file inside the zip file.
# zip -d myarchive.zip myfile1
Opening a password protected zip file
The syntax for unzipping a file is a lot easier. It uses a different binary file called unzip.
# unzip myarchive.zip
The above prompts for the password automatically and unzips the files, assuming the correct password is provided.
Some times is it the simple things that people don’t know. For example, I have always just installed software from ports. Every now and then I would use pkg_add -r to pull a pre-made package from a FreeBSD package server. But I have never actually made a package myself. I have been using FreeBSD for 10 years and many consider me an expert in some areas. Well, like I always say, it is possible to be an expert in many areas and still be a newbie in some areas.
Recently, I am looking into steps to make a BSD appliance and so I want to keep the system as minimal as possible. So I want to build packages on on a separate build box. So I suddenly realized that I have never made a package myself and I wasn’t exactly sure how.
So is it hard to convert a port into a package? Of course not. If you want to make a package from a port, and you are familiar with ports already, then all you have to do is run make package, and you may want to make the dependent packages as well.
If you need some more granular steps, I will provide them. You just need to follow some simple steps:
Port: lighttpd-1.4.28_4
Path: /usr/ports/www/lighttpd
Info: A secure, fast, compliant, and very flexible Web Server
Maint: mm@FreeBSD.org
B-deps: libtool-2.2.10 pcre-8.10 pkg-config-0.25_1
R-deps: pcre-8.10
WWW: http://www.lighttpd.net/
Look at the R-Deps. R is short for Run and deps is short for dependencies. If you want a package for lighttpd, it requires pcre-8.10 to run, so you will need a package for pcre-8.10 as well.
Note: B-deps are not need. B is for Build. These dependencies are only need to build the package. Once the package is built, they are not needed, so you don’t need to create packages for them.
Make the lighttpd package:
#
#
cd /usr/ports/www/lighttpd
make package
This creates the file in the /usr/ports/www/lightpd. You may have a directory or share where you store your packages, and you can copy it there if you want. Especially if this is a build machine in a vm that you plan to revert, you need to copy this off the machine or you will lose it when you revert.
Make the pcre package.
#
#
cd /usr/ports/devel/pcre
make package
This creates the file in the /usr/ports/www/lightpd. You may have a directory or share where you store your packages, and you can copy it there if you want. Especially if this is a build machine in a vm that you plan to revert, you need to copy this off the machine or you will lose it when you revert.
Hopefully this helps you if you ever need to make your packages on one box.
This is also something great to do before an install fest so you can have the latest packages available. Lets say you want to do an install fest for a FreeBSD desktop, you could have all the latest Xorg and Fluxbox or KDE or GNOME packages already built.
Build machine notes
On your build machine “make package” will actually install the package in the process of building the package. However, that is not really a concern as this is a build machine. My recommendation is that you create a build machine in VirtualBox and snapshot it after you download ports. Usually you just continue making packages. When you decide it is time to go back to a clean system, 1) revert your snapshot, 2) update your ports tree, 3) make your new packages.
Recently using my FreeBSD desktop, I was unable to download a file in Firefox.
There is not enough room on the disk o save /tmp/IVpWYcrD.exe.part.
Remove unnecessary files from the disk and try again, or try saving in a different location.
So I got this as soon as I tried to download a file. It said there wasn’t enough space to download the file and recommending a different location, however, this error was before I even chose a download location.
Cause
So it appears it starts downloading immediately to /tmp, but since I installed FreeBSD without giving /tmp its own partition, it was dumped in the root partition, which doesn’t have much space.
If you screw up your permissions for the /usr/tmp file, Firefox will likely let you know with the following error.
/tmp/LDVDKpa.exe.part could not be saved, because you cannot change the contents of that folder.
Change the folder properties and try again, or try saving in a different location.
So I got the permission issue fixed and then rebooted to try to fix the fact that no other windows would open because I switched the /tmp directory while in X and after that none of my windows would open.
However, when I rebooted, I got this error with kdm and it kdm didn’t start:
Nov 9 09:07:12 slc-jab kdm_greet[1576]: Cannot create $HOME
Nov 9 09:07:12 slc-jab kdm-bin: :0[1575]: Received unknown or unexpected command -2 from greeter
Nov 9 09:07:12 slc-jab kdm-bin: :0[1575]: Abnormal termination of greeter for display :0, code 1, signal 0
I tried to fix the KDE issue, but it seemed to be caused by the fact that /tmp was a link because /usr/tmp had proper permissions but still it didn’t seem to work.
My second bad attempt
I spent hours trying to find a way to change the temp directory in about.config and thought I had it with browser.cache.disk.parent_directory but alas, it never worked.
Leave /tmp as it is.
Create another temp directory:
mkdir /usr/tmp
Give it the correct permissions.
chmod 1777 /usr/tmp
Open Firefox.
For the URL type: about:config
Add a new string
Name: firefox
Value: /usr/tmp
Restart Firefox.
My third attempt
I tried to create a TEMP environment variable. In fact, if Firefox is launched from a shell with TEMP specified as ~/.tmp then it works. However, when the KDE Menu launches Firefox, it never has that environment variable. I added the environment variable to .profile, .cshrc, and rebooted, but it never worked.
Resolution
I added this line to my /etc/fstab file and rebooted. That took care of it. Supposedly tmpfs is experimental, but it is working great.
tmpfs /tmp tmpfs rw,mode=1777 0 0
Anyway, I hope this information helps you if you see this issue.
My job at LANDesk requires that I write code in C# for an application that only runs on Windows Server. I also have to test a lot of code on Windows 7. Like me, so many people are forced to run a version of Windows because they have special windows applications at work or because that is the platform we are developing for in our jobs.
If running windows is a must for you, as it is for me, then moving to FreeBSD exclusively is just not an option. I want to run an FreeBSD, but running Windows 7 is a must too.
At first VMWare Workstation looked like it was going to solve this problem. But while its early versions worked on FreeBSD, they failed to port newer versions over. Quemu just never could get to level of usability needed. Well, along comes VirtualBox from Sun. Sun, now Oracle, released an open source edition cleverly named VirtualBox Open Source Edition (OSE). Like many of Sun’s code, it is duel licensed.
Prerequisites
A FreeBSD desktop – Hopefully you are here because you already have this. If you don’t have a FreeBSD desktop, you can follow my guide to build one. How to install and configure a FreeBSD 8 Desktop with Xorg and KDE?
Or you can install and use PC-BSD which is a nice desktop version of FreeBSD.
A Windows 7 DVD or ISO and a product key. Please do not pirate!
Step 1 – Installing VirtualBox OSE on FreeBSD 8.1
Installing VirtualBox is not complex. It involves only a few steps.
Go to the directory for virtualbox-ose in your ports tree.
#
cd /usr/ports/emulators/virtualbox-ose
Configure your installation.
#
make config
Select Guest Additions, as it is not selected by default.
Note: The defaults are Qt4, DBUS, X11, NLS and they should remain checked.
You may also want to select VNC.
Install virtualbox-ose
#
make install
Step 2 – Configuring FreeBD for Virtual Box
There are few things we need to configure on the FreeBSD system to make VirtualBox work.
Add users to the vboxusers.
Configure CD/DVD drive access.
Configure VirtualBox kernel modules to load.
Step 2.1 – Adding use to the vboxusers group
To add users to the group, use this command:
FBSD#
pw groupmod vboxusers -m SomeUserName
Step 2.2 – Configure CD/DVD drive access
Note: This is a copy of what is in my document for building a FreeBSD Desktop.
FreeBSD is more secure by default, so something as simple as accessing a CD or DVD or USB drive is not actually allowed by default. You have enable this.
These steps assume that your user is a member of the operator group. Remember above during the installation, I mentioned to make your user a member of both the wheel and operator groups.
Access a shell and su to root.
Note: The easiest shell to access now that you are in KDE is Konsole. To access Konsole, click the K and go to Applications | System | Terminal. Also you can add the shell icon to your panel by right-clicking on the icon and choosing Add to Panel.
Enable vfs.usermount.
FBSD#
sysctl -w vfs.usermount=1
Configure vfs.usermount to be enabled on boot.
FBSD#
echo vfs.usermount=1 >> /etc/sysctl.conf
Open the following file with an editor: /etc/devfs.conf
FBSD#
ee /etc/devfs.conf
Add the following lines:
# Allow all users to access CD’s
perm /dev/acd0 0666
perm /dev/acd1 0666
perm /dev/cd0 0666
perm /dev/cd1 0666# Allow all USB Devices to be mounted
perm /dev/da0 0666
perm /dev/da1 0666
perm /dev/da2 0666
perm /dev/da3 0666
perm /dev/da4 0666# Misc other devices
perm /dev/pass0 0666
perm /dev/xpt0 0666
perm /dev/agpart 0666
perm /dev/uscanner0 0666
Note: Yes, I copied these from a PC-BSD install’s version of this file.
Note: Change to 0660 to only allow users in the operator group to mount drives.
Edit the /etc/devfs.rules file.
FBSD#
/etc/devfs.rules
Edit the following file: /usr/local/etc/PolicyKit/PolicyKit.conf
See if there is a line in the fstab for your CD/DVD-Rom. Comment out or remove the line for your /cdrom. I usually just comment it out by adding a # sign as shown:
#/dev/acd0 /cdrom cd9660 ro,noauto 0 0
Restart the computer.
You should now be able to mount CD, DVD, and USB drives. You also should be able to both read and write to them, burn disks, write and format USB drives, etc…
Step 2.3 – Configure VirtualBox kernel modules to load
As root, edit the /boot/loader.conf file.
#
ee /boot/loader.conf
Add the following text:
# VirtualBox
vboxdrv_load=”YES”
Save and close the file.
Edit the /etc/rc.conf file.
Add the following text.
# VirtualBox
vboxnet_enable
Save and close the file.
Step 3 – Creating your Windows 7 VirtualBox
Launch Virtual Box.
Note: VirtualBox registers itself with the KDE menu. On my installation, it was in Lost & Found, but on PC-BSD it was under System. Either way you can type VirtualBox in the KDE menu search and find it. Also, VirtualBox is the command and it should in $PATH so you should be able to open any shell from your desktop environment and run VirtualBox and have it open.
Click New. This brings up a Wizard.
Follow the wizard.
Ok, if you need help with the wizard, here are my steps.
Read and click Next.
Choose an easy name. I used “W7”.
Make sure the Operating System is set to Microsoft Windows.
Change the Version to Windows 7 (64-bit) or if you are on 32 bit hardware still use just Windows 7.
Click Next.
Allow at least 1536 MB (1.5 GB) for the base memory size. You can get away with less if you need to. You can do better with more if
you want to.
Click Next.
The Virtual Hard Disk page is already configured correctly, Boot Hard Disk is checked and Create new hard disk is selected. So just click next.
Read and click Next.
For Hard Disk Storage Type, I left it set at Dynamically expanding storage.
Comment: This means that even if you use a 100 GB drive, it will only physically use as much space as Windows 7 has used in the Virtual Drive. So if Windows 7 is using 10 GB, even if you have 100 GB drive, the physical size on disk is only 10 GB. This is important information for the next screen.
Click Next.
I change the drive size to 50 or 100 GB.
Comment: It doesn’t really matter, but it is best to not run out of space either virtually or physically. Read my comment in the previous step.
Click Next.
Read and click Finish.
You virtual Machine now shows in the list.
Lets move to the next step.
Step 4 – (Optional) Changing Settings on your Windows 7 VirtualBox
I make two changes to my Windows 7 virtual box. As noted above this is optional, but I like to do them.
Click the settings.
Click System.
Change the boot order to be hard drive first.
Note: I make this change because it annoys me it when I install and then reboot the machine after the install and it boots right back to the install media. So I make this change and the press F12 during boot to the CD once.
Uncheck and get rid of the floppy. (Does anyone still use those?)
Now click on Storage.
Under the Storage Tree, select your optical drive.
If you are using an ISO, change the CD/DVD Device to point to the ISO. If you are using a DVD, as I am, choose Host Drive. My host drive says: Host Drive Optiarc DVD RW AD-7910A (cd0). I assume everyone drive will show up slightly different, but should start with Host Drive.
Click OK.
Your settings should be good to go.
Step 5 – Install Windows 7
Now it is time to install Windows 7.
Don’t pirate! Use a legal product key. Again, just because I like open source does not make me anti closed source. I am not a Microsoft hater and I would hope you aren’t either. Even if you are, that is no excuse for pirating.
Insert the DVD into your DVD drive, unless you are using an ISO and have already connected it.
Click the Start icon.
A new installation window will popup.
Important! You may get a lot of popups telling you about important tips for using VirtualBox. Take time to read them. If you don’t read them or don’t already know what they are telling you, you will wish you had read them.
Click in the window and to have it take control of your mouse and keyboard.
Press F12 to choose your boot option.
Note: If you miss this, that is OK, you can restart the VM and try to be quicker.
Once you have pressed F12 in time, you will see the following screen. At this screen, press the letter next to DVD drive.
Press a key when prompted to boot to the Windows 7 media.
Well, you are off to installing Windows 7. Hopefully you can get Windows 7 installed on your own, cause I am not here to walk you through doing that. Don’t worry, the install media for Windows 7 should be easy enough for you to follow if this is your first time.
Once finished, you will be running Windows 7 on FreeBSD.
Step 6 – Install VirtualBox Guest Additions
Even though all the devices are virtual, drivers are still needed. VirtualBox guest additions installs most of these drivers as well as other features of VirtualBox.
Log in to your Windows 7 install.
Select Device | Install Guest additions.
This will mount an ISO and start the installer for VirtualBox Guest Additions inside Windows 7.
Click Run VBoxWindowsEditions.exe.
Follow the wizard.
Note: I use the default install location and I check the option to Use Direct 3D support.
Reboot when prompted.
Step 7 – Install the sound card driver
The sound card driver must be installed. VirtualBox uses a virtual device representing the Realtek AC’97 sound card.
You now have Windows 7 running. Now you can have the great experience of using FreeBSD as your primary OS and load Windows 7 when you need something requires windows, like I do.
Sources:
http://wiki.freebsd.org/VirtualBox
http://forums.freebsd.org/showthread.php?t=18699
The virtualbox-ose port’s pkg-message
I live in Utah. The BSD users group is called: The Greater Utah BSD Users Group (GUBUG).
Unfortunately, I haven’t really seen any activity with this group in years. Sometimes I feel like the only active BSD user Utah, though I know this is far from true. I met some great people at the Utah Open Source Conference.
So I am kicking GUBUG into gear! Lets have a restart of the GUBUG meetings!
Date: Nov 17, 2010
Time: 7:00 pm – 8:30 pm
WHERE: LANDesk Building (see map)
I created a Facebook Group and added this as an event. Please join the group and RSVP if you can make it.
http://www.facebook.com/event.php?eid=119773334748668
Topics:
1. Contacting past members
2. GUBUG web site
3. A BSD topic (To be determined)
4. New GUBUG goals.
It will just be a fun meeting, to get things started again.
I am looking for a Graphical Newtork Configuration tool for FreeBSD. However, my attempts to find one are unsuccessful.
KDE’s “Network Settings” tool
So, KDE on FreeBSD has a network configuration tool. However, it doesn’t appear to work. PC-BSD has a working network management tool, that looks different.
I don’t have PC-BSD installed, but instead my own desktop build on FreeBSD, so I dont’ have a PC-BSD screen shot, but here is the screen shot from KDE’s regular Network Settings.
It flashes a little box that says, detecting platform and then the screen is empty of network cards.
I am on FreeBSD 8.1 64 bit.
I have these ports installed:
[jared@slc-jab ~]$ pkg_info |grep kde
akonadi-1.4.0_1 Storage server for kdepim
kde4-4.5.2 The “meta-port” for KDE
kde4-icons-oxygen-4.5.2 The Oxygen icon theme for KDE
kde4-shared-mime-info-1.0 Handles shared MIME database under ${KDE_PREFIX}
kde4-xdg-env-1.0 Script which hooks into startkde and helps KDE pick up XDG
kdeaccessibility-4.5.2 Accessibility applications for KDE4
kdeadmin-4.5.2 KDE Admin applications
kdeartwork-4.5.2 KDE Artworks Themes
kdebase-4.5.2 Basic applications for the KDE system
kdebase-runtime-4.5.2 Basic applications for the KDE system
kdebase-workspace-4.5.2 Basic applications for the KDE system
kdebindings-smoke-4.5.2 SMOKE bindings for Qt/KDE
kdeedu-4.5.2 Collection of entertaining, educational programs for KDE
kdegames-4.5.2 Games for the KDE integrated X11 desktop
kdegraphics-4.5.2 Graphics utilities for the KDE4 integrated X11 desktop
kdehier4-1.0.6 Utility port that creates hierarchy of shared KDE4 director
kdelibs-4.5.2 Base set of libraries needed by KDE programs
kdemultimedia-4.5.2 KDE Multimedia applications
kdenetwork-4.5.2 KDE Network applications
kdepim-4.4.6 Libraries for KDE-PIM applications
kdepim-runtime-4.4.6 Libraries for KDE-PIM applications
kdepimlibs-4.5.2 Libraries for KDE-PIM applications
kdeplasma-addons-4.5.2 Extra plasmoids for KDE4
kdesdk-4.5.2 KDE Software Development Kit
kdetoys-4.5.2 Collection of entertaining programs for KDE
kdeutils-4.5.2 Utilities for the KDE4 integrated X11 Desktop
kdeutils-printer-applet-4.5.2 Printer system tray utility for KDE4
kdevelop-4.0.0 Opensource IDE based on KDevPlatform, KDE and Qt libraries
kdevelop-php-1.0.0 PHP support for KDevelop
kdevelop-php-docs-1.0.0 PHP documentation for KDevelop
kdevplatform-1.0.0 KDE development platform
kdewebdev-4.5.2 Comprehensive html/website development environment
py26-kdebindings-kde-4.5.2 Python bindings for KDE
py26-kdebindings-pykdeuic4-4.5.2 An enhanced version of pyuic4
ruby18-kdebindings-4.5.2 Ruby bindings for Qt/KDE
system-config-printer-kde-4.5.2 KDE4 frontend for system-config-printer
So there according to the README in subversion for KDE’s network settings, this is supposed to work on FreeBSD. Maybe it doesn’t actually work. I can configure my network from the command line, so it doesn’t affect me, it just affects me trying to get new users who don’t know how to configure the network from the command line.
Looks like no one has maintained this feature on the FreeBSD platform and it is not working.
PC-BSD’s “System Network Configuration” tool
PC-BSD has their Network Management tool available as a port it appears. /usr/ports/net/pcbsd-netmanager
However, when I installed it on FreeBSD, it didn’t really work either. Again, I am not on PC-BSD, just my own Xorg and KDE build on FreeBSD. It did work on PC-BSD when I was testing PC-BSD.
When I installed it to FreeBSD, it added a different network configuration option to the KDE System Settings called “System Network Configuration” which is different than the default one called “Network Settings”.
I sort of wish that instead of writing a new tool, the PC-BSD team had just worked with KDE to make the regular one work, but maybe there is a reason I am not aware of that made this a necessity. Anyway, that is besides the point, the GUI network configuration tool from PC-BSD didn’t work when installed to FreeBSD either.
It shows the network devices, physical, wireless, and virtual, but while it displays them, right-clicking and choosing the Configure option does absolutely nothing.
Any one know if GNOME has a GUI Network Configuration?
I didn’t check out GNOME’s options. I don’t have GNOME installed and installing it is a bigger chore than I was planning on trying for finding a GUI network configuration tool
Conclusion
If you are running PC-BSD, the graphical System Network Configuration tool works.
If you are running FreeBSD, you may be out of luck using your own network configuration tool.
Options
The options seem to be these.
We can contact the folks at PC-BSD and the folks at KDE and see if either have plans to make their tool work.
We could step in and help either PC-BSD or KDE and fixing this ourselves and contributing our code.
Write our own tool.
I like option 1 or 2. I guess I will contact PC-BSD and see what I can do to help.
Ok, so it is one thing to have Xorg just autodetect settings, it is another to install and take advantage of a powerful NVIDIA driver and all its features.
To install the NVIDIA driver on FreeBSD 8.1, do the following.
This needs to be done as root, so su to root.
Install the NVIDIA driver. (Obviously only do this if your video card is NVIDIA)
#
#
cd /usr/ports/x11/nvidia-driver
make install
Note: You will be prompted for the build configuration. Check the ACPI box because I suspect ACPI is needed if you want to sleep and resume. If you have Linux compatibility enabled or plan to use it later, leave that checked, otherwise uncheck it and hit ok.
Edit the /boot/loader.conf file.
#
ee /boot/loader.conf
Add the following line to configure the NVIDIA module to load at startup.
nvidia_load=”YES”
Install the NVIDIA configuration tool.
#
#
cd /usr/ports/x11/nvidia-xconfig
make install
Use Xorg to create an xorg.conf. The following command creates and xorg.conf.new in /root. This might detect the NVIDIA driver, or not. Whether it detects it or not if may not make all the desired settings. The nvidia-xconfig tool will make the xorg.conf file settings work more accurately for the NVIDIA driver.
#
Xorg -configure
Copy the file to the appropriate location
#
cp /root/xorg.conf.new /etc/X11/xorg.conf
Run nvidia-xconfig
#
nvidia-xconfig
Edit the /etc/X11/xorg.conf.
#
ee /etc/X11/xorg.conf
Add this line in the driver section or “Section Device” to enable transparancy.
Option Overlay
Ok, you should have your NVIDIA card working. There are probably many more tweaks you could make. If you know of any other options that your would recommend, please comment and let my readers and I know.
I don’t know about you but I switch between FreeBSD and Windows a lot. So it drives me crazy when I type the command ls on windows and get the error message.
C:\Windows\system32>ls
‘ls’ is not recognized as an internal or external command,
operable program or batch file.
So I want this to go away.
I looked for the alias command in Windows and couldn’t find one. So I made a batch file that solves this.
Windows doesn’t seem to have the equivalent of a .shrc or .cshrc or .bashrc. I couldn’t find a .profile either. So I decided to go with the batch file route.
Option 1 – Using doskey
I was tipped off to this idea from a comment, which led my mind to the Command Prompt autorun registry I already knew about. But once I wrote the batch file, the parameters were not working, so I searched around and found an example of exactly what I wanted to do here: http://bork.hampshire.edu/~alan/code/UnixInWin2K/
Create a batch file called autorun.bat and put it in your home directory:
My home dir is: c:\users\jared
Add the following key to the registry:
Key: HKEY_CURRENT_USER\Software\Microsoft\Command Processor
REG_SZ (String): Autorun
Value: %USERPROFILE%\autorun.batOr as a .reg file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"Autorun"="%USERPROFILE%\\autorun.bat"
Now whenever you open a command prompt, the aliases will be there.
Option 2 – Creating a batch file as an alias
I created an.bat file that just forwards calls the original file and forwards all parameters passed when making the call.
Here is how it works.
Create a file called ls.bat. Add the following text.
ls.bat
@ECHO OFF
dir $*
Copy this batch file to your C:\Windows\System32 directory. Now you can type in ls on a windows box at the command prompt and it works.
How does this work to make your aliased command?
Name the batch file the name of the alias. I want to alias ls to dir, so my batch file is named ls.bat.
In the batch file, set the RealCMDPath variable to the proper value, in my case it is dir.
So if you want to alias cp to copy, you do this:
Copy the file and name it cp.bat.
Edit the file and set this line:
SET RealCMDPath=dir
Now you have an alias for both ls and cp.
Using different versions of msbuild.exe
You can also use this so you don’t have to add a path.
I need to use C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe but sometimes I want to use C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe. Both files are named the same. So I can easily use my alias command.
Create two files in C:\Windows\System32: one named msbuild35.bat and one named msbuild40.bat.
Change the line in each file to have the appropriate paths for the RealCMDPath.