Friday, November 06, 2009

Ubuntu v/s Windows 7 : Some early thoughts


Whether you belong to either Windows or Linux territory,here is a small account of my own comparison of the new competitors in OS field.I could get a taste of both the new OS's in relatively old (3yrs !!!)desktop having 2GB RAM and an AMD Athlon XP Processor(2GHz).Here i am taking the vital aspects of an operating system into account,to decide which is better, Ubuntu 9.10 (Codename : Karmic Koala)or Windows 7 (Codename : Vienna)?

Speed: Talking about speed, if you've got an older computer that is starting to feel sluggish but you either don't want to or can't afford to buy a new computer, give Ubuntu a go. You'll get an up-to-date operating system running quite smoothly on your out-of-date computer.Although Windows 7 claims a great performance makeover, it cant keep the pace in old hardware as i found.

Tip: Windows 7 is much better than Vista on older hardware, while Ubuntu always has been strong on a wide range of hardware.


Drivers and hardware: Ubuntu is generally good at recognising hardware. Windows needed a driver downloaded for my vintage Wi-Fi PC Card, but it worked right away with Ubuntu But if Ubuntu doesn't automatically install a driver, it can be quite tedious way, and not all hardware and peripherals will work with Linux. Sometimes you'll have to go to the command line, which is terrifying territory for most users. It's worth checking to see if Linux drivers exist for your printer and other key peripherals. It gives me headache why Windows forgets hardware that I have installed previously in even Vista. Windows 7 doesn't seem to have completely solved these issues.

Tip: Both Microsoft and Ubuntu could improve how they handle drivers.


Multimedia: Looking at the default applications that come with both Windows 7 and Karmic Koala, Ubuntu installs needed Players for audio/video. Because of licensing restrictions and Ubuntu's own philosophy, it does not ship with the ability to play commercial DVDs. It's relatively easy to add commercial DVD support by adding Ubuntu Restricted Extras in the Software Centre. Most versions of Windows 7 come with Windows Media Player and Media Centre which scores over ubuntu in DRM-restricted content . The Media Centre is impressive and polished. It organises your pictures, video and music files neatly.

Tip: Microsoft wins this one with its Media Centre, though Linux enthusiasts will be quick to point out the digital-rights management issues of Windows.


Software and applications: In terms of software, i would compare Ubuntu with iPhone. Almost anything you care to do, there's an app.However, you'll have to learn your way to it. For people looking to make the switch to Linux, osalt.com is a good directory of open-source alternatives to common commercial software. Ubuntu comes with OpenOffice and Gimp photo editing software installed.Windows 7 users will need to buy Microsoft Office and such paid packages which is also a turnoff as ever before, or you are now offered download of OpenOffice and Gimp. Ther is a refreshed tool called Ubuntu Software Centre which deserves mention. You can search the directory full of hundreds of applications.

Tip: Ubuntu wins this hands-down with a huge range of free software packages ready to download.


Cloud computing & Storage: Ubuntu 9.10 brings cloud storage to the masses with its Ubuntu-One service. Whenever you save a file, you have the option to save it directly to Ubuntu One. Up to 2GB of storage is free, and you can pay for higher amounts of storage. You can also share files with other people, and your files are easily available on other computers, even ones not running Ubuntu. The service is in beta, though, so I'd expect a few drawbacks. Microsoft has a remote storage and remote desktop service in beta called Live Mesh, which offers 25GB of storage for free. It's not yet integrated into the operating system and Microsoft is under scrutiny about what it integrates into the OS because of its market dominance.

Tip: Ubuntu wins this as well. Live Mesh isn't as well integrated yet as Ubuntu One is immediately from startup.


Ease of use: This is subjective. I've spent the past two years using Ubuntu, and find it relatively easy.(shhh just like any linux flavour, there is a learning curve). Ubuntu has made great strides, but average users will still struggle with it at times. Adding new software sources so that you can easily install applications such as Skype or Google Earth will be beyond most average users. User interface design still lags behind software on Windows 7. Windows 7 will be an adjustment for XP users. Vista users won't notice a change apart from a faster, smoother experience and fewer annoying pop-ups.

Tip: Windows still is easier to use than Linux for some key tasks. Ubuntu is making a lot of progress, but Microsoft has stepped up its game as well.


Graphics: Whoa !! like ever, Ubuntu is way behind Microsoft in 3D Gaming and graphics. I couldn't withstand sight of my nVidia 3D accelarator card laid useless in even new version of Ubuntu.Well, there aren't much capable 3D games in the linux front as well.Folks would you keep your promise to come up with a good effort in this front ?

Tip: Planning for high-end multimedia and gaming ??, never look at Ubuntu.


Final Verdict: Windows 7 is a worthy successor to Windows XP. Vista had well-known flaws, which meant it never replaced XP for most users. For those with a lot of investment in Windows software, there probably will be no reason to look elsewhere. For those not that tied into the world of Windows, Ubuntu is certainly worth a look. Consumers have never had more choices for capable, powerful and easy to use operating systems, and Ubuntu is only one Linux distribution. I had tried Linux frequently from almost 10 years ago, but I always gave up within a few days until the arrival of Ubuntu. It is a relatively easy-to-use, modern operating system, and one that will only cost you the time to download it.

Copyright Notice: Windows 7 and Ubuntu logos and titles used in the post have respective trademark restrictions from Micorosft Corporation and Canonical Inc Ltd.

Sunday, September 20, 2009

Script kidding

'Script' is a cool utility command in linux terminal as a way to store or share everything printed during a terminal session. It's a good way to keep a record of everything you do (or did) for a specific session at your termial.Alternatively,it can be a great way to remotely demonstrate command-line Linux to a less experienced user.

First we'll look at keeping a record of everything. The can be done by just issuing the command script. The output of your session will be written to a file named typescript. If you want to specify a file other than the default, use script file where file is the name of the file storing the session.

Code 1: Making a script session file

% script
Script started, file is typescript
% uptime
13:27:53 up 89 days, 3:50, 1 user, load average: 0.27, 0.35, 0.29
% uname -srvmpio
Linux 2.4.20-gentoo-r4 #1 SMP Fri May 9 08:54:35 EDT 2003 i686 Intel(R) Xeon(TM)
CPU 2.00GHz GenuineIntel GNU/Linux
% exit
Script done, file is typescript

The session file can be reviewed later with a pager such as more, less, or cat.

Code 2: Viewing script session file

% more typescript
Script started on Wed Aug  6 13:27:47 2003
% uptime
13:27:53 up 89 days,  3:50,  1 user,  load average: 0.27, 0.35, 0.29
uname -srvmpio
Linux 2.4.20-gentoo-r4 #1 SMP Fri May 9 08:54:35 EDT 2003 i686 Intel(R) Xeon(TM
CPU 2.00GHz GenuineIntel GNU/Linux
% exit
Script done on Wed Aug  6 13:28:01 2003

Now we'll look at sharing a terminal session. The easiest way to do this is combining script with mkfifo (which creates a named pipe). Note that you need to use the -f option (script -f) to flush output after each write. This way, the terminal can be written to by User A and viewed in (near) real time by User B.

Code 3: User A's terminal

<span style="color:#990000;">% mkfifo demo; script -f demo</span>
<span style="color:#990000;">Script started, file is demo</span>
<span style="color:#990000;">% echo 'Hello World'</span>
<span style="color:#990000;">Hello World</span>
<span style="color:#990000;">% exit</span>
<span style="color:#990000;">Script done, file is demo</span>
Note: User A's terminal will wait for input until User B issues the cat command (or accesses the named pipe).

Code 4: User B's terminal

% cat demo
Script started on Wed Aug  6 13:48:51 2003
% echo 'Hello World'
Hello World
% exit
Script done on Wed Aug  6 13:49:04 2003
There are many other cool ways script could be used. Now do you get amused how i record my complex workarounds with servers or applications for future use or for blogging ???


How and when here for ur reference : http://www.linux.com/archive/articles/53729


Saturday, April 04, 2009

Exporting Display between Linux hosts

This tip may come handy in a network environment if you want to export the display of a linux machine to another to run tools or programs in GUI mode.Think of a scenario in which you are not having the access to the display of another machine and want to test a tool or application urgently in GUI mode.All you r left with is the display of your machine booted in graphical mode and a privilaged access to the machine you want to test the tool from.



Fig: Firefox executed from remote host

I have found this useful in current workplace where testing of tools in GUI mode is essential often as part of OS support we are giving to the developers.This is found to work in almost all linux flavours with some additions in some distributions.

Note that this is heavily dependant on the speed of your network connection. If u think u can run some application like mozilla off a box on the other side of the country on a 56K modem it is probably not going to work very well. The best application for this is running programs over the same standard LAN or possibly a high-speed WAN.

Background

For this we r going to assume the machine from which we r exporting display as remote host and machine to which we export as localhost (GUI login).

Steps

First ,on the local machine you're going to need to give the remote machine access to connect to your X server. Use the command xhost to do this in localhost:


// This command allows the machine remotehost to connect

# xhost +ip of remotehost
eg: #xhost +192.168.192.17

Secondly,on the remote machine, you need to export the $DISPLAY variable to your local machine. After that, you should be ready to run GUI programs remotely:

//This command allows the display of localhost to access that of remotehost

# export DISPLAY="ip of localhost:0.0"
eg: # export DISPLAY="192.168.192.10:0.0"

Now be ready to fire up the command of the tool/program in the shell of localhost after gaining access to the remotehost shell :
# ssh ajith@192.168.192.17  (Be sure to export the display specifically for the user)

# gvim & (Command for GUI tool)

Securing and encrypting the data

Note that This is very unsecure and not recommended since everything you type including passwords will be transmitted over the network unencrypted.To tunnel the connection over SSH and thus encrypt the traffic,edit your '/etc/sshd2_config' file.
(Refer your distribution manual for the right sshd  file)

In  /etc/sshd2_config of remote machine and local machine,

// Add or edit the following line as

ForwardX11     yes

Now connect from the local machine to the remote machine via ssh and start your X application.Notice that you don't have to set the DISPLAY variable, ssh automagically does that for you. You do however have to allow access to your local machine's X server (see above).

I happened to stumble on some issues raised in a forum on the topic : http://www.linuxquestions.org/questions/linux-networking-3/how-to-export-the-display-304667/




Saturday, March 07, 2009

Supporting essential applications for linux desktop

Hi there, nowadays we see lot of linux installations coming up in our organization, paving a big way to replacing the old OS's and the issues in them too seem to multiply.Along with the installation, we too have to support the applications in it installed for developers.A common issue we faced was the installation of firefox and adobe reader which is not natively available with the enterprise version of linux OS we are using.So, solution we have now come up with is :

i) Repository of such softwares
which need frequent installations for developers to be hosted in our machines which act as FTP server.

ii) The repositories are in a common folder and needs admin-level access so that only we are authorized for copying using SFTP.

iii) Packages are divided into developer tools, utilities, and other folders for ease of access

Also, i am outlining a solution for installing flashplayer plugin for Firefox which is a common problem in all the machines which have installed Firefox.If you view flash charts or view flash animations in your firefox browser in linux, go for the following steps:
  1. wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz
  2. tar -zxf install_flash_player_9_linux.tar.gz
  3. mkdir ~/.mozilla/plugins/
  4. mv install_flash_player_9_linux/flashplayer.xpt install_flash_player_9_linux/libflashplayer.so ~/.mozilla/plugins/
  5. nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so
  6. close all firefox instances and restart iceweasel/firefox/whatever
NB: Be sure to check nspluginwrapper installed before trying out this. Also, your machine must be exposed to outside network without a proxy so that wget works for download of the plugin package.Otherwise, go for http download by googling the appropriate package for your flavour of linux.

I tried the above steps in a both ubuntu desktop at my home and RHEL4 AS version at the workplace but can work in most linux installations.Since the workplace machines are in an isolated network, i had to use the already downloaded packages in the FTP server repository.


Happy browsing :)