Running linux at work

Linux at Work

At home, I use a combination of Mac OS X, Ubuntu and Debian — this does me very nicely. At work however, I’ve been using Windows XP, and I’m pretty damn fed up with it. Here’s what I did to remedy the situation.

I’d ordered some free CDs from Ubuntu’s ShipIt service, which included a Live CD. I thought it would be prudent to use this to check that the computer could actually boot Ubuntu, happily it could. I was particularly pleased that (with the help of some extra packages) it was able to use my nvidia dual monitor setup.

For my next trick, I booted from a BartPE CD including Symantec Ghost, which I used to copy an image of my hard disk to an external disk. Once that was done, I booted from the Ubuntu install CD, erased the hard disk and installed Breezy Badger.

Breezy installed fine, but just like the live CD it only detected one of my monitors. I fixed that first:

# apt-get install nvidia-glx nvidia-settings linux-restricted-modules-2.6.12-10-386 
# vi /etc/X11/xorg.conf

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/CID"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# paths to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection

Section "Module"
# Load "GLcore"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

Section "Device"
Identifier "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 0"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "MonitorLayout" "LFP, CRT"
Screen 0
EndSection

Section "Device"
Identifier "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 1"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "MonitorLayout" "LFP, CRT"
Screen 1
EndSection

Section "Monitor"
Identifier "monitor0"
Option "DPMS"
HorizSync 28-64
VertRefresh 43-60
EndSection

Section "Monitor"
Identifier "monitor1"
Option "DPMS"
HorizSync 28-64
VertRefresh 43-60
EndSection

Section "Screen"
Identifier "screen0"
Device "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 0"
Monitor "monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Section "Screen"
Identifier "screen1"
Device "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 1"
Monitor "monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "screen0"
Screen "screen1" RightOf "screen0"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
Option "xinerama" "on"
Option "clone" "off"
EndSection

Section "DRI"
Mode 0666
EndSection

Once I had that working, I upgraded the kernel to a version optimised for the Pentium 4, this quickly broke the dual monitor setup. If you upgrade the kernel, make sure that you have a linux-restricted-modules pacakage that matches the output of uname -r, in my case, # apt-get install linux-restricted-modules-2.6.12-10-686

Читайте также:  Installing software packages linux

Next, I tackled VMware. This doesn’t play all that nicely with Ubuntu, but it does install. Need some packages:

# apt-get install linux-headers-2.6.12-10-686 build-essential gcc-3.4 g++-3.4 
# ln -s /usr/src/linux-headers-2.6.12-10-686 /usr/src/linux
# export CC=/usr/bin/gcc-3.4

Use uname -r and cat /proc/version to determine the correct package versions.

Retreive the VMware tarball and extract it. Also, fetch the latest version of the VMware-any-any script and extract it.

# tar zxf VMware-workstation-5.0.0-13124.tar.gz 
# tar zxf vmware-any-any-update94.tar.gz
# cd vmware-distrib
# ./vmware-install.pl

Don’t run vmware-config.pl when it asks, instead:

# cd ../vmware-any-any-update94 
# ./runme.pl

This time, do run vmware-config.pl. VMware is now in the panel — Applications, System Utilities.

I now used the BartPE disk again to restore the ghost image onto a virtual machine. I encountered a small problem — Ubuntu would detect and mount the USB external hard drive with my image on it, rather than handing it off to the virtual machine. I could probably have solved this, but instead I just attached the driver to another PC, shared it and restored it across the network. Once restored, the image booted OK in VMware, but XP required re-activating.

XP wouldn’t re-activate over the internet, so I had to call Microsoft. After keying the 48-digit activation ID into the phone, I was told by an automated annoucement that it was not recognised. Grrr. So, I spoke to an activation humanoid, acted dumb and after 10 minutes or so it was re-activated. People say Linux isn’t user-friendly?

I set up OpenVPN so that I could access my computer from home. It worked great, but I forgot to install sshd! Bugger. Fixed that the next day with apt-get install openssh-server . I had left OpenVPN running on the Windows virtual machine, so fortunately I could still RDP to that.

Читайте также:  Remove all symbolic link linux

Источник

Using Linux at Work

When I started using Linux, I wondered when I would get to actually use it “on the job”. It wasn’t easy sometimes to work with a Windows-based computer—when there’s a skill set available that can help you do things faster on the computer. This skill set is the Linux command shell, but as mentioned your computer runs Microsoft Windows. What can you do??

At one job, I was able to install Perl. At another job one had to submit a request (with business justification) to add software to a workstation. Instead of Perl I thought “why not Python?” Since both times it was a Windows XP Environment, I used the DOS command line (or “CMD” app) to execute the Perl or Python programs.

I used the DOS CMD because (at that time) I did not know about Cygwin. Using the DOS CMD to execute programs is easy. The difficult part is dealing with case-insensitivity (which hurts portability) and using a shell to navigate folders with spaces in the names is a real pain.

Using the DOS shell to execute programs is not the same as using Cygwin. Cygwin is command shell that emulates a working Linux environment. Installing Cygwin with the base packages is simple and will provide a good “starting point” for learning some shell commands.

Want to use Linux but your work computer is Mac OS-X?

OS-X (like Linux) is Unix-based. It has a shell that’s known as “Terminal” and it is in the Applications/Utilities folder. You can also (if the OS is 10.5 or later) use keystrokes (apple + Space bar) to show the “spotlight search” box at the top right and start typing Terminal. When search finds “Terminal” then press ENTER and voila! Say hello to the Darwin Terminal.

Читайте также:  Вывести значение переменной linux bash

Darwin handles the basic stuff really well. It’s capable of helping you learn Shell commands. But it doesn’t do everything that a regular Linux distro does. Darwin’s limits can be overcome by installing apps and libraries. Most likely you will need your System Administrator’s help to get and install X11, MacPorts, or Fink to augment the BSD-derived Darwin environment.

Источник

Оцените статью
Adblock
detector