Saturday, June 02, 2007

Linux for Windows Users

Prologue


I would it would not be an overkill to say that there was always a time for any Windows user,that he was temped to try an alternative Operating System.That tempation was even more strong when Windows were doing their dirty tricks and stopped functioning out of a sudden.This time has come for me too.After 2 days of fighting to my Windows XP trying to explain them that my MONITOR is supposed to be the primary device and not the TV that I dont even have connected to the system I came across an interesting trick.I wanted to get my work done and did not want to setup the system from scratch.Then I met wubi



Wubi



What wubi does is really original.It allows you to install Linux from Windows.With a 3 step installer and minimal user interference.In addition to that it does not mess with your HDD since it installs everything on a folder where you tell it to by creating some Virtual Hard Drives.In other words its really safe of those who dont even know what partition is.Even if you mess everything up just log to windows and unistall it from add remove programs just as easy as the mIRC....

Enough with the blattering lets start the games.First we need wubi (9mb) and a linux ISO.If you dont feel sure about which linux to get you can let wubi download the iso for you.If you want really fast download though just do it yourselves from here.Remember to Get the Desktop Version,x86 and alternative Iso or the wubi wont accept it.When it downloads put it in the same folder with the wubi.exe and run it.You should get to this screen eventually





The Username and Password you are supposed to provide them for the Linux.Mind that the pass will be asked a lot so keep it easy to type.If you press install it downloads iso (if its not downloaded by you) and installs.
But I recommend you to check the settings before that.There they are.





Dont panic with all those things you have no idea what they do.Let me give you a quick info.

  • Swap is the same as windows Virtual Memory just in a separate partition.So normally its best to keep it 2xTimes the Ram of your system.But it will work for 1GB just fine if you only wanna check linux out.
  • System is the same as the /windows forlder on your system.The main system files will be installed there.
  • Home is more or less a combination of the MyDocuments,ProgramFiles and User Settings.
  • The installation Drive is where you want the virtual files installed.Pick one where you can spare the space.It also shows you how much space is left after wubi is installed
  • Desktop Environment is what type of grafic environment you want.I highly recommend Ubuntu for starters.
So what are the best settings.It depends on each peoples system.The only thing I can recommend for sure is the Ubuntu.For minimal system setup I have made it work with 1swap,3Home,3System but next time I decided to go 2,4,4.So choose the space you want to spare and install wubi.When done it shall ask for reboot.Accept it and when the system restarts you shall see a promt to start Windows of Ubuntu.We start Ubuntu and wait for the installer to Finish.Then it will restart once again and the system will be ready.No more user Interaction needed.

In case you wanna use other that the normal ISO files there is a way even for other debian based distributions or 64Bit ones.I suggest you first try to see how the normal ones work then play with the unofficial ones.For anyfurther info check the Wubi Guide and the Forums...


Ubuntu...ing...



If all goes well you shall be presented with the login screen.You insert the Username and Password we put in wubi and there you are.You are inside Ubuntu.This is the First time Desktop.




I though it looked kinda minimalistic.Dont worry and we can change it a LOT.Since you are used to Windows you can make it look more like it.Im gonna use a Vistaish template so you can see how customizing Desktop works.All elements of those bars are customizable.So you should just delete the upper one and customize the lower one.Right click to delete panel on top.Then go on bottom and delete the workspace switcher and the Recycle Bin.Also UNLOCK the Show Desktop Panel and the Window list if its locked.Finally Right Click and Add to Panel.





From Here add the
  • Main Menu(the Ubuntu Icon you should not normally have the other main menu)
  • Keyboard indicator
  • Notification Area(Tray in Windows)
  • Volume Control
  • A clock
  • A couple of separator if you wanna be aesthetically perfect.
Each of those elements can be moved along the bar.I think that you can set the to the way you are used to with little effort.When done you can lock them.

Screen Monitor and Grafic Card Drivers

Now that the menu is configured to a more easy for you way lets check out our system Hardware support.If the screen is feeling tiring probably your monitor is not supported.Go to System>Prefferences>Screen Resolution and try to set a desired Resolution and Refresh Rate.If you can you are lucky ones.If not we need a get our hands dirty but first we need to make a decision.

Do you wanna play heavy 3D Windows Games or Not.If you do,you have to install the Proprietary Drivers for your card(Official) else we can just skip that part.For Nvidia its highlly recommended and also for ATI after the R480Chipset (X850 Series) even though its a pain.If you only wanna move along and decide later skip to next chapter and go to Beryl.

Installing proprietary drivers is easy at Ubuntu.Go to System>Prefferences>Restricted Drivers and just enable it.It will setup everyhing aytomated and you have to restart the system



Xorg



Xorg is the CORE of the Linux System Grafical environment.You will have to edit it in order to make tweaks.Im gonna show you how we do a simple task such as fixing a monitor that is not recognizing.If your system works so far and you did not install the drivers you can move to Beryl Part or just read this to learn.

First of all before learning I recommend to make a copy.You never know what may go wrong.So type this on terminal

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup1

To make you understand what you are doing Sudo=super user.Linux does not allow every user to edit everyhing.cp is the copy command. The rest is the location of the files.CAPS do matter so x11 will not work.Now lets edit

sudo gedit /etc/X11/xorg.conf

That will get you to a notepad like application with a lot of text inside.Move to the Monitor Section and it should say

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 48-40
VertRefresh 48-60
EndSection

If we want our monitor to display the correct refresh we just change the HorizSync and VertRefresh to our monitor ones.If you dont know them but remember how your windows one worked at 85refresh you can set it to HorizSync 60-65(its mainly ~ -20 of the Vertical one) VertRefresh 85-85

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
HorizSync 60-65
VertRefresh 85-85
EndSection

Save exit and press Alt+CTRL+Backspace to restart the Xserver.Log in and see if its fixed :)

An alternative way is the modeline one.Type this on a terminal:
gtf horizontalresolution verticalresolution refreshrate and if will give you a long line.For example for 1024x768 100hz I type

gtf 1024 768 100

# 1024x768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz
Modeline "1024x768_100.00" 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync

Take that line without the # and add it on xorg instead of the refresh rates we used before and it will work

REMEMBER IF YOU CHANGE THE monitor Identifier you also have to change it on the Screen Section or you wont be able to boot

You can also edit display modes on the next section Section "Screen" .

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc R430 [Radeon X800 (PCIE)]"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection

This one means that when you set 24Bit Colour you can choose from those 3 available resolutions.You may also add the refresh rate on each resolution or delete the res you dont like i.e

Modes "1024x768_85" "800x600_100"

This one forces 100 Refresh rate on 800x600 while 85 on max and does not allow you to switch to 640x480.



Beryl Eyecandy



This is the most important and neat feature you will love in Linux.Its a project to help you get 3dimentional Desktop.Unlike Vista its ACTUALLY 3D and has very low requirements.I have managed to run Beryl on an AMD 1300 with 9600Ati card and 513 Ram on 266Speed.Here is a quick look at how it looks..





And you can watch some videos of its features on youtube.Here is a nice Demo.

Installing applications to Ubuntu is kinda easy even when it involves the Termina.Fortunatelly for us beryl can be also grafically installed (at least the light Version)Go to Add/Remove.It will ask you to Input password and refresh the list from the net.You do both.Select it to show all available applications on the upper right and search for Beryl.You should see something like that.






Select Beryl Manager and Beryl hit apply and you are done.In most of the cases that is all you need to do if you did not install any driver and got an Nvidia or older ATI.To run Beryl you can either find it on the applications>system Tools or press alt+f2 and type beryl-manager there.You shoud see a gem on the notification area and your windows should become more elastic.For the cube press alt+ctrl and move the mouse.You can set the other settings on the beryl setting manager.

If you now want themes in the windows and I think you do you need to install the Beryl Theme manager.For that we need the terminal.Open it and type

sudo apt-get install emerald emerald-themes

When done if you right click on the Gem Icon you should be able to change theme

If you wanna set it to startup go to System>Prefferences>Sessions>New startup item and Put whatever name you want and run "beryl-manager"



Beryl Advanced



Now lets get to some more advanced commands.THose are not needed or you better wish they are not needed.ATI support for Linux is a joke and you may be forced that way....If you got everything working by now you can skip this section.

Let me give you some explanations.There are 2 ways to get 3d Desktop accelaration.Xgl and AIGLX.ATi official drivers do NOT support AIGLX which is far supperior while the default open source ATI drivers do support it but do not support Games.If you got Nvidia you can have both at the same time.For Ati you have to SHUT down XGL+Beryl for games and 3d Apps to Run

How to ATI+XGL+Beryl:

I suppose you already got the official driver installed.To check for that type

fglrxinfo

and you should get

display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON XPRESS Series
OpenGL version string: 2.0.6334 (8.34.8)
If not use the restricted driver manager OR the add/remove programs to use the binarydriver for an easy installation.This driver may cause some Hybernate-Powermanagemt Issues to Amd machines hence you may want to updrage to the latest official driver which is described in the following paragraph:

To manually install the latest ati driver you have to do this you should get it from here ATI 8.38.6-x86_64
and follow this commands

sudo gedit /etc/default/linux-restricted-modules-common and add "fglrx" to DISABLED_MODULES="". Then install

sudo apt-get install linux-headers-generic build-essential debconf dh-make fakeroot gcc-3.4 libstdc++5 module-assistant

chmod +x ati-driver-installer-8.38.6-x86.x86_64.run

./ati-driver-installer-8.38.6-x86.x86_64.run --buildpkg Ubuntu/feisty (or edgy, whatever)

dpkg -i xorg-driver-fglrx* fglrx-kernel-source* fglrx-amdcccle*

m-a prepare

m-a update

m-a a-i fglrx

depmod -a

sudo gedit /etc/X11/xorg.conf from using "vesa" to "fglrx" and add

Section "Extensions"

Option "Composite" "Disable"

EndSection



Section "ServerFlags"

Option "AIGLX" "off"

EndSection

at the bottom.

Now Reboot if you installed drivers
If everything is ok you have to change the place beryl is downloaded from.To do that

gksudo gedit /etc/apt/sources.list
You should get that notepad again.In the end of file add a new line
deb http://ubuntu.beryl-project.org/ feisty main
Save and close.(This allows us to download beryl version from its own site and not ubuntus version)Then
sudo wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
This one gets the key and finally we install with

sudo apt-get install xserver-xgl beryl-ubuntu beryl-manager emerald 
The Beryl PLugins Unsuported can be skipped if you dont want ALL the neat tricks.Same applies to emerald-themes if you dont want the default themes there.If you want to test them out as you should just add this to the previous line of install :

emerald-themes beryl-plugins-unsupported

Its almost complete.We only need to downgrade the beryl core in a version that works with XGL

sudo gedit /etc/apt/preferences

Paste,save exit
Package: *
Pin: release o=lupine
Pin-Priority: 1000
Update and install Beryl Core
sudo apt-get update
sudo apt-get install beryl-core=0.2.0~0beryl1
This has installed beryl.Now we need to create a diffirent session to log into it with XGL.

sudo gedit /usr/local/bin/startxgl.sh
This Creates a startup script.It should be blanc.Paste this code into it save and close
#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"
xauth -i add :1 . "$cookie"
exec dbus-launch --exit-with-session gnome-session

Make it executable now

sudo chmod a+x /usr/local/bin/startxgl
.sh

Adding the Session Menu now
sudo gedit /usr/share/xsessions/xgl.desktop
And copy paste this,save exit
[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application
Done Press Alt+Ctrl+Backspace and change session to XGl,login and enjoy




More Appications


We got the Ubuntu and Beryl working.The hard part has passed.Now lets add more applications to make our life easier.Open the add remove selection and install those.

  • Ntfs Configuration Tool .By default the linux does not allow you to mess with windows drives.This tool allows you to make them writeable.If you face any issues with the default version you can update to the one here.Not shutting down may be one issue it causes.
  • Amule a Linux emule client
  • ktorrent,Deluge A bitorrent client
  • Wine .Windows emulator.Really cool way to run Exe files.
  • GnomeBacker,Brasero Burning Applications for Cds DVDs
  • VlC Best Mediaplayer out there.Also Xine is impressive one and highly recommended but you have to install from command promt (sudo apt-get install xine-ui)
  • JaVa 6 web start
  • XMMS (Winamp like)
Also do get Automatix2

This allows some extra applications to get easily installed such as

  • Flash player for Firefox
  • Multimedia Codecs
  • Frostwire (Limewire Free)
  • SLAB (custom Menu instead of start one.Check it out)
Aytomatix should install fine by just clicking on the file like a windows installer.If it fails do follow the steps of this guide

Last but not least there is some non free software you may like.

  • Crossover Office .This allows Ms office and other win applications get installed and run easily.Needs Wine
  • Cedega .Its like Crossover office for Windows Games.You can see a list of suported games here
  • NeroLinux.If you cannot live without your Nero you can Get linux Version.I think nero 6.3 Premium Serial works there..


Extra tips


  • For more application support you may wanna try your windows apps with wine.Just browse to the exe and right click>open with other application>Use Custom Command>wine

  • Or just type on the terminal wine application.exe I did that so I can run utorrent which seems to work just fine.Same applies to isobuster and many other apps.You can easily create a launcer too so you dont have to type it.Create launcer and input inside in the run part "wine /etc/media/drivername/blablabla/application.exe" and you are done :)


  • If you want to autolog to the Ubuntu without entering password go to System>Administration>Login Window>Security>Enable Automatic logic for your username..

  • In case you are facing with DVD burning issues you have to do two things.First of all if your system is all IDE you Need to update your kernel for UDMA support.If your system is Sata HDD with IDE burner you need to do this trick... sudo gedit /etc/rc.local and add BEFORE the end line :P chown root:cdrom /dev/sg0 (or sg1,2,... whatever your system has.)Save close reboot.


  • If for any reason you just hate to make copy or changes with the terminal you can create a new launcher in desktop ,name it Super User Mode,enter as command gksudo nautilus and save it.Now this allows you to access files previously locked.BE CAREFULL THOUGH because with great power comes great responsibility :)


  • On the Snow Plugin for Beryl-Unsupported you can use any texture you like.Be it leaves or hearts,stars etc..


  • On Nautilous you can set your windows Desktop and Application Data in your bookmarks so its Faster to move around.


  • If you need to make a full system Backup just copy Virtual System Drives.They are located to /media/host/wubi/disks in Linux and in c://Wubi/disks (if c is the install directory) in windows.Better play safe than sorry


  • UPDATES ARE CRITICAL on Linux.But do be carefull when applying them.I highly recommend to have the update manager turned off and when you choose to install it to have the /etc/apt/sources.list file CLEAN.If you have added some lines or automatix did please COMMENT THEM OUT with # in front and run a "sudo apt-get update".Then run the update manager.Im telling this to you because extra lines will install SVN(untested-beta) upgrades and will prob create issues you cannot fix.After the upgrade you may remove the # and reupdate the apt.

  • Some Video Applications may not like your 3D desktop.Most of all because they are presenting the image below the 3D layer so you get a black screen.If that is the case im gonna present you a fix for VideoLan.Mplayer seems totally broken in last version but any input is wellcome.In VLC open prefferences check the Advanced Checkbox on the lower right,and go to Video>Output Modules and change the default to X11.If you use unicode Subtitles you need to set it you language.In Videolan that is accomplished by prefferences>input codecs>other codecs>subtitles>encoding.For subtitle size you go to prefferences>video>subtitles OSD>Text Renderer.On Xine you just get some ttf fonts with your language support and put it in /usr/share/xine/libxine1/fonts.Then just select from its menu the fonts and the language and you are done.Mplayer subtitle support is a mess


  • In order to Install DVD and Win32 proprietary codec you need to either try to install them with Automatix or do this:
sudo gedit /etc/apt/sources.list
Add this one to the Sources: ## Medibuntu - Ubuntu 6.10 “feisty
eft”
## Please report any bug on https://launchpad.net/products/medibuntu/+bugs
deb http://medibuntu.sos-sts.com/repo/ feisty free non-free
deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free


Save close and type: wget -q
http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key
add -


sudo apt-get update

sudo apt-get install libdvdcss2 w32codecs


  • In case you have issues with Streaming Video and especially quicktime you may wanna change the default Firefox Plugin.In terminal type

sudo apt-get remove totem-mozilla
sudo apt-get install mozilla-mplayer



  • Nautilus supports audio file preview when mouseover.Most of the times it will get installed the moment you add the codecs.In case you don't install the codecs you can install the preview with this command
sudo aptitude install mpg321 vorbis-tools


  • To add Winrar support in intergraded Archive manager use Automatix for installing Archive Tools or type:
sudo aptitude update && sudo aptitude install rar unrar

  • If you are getting some strange Errors when Shutting down the system about user.virtal.disk,swap failed etc you may need to edit fstab
sudo gedit /etc/fstab

and look for usr.virtual.disk and extra.virtual.disk .
If you find them add # in front of their line like that:


#/media/host/wubi/disks/usr.virtual.disk /usr ext3 loop 0 0
#/media/host/wubi/disks/extra.virtual.disk /media/extra auto loop 0 0


  • Use Gmail as Default manager in Ubuntu.This tip is extremely usefull for all who do use gmail and dont like embeded mail aps(ME for example).The fix is rather simple.Create a new file named whaever you like with .sh at the end.In my case I liked the gmail.sh.Paste inside
#!/bin/sh
firefox -remote "openurl(https://mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed 's/mailto://'`,new-tab)"
Save close and run
chmod u+x ~/Desktop/gmail.sh
  • This makes it executable.Now put is wherever you like.Best place would be in home to create a folder .gmail so the path is /home/yourusername/.gmail/gmail.sh.Now go to System>Prefferences>Preffered Applications Go to mail reader change



  • Using Alias makes your life easier.Aliases are an easy way to make common commands shorter.Go to your home directory and press ctrl+h(show hidden files) and open with any editor the .bashrc file.Now add to its end the following code
# apt-get aliases
alias name='command'
In other words you can pick any word on the right side to do what you have put on the left.If I want to use just to remove software I just type:
alias junk='sudo apt-get remove"





Themes - Final Touches




Fist of all let me explain something.There are 2 types of themes in our Linux System.The first one are GTK2 Themes and are responsible for everyhing including bars,mouse cursors,icons etc and the second are Beryl Themes since we are using Beryl for Rendering Windows and they end with .emerald name.

You can get themes on numerous of sites such as

http://www.gnome-look.org/
http://art.gnome.org/

In order to make your life easier I have uploaded a pack I gathered from looking around here.

VuBuntu Customization Pack

So lets tweak our Linux shall we?


1. Icons/Task Bar.Those are relatively easy to fix.System>Prefferences>Theme and just drag and drop the tar.gz files inside.IT will ask you if you want to apply new theme select yes and you are set.


2. Windows Decoration.Right Click on Beryl open Emerald Theme manager and import the Dark Glass emerald file.NOT the SVN one.Its a tweat version by me for the new beryl.

3. Mouse Cursor.Its a kinda complex proccess so the best way is go to Add/Remove and install Cursor Selection.Then just alt+f2 and type gcursor.Install the cursors using this tool.

4. Custom Start Menu Icon.For that we need to use a powerfull tool.Alt+F2 and type gconf-editor.This can edit a LOT of gnome features.We now need to go to apps>panel>object>object0 (this can be object1 or other number depending on computer) and look for tooltip Main Menu.If we see that we are in the correct object.Select the box Use Custom Icon and go above to enter where the custom icon is located.In my case for example check how I did it.





While you are here you can also change the apps/nautilus/desktop entry and add the MyComputer,Trash,Home Icons.

  • If you wanna edit the splash screen(the one when ubuntu enters Desktop its on apps/gnome-session.(You can change spash easily with an app in the Add Remove.Search for splash)
  • If you want to disable the windows grouping in taskbar its located in Apps>Panel>Applets>Windows_List_Screen0>Prefs .You can also set a max window length if you dont like them autoexpanding to your full bar...

5)Fonts.This is the easiest part.Just open any nautilus window or just Mycomputer and type "fonts:///" you should get yourself to the font folder.Just add any font you want there.In my pack there is the SegoeUi pack.Then to enable it got to System>Prefferences>Font

6)Wallpapers / Skydome.I dont think the first one needs explanation.Skydome on the other hand is new.Its the image that is on the enviroment when we rotate the Cube.It can be set on beryl settings>Desktop>Desktop Cube>Skydome.Skydome picture must be 1x2 ration meaning that if height is 1024 width MUST be 2048.And width must NEVER be bigger that the one your grafic card can handle.To see that just type on a terminal "xvinfo | grep max" Last but not least the animate skydome button enables you to either dynamically move or not the image.This can make it look more realistically 3D.Check the Space skydome for example and you should udnerstand.If you need to resize dome images use GIMP.Last but not least I have included some Caps which are the images displayed above and below the beryl cube.You may disable caps as well.


7)Firefox Tweaking.Firefox has a couple of issues in Ubuntu.For one the default theme is not working very well with theming.For that you can install Cleartabs which is basically the same but is working really nice and has way more bright colours.Also metalion is nice even though heavy for my taste.Last but not least if spelling refuses to work for you use Spellbound as a bridge.You can also use Foxmarks if you want to keep your bookmarks synched on both windows and Linux systems


8)Kiba Dock -ScreenLets.Those are optional.Kiba Dock is a mac like Dock menu with really cool physics engine build in and Screenlets is like the Widgets in Mac or Gadgets in Windows Vista (rotfl on the namings )In case you wanna install Screenlets I have included a custom one to make the VistaOrb more Round in my pack.Installation of both those is no diffirent to most apps in ubuntu so im just linking the guides.Here is a video which shows you Kiba Dock in action.

Screenlets HowTo
KibaDock HowTo

In general most apps are installed that way.You tell it where to get the files(sources list) add the key and "sudo apt-get update" and "sudo apt-get install" .They are removed just by typing sudo "apt-get remove applicationame"

9)Login Manager Theme.This allows you to select how you wanna your login look like.I have not included any manager but DarkClean is cool enough.Especially combined with the corresponding Splash screen.To change login manager theme got to System>Administration>Login Window Local,and drag and drop the theme inside here.Make sure Themed is enabled and you dont have random set on ...




Thats All Folks.!!!!



Now that everything is set you should have a fully working system,really impressive and feature rich.Remember for games to either log out of XGl (ATI) or kill beryl Nvidia even though it works ok(IMBA nvidia Drivers)Enjoy some screens of my finished project.Its not that hard as it sounds and it took me 2hours to setup more or less with no prior Linux experience.I just wanted to make the guide as analytical as possible..Have Fun


Default Monitor layout






Desktop With KibaDock and Screenlets





3D View with Utorrent.exe and Mirc32.exe running :P





Exagonizing the Desktop





Space Animated Space Skydome with Numeric Caps






Custom Beryl Textures Soccer ball





Here are some more Screens of the second theme I am currently using.Its also showing a new cool menu I discovered called USP2 (Ubuntu System Panel2).








Also Using the Snow plugin and custom leaf textures I bring the wallpaper to life :)