Sunday, May 10, 2009

How to remote access Ubuntu box from M$ Windows box

If you are using M$ Windows OS to remote access Ubuntu, you will need to use ssh (secured shell) via putty.

If you get this "Network error: Connection refused", this means your Ubuntu box do not have any ssh server yet. So what you can do is open a terminal in Ubuntu, type the command:
apt-get install ssh openssh-server
This will install ssh server and you can do remote access from M$ Windows box. Have fun... :D

Tuesday, May 5, 2009

HOW-TO: Dreamweaver running on Ubuntu in 10 EASY Steps!

Copy & Paste from LuisCosio.com

Tired of Windows? Quanta Plus/NVU/Vim are not enough? You just can’t switch to linux because there is no match for the Dreamweaver? Well… Here it is the solution to all your problems!

- What you need?

  • A fresh install of Ubuntu Dapper + all the updates
  • A Windows box with a functional install of Dreamweaver 8

IMPORTANT: I own an original license of the Macromedia Studio 8, but in order to use it under Linux sometimes the original *.exe has to be cracked or patched. I’M NOT ENCOURAGING PIRACY, I’m just presenting a method for those who have an original license, to use it under a different platform.

- Fire up a terminal session and type the next commands;

TIP: Instead of using apt-get, you can install them with the Synaptic Package Manager located in the System/Administration menu

  • $ apt-get update
  • $ apt-get install wine and then type “yes”
  • $ wine /*To create the wine file structure*/
  • $ apt-get install recode and then type “yes”

- Then you need to copy all the necessary files from the Windows box;

  • Copy the whole Macromedia folder from “c:\Program Files\” to “/home/YOURNAME/.wine/drive_c/Program Files/”
  • Copy the whole Macromedia folder from “c:\Documents and settings\All users\Application Data” to “/home/YOURNAME/.wine/drive_c/window/profile/all users/”
  • Copy the whole Macromed (No mistake with the “ai”) from “c:\Windows\system32\” to “/home/YOURNAME/.wine/drive_c/window/system32/”
  • Finally, copy the whole Macromedia folder from “c:\Program Files\Common Files” to “/home/YOURNAME/.wine/drive_c/Program Files/Common Files/”

- Now you need to export the registry keys of the Dreamweaver;

  • In your Windowx box, type “regedit” in the command-line and export the whole “HKEY_LOCAL_MACHINE/Software/Macromedia/” to “macromedia.reg”, then copy it to your your Ubuntu, convert it to ascii with “$ recode ucs-2..ascii macromedia.reg”. Afterwards, type “$ wine regedit macromedia.reg” to run it with wine.
  • That’s it! Type “$ wine dreamweaver.exe” or create a launcher and enjoy Dreamweaver in Ubuntu ;)

Additionally, if you want full functionality download winetools latest version, and install TrueType Font Arial, dcom98, MFC 4.x and IE 6.0 SP1

Saturday, May 2, 2009

Install Samba Server on Ubuntu

If you want to share files between your Ubuntu and Windows computers, your best option is to use Samba file sharing.

To install, first open a terminal window and enter the following command:

sudo apt-get install samba smbfs

We've got samba installed, but now we'll need to configure it to make it accessible. Run the following command to open the configuration file, substituting your editor of choice:

sudo gedit /etc/samba/smb.conf

Find this section in the file:

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user

Uncomment the security line, and add another line to make it look like this:

security = user
username map = /etc/samba/smbusers

This will set Samba to use the smbusers file for looking up the user list.

Create a Samba User

There are two steps to creating a user. First we'll run the smbpasswd utility to create a samba password for the user.

sudo smbpasswd -a

Next, we'll add that username to the smbusers file.

sudo gedit /etc/samba/smbusers

Add in the following line, substituting the username with the one you want to give access to. The format is = "". You can use a different samba user name to map to an ubuntu account, but that's not really necessary right now.

= ""

Now you can create samba shares and give access to the users that you listed here.

copied from www.howtogeek.com

How to set a static IP in Ubuntu from the shellHow to set a static IP in Ubuntu from the shell

Kepada sesapa yang tak mau guna dhcp dalam ubuntu, bolehla set statik ip. Caranya agak kacang.

Mula-mula bukak terminal:
Applications > Accessories > Terminal

Taip @ copy & paste command di bawah:

sudo vi /etc/network/interface
Adjust mengikut citarasa masing-masing. Dalam contoh di bawah guna 192.168.0.100
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Lepas tu tekan kekunci "Esc"
Kemudian taip ":wq" > enter (write/ save/ quit )

Untuk restart servis networking, run command ni

sudo /etc/init.d/networking restart

Install vim full version dalam ubuntu

FYI, vim yg ada dalam ubuntu adalah "vim-tiny" yang ntahapahapa. Kalu nak guna vim, kena la install vim-full.

Caranya kacang sahaja. Mula-mula bukak terminal:
Applications > Accessories > Terminal

Taip command ni dalam terminal & tekan enter. (Kalu nak senang, just copy & paste je).
sudo aptitude install vim-full
Lepas tu tekan "Y" (untuk yes) dan ia akan didonlot & diinstall secara automatik.

Thursday, April 30, 2009

Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP)Installing LAMP on Ubuntu 7.10/8.04/8.10 (Linux,Apache,MySQL,PHP)

Copy & paste from this site

This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.

Lets start with Apache:
1. Open the terminal (we will be using it through most of my guide) from Applications > Accessories > Terminal
2. Install apache2 using apt-get by typing the following

sudo apt-get install apache2

Note that you should know the root password.
Now everything should be downloaded and installed automatically.
To start/stop apache2 write:

sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop

Your www folder should be in: /var/www/

If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser

Finished with Apache ? lets conquer PHP:

1. Also in terminal write:

sudo apt-get install php5 libapache2-mod-php5

or any php version you like
2. restart apache

sudo /etc/init.d/apache2 restart

This is it for PHP :D Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.
Example:

sudo gedit /var/www/test.php

and write in it: < ?php echo “Hello World”; ?>

Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”

66 % is over, lets continue to installing MySQL:
1. Again and again in terminal execute:

sudo apt-get install mysql-server

2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address
3. set your root password (although mysql should ask you about that when installing)

mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’xxxxxx’);

4. Try running it

mysql -uroot -pxxx

where xxx is your password.
Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

5. restart apache for the last time

sudo /etc/init.d/apache2 restart

Congratulions your LAMP system is installed and running :D Happy Coding

//Jo

UPDATE:
Due to the large number of people emailing about installing/running phpmyadmin.
Do the following:

sudo apt-get install phpmyadmin

The phpmyadmin configuration file will be installed in: /etc/phpmyadmin
Now you will have to edit the apache config file by typing

sudo vi /etc/apache2/apache2.conf

and include the following line:

Include /etc/phpmyadmin/apache.conf

Restart Apache

sudo /etc/init.d/apache2 restart

Another issue was making mysql run with php5
First install these packages:

sudo apt-get install php5-mysql mysql-client

then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there

sudo vi /etc/php5/apache2/php.ini

Restart Apache

sudo /etc/init.d/apache2 restart

Hope this helps :)

Share and Enjoy:

Wednesday, April 29, 2009

How to take ownership of a file or a folder in Windows XP

Kes: HDD dari pc lama letak dalam pc baru, tak boleh akses ke folder "c:\Document and Settings\user"

Penyelesaian: http://support.microsoft.com/kb/308421

Monday, April 20, 2009

[ C:\Heap41a ] * Prank Remover *

Symptoms: You are being annoyed by the following messages







Solution:

If you are reading this from the prank-hit machine:
  • 1) Open Windows Explorer and type C:\Heap41a ( in address bar ) and press enter. ( You will be browsing the hidden folder ).
  • 2) You will have to save this file Arrow AutoHotkey.INI ( right click > save link as ) to the above folder.
  • 3) Go back to Windows Explorer and double click svchost.exe to execute.
  • 4) You will be happy to see a message box, press Ok and then in Windows Explorer, press BackSpace to browse C:\.
  • 5) Delete C:\Heap41a folder.
That is it!... Idea