Wednesday, September 30, 2009
chmod Recursive permission change (i.e. in the directory and its sub-directories)
chmod -R 777 (folder name)
in case you got the error that you do not have permission, you have to login as root(su command and then password)at Ubuntu run :
sudo chmod -R 777 (folder name)
Tuesday, September 29, 2009
compiling and installing software from Source Code
Typically applications you must compile from source will come as a ".tar.gz", ".tar.bz2", or ".zip" file.
You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. For the rest of this section we will assume you have downloaded your zip file to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:
mkdir /home/username/src/
Change to the /home/username/src/ directory with the "cd" (change directory) command like so:
cd /home/username/src/
ls
We now need to unzip the zipped file, this is done differently depending on the file extension.
for files ending in .tar.gz, use:
tar -zxvf
for files ending in .tar.bz2, use:
tar -jxvf
unzip
ls
cd
This is where things will differ. Some packages will have an INSTALL or README file which will contain installation instructions. use "ls" to see if the software has an install or readme file. If it does have one, you can use the "more" command to read it, like so:
more INSTALL
- Configure the installation
- Compile the software
- Install the binaries
The pre-installation configuration is done by executing ./configure:
./configure
The next stage is to compile the software, this is done using "make". When you run "make" it will read the instructions in the Makefile and build the application binaries.
make
The final stage is to install these binaries, ie, copy them to a more permanent location. Typically only the "root" user can do this, so you will need to swich to the root user with the "su" command:
su
make install
Remember that if you have any problems, please post in the most relevant section of the forums. - When posting, remember to include as much info as possible, including all output and error messages.
SOURCE
Special characters, Java ...
/********************************************
*********************************************
********** Special Char check ***************
*********************************************
********************************************/
public void checkSpecialChar(String aText){
Char character = aText.charAt(0);
if (character == '<') {
System.out.println(aText);
}
else if (character == '>') {
System.out.println(aText);
}
else if (character == '&') {
System.out.println(aText);
}
else if (character == '\"') {
System.out.println(aText);
}
else if (character == '\t') {
System.out.println(aText);
}
else if (character == '!') {
System.out.println(aText);
}
else if (character == '#') {
System.out.println(aText);
}
else if (character == '$') {
System.out.println(aText);
}
else if (character == '%') {
System.out.println(aText);
}
else if (character == '\'') {
System.out.println(aText);
}
else if (character == '(') {
System.out.println(aText);
}
else if (character == ')') {
System.out.println(aText);
}
else if (character == '*') {
System.out.println(aText);
}
else if (character == '+') {
System.out.println(aText);
}
else if (character == ',') {
System.out.println(aText);
}
else if (character == '-') {
System.out.println(aText);
}
else if (character == '.') {
System.out.println(aText);
}
else if (character == '/') {
System.out.println(aText);
}
else if (character == ':') {
System.out.println(aText);
}
else if (character == ';') {
System.out.println(aText);
}
else if (character == '=') {
System.out.println(aText);
}
else if (character == '?') {
System.out.println(aText);
}
else if (character == '@') {
System.out.println(aText);
}
else if (character == '[') {
System.out.println(aText);
}
else if (character == '\\') {
System.out.println(aText);
}
else if (character == ']') {
System.out.println(aText);
}
else if (character == '^') {
System.out.println(aText);
}
else if (character == '_') {
System.out.println(aText);
}
else if (character == '`') {
System.out.println(aText);
}
else if (character == '{') {
System.out.println(aText);
}
else if (character == '|') {
System.out.println(aText);
}
else if (character == '}') {
System.out.println(aText);
}
else if (character == '~') {
System.out.println(aText);
}
else {
//the char is not a special one
//add it to the result as is
System.out.println(aText);
}
}//end of checkSpecialChar(String )
/********************************************
*********************************************
******* End of Special Char check **********
*********************************************
********************************************/
Edited from this source
You dont need to boot to check your eamil, FAST LINUX
The objective is not to replace the main operating system, which in most cases is still Microsoft Windows, but to enable users to perform common tasks, such as checking email, browsing the Internet, or making a VoIP call immediately after turning on the computer, without the painful process of waiting for the regular OS to be fully up and running.
ASUS has been adopting Splashtop early on and includes it now on most of its motherboards. It is incorporated in the flash memory firmware. Besides the Linux kernel, this includes drivers, networking tools, and various frequently used applications.
Saturday, September 26, 2009
RAR @ Fedora ...
By default, Rar is not available in Fedora 10. If all you need to do is extract files from a Rar archive, unrar from RPM Fusion's YUM repositories will work. If you need to create Rar archives, then you will have to download and install the complete Rar package from DAG. The instructions below show you how.
Only Need to Extract Files?
First, install RPM Fusion's free and nonfree YUM repositories. For detailed information about installing RPM Fusion, see: http://rpmfusion.org/Configuration
su -c "rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm"
su -c "rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm"
Next, install the unrar packages from RPMFusion's nonfree repository.
su -c "yum install unrar"
Done! You now have unrar in /usr/bin/unrar. This binary can only extract files from Rar archives. Use this command to see all available options:
/usr/bin/unrar -?
Need to Create Rar Archives?
First, download the source RPM from DAG: http://dag.wieers.com/rpm/packages/rar
wget -c http://dag.wieers.com/rpm/packages/rar/rar-3.5.1-1.rf.src.rpm
Now, install the source RPM. This will create a $HOME/rpmbuild tree. Please note that you do not need to be root.
rpm -iv rar-3.5.1-1.rf.src.rpm
Next, build a binary package in $HOME/rpmbuild. Again, no need to be root.
rpmbuild -bb ~/rpmbuild/SPECS/rar.spec
Finally, install the built RPM as root:
su -c "rpm -Uvh $HOME/rpmbuild/RPMS/$(arch)/rar-3.5.1-1.rf.x86_64.rpm"
Done! You now have rar in /usr/bin/rar. This binary can build and extract Rar files. Use this command to see all available options:
/usr/bin/rar -?
Thursday, September 24, 2009
Flash Fix @ Ubuntu ...
sudo apt-get remove swfdec-mozilla
sudo apt-get remove mozilla-plugin-gnash
sudo apt-get remove adobe-flashplugin
sudo apt-get remove flashplugin-nonfree
Nevertheless, I believe your problems is due to conflicting plugins. So before trying to remove all flash plugins, try this(IT WORKED FOR ME):
sudo apt-get remove swfdec-mozilla
sudo apt-get remove mozilla-plugin-gnash
sudo apt-get remove adobe-flashplugin
sudo apt-get remove flashplugin-nonfree
sudo apt-get install flashplugin-nonfree
You can also try to improve your flash experience using my tutorial Firefox optimization and troubleshooting thread.
Source : Ubuntu Forums
Wednesday, September 23, 2009
List of installed programs or packages on Ubuntu
$ dpkg -l
$ dpkg -l | less
$ dpkg -l | grep nano
See also
$ ls -l /usr/bin | less
$ man dpkg
Setting up gmail account
If so, check this tutorial out ...
Tip before reading : My problem was that the gmail account is not just your account name but the full Gmail email address(account@gmail.com)
Monday, September 14, 2009
Removing a printer @ VISTA
Microsoft hint : You can't remove a printer if you have items in the print queue. If items are waiting to print when you try to remove a printer, Windows will wait until printing is complete, and then remove the printer. If you have permission to manage documents on the printer, you can also cancel all print jobs and then try to remove the printer again.
Tuesday, September 08, 2009
Automatically Mounting Windows SMB Shares in Ubuntu v3
------------------------------------------------------------
This post is an update to two posts I wrote previously on how to make your network shares mount automatically when you start up your Ubuntu Linux computer. In this method we modify the fstab file so that when all the file systems are mounted the network shares are mounted as well.
This method works for me in Ubuntu Gusty Gibbon 7.10 and is probably the most secure. I have only tested this on a wired connection, so I don’t know exactly what will happen if you use this method when using a wireless connection.
First you have to install smbfs:
sudo apt-get install smbfs
Then create a folder inside of the /media directory to mount the share on:
sudo mkdir /media/Storage
You can call it whatever you want, I call it Storage. If you change the name remember to change it below when we edit the fstab file.
Create a credentials file in /root so that you can save your password and have it protected by the root account:
sudo gedit /root/.cifscredentials
Add the following information to the file, but change Guest to your SMB username and add your SMB password.
username=Guest
password=
Note: If your fileserver allows Guest access you can just leave the file as above. If it is password protected you have to put in your username and password.
Save and close the .cifscredentials file.
Now open up your fstab file so that you can add mounting instructions:
sudo gedit /etc/fstab
Add the following line to the bottom of the file:
//192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0
You have to change the following information:
Change 192.168.0.10 to the IP address or DNS name of your server
Change SHARENAME to the share you want to mount
Change USER to your Ubuntu username
The file_mode=0775,dir_mode=0775 part sets the mounted directory as read/write for all users so long as the SMB username you set in .cifscredentials has read/write access.
Now save the file and run the following command to test to see if you mount now works:
sudo mount -a
If that worked you should see a new drive icon on your desktop that lets you access your share. Now try rebooting and see if your shares mount automatically. If everything went as planned you will have a nice little drive mounted on your desktop every time you start up.
SMB Shares with Spaces in the Names
If you have a share with a space in the path you can replace the space with \040. For example:
//192.168.0.10/Storage\040130 /media/Storage\040130 cifs auto,iocharset=utf8,uid=matt,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0
This mounts my 130GB drive on my fileserver to a local directory called Storage 130.
Saturday, September 05, 2009
VLC on Feodra ...
#> rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#> yum install vlc
#> yum install mozilla-vlc (optionnal)