Linux.com

Home Linux Community Community Blogs

Community Blogs



Fedora 14 Linux and ATI Radeon drivers installation [how to]

Okay guys, this is my first blog post in English, only because I had problems with this and found no solution on the web, so I decided to share this to all of yu.

As you know, Fedora Linux is a lil’ bit tricky when it goes to ATI graphics drivers, so you can use this easy steps to go trough ATI’s official non-free proprietor drivers on Fedora Linux 14 (i686).

catalyst control center linux 587x480 Fedora 14 Linux and ATI Radeon drivers installation [how to]

 

ATI driver installation

Step 1: Open Konsole: Alt+F2 and type: “konsole” [enter]

Step 2: Login as “root”

  1. su  

and enter your root passwd.

Step 3: Update the system

  1. yum update  

…or update just kernel

  1. yum update kernel  

Step 4: Install required tools

  1. yum install kernel-devel gcc wget  

Step 5: Reboot (and login to a new kernel, if any)

  1. reboot  

Open Konsole again, and login as root (step 1 && step 2)

Step 6: Download ATI Catalyst driver (download this version because you’ll have problems with newest)

  1. wget http://www2.ati.com/drivers/linux/ati-driver-installer-10-11-x86.x86_64.run  

Step 7: Start the installation

  1. bash ./ati-driver-installer-10-11-x86.x86_64.run  

…and go with standard next-next-finish yada-yada… everything by default

Step 8: Navigate to proper module build directory

  1. cd /lib/modules/fglrx/build_mod  

Step 9: Compile the driver’s module

  1. sh make.sh  

Step 10: Navigate to the proper module directory

  1. cd /lib/modules/fglrx  

Step 11: Install the compiled driver’s module

  1. sh make_install.sh  

Step 12: Add nomodeset as kernel option to grub.conf

  1. sed -i '/root=/s|$| nomodeset|' /boot/grub/grub.conf  

Step 13: Reboot to a new driver

  1. reboot  

If you get your GUI working, you should find “ATI Catalyst Control Center” in:
Main menu > Applications > Settings > ATI Catalyst Control Center

EDIT: For Compiz Fusion install this:
If you’re using Gnome:

  1. yum install ccsm emerald-themes compizconfig-backend-gconf fusion-icon-gtk emerald compiz-fusion compiz-fusion-gnome libcompizconfig compiz-gnome compiz-bcop compiz compizconfig-python compiz-fusion-extras compiz-fusion-extras-gnome  

If you’re using KDE:

  1. yum install ccsm emerald-themes compizconfig-backend-kconfig fusion-icon-qt  emerald compiz-fusion  libcompizconfig compiz-bcop compiz compizconfig-python compiz-fusion-extras  compiz-kde compiz-manager  

Original article on my blog: Fedora 14 Linux and ATI Radeon drivers installation [how to]

 

Why is my Linux so DAMN slow?

I’ve discovered Linux in 1995 and I have been using it as my only home/work operating system since then. I still love it and want to continue to use and promote it, but in the last 2/3 weeks it’s become almost impossible. In this page I explain why, hoping to get and collect useful suggestions.

 

Manually clone a VMWare Virtual machine from the shell

Introduction

Sometimes you've VMWare appliances and you need to get a physical copy instantly and you don't have VMWare Tools with you or you're doing everything from command line (on a remote console), sometimes you don't even have VMWare (ESX/GSX/VSphere/player) installed or you've just the Player (no cloning from there) but you still need to get a clone of a working machine. I usually create my own appliances with my own utilities, packages and tools installed, I store them as .TAR.GZ and I use them as a base for new machines. Here's what I do to have an exact copy of a machine; it's not a geek trick, it's just a plain basic task, this always works, no matter about the OS inside your VM (Win/Linux/BSD/Plan9/BeOS/...).

 

First: of all you need to do is stop your source machine (in my example “Debian 6”) and locate its directory, then copy the whole source Dir to a new path (in my example “new.machine”)

$ cp -R Debian 6   new.machine
$ ls -la new.machine/
total 534520
drwxr-xr-x 2 ben ben 4096 2011-02-09 09:53 .
drwxr-xr-x 12 ben ben 4096 2011-02-09 09:53 ..
-rw------- 1 ben ben 8684 2011-02-09 09:53 Debian 6.nvram
-rw------- 1 ben ben 211550208 2011-02-09 09:53 Debian 6-s001.vmdk
-rw------- 1 ben ben 234356736 2011-02-09 09:53 Debian 6-s002.vmdk
-rw------- 1 ben ben 107347968 2011-02-09 09:53 Debian 6-s003.vmdk
-rw------- 1 ben ben 2621440 2011-02-09 09:53 Debian 6-s004.vmdk
-rw------- 1 ben ben 65536 2011-02-09 09:53 Debian 6-s005.vmdk
-rw------- 1 ben ben 639 2011-02-09 09:53 Debian 6.vmdk
-rw-r--r-- 1 ben ben 0 2011-02-09 09:53 Debian 6.vmsd
-rwxr-xr-x 1 ben ben 1652 2011-02-09 09:53 Debian 6.vmx
-rw-r--r-- 1 ben ben 263 2011-02-09 09:53 Debian 6.vmxf
-rw-r--r-- 1 ben ben 88558 2011-02-09 09:53 vmware-0.log
-rw-r--r-- 1 ben ben 49667 2011-02-09 09:53 vmware-1.log
-rw-r--r-- 1 ben ben 64331 2011-02-09 09:53 vmware-2.log
-rw-r--r-- 1 ben ben 63492 2011-02-09 09:53 vmware.log

Now delete unnecessary files like the logs

$ rm *.log

Do a massive rename, source/previous virtual machine was named “Debian 6”, you need to replace it with “new.machine” (our new name)

$ mv "Debian 6.nvram" new.machine.nvram
$ mv "Debian 6-s001.vmdk" new.machine-s001.vmdk
$ mv "Debian 6-s002.vmdk" new.machine-s002.vmdk
$ mv "Debian 6-s003.vmdk" new.machine-s003.vmdk
$ mv "Debian 6-s004.vmdk" new.machine-s004.vmdk
$ mv "Debian 6-s005.vmdk" new.machine-s005.vmdk
$ mv "Debian 6.vmdk" new.machine.vmdk
$ mv "Debian 6.vmsd" new.machine.vmsd
$ mv "Debian 6.vmx" new.machine.vmx
$ mv "Debian 6.vmxf" new.machine.vmxf

NOTE: .vmxf file is present on newer releases of VMWare appliances, if you don't have it just ignore it

Now it's time to change information inside your virtual machines, you just need to use your favorite text editor to change few things, keep this files as they're

new.machine-s*
new.machine.nvram
new.machine.vmsd

NVRam is your bios/nvram, it's a binary file and you don't need to change it, *.vmdk are your disks, you just need to change the information header of the disk (new.machine.vmdk), leave the other VMDK files as they are (new.machine-s*.vmdk); VMSD file is usually empty, don't need to change it.

 

Modify your hard disks

If you've more than one hard disk you've more than one .VMDK master file, you need to apply few mods on it, here's the content of the original file (was “Debian 6.vmdk”, now “new.machine.vmdk”)

# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=71ad0a67
parentCID=ffffffff
isNativeSnapshot="no"
createType="twoGbMaxExtentSparse"

# Extent description
RW 4192256 SPARSE "Debian 6-s001.vmdk"
RW 4192256 SPARSE "Debian 6-s002.vmdk"
RW 4192256 SPARSE "Debian 6-s003.vmdk"
RW 4192256 SPARSE "Debian 6-s004.vmdk"
RW 8192 SPARSE "Debian 6-s005.vmdk"

# The Disk Data Base
#DDB
ddb.virtualHWVersion = "7"
ddb.longContentID ="86aa7ebbb50ab88b973ea60271ad0a67"
ddb.uuid = "60 00 C2 9f 9a e3 43 6a-ea 70 c7 fa 35 72 7c 04"
ddb.geometry.cylinders = "1044"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"

Row order and content may vary, VMWare configuration files don't have a fixed order, you may change row order, add comments and some other stuff inside it. Here's what you need to change:

RW 4192256 SPARSE "new.machine-s001.vmdk"
RW 4192256 SPARSE "new.machine-s002.vmdk"
RW 4192256 SPARSE "new.machine-s003.vmdk"
RW 4192256 SPARSE "new.machine-s004.vmdk"
RW 8192 SPARSE "new.machine-s005.vmdk"

So all you need to do is change references to physical hard disk files, nothing more, just change the lines above in your new.machine.vmdk file and nothing else

 

Other Descriptors

It's time to change the VMXF file (extra configs from VMWare), if you don't have it, just skip this step. Your new.machine.vmxf file could be something like that:

52 62 73 9d 7f 10 1b 58-8e 3c 8e 15 8e ef f4 a3 Debian 6.vmx

It's an XML file as you may see, content and VMIDs may change a little bit but it doesn't matter. All you need to do here is to replace this string:

Debian 6.vmx

with this one

new.machine.vmx

and nothing more, here's the result:

52 62 73 9d 7f 10 1b 58-8e 3c 8e 15 8e ef f4 a3 new.machine.vmx

VMX Main configuration file

new.machine.vmx is the machine main configuration file, inside it you find hardware description and file references, it may vary a lot according to virtual hardware, player version and hardware machine version, here's a copy of my new.machine.vmx (original copy from Debian 6.vmx)

.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "7"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "256"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Debian 6.vmdk"
ethernet0.present = "TRUE"
ethernet0.connectionType = "bridged"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
roamingVM.exitBehavior = "go"
displayName = "Debian 6"
guestOS = "other26xlinux"
nvram = "Debian 6.nvram"
virtualHW.productCompatibility = "hosted"
gui.exitOnCLIHLT = "FALSE"
extendedConfigFile = "Debian 6.vmxf"
ethernet0.generatedAddress = "00:0c:29:b1:8b:e6"
uuid.location = "56 4d 05 92 24 e8 b0 b3-f7 37 1f d9 51 b1 8b e6"
uuid.bios = "56 4d 05 92 24 e8 b0 b3-f7 37 1f d9 51 b1 8b e6"
cleanShutdown = "TRUE"
replay.supported = "FALSE"
replay.filename = ""
scsi0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "16"
ethernet0.pciSlotNumber = "32"
vmci0.pciSlotNumber = "34"
vmotion.checkpointFBSize = "16777216"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "1370590182"
vmi.present = "FALSE"
ide1:0.present = "FALSE"
floppy0.present = "FALSE"

Now let's focus on the changes, it's basically straightforward to understand it but I need to mention:

change previous VMDK references to newly created hard disk, basically you need to replace “Debian 6.vmdk” with “new.machine.vmdk” everywhere in your file (just one occurrence)

scsi0:0.fileName = "new.machine.vmdk"

Now it's time to change the label for your new machine in the Server (ESX,GSX,VSphere) or Player with your favorite name (“My new Machine Name” in my case), here's:

displayName = "My new Machine Name"

NVRam file with the new name:

nvram = "new.machine.nvram"

Extended configuration file (only if this is present) with the new one:

extendedConfigFile = "new.machine.vmxf"

Now change the Ethernet mac address with a new one or your machines cannot be on the same network with the same address (as in real cases), just respect mac address notations and change something random in it

ethernet0.generatedAddress = "00:0c:29:b1:ab:ab"

You may change UIDs inside the file but you don't need to bother about them. Save everything and import your newly created/cloned machine inside your favorite player/server.

 

Ready, Set, Go!

Locate your new .VMX file and open it with your Server/Player, you'll see your new machine inside the remote/local repository and you're ready to start it.

We didn't change the machine UID because it's not necessary, VMWare will do it for us, when you run your machine the first time you'll see a window like this

Just select “I copied it” button and VMWare will generate the serial UID for the new machine. Now the machine runs an exact copy of your previous one with the same operating system and configurations inside it, please read these hints to solve possible problems:

  • If you're using a static IP address you need to change it in your new machine to avoid conflicts with the previous one (obviously)

  • If you're using a MS Windows OS you need to change the machine name or you'll have a “name duplicated” error when you start the machine, just change the name and make a new reboot

  • If you're serving clients with a basic service (DHCP, DNS, MS Domain Controller) you need to stop it or you'll have few network troubles (as with real servers) due to two services running in the same network (two DHCP servers in the same net are a bad thing...)

  • udev troubles and linux networking, please read below if you're running a perfect Linux machine but without networking capabilities

 

No networking ? Please read

Everything is fine with your new virtual machine but.... you don't have a network card properly configured ? Keep reading.

If you're using UDEVD (http://linuxmanpages.com/man8/udevd.8.php) you may have a problem, it's just a minor trouble as you'll see.

UDEVD defines plugged network cards in a proper configuration file, network cards are located generally in /etc/udev/rules.d, there's a file called: “z25_persistent-net.rules” | “70-persistent-net.rules” (Debian | Gentoo) or something like that, it's not hard to find it (or let me know and I'll add your information here), generically it's called *persistent-net.rules, let's see it to understand how it works:

~$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib64/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.


# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:21:85:c1:79:37", KERNEL=="eth*", NAME="eth0"

 

Here's the “old” network card (the one you cloned), it's called “eth0” and this card is not available any more (you've just changed the mac address), you may:

  • Delete the line reporting the “eth0” device, just delete this line

  • Change the line with the proper mac address (the one you've changed in the VMX file)

I usually prefer to delete the line so a new one will be created for you on the next reboot

 

NOTE: If you've a line with “eth1” device and you don't have two network cards it means UDEVD has created the line for your with your new (according to him) network card and it left the previous one already there and configured, you may remove eth0 line and rename eth1 to eth0 OR delete both lines. UDEVD will recreate what it needs on the next reboot, don't change your network configuration (etc/networking and so on), just leave UDEVD with the proper card and you'll see it running fine from the next boot

NOTE SAMPLE: If you're following my own example with a Debian 6 installation you don't need to worry about udev, previous versions (etc, lenny, …) are affected by this


IMPROVED SCRIPT
: After few comments reported on this blog I've decided to write a new blog with an automated script, the script does everything reported it by itself, check it out here


I hope this small guide will assist you in some way if you decide to clone your VMWare machines on your own, file formats are basically the same for a long time and that's what I do for basic sys Admin when I don't have the hypervisor or proper tools with me.

Share your comments

Hope it helps

 

Andrea (Ben) Benini

 

 

Midterm rush and AdBlock fun

It's been a while since I posted on my blog - it's been busy weeks as the midterm exams are approaching. Anyway, this post will be short.

I've tried Gnome Shell for about 15 minutes last week. This week, I'm running KDE 4. Coincidence? Maybe more details later - I'll try to give Gnome Shell another shot when I'm out of shock!

After installing KDE 4 (in Fedora 14), I had some problems with Kopete. The buddy icons were not showing up in the chat window. Cause? AdBlock filters in Konqueror. After turning them off, the icons came back. So if you have problems showing images in Kopete, this might be your problem!

That is all! Next time, I'll probably have more content - in the meantime, happy chatting in Kopete... with icons!

 

WIKIBEN: Virtualization Articles Collection

Here's a list of my articles related to virtualization, I've collected all of them in this page to summarize my results, I'll always keep the page updated so you can periodically check my activities related to it.

I've sorted subjects on technology, product and topic, feel free to ask me new topics or arguments if you need more information about something, hope this helps


Generic
VMWare Server 2.x thoughts



VMWare Troubleshooting and Tricks
Manually clone a VMWare Virtual machine from the shell
Clone a virtual machine from the shell (THE SCRIPT)
Mouse/Keyboard not responding on VMWare Player with Linux
Accessing VMWare Server 2 with vSphere Client (the unsupported way)
Access VMWare Server 2 remote virtual machine without web interfaceHOWTO: VMWare Server 2, Disable Web Server Interface



Linux Distro Related Topics

Install latest VMWare Player on Gentoo (without portage)
Install VMWare Player on Gentoo (amd64), the easy way
HOWTO: Install VMWare Server 2 on Debian Lenny, AMD64 (64bit)

 

 

 

 

Ben

 

 

5 Things I Hate Most About Linux

The GNU/Linux computer operating system created through the sewing of miscellaneous Richard Stallman body parts around Linus Torvalds‘ heart is not perfect. Here’s a list of my 5 top pet peeves:

  • coming in at #5 is the fact that using the GNU/Linux operating system causes me great distress due to the guilt of not having paid $300+ to purchase this operating system in a very earth-unfriendly, made-in-China package from my local Bloat Buy retail software outlet.
  • #4 would, of course, be the pain caused by my empathetic tendencies toward those poor souls out there using other operating systems, and my terrible evangelistic need to convert them all. I’m becoming a damned Jehovah’s Witness of GNU/Linux… *Knock-Knock* “Hello, ma’am. I’d like to talk with you a bit today about the everlasting joy of Linux. Come to the light with me, won’t you? Yes, you can bring your cat, too.”
  • 3rd on the list is the fact that GNU/Linux does not follow the engineered obsolescence business plan that has kept free markets and manufacturing buzzing for the past 50 years. It is instead a steady, long-life item that will eventually put many folks out of work. Besides, the best distributions are given away for no cost at all. What’s up with this? This is NOT your granddad’s Capitalism, comrades.
  • my 2nd most peeving peeve is the gnawing certainty that the GNU/Linux was actually a technology that the C.I.A. leaked after discovering its usage in the computers on that crashed alien craft that’s kept in storage in Area 51. No current human intellect could have come up with something so efficient and useful. I think the aliens may have assimilated us without our knowledge or consent. Maybe that’s a good thing, upon further reflection.
  • and first/foremost on my list is the fact that GNU/Linux has increased my boredom exponentially over the last 5 years. I no longer have to run crap cleaners, antivirus apps, defraggers, malware hunters, cookie cullers, bloated/inefficient backup apps, etc. Sheeesh! I have all this time on my hands to do really useful computer stuff nowadays. So, what do I do? I choose to sit here and tap out masterpieces such as this one for your entertainment and enlightenment.

I HATE Linux! I love that little penguin, though.

Later…

 

~Eric

*A reposting from my Nocturnal Slacker (Lockergnome.com) blog. Thanks for reading/commenting.

 

 

 

Installing Ruby and Gems for Vagrant/Opscode/Chef on OSX 10.6.6

So, I just finished a course in London by these guys (www.opscode.com) which was awesome.

They have a really great platform that allows you to manage your infrastructure as code, by writing 'recipes' and uploading them into 'cookbooks' on the managed platform - defining amongst many other things  'this is what I want my sever to look like', and "these are the steps I need to take to make this environment 100% reproduceable with no deviation from its first incarnation to its last".

You can then run one-liners to run up your entire infrastructure either locally with a tool like Vagrant or on a cloud provider like AWS EC2 and Rackspace. - If you havent already, grab yourself an account and give it a try, you can run up to 5 clients/nodes at no monthly cost.

As you may have guessed this relies on a successful install of Ruby and Ruby gems and Fog (amongst other gems) on a local machine or designated management server, to allow you to communicate with the platform.

This worked really well on OSX 10.5, but I had really bad problems after getting a newer Mac with 10.6.6 on it. I found that by default when I tried to install Ruby the newer OSX 10.6.6 compiler was automatically detecting that it was capable of comiling as x84_64, so was downloading/compiling/installing a 64bit version of Ruby.

I tried to do a fat Ruby install of that both supported x86_64 and i386 but this didnt seem to work properly in 10.6.6 at the moment.

In itself this wasnt a problem until I came to use some of the gems that I need to communicate with the Opscode platform, I still havent confirmed if this is due to them only working on i386 version of Ruby or some issue with running different architectures under RVM. However I found that some of the gems failed to work on the x86_64 version of Ruby, even if I then installed a 32bit version, I'm guessing this is something to do with symlinking inside RVM.

Anyway, I thought some other people might find the steps I had to take helpful and hopefully save them wasted time.

To start with I installed the latest version of Xcode available on the Apple Developer site.

then I installed Git and grabbed RVM which allows me to run multiple version of Ruby on the same machine.

I grabbed it from here, http://rvm.beginrescueend.com by running the following:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-latest )

then I added this to my .bashrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

and reloaded Terminal

Then I grabbed the iconv gem and made sure it was available for one of the later versions of Ruby.

rvm package install iconv

Once I had done this I was ready to actually install a version of Ruby that was happy to run all of the gems I needed for Chef and Vagrant. As you will see I did this by forcing the architecture of the Ruby install to be i386

rvm_archflags="-arch i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" rvm install 1.9.2 -C --with-iconv-dir=$HOME/.rvm/usr --patch osx-arch-fix

If I didnt include iconv, it appeared that the build had worked, until I came to use "knife", which gave me a horrible stack trace about it not being able to solve some things ruby was unhappy about.

Once I had finished with this a quick "rvm list" showed me that the 32bit install of ruby was successful =>ruby-1.9.2-p136 [ i386 ]

Then I installed Rubygems 1.3.7 and ran "gem install iconv" and "gem install chef"

then:

"gem install net-ssh net-ssh-multi fog highline rb-appscript gem-man virtualbox vagrant"

So from this point on, assuming you have an Opscode account and all of the above, you can start doing stuff like:

"knife ec2 server create -i ami-id -G AWSdefaultsecuritygroup -Z AWSZONE --region AWSREGION -f m1.instancetype -S <ec2account> -I ec2account.pem -x ubuntu"

Or bring up a test environment following the simple instructions:

$ vagrant box add base http://files.vagrantup.com/lucid32.box
$ vagrant init
$ vagrant up
$ vagrant ssh

Loads more really good info available at http://vagrantup.com

Hope you find it useful....


 

LinuxFest Northwest

LinuxFest Northwest is looking for Sponsors, Exhibitors and Presenters, It's April 30th-May 1st in Bellingham, Wash. register at http://linuxfestnorthwest.org

 

ZORIN for the New and Upcoming Linux Converts

I love linux, and wished I'd used it years ago when I was learning computers. There is an unkown adventure when using opensource. You like creativity and innovation, you will like linux. Plus, it will teach you areas about computers and technology that some of the other popular OSs left out. I am sure you have heard the term, "one size does not fit all". Well in the linux realm, that's exactly true. There are plenty of linux distros customized to fit anybody's need. Don't think one is all you can get. 

Speaking of "one size does not fit all", I have been using a particular distro for a while, and it has great potential--Ubuntu. Ubuntu does pretty much what you expect in an OS and will recommend it to everyone. It is, however, not the only one. 

I like to explore, keeping my mind open to new things and experiences. That being said, I've looked at all the other available distro flavors exploring their uniqueness. There was one that really stood out- Zorin OS 4. 

The reviews mentioned that this distro was a faster alternative to windows and actually utilizes the same theme from windows vista and windows 7, cool. After running the liveCD, the OS booted fast, which was good for a liveCD. First thing I noticed was the theme. It was exactly like vista, more or less. Not bad, especially for users who are coming directly from windows. You will feel right at home. Zorin uses the KDE desktop environment, meaning it is very configurable. 

The task bar lets you pin programs for ease of launch. Very similar to Windows 7. And for those who became accustom to the windows themes, Zorin has desktop options to change the themes to either vista or 7. Like that? 

Zorin gives you the ability to install new opensource programs as like the rest of the linux OSs, yet with a little spice to it. Zorin is a spine off of ubuntu, so you will notice some similarities. In addition, wine is installed by default with an app called "playonlinux" that allows you to run windows apps. So wherever you go, your trusted windows apps follow. And, the programs run better on Zorin.  Wine also gives you a huge list of game you can play one Zorin. GAMES!!! One of the games sold me completely, Call of Duty: Black OPs, NO WAY. And, there are many more, Devil may cry 4, halo, etc. 

Zorin supports a wide range of hardware as well. Which I think is very critical to a successful linux OS. I am running Zorin on an old Dell WHL with a Xeon processor inside and a 1Gb of memory. This machine is loving it. 

Ok for you security gurus, Zorin has an app that allows you to configure your firewall. Thats right, a gui app to configure your firewall. I am not saying it can replace iptables, however, you are fresh to linux, so why not do something you are used to, savvy?  

Now for the online media content viewers. Zorin comes with all the video and audio codecs pre-installed. It supports the opensource and proprietary codec software so you are kept adaptive. The codecs that are support, flash, java and windows media codecs.

Did I mention, that Zorin is blazing fast? Oh yeah, it is. I was opening up multiple programs and windows and everything worked seamlessly. And, it is only 32bit. 

In my opinion, Zorin is the windows equivalent of linux. This is a good distros to use to promote linux and help new users get familiar with the system as they make their way to becoming linux gurus. 

 

Midnight Commander Notes

Midnight commander is a popular file manager available from repositories in almost all major Linux distributions. Many new users find it difficult to work on servers only from command line so midnight commander is a welcomed help. Here are some tips and notes how to use this tool together with my most used shortcuts that I used to give users that never worked with it before. As always for a complete list of keyboard shortcuts and much more man mc or info mc should work.

 

Usage tips

To start midnight commander simply type mc.

[podlevak@55cent:~]$ mc

 

If you want the panels pointing to some specific directories append a path (or two) after the mc:

[podlevak@55cent:~]$ mc /etc/httpd/ /var/log/

 

To go back to command line you don't have to quit midnight commander with F10 - on most shells, here bash is used, ctrl-z will put mc into background and it can be put back to foreground with fg command.

[podlevak@55cent:~]$ mc /etc/httpd/ /var/log/

[1]+  Stopped                 /usr/bin/mc -P "$MC_PWD_FILE" "$@"

[podlevak@55cent:~]$ fg

Another way is using the ctrl-o shortcut for hiding the panels; to show them press ctrl-o again.

 

Midnight commander comes with an integrated editor and viewer - you can use them also directly:

[podlevak@55cent:~]$ mcview /etc/hosts

[podlevak@55cent:~]$ mcedit new_file

 

Shortcuts

I've divided the shortcuts into three groups according to their usage. A little note on how to use them:

  1. when using a shortcut like ctrl-r, hold down the control key and then press the r key
  2. for shortcut like ctrl-x-o hold down the control key and then press the x key, let go and press the o key

File manipulation and shell commands

  • ctrl-x-c change permissions
  • ctrl-x-o change owner
  • ctrl-x-s create symlink
  • ctrl-x-ctrl-s edit symlink
  • esc-tab completion, like tab in shell
  • alt-s search in active panel, after pressing keys just write
  • alt-p previous entered command
  • alt-n next entered command
  • ctrl-space show directory size
  • ctrl-x-i shows file / directory info, press again to return to panel
  • ctrl-x-q quick view - view content of files in a preview window (F7 for search works), press again to return to panel

Displaying content

  • ctrl-o turn off/hide the panels, 2x turns them on
  • ctrl-r rescan (refresh active panel)
  • ctrl-u flip panels
  • alt-o open path in other panel
  • ctrl- frequently used directories, directory hot-list

Selecting

  • Insert select single file
  • * (asterisk) select all files, 2x un-selects if all files were selected, or inverts selection if files were selected (using a mask or insert)
  • + (plus) select mask, regular expression can be used
  • - (minus) un-select mask, regular expression can be used
 

Bash Customization

Almost everyone after a fresh install makes some customizations to make the work on the server easier... here are some I like (yes, bash configuration ahead).

 

History

First history search. I'm quite a lazy person and don't like to type the same commands again and again, especially the long ones :) so I usually add this two lines to the inputrc file, which enables quick and simple history searches - just use meta+up arrow and meta+down arrow, meta is usually Alt. Sure you have ctrl+r for incremental reverse history search, but this solution is IMO better.

[root@cent:~]# vim /etc/inputrc

# for simple history search
"e[1;3A": history-search-backward
"e[1;3B": history-search-forward

$endif

After added to inputrc, write a beginning of a command and press alt+up arrow to browse the history.

 

Keeping track of BASH history is also important so you can set a huge HISTSIZE value and HISTCONTROL to ignoreboth, which will make bash ignore duplicates and commands beginning with a space won't be shown in history.

[root@cent:~]# vim .bash_profile
export HISTSIZE=10000
export HISTCONTROL=ignoreboth

The duplicates won't be in history:

[root@cent:~]# ls /var/www/html/
[root@cent:~]# ls /var/www/html/
[root@cent:~]# ls /var/www/html/
[root@cent:~]# history | tail -n3
1809 xm list
1810 ls /var/www/html/
1811 history | tail -n3

And if it begins with a space it won't show up in bash history at all.

[root@cent:~]#  cat /etc/shadow | grep root

[root@cent:~]# history | tail -n3
1809 xm list
1810 ls /var/www/html/
1811 history | tail -n3

 

Prompt color

Now some prompt eye candy... a lot of old-school admins really hate color prompts. The idea is that you should concentrate on the output and not on the prompt itself. So it's up to you, I like this prompt configuration for root and user:

[root@cent:~]# vim .bash_profile

export PS1="[[$(tput bold)][$(tput setaf 1)]u@h[$(tput sgr0)]:[$(tput setaf 3)]w[$(tput sgr0)]]$ "
[podlevak@cent:~]$ vim .bash_profile

export PS1="[[$(tput bold)][$(tput setaf 2)]u@h[$(tput sgr0)]:[$(tput setaf 6)]w[$(tput sgr0)]]$ "

btw also the full path will be shown, but you will need tput for this

 

If you want all new users to take advantage of those changes put it in:

[root@cent:~]# vim /etc/skel/.bash_profile

 

MOTD

Now a lot of users hate this messages, I think they are fun... On some serious servers I used to put some legal notice in the motd file, like in the example below:

[root@cent:~]# vim /etc/motd

^[[32mWelcome to cent server !^[[0m

^[[31m* The use of this system is restricted to authorized users.
* Unauthorized access is forbidden and will be prosecuted by law.
* All information and communications on this system are subject
to review, monitoring and recording at any time, without
notice or permission.^[[0m

I didn't come up with it, it's a slightly changed and colored version I found on the Internet... IMO doing this has similar meaning as writing at end of your email footer this serious legal notice that you are not allowed to read the email if your are not the intended recipient and you go to hell if you do :).

Note: The symbol ^[ to print it with color is done in Vim by pressing ctrl+v+esc .

 

Fun

To be a little wiser after each login you can use fortunes. The command will print a quote, joke or whatever depending on your configuration.

[root@cent:~]# yum install fortune-mod

After it's installed you can test it, to list available fortunes use the -f option.

[root@cent:~]# fortune
A hacker does for love what others would not do for money.

[root@cent:~]# fortune -f

And to display a message after login, add it to your .bash_profile file.

[root@cent:~]# vim .bash_profile

echo -e "
$( fortune -e linux people drugs wisdom )
"

On my Ubuntu box I've used fortune together with cowsay.

root@crack:~# aptitude install fortune fortunes cowsay

To list all your cow files and print one use:

palo@crack:~$ ls /usr/share/cowsay/cows
palo@crack:~$ cowsay -f tux.cow $(fortune)




/ Arnold's Laws of Documentation: (1) If | it should exist, it doesn't. (2) If it |
| does exist, it's out of date. (3) Only |
| documentation for useless programs |
transcends the first two laws. /
----------------------------------------
.--.
|o_o |
|:_/ |
// (| | )
/'_ _/`
___)=(___/

Something like this should do the trick in the bashrc file:

echo "$(cowsay -f tux.cow $(fortune))"

 

What changes and customizations do you make to new installed Linux severs ?

 
Page 15 of 122

Upcoming Training Courses

  1. LF331 Developing Linux Device Drivers
    03 Jun » 07 Jun - Virtual
    Details
  2. LF411 Embedded Linux Development
    24 Jun » 28 Jun - Silicon Valley
    Details
  3. LF422 High Availability Linux Architecture
    15 Jul » 18 Jul - New York
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board