Monday, April 30, 2007

Force programs to minimize in tray on hitting close button

I always wished to force some programs to be minimized in tray when I hit close button (instead of being closed), for example Rhythmbox ,BitTorrent ,SSH terminal, RealPlayer , Thunderbird , it was painful you were listening to a music and you had to have big Rhythmbox on your screen and on your panel , (I used to move it to another desktop but still I had to switch to another desktop if I needed it) or sometimes you hit close button on a bitTorrent program and it would be closed....

I found a program named , AllTray , (I wonder why digg users never introduced it to people) , after installing this program you can put the programs you want in tray , by running AllTray and then clicking on the window of the program you to minimize to tray, so after that when you hit the close button , it will be minimized to tray , instead of being closed !

In Ubuntu (Fesity Fawn) you can install this program using Synaptic package manager , for other Distros you can download it here

Enjoy too !

+ Update : just a tip on using this program , do not put all your programs in tray , putting a program in tray means , you want that program to be in the Resident Memory (Ram) and you want it to be ready all the time ! (so do not put unnecessary programs in tray or it will take your ram and your computer speed)

+Update2: another tip, to make a program to be loaded by AllTray on default, you can do this :
for example for Thunderbird , go to System / Preferences / Main Menu / Choose Internet in left column / (then right click on Thunderbird Mail and change the properties
change the command :
mozilla-thunderbird

to
alltray mozilla-thunderbird
you can play with it and do some other things , like you can add that above command to System/ Preferences / Seasons (so it run thunderbird in automaticly at startup using AllTray)


alltray itself has some options which you can use them to see the full list of options type this :
alltray --help

+For poor Windows users , I found a similar program for them so they have some fun too (wink) it is not as cool as AllTray but still....

Wednesday, April 25, 2007

How To Launch Programs In The Background From A Terminal Window

today I found out ubuntugeek.com stole one my articles (copy pasted it !) well they had corrected my grammar mistakes in English , it is painfull , I spend hours on my blog and somebody else is making money on it ! I commented there and complained , they deleted my comment ...

some years ago , linux community was a lot better , peopel were honest and nice but now , whatever...

today I read this tutorial about how to launch programs in background in terminal ! I am not gonna copy/paste it like Ubuntu Geek.com (go to the original site and read it there)

just in brief, you add a & infront of the program name it will be runned in background, like this:
firefox &

and to see a list of running programs you type this :
jobs

Tuesday, April 24, 2007

How to implement the Babylon dictionaries in Ubuntu?



Have you missed the Babylon program under windows , with all those good dictionaries?
here I will tell you how to make Babylon dictionaries work under ubuntu .

StarDict works like Babylon it is resident in memory , you select the word and it will show the definition in a small pop-up window fastly, ofcourse you can change the keys . (I changed it so when I press WIN key it show me the definition of the selected word) you can install StarDict using synaptic package manager easily .

How to make the Babylon dictionaries work in ubuntu(stardict)?
they have some dictionaries on StarDict site but compared to Babylon dictionaries they are so few.. first go to Babylon site and download the dictionary which you want to use , (I download Kurdish and Farsi ones)

Now we should convert the downloaded dictionary to StarDict format ,
there is a program named dictconv , to convert dictionary formats to each other (including Babylon to StarDict)

here we go :
1- download dictconv here . you should install it by source (don't loose your pants , it is not hard)

2-Extract the zipped file which you downloaded , somewhere in your desktop .
3-Before we continue , open synaptic package manager and install "libxml2-dev" as it is needed for our program .

then go to the folder on the desktop
cd dictconv
4-then enter this :
sudo ./configure
5- if the previous thing was done without any error continue , if it gave you error , (it usualy tells you , you need to install something) solve the error and continue :
sudo make all install
Now it is installed ! but we still need another program
again go to synaptic package manager and install "dictzip".

now here we go to convert the bayblon dictionary : for example mine is Farsi.BGL
I copy it to the desktop then
cd Desktop
then
dictconv Farsi.BGL -o Farsi.ifo

in this example Farsi.BGL is the one which I downloaded from Babylon site and Farsi.ifo is the name of the output file which I want to make .

if you have done it successfully ,it should generate 3 files !

one of those 3 generated files is Farsi.dict (Farsi in my case)
now we should do this :
dictzip Farsi.dict
this command changes our .dict file to .dz !

now we should have three files
Farsi.dz
Farsi.ifo
Farsi.idx
create a folder on your desktop and move these 3 files to that folder .
and move those generated files to there , in my case I created Farsi in desktop and moved them
to the Farsi folder .

now we should move the whole things to the StarDict folder
sudo mv Farsi /usr/share/stardict/dic

and now I restart the StarDict and click on the "manager dictionaries" (it is in the Right Bottom corner of the window) and Enable the Farsi dictionary.

Thats all folks . I am enjoying Babylon dictionry under ubuntu !

Monday, April 23, 2007

I must learn MySQL !

I am working a project which I had started 2 years ago but never could complete it (being lazy , being prefectionist , and giving my time to other things !) for that I need to learn MySQL ,

I need a login system for the site , and I want each user have a profile and they be able to add up to 100 favorite sites to their profile , and I want to learn to show these information easily on the pages, like all the UserX's Favorite sites , and he should be able to easily delete/edit his profile fields .

I searched for tutorials , these are the really good ones which I am learning from them,
and I was amazed how easy MySQL is and why I hadnt started learning it before !


if you also know good tutorial , please comment it so me and others use it !

Saturday, April 21, 2007

Issues I had to install my graphic card in ubuntu -Nvidia Rivia TNT2-


I can tell you installing the "right" driver for your graphic will boost your ubuntu speed and also its appearance and it really becomes faster !

not installing my graphic card driver I had some problems ,
I used to see Firefox uses a lot of CPU while opening Digg.com or Blogger.com (other people also had the same problem )
I fixed that problem by installing the right driver for my TNT2 graphic card , and now Firefox and my other programs like Ktorrent or Tomboy load so much faster !

it may be a reall headache to install the "right" driver for your card, but it worth it and I tell you Ubuntu without right graphic card driver, is not Ubuntu ! it is Half of Ubuntu .

First of all I make a back up of my Xorg.conf like a good boy !
So here is how I installed my Nvidia TNT2 graphic card :
I first backed up my Xorg.conf using this command (you should really do that before installing any graphic driver program )
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
then I installed the drive using the menu , system--> adminstrator --> restricted driver manager ,then it automaticly installed my graphic card.

(I made sure I had not installed the driver using other programs like "automatix2" or "envy" , in that case I uninstalled the driver installed by them first )

How to make sure if the Graphic driver is installed and enabled ?

try this
sudo nvidia-glx-config enable
and also this :
glxgears
this should show a 3D animation and also some numbers in the terminal like

909 frames in 5.0 seconds = 181.725 FPS
1060 frames in 5.0 seconds = 211.880 FPS
1115 frames in 5.0 seconds = 222.946 FPS
998 frames in 5.0 seconds = 199.475 FPS
if those numbers which I marked in red, are less than 1000 (like 150 , 300...) then you have not enabled / installed it right !

Ah , Low Screen Reolution Problem !
but after installing I found out my screen resolution is 800*600 and it doesn't let me change it . some others also have the same problem , and a bug is listed in luanch pad for this !

the problem is the Ubuntu fails to detect the monitor Horizontal and Vertical Refresh Rate numbers, (on ubuntu site they have explained this fix in detail) .
to fix this problem I do this (I have made backup of the xorg.conf ! okay?)
sudo gedit /etc/X11/xorg.conf
(if you are in not graphic mode , you should use nano instead of gedit)

now find the Section "Monitor"
and add these lines just before EndSection :
HorizSync 30-96
VertRefresh 50-160

mind that those numbers (30-96 and 50-160) are default numbers which should work with most monitors ,but your monitor may be different , so google for it to find the right numbers.
for your own monitor .

now save the file and then restart your Ubuntu !



I was also told on the forums to add this to my Section "Screen" in Xorg.conf for better performance (this is just for my card -TNT2-)
Option "AllowGLXWithComposite" "1"

Now I have installed the driver and I am enjoying it !

+For Nividia and ATI cards there is an Automatic tool to install drivers called Envy , many people used it and they liked it ,so you may give it a try !


If you messed up your graphic in Ubuntu...
You no longer see any graphic but a black page with terminal (command prompt) ?
Don't get scared (terminal is not gonna bite you) , it is easy to recover , fix everything using commands .
cd /etc/X11/
Then
dir
this shows list of files in that folder
mv xorg.conf.backup xorg.conf
If your backup file name is diffrent change xorg.conf.backup , for exmple
mv xorg.conf.backup20070404 xorg.conf

To find out the name of the back up file just look at the list of files which "dir" command gave you.

Friday, April 20, 2007

How did I fix "can't acess tty" in Feisty Fawn Live CD ?



many people like me have faced a "can't acess tty" error in Feisty Fawn Live CD while trying to boot from live CD , the exact error is :
/bin/sh: can't access tty; job control turned off
I fixed the problem , I was inspired by Ben Colin's comment but I didnt do what he said , as it didnt work for many others , I fixed it in my Shewdiz-ish way .

it seems this problem is happening to those who have more than one hard disk ,
I have two Hard Disks and two disk drives (a CD-RW and a DVD-ROM) ,
I unplugged one of the hard disks and unplugged the CD-RW ,so I had one device on each IDE .
then I put the live CD in and installed the Feisty Fawn Linux .

but the problem is not fixed yet, after you are in ubuntu you should , type this in terminal :
sudo gedit /etc/initramfs-tools/modules
and then add this to the end of the file
piix
and then save the file , and now do this :
sudo update-initramfs -u

now turn off your PC , and then connect your Other Drives cables again and start ubuntu , it should work fine !

+ a Bug is filled for this error in launchpad.

Thursday, April 19, 2007

Backup your installed programs on ubuntu and install them on another computer without internet !

Read this tutorial if :

  • you have slow internet connection and you have to reinstall your Ubuntu , you don't want to re-download all the programs which you had downloaded .
  • you want to install Ubuntu with certain programs on many computers in a an office or someplace... but you dont want to download programs for each computer.
  • or let say you want to install programs on a computer which doesn't have internet !

all the programs which you install using Synapatic package manger have a .Deb file (the installation file) and they are archived in this folder :

/var/cache/apt/archives

you can go there and copy the deb files to a CD , and then install them in another PC .
for example I myself have copied the Java Virtual Machine's deb files (which are about 60 MB) to somewhere on my hard disk and each time I install it from hard disk (instead of downloading it)

just make sure when you copy a program's Deb file , you copy its dependencies too (to find out the dependencies double click on the file and you will see the info)


a safe way to install many packages without having you find the dependences is to
copy all the files in the address below :
/var/cache/apt/archives
but before that you may want to clean "old packages" using this command :
sudo apt-get autoclean
and on the new PC , and open a terminal and go to the folder containing backed up Deb files and then type
sudo dpkg -i *.deb
this will automaticly finds out the dependencies and installs them by order !



A Friend's Note :
A webmaster usually goes for pay per click rather than any other online marketing plan. This is because ppc is heard of in hosting business, the rest are not. In student web hosting services however, the layman information spectrum is much larger.




+ by the way there is a GUI program named AptOnCD , you can also use that ! (the same thing but in graphical mode but command based way always works and it is so faster )

Wednesday, April 18, 2007

Refreshing Your Original Firefox Installation

Sometimes firefox becomes gives me nasty errors or some of my usefull extentions stop working (mostly because of installing a bad extensions which blow the firefox up) , and it gives me "chrome" error, I reinstall the extension and even I reinstall the firefox itself , but still wont work !

what's the problem and what to do ? the problem is there is a folder under your comptuer which stores Firefox datas and when you un-install or reinstall Firefox , it doesn't delete that folder and the new Firefox will use that folder too which has the error in it .

the solution is to delete the "Firefo"x folder under ".mozilla" folder in your home directory .

1- in ubuntu , go to your home directory
2- and press ctrl+h to see Hidden folders
3- then you will see .mozilla folder go there
4- there is a Firefox folder there, just delete the Firefox folder
5- now reinstall firefox and you will have firefox working like first day


(I believe in windows you should do the same, except in windows the folder should bein Documents under application data )

Monday, April 16, 2007

Messed up boot loader ? recover easily

one of the ugliest problems about dual booting windows and Ubuntu (generally Linux) is Boot Loader problems.

the problem is , "the menu" which lets you choose the operation system at startup needs to be stored in your Hard Disk MBR (MBR is the short for -Master Boot Record- and it means the first sector of your hard disk which tells the computer which partition has the operation system to load)

you can easily destroy this MBR by just adding a new hard disk or changing the hard disk cable position or installing a new operation system (windows doesn't care about Linux , so if you install windows after Linux , it will destroy Linux MBR , but if you install Linux after Windows it won't destroy your windows booting ability , so when you install windows after Linux be careful)

so let say you messed that MBR thing up , you will see your computer doesn't load at all ,
but don't worry you have lost none of your data or operation system .

you can solve this ugly problem in less than 3 minutes and 5 commands ,
for this you must have a Linux Live CD (I strongly recommend Ubuntu Dapper live CD)

1- insert your Ubuntu Dapper Live CD and in your computer setup set the options to boot from CD (I assume you know how to boot from CD)

2- now we are in ubuntu (by live CD) , open a Terminal window (it is in menu list)
3- open a terminal and enter these commands :

Sudo Grub


find /boot/grub/stage1

this should give you a result , remember the results .

root (hd?,?)

(replace the ? with the numbers you got in the last command)

setup (hd0)
replace 0 with the hard disk number you want the grub to install to (if you don't know, don't worry just use hd0 it should work fine)

quit

now restart and you should have a boot menu for your all installed operation systems.

Sunday, April 15, 2007

A lil about me

I am a Kurd and studying Comptuers in Tehran ,

when I was a kid , I wanted to be God's Chosen (a prophet) I was disapointed when they told me ,Mohammad was the last prophet and there will never be any prophet again .

when I was teenager I wanted to be a hero in running or wrestling or badminton , but soon I found out my body is not made for a sport hero , then I wanted to be somebody like Billgates in computers .

when I was a bit older , I wanted to become leader of the rebels of the world !
later I wished to become president of my country ,...

but now I am an adult and I just want to be a human , and I belive being a human is more than being a president, a leader and a hero and more than all Bill Gates' money!

Computer is my Friend, my Tool , my Job and source of Money .
I am supporter of Open Source Softwares, Ubuntu and Humanity .

I am not a photographer but I take photos and people like it , I used to have a photoblog and I won several awards and some TVs showed my works , but for some reasons I had to stop it ,
I hope I can set up my photoblog again .


I am also so fond of languages and literature , and I write a lot , my drawer is always full of notes which I have written .
Shewdiz & Shevin are characters in a story which I am writing in these months ,
He is a man who has special powers in the night , and Shevin is a girl who doesn't sleep in the nights , Shewdiz chooses Shevin for some missions . (I am not gonna tell you all the story)


in this blog , I will try to post my "publishable" materials about computer (mostly ubuntu and open source softwares) and life (literature , personal notes , music and ...)

I also try to make some money ,well I am a student, living on my own , I try to find peopel who may wish to hire me.

Related

Labels

computer (48) ubuntu (46) linux (28) tutorial (20) opinion (17) programming (14) software overview (13) terminal (12) troubleshooting (8) life (7) literature (7) poem (7) human languages (6) vim (6) bash (5) google (5) python (5) android (4) cars (4) phpBB (4) suggestion (4) tips (4) 12.04 (3) Chef (3) extension and addons (3) firefox (3) java (3) personal (3) russian (3) shell (3) windows (3) 64bit (2) Calligraphy (2) Chicago (2) Vagrant (2) apple (2) backup (2) bug (2) code (2) eclipse (2) funny (2) google chrome (2) idea (2) monitor (2) php (2) phpBB3 (2) shorter prompt (2) ssh (2) virtualbox (2) $_SERVER['REQUEST_URI'] (1) 2.7 (1) ALT+Backspace (1) AVR (1) Alt-Printscreen-K (1) AutoRotate (1) CTRL+ALT+DELETE (1) DRM (1) Debugging (1) Gimp (1) Gimp 2.8 (1) Microcontroler (1) Restart X (1) UML (1) Ventra (1) adsense (1) amazon (1) audio (1) aws (1) background process (1) battery (1) bing (1) blank (1) blogging (1) bmw (1) boot (1) business review (1) car (1) cd (1) chrome (1) comcast (1) computer kubuntu (1) conference (1) cookie (1) cron (1) database (1) date (1) display (1) domain name (1) download manager (1) dual boot (1) dual monitor (1) extensions (1) feature request (1) file (1) folder (1) freeze (1) gimp single window (1) git (1) gnome 3.10 (1) google docs (1) google plust (1) google+ (1) grep (1) icon (1) install (1) iterator (1) links (1) linu (1) linux links (1) list (1) mac os (1) media server (1) microsoft (1) moonlight (1) music (1) mysql (1) name (1) nautilus (1) netflix (1) notepad++ (1) parking (1) permission (1) philosophy (1) photo (1) prompt (1) protest (1) ps3mediaserver (1) putty (1) read from file (1) realtek (1) resolution (1) roku (1) samsung (1) scala (1) screenshot (1) security (1) selinux (1) server (1) skype (1) space (1) spam (1) spambot (1) sql (1) suspension (1) system monitor (1) tar (1) task manager (1) template design (1) th23 domain (1) thinking (1) ubuntu 13.10 (1) unity (1) vimrc (1) virtual machine (1) weblogic (1) wget (1) with space (1) xorg (1) xrand (1)