Welcome To My Blog
here i will try to collect as much as i can of articles and
toutorials talking about linux and open source software

if you want to share me this and be an author Contact me
subscribe to RSS or subscribe to Email Newsletter

How to: Extract files from ISO CD images in Linux

Posted by Linux4all Sunday, January 31, 2010 View Comments

Under many situations you may need to get a single file/many files from Linux ISO image.

You can mount ISO images via the loop device. You need to use mount command. First login as a root user:

Extract File(s) Under Linux OS

Let us assume that your ISO image name is disk1.iso.

Step # 1: First you need to create a directory /mnt/iso

# mkdir /mnt/iso
# mount -o loop disk1.iso /mnt/iso

Step # 3: Extract file

Now you can easily copy file called file.txt from iso disk image to /tmp directory :

# cd /mnt/iso
# cp file.txt /tmp

Step # 4: Copy foo.rpm from ISO disk image:

# cd /mnt/iso/RedHat/RPMS
# cp foo.rpm /tmp

Extract File(s) Under Windows XP or Vista Os

Windows do not have in built capability as provided by Linux to extract file. Luckly many third party software exist my favorite is Winimage http://www.winimage.com/. Download trial version (I’m sure you will love to registered this tiny utility later):

1) Install Winimage software

2) Just double click on Linux ISO file

3) Select the desired file and hit CTRL + X (or from Image menu select extract)

For more information read man pages:

man cp
man mv
man rpm
man mount
man mkdir

How To Change XSplash Themes in Ubuntu 9.10

Posted by ahmedhamdy_27 Friday, January 15, 2010 View Comments

With every new release of Ubuntu, there s a new XSplash theme that comes in. Today we show you how to change it and also show you some cool themes you might want to add to your machine.
XSplash
XSplash is a software project in the Ubuntu community that uses the X Window System to replace the scrolling-text screens that appear while booting a Linux-based computer with a graphical splash screen.
Previous versions of Ubuntu, (before Karmic Koala) used USplash which now is history. The default XSplash screen in Karmic Koala looks something like the one below& which is actually not too bad.
Xsplash Default
However, you don t have to live with the default XSplash if you don t like it. You can always change your XSplash screen to make it look better, and customize it to your Ubuntu overall theme. The following is the XSplash screen that I am currently using.
XSplash New
Change Themes
In order to change the XSplash screen in Ubuntu Karmic Koala follow these steps:
1. Open nautilus as root by typing  gksu nautilus at the run prompt (Alt + F2).
2. Download the XSplash archive that you want to use and move the content of the archive to

/usr/share/images/xsplash folder.

Note: Make sure that you take the back up of your current XSplash, by copying the default files to some safe location before copying the new XSplash theme files.
Once you have installed the new XSplash theme you can check how it looks by typing the following command at the terminal.

sudo xsplash
Cool XSplash Themes
Now that you know how to change it, let s take a look at some of the different themes. Here is a list of cool themes we ve found.
Fusion-GX-v00

Fusion-GX-v00 [200911-21]_1
Fusion-GX-v00 [200911-21]_2
Fusion-GX-v00 [200911-21]_3
Download Fusion-GX-v00

Xsplash  Crunchy Branch
Xsplash - Crunchy Branch
Download Xsplash Crunchy Branch
Ubuntu clean xsplash
Ubuntu clean xsplash
Download Ubuntu clean xsplash

Mesh Grill
Mesh Grill
Download Mesh Grill
XSplash-CF-GX
XSplash-CF-GX
Download XSplash-CF-GX

PackoXsplash HD
PackoXsplash HD_1
PackoXsplash HD_2
Download PackoXsplash HD

Xsplash (for netbook)
Xsplash (for netbook)
Download Xsplash (for netbook)
Xsplash-Engranes-GX-01a
Xsplash-Engranes-GX-01a
Download Xsplash-Engranes-GX-01a

Chromiu-GX
Chromiu-GX

Download Chromiu-GX
This will allow you to customize your Ubuntu installation a bit more& especially if you match it with your overall unique Ubuntu theme. Have Fun!

Original post by : HowToGeek

10 Useful Linux Commands

Posted by Linux4all Tuesday, January 12, 2010 View Comments

10 Useful Linux Commands

Here's a list of 10 commands which may come handy when using the command line in Linux:

Search for all files modified in the last N days containing a specific text in their name


find DIR -mtime -N -name "*TEXT*"

For example:


find ~ -mtime -5 -name "*log*"

Will display all the files modified in the past 5 days which include the text 'log' in their filename.

Determine which processes use the most memory


ps aux | sort -nk 4 | tail

Will show the first 10 processes which use the most memory, using ascendant sorting. Alternately:


ps aux | sort -nrk 4 | head

Will show the first 10 processes using most memory, using descendent sorting.


Output of ps aux | sort -nrk 4 | head


Display the username which is currently logged in

whoami

Show date using format modifiers

date +"%H:%M:%S"

Will output time in format HOUR:MINUTE:SECOND. You can use any format specifiers explained in the man page. The double quotes are required in case you need to use spaces.

Showing date in format month, day year


Show info about a specific user

finger $USER

Output of finger $USER

Show disk usage separately for each partition

df -h

The -h switch will tell df to show human-readable sizes (KB, MB and GB when it is the case)

df -B 1K

Will show sizes in kilobytes.

Show which modules are loaded

lsmod

Add or remove a module to/from the Linux kernel

Insert a module:

modprobe MODULE

Remove a module:

modprobe -r MODULE

Search for a file using locate

locate FILENAME

Will search the locate database (created with updatedb) for any path or file which contains FILENAME.

Change the encoding of a text file

iconv -f INITIAL_ENCODING -t DESIRED_ENCODING filename

For example:

iconv -f ISO-8859-16 -t UTF-8 myfile.txt

Will change the encoding of myfile.txt from ISO-8859-16 (Romanian) to UTF-8.


There is an old saying that goes "you can't miss what you never had" meaning that for those who have never had something of these things they will have no idea what they are missing out on.

Typically I use Ubuntu or some Linux flavor as my operating system for every day tasks, however as most techs know using Windows is unavoidable at times. (Whether it be because I am fixing someone else's machine, at work/school, or queuing up some Netflix watch instantly on my home system)

That being said the following are the top ten features/programs I find myself grumbling about/missing the most when I am working on the Windows platform:

10.) Klipper/Copy & Paste Manager - I use this one alot when I am either coding or writing a research paper for school.

More often than not I find I have copied something new only to discover I need to paste a link or block of code again from two copies back.

Having a tray icon where I can recall the last ten copies or so is mighty useful.

9.) Desktop Notifications - This is something that was first largely introduced in Ubuntu 9.04 and something I quickly grew accustomed to having.

Basically it is a small message (notification) the pops up in the upper right hand corner of your screen for a few moments when something happens in one of your programs (a torrent finishes, you get a new instant message, ect.) or you adjust the volume/brightness settings on your system.

8.) "Always on Top" Window Option - This is something I find useful when I am instant messaging while typing a paper, surfing the net, or watching a movie on my computer.

Essentially what it does is make sure that the window you have this option toggled on is always at the top of your viewing regardless of what program you have selected/are working in.

It is useful because it allows me to read instant messages with out having to click out of something else that I am working on.

7.) Multiple Work Spaces - When I get to really heavy multitasking on a system having multiple different desktops to assign applications to is a god send.

It allows for better organization of the different things I am working on and keeps me moving at a faster pace.

6.) Scrolling in the Window/Application the Cursor is Over - This one again is mostly applicable when some heavy multitasking is going on (but hey - its almost 2010, who isn't always doing at least three things at once right?).

Basically in Ubuntu/Gnome desktop when I use the scroll on my mouse (whether it is the multi-touch on my track pad or the scroll wheel on my USB mouse) it will scroll in what ever program/window my mouse is currently over instead of only scrolling in what ever application I have selected.

5.) Gnome-Do - Most anyone who uses the computer in their everyday work will tell you that less mouse clicks means faster speed and thus (typically) more productivity.

Gnome-Do is a program that allows you to cut down on mouse clicks (so long as you know what program you are looking to load).

The jist of what it does is this: you assign a series of hot keys to call up the search bar (personally I use control+alt+space) and then you start typing in the name of an application or folder you want to open and it will start searching for it - once the correct thing is displayed all you need to do is tap enter to load it up.

The best part is that it remembers which programs you use most often. Meaning that most times you only need to type the first letter or two of a commonly used application for it to find the one you are looking for.

4.) Tabbed File/Folder Viewing - Internet Explorer finally got tabs! Why can't the default Window's explorer for viewing files/folders join it in the world of twenty-first century computing?

Tabs are very useful and are a much cleaner option when sorting through files as opposed to having several windows open on your screen.

3.) Removable Media Should Not Have a Driver Letter - The system Windows uses for assigning letters to storage devices was clearly invented before flash drives existed and I feel it works very poorly for handling such devices.

It is confusing to new computer users that their removable media appears as a different drive letter on most every machine (and even on the same machine sometimes if you have multiple drives attached).

A better solution is something like Gnome/KDE/OSX do: have the drive appear as an icon on the desktop and have the name of drive displayed not the drive letter (its fine if the letter still exists - I under stand the media needs a mount point, just it adds confusion displaying this letter instead of the drive name)

2.) Hidden Files that are Easy/Make Sense - I love how Linux handles hidden files. You simply prefix your file name with a "." and the poof its gone unless you have your file browser set to view hidden folders.

I think it is goofy to have it setup as a togglbe option within the file's settings. Beyond that Windows has "hidden" files and "hidden" files to further confuse things.

1.) System Updates that Install/Configure Once - I've done more than my fair share of Windows installs and the update process it goes through each time irks me beyond belief.

The system downloads and "installs" the updates, then it needs to restart. Upon shutting down it "installs" the updates again and then proceeds to "configure" them.

Then once it comes back online it "installs" and "configures" the updates one last time. Why? On Ubuntu the only update I need to restart for is a kernel update - even then most times I stick with my older kernel most times unless I have a specific reason for changing to the new one.

0.) Wobby Windows - This one doesn't effect productivity or use-ability like the other ten, but I must say after using mostly Ubuntu for the last year and a half not having the windows wobble when I drag them around the screen is a huge kill joy.

I'm aware that a few of my above mentioned things can be added to Windows through third party software- however like I said most times when I am using Windows it is at work, school, or for a few moments on a friends system. Meaning I'm not about to go installing extra things on them/changing configurations.

Anyone else have some other key things/features they miss when using the Windows platform when coming from else where?

Three ways to securely access remote internal networks and work from home

Remote access to a computer and internal network’s secured resources - all of it in a simple way that’s following well-known security’s best practices?

Sounds impossible, but it’s not. How to achieve it explains Bartosz FeÅ„ski aka fEnIo.

A computer network with a tight security should be separated from the outside world as much, as it’s possible.

It’s often the case. Even if there is a over a dozen of devices(PCs), that play different parts assigned to them in terms of company’s infrastructure, usually there is one that separates them from others, a firewall and a router.

On the assumption that the company’s policy is not too strict we often have an free access to this kind of devices.

It can be various internal services, databases, servers of whatever is necessary to run a current company.

What if, after work, when we are home safe and sound, we still need to connect to one of those servers that are not accessible outside the internal network.

I’ll describe few ways to do it.

SSH ProxyCommand
The simplest and, as far as I reckon, the most often case is when just behind firewall there is a 2nd server accessible by SSH, but only for LAN users.

It’s similar to the situation, where router does NAT, and server’s addresses behind him are from private address’ classes.

Therefore, If we want to log in, we need to log in to the firewall first.

Sounds familiar ? How many times have you actually tried to do the following:
laptop$ ssh router
[password1]
router$ ssh server
[password2]
server$

I’ve done it millions of times, and if someone does something often enough there is a chance that it would be so infuriating that eventually someone will try to automate it. SSH share the same story.

Let’s make an configuration file on a laptop ~/.ssh/config:
Host server
ProxyCommand ssh router nc %h %p 2> /dev/null

For this configuration to work a program called netcat is necessary, but most of the distributions have it in high-priority packages so it’s often already installed, so… How does the server connection looks like ?
laptop$ ssh server
[password1]
[password2]
server$

Let’s generate a key so we won’t be bothered about all the passwords.
laptop$ ssh-keygen
laptop$ ssh-copy-id router
laptop$ ssh-copy-id server

Login process is much more easier now:
laptop$ ssh server
server$

The coolest thing about it all is the fact, that along with the possibility of logging in to a device that is not public-accessible, we also get the full set of SSH features.

There is no problem in using scp, sshfs, forwarding Xs or to set a tunnel to other device through a server.

But what if…
laptop -> router1 -> router2 -> ... -> routerN -> server

There are no barriers to add several devices to ~/.ssh/config and automate the whole login process even if u need to log in to few middle devices before logging in to the right one. You just need to define the right proxy command.

SSH SOCKS
SSH problem is solved, but what if the service we try to get to is, for example, a WWW server? We can use text browsers from the device we logged in, but it’s not really elegant or convenient.

We can use,mentioned earlier, port forwarding, that along with automatic login to different devices is a pretty flexible solution, but we need to remember to add certain SSH commands to every service or setting it all up in ~/.ssh/config)….
… but SSH function SOCKS saves the day:

laptop$ ssh -D 8080 router
[password1]
router$

If we generated a key, then we don’t need to give a password. We need to set up localhost as a SOCKS server and port 8080 in our browser.

All connections will be tunneled to the router and visible for the WWW server as if they were initiated from this device.

Not every applications let’s you use SOCKS server though, but there is a cure. It’s called tsocks. It’s a simple program, that with the help of LD_PRELOAD variable, makes applications use the alternative versions of the connect(), sendto(), socket() functions.

Thanks to that the applications can use middle servers almost without any dedicated configuration, unconsciously if we may use this term in reference to binary beings.

The configuration file should look as follows:
server = 127.0.0.1
server_type = 5
server_port = 8080

Now the applications, we’d like to “deceive” should be run:
laptop$ tsocks application_without_socks_support

As I’ve just presented, with SSH and a simple program we can quite easily organize our work environment and bypass limitations caused by a firewall. We can’t solve all our problems though. Let’s take our old FTP for example.

It needs 2 ports to communicate, so it can’t be deceived in the way shown above. Moreover, if there is 40 services run on 30 devices behind firewall SSH configuration will be exceptionally complex and hard to maintain.

Perfect would be a solution, in which our laptop with a certain address’ class simply connects to through a channel to the targeted devices in a way, that the device knows the connection came from a secured and trusted network.

OpenVPN
OpenVPN solves the problem. To the contrary to SSH-based solutions, that works on 7th layer (application), OpenVPN works on 3rd (network)or even 2nd (transport) layer so it’s entirely transparent for the software.

Moreover, it comes with authentication and encryption, so we don’t loose anything comparing to SSH.

Although since version 4.3 OpenSSH makes 2/3 layer tunneling possible,
but its configuration stands next to impossible.

OpenVPN allows making advanced configurations and, for instance, setting up a secured connection between several corporate branches.

I’ll limit the example and only show how to gain access in the case described at the beginning of this article.

Laptop will be a client and a VPN server will be configured on a router.

I assume, that openvpn package is installed on the laptop and the router. Let’s generate a key (that will be used to encrypt and authenticate the transmission) on the router.
router$ openvpn --genkey --secret /etc/openvpn/static.key

And a configuration file /etc/openvpn/server.conf:
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key

10.8.x class’ addresses will be used to set up a tunnel. You are free to choose your own addresses.

One thing left is to run the server:
router$ sudo /etc/init.d/openvpn start

We should get one more interface
tun0      Link encap:UNSPEC
HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Moreover we need to unlock the 1194 port in firewall setup.
We copy generated static.key on the laptop and we create client configuration file /etc/openvpn/client.conf:
remote routers_address
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key
route 192.168.0.0 255.255.255.0

Now we switch routers_address to its actual address. Route option will make a new record in routing table visible and from now all transfer is directed to the set up tunnel.

Last but not least thing we have to do is to run VPN on the laptop:
laptop$ sudo /etc/init.d/openvpn start

Let’s look at the routing table:
10.8.0.1    0.0.0.0    255.255.255.255 UH  0    0    0 tun0
192.168.0.0 10.8.0.1   255.255.255.0   UG  0    0    0 tun0

That’s the way to set up the simplest configuration. Of course, as everything, It has its flaws.

For example, everyone who has the key can access our network – sometimes though the key may fall into the wrong hands.

OpenVPN has its own, more sophisticated authentication methods – simply get the generated key password-protected, but its security is far beyond this article framework.

Linux Live USB Creator

Posted by ahmedhamdy_27 Monday, January 11, 2010 View Comments



LiLi USB Creator is a free software for Windows that allows you to create a bootable Live USB key with a Linux on it.
This software also offers an exclusive option of automatic virtualization to directly run Linux in Windows without any configuration nor installation.
  • create bootable Live USB of Ubuntu, Fedora, Debian, Damn Small Linux, Puppy Linux and many others !
  • enable persistency of your data
  • launch Linux directly in Windows with a special Portable VirtualBox
  • hide created files on the key
Anybody can use LiLi USB Creator. It's really easy to use and you don't have to be a computer geek !


DOWNLAD


Use the link below to follow a step by step procedure on how to use LiLi :
http://www.linuxliveusb.com/en/how-to.html

Color man pages

Posted by ahmedhamdy_27 Sunday, January 10, 2010 View Comments

A nice feature of less which enables you to set termcap colors by environment variables.

Just use


export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

in your ~/.$SHELLrc to get this effect.

Thanks to : http://nion.modprobe.de/blog/archives/572-less-colors-for-man-pages.html

There are a couple of easy adjustments you can make to your web server in order to decrease page loading times, save bandwidth, and reduce load on the server. All you have to do is add a couple of code snippets to either your Apache server configuration file (httpd.conf or apache2.conf) or an .htaccess file.
Note that these require that your server have certain modules installed for this to work. You will need either mod_deflate or mod_gzip for GZIP compression and mod_expires for the browser caching trick.

Enable Browser Caching

When a web browser loads a page, it checks each item it requests (JavaScript, CSS, images, etc) against its local cache. If an item, say the stylesheet, hasn’t expired yet, then it will load the local copy instead of requesting a new one. Now if you were to instruct your server to set the expiration time for images, CSS, and JavaScript files to one month from the present, users viewing multiple pages of your site (even across multiple days) won’t tax your resources as much, as they will use the copies of your stylesheets and images that have already been downloaded.
Insert this into your .htaccess file or Apache config, restarting Apache if you chose the latter:



 ExpiresActive On

 ExpiresDefault "access plus 1 month"

Now any file with an extension of ICO, JPG, JPEG, PNG, GIF, JS, CSS, SWF will be set to expire one month from the time the browser caches it.

GZIP Compression

Now wouldn’t it be nice if you could cut down on the size of the file? There’s no point in doing it for images (which are already compressed) but you can greatly reduce the size of text-based files (HTML, JavaScript, CSS) by having the server compress them before sending them out.
Add this to your .htaccess or Apache config (restarting Apache if you chose the latter) as before:

SetOutputFilter DEFLATE

SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \

 no-gzip dont-vary

SetEnvIfNoCase Request_URI \

 \.(?:exe|t?gz|zip|bz2|sit|rar)$ \

 no-gzip dont-vary

SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
This beast does several things. The first directive tells mod_deflate to get to work. The next several lines determine how mod_deflate will work. It will not affect GIF, JPG, PNG images or already-compressed archive files (e.g. ZIP or RAR), as there is no real benefit in doing so. The final three “BrowserMatch” lines deal with Internet Explorer’s funkiness.

Is it Working?

If you have Firebug and the handy Google Page Speed extension installed, you can run a quick test to make sure everything is working right. There should be two lines mentioning “Leverage browser caching” and “Enable gzip compression.” They should be checked-off instead of having a red icon.

Firebug Speed Test: GZIP Compression

How to enable mod_deflate globally in cPanel/WHM

This will be a quick one folks.  The Apache module mod_deflate helps in reducing the size of the information sent to a user, by compressing things prior.  It seems to work very well.  To test if your site already has mod_deflate installed and working, you can go here:

http://www.whatsmyip.org/http_compression/

To enable mod_deflate on your WHM / cPanel server, make sure you run EasyApache through WHM, and select to install mod_deflate.  Once done, you’ll notice that it is not active globally.  In your cPanel control panel for your domain, you should notice that under “Software / Services” an icon called “Optimize Website” is now there.
If however, you wish enable it globally, so that all websites on your server can benifit from this, you need to venture back into WHM, and this time go to:

Services Configuration >> Apache Configuration >> Include Editor >> Post VirtualHost Include, and select All Versions

Now, paste the following into this file, and hit Update:


SetOutputFilter DEFLATE

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won’t work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don’t compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary



# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary



That’s it, now, go back to the site I gave you at the start, load up your website, and verify that compression is now functioning.

For you command line users, you can achieve this my running the easy apache command line build (/scripts/easyapache), and select to include mod_deflate.  Once that is done, you can edit the “/usr/local/apache/conf/includes/post_virtualhost_2.conf” file, and paste the above code into it to achieve the same results.  Remember to restart apache once you’ve edited the file.

Mod Deflate comes built into Apache, but is not enabled by default. This tutorial will explain the simplest way of enabling it and setting which mime times to compress. Mod Deflate will increase your server load, but decreases the amount of time that clients are connected and can usually reduce the page size by 60 to 80 percent.

Loading Mod Deflate

First make sure that you are loading mod_deflate.so, this line should be at the top of your httpd.conf file and is usually loaded by default.
LoadModule deflate_module libexec/apache22/mod_deflate.so

Mod Deflate Settings

Second create a new config file to keep the deflate options in.
# ee /usr/local/etc/apache22/Include/mod_deflate.conf
This file will be included in the main httpd.conf file. Inside the file add the following:
AddOutputFilterByType DEFLATE text/html text/plain
#Highest 9 - Lowest 1
DeflateCompressionLevel 9

#Optional
#Skip browsers with known problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

#Optional
#Logging
DeflateFilterNote ratio
LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
CustomLog /usr/local/www/logs/deflate_log deflate
The compression level can be adjusted. 9 gives the highest compression, the smallest file sizes, and also uses the most CPU cycles.
Once you have this config file added restart apache.
# apachectl graceful

Testing Mod Deflate

To test your compression you can compare the file size by looking at the apache logs or a tool use as port80 tools.

Compressing additional types

You can compression additional mime types coming out of your server by adding them to the AddOutputFilterByType list in the mod_deflate.conf file. Some you might want to add are text/css, application/x-javascript, text/xml, and any others that are would benefit from being compressed.

If you want to experience it first hand, we will tell you what you how to do it in this article. Just to start off here is a screenshot of the Gnome 3 Shell:

gnome3_11
Note: Gnome-Shell is still in the development stage and there is always the possibility of something breaking.
1. Open terminal and run the command below to install the Gnome Shell
sudo apt-get install gnome-shell
2. After the installaton is done you can start it using the command below in terminal
gnome-shell --replace
3. If you have intel graphics and get just a blank screen after the above command run the command given below before the command in step 2.
export GNOME_SHELL_DISABLE_TFP=1

K9Copy Ubuntu

Posted by ahmedhamdy_27 View Comments

  • K9Copy
IconsPage/dvd-video.png K9Copy is a program that allows you to copy DVDs (and other audio-video media) in Linux. It has the following features:
  • Video compression (to make the video fit on a 4.7GB recordable DVD, or any size desired)
  • DVD burning
  • Creation of ISO images
  • Choice of audio and subtitle tracks to be copied
  • Title preview (video only)
  • Preservation of original menus
IconsPage/warning.png Warning: As always, check the relevant copyright laws for your country regarding the backup of any copyright-protected DVDs and other media.

Installing K9Copy from the Repositories

K9Copy requires the multiverse repository - enable this in Software Sources
software-sources.png
Search for the package k9copy in Synaptic, Adept, KPackageKit, or other package manager.
IconsPage/IconGNOMETerminal.png Or, to install via terminal:
  • sudo apt-get install k9copy

Activate Support for Encrypted DVDs

Encrypted DVD playback requires the installation of libdvdcss2 from the Medibuntu repositories. libdvdcss will need to be enabled for K9Copy to have full functionality.
* You can install libdvdcss2 from a command line terminal as a 64-bit .deb package without installing the Medibuntu repositories:
wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.10-0.2medibuntu1_amd64.deb
sudo dpkg -i libdvdcss2_1.2.10-0.2medibuntu1_amd64.deb
  • or a 32-bit .deb package:

wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.10-0.2medibuntu1_i386.deb
sudo dpkg -i libdvdcss2_1.2.10-0.2medibuntu1_i386.deb
See RestrictedFormats for more information on playing encrypted DVDs and other non-free media.

Using K9Copy

IconsPage/navigate.png K9Copy should now appear under Menu -> Applications -> Sound & Video in Gnome (Ubuntu) or Menu -> Multimedia in KDE (Kubuntu) or XFCE (Xubuntu). You can also start K9Copy from a command-line terminal (or by pressing Alt + F2):
k9copy

Quickstart guide

K9Copy works in both KDE and Gnome. To copy a normal DVD and shrink it down to 4.7Gb, set the input device to your DVD and output as ISO image. Open the video using the 'folder' icon at top left. Under the MPEG4 Encoding tab, select Video codec as copy. Ticking the 2 pass box will give a higher quality copy. Set file size to say, 4700MB (note that there have been reports e.g. that this value is sometimes slightly exceeded).
Select the title(s) of interest. Then press the circular to DVD icon. It will ask for a location to create the iso copy. Note that when it starts, it misleadingly says 'Burning DVD' - what its actually doing is creating the iso copy on the hard drive - rest assured the DVD is NOT being overwritten! A dvd can then be created from the resulting iso file with another program eg. Nautilus (right click on the iso) or K3b. Although k9copy can also burn the iso (or a DVD structure), using a separate program has been reported to be more reliable.
Tip: To preview the titles, highlight the title/chapter of interest and click on the 'movie camera' icon - only THEN can you use the stop/play buttons in the preview window.
If you wish to change the Menu structure (reauthor the DVD), you can use qdvdauthor.

Similar and related programs

*DVD::Rip is another full-featured solution for DVD ripping in Linux.
*DVDShrink is a Windows-based program that must be run in Wine in Linux.

Using Rsync

Posted by ahmedhamdy_27 View Comments

What is rsync?

Rysnc helps you transfer data from one location to another in an efficient manner. It is one of those tools that you learn to use and wonder how you lived without it. Rsync is the de facto standard in backup solutions because of its flexibility and power.
Rsync checks each file and transfers only what has changed. What does this mean exactly? Rsync will actually look and see what in the file has changed and upload only the part of the file that has changed. Unlike ftp and other transfer solutions rsync doesn’t simply re-upload the entire file.
The difference in the files are then compressed (an optionally encrypted through ssh) then sent so the transfer uses the minimal amount of bandwidth. Rsync is often used by Amazon S3 users as they must pay for bandwidth. When you are paying bandwidth bit by bit you can’t afford anything but rsync.

Rsync is Efficient but What Else Can it Do?

As you can probably tell by the name rsync is really good at syncing files across a network. If a file has changed it can detect the change and transfer only that change. This makes rsync a perfect candidate for doing incremental backups or mirroring a website.
For example to mirror one folder to another you could do:
rsync –av /path/to/source /home/nixtutor/rsync/daily
You can also use the same technique to sync from one computer to another:
rsync –av /path/to/source user@nixutor.com:/home/nixtutor/rsync/daily
By default this will only upload new files and changes but not delete or remove files that no longer exist. To do this you can add the –delete flag. This is rsync’s way of protecting yourself from mirroring a blank directory.
rsync –av –delete /path/to/source user@nixutor.com:/home/nixtutor/rsync/daily

Want to Sync Specific Files?

In this example we only sync .iso files.
rsync -zrv –include=”*.iso” host:/home/nixtutor /home/

Things to Keep in Mind

  • Rsync is powerful but unforgiving
  • Rsync follows the unix methodology, do one thing and do it well. Thus it doesn’t provide encryption only efficient file transferring. Run rsync through SSH if you need encryption.
  • Rsync will not delete files that have been removed unless you supply the –delete flag.
  • Windows doesn’t keep file modification times to better than two seconds. Use the –modify-window=2 option to get around this when syncing to Windows file shares.
Most backup senarios can be done with rsync and cron.

Usefull basic Mysql commands

Posted by ahmedhamdy_27 Tuesday, December 15, 2009 View Comments

here are some basic but useful MySQL commands.




How to login to MySQL:

mysql -u root -p

How to create a MySQL database via Shell:

After you logged in, execute this command (replace dbname with the name of the database you want to create):
mysql> create database dbname;

Output:
Query OK, 1 row affected (0.01 sec)

How to delete a MySQL database via Shell:

mysql> drop database dbname;

Output:
Query OK, 0 rows affected (0.05 sec)

How to create a MySQL User via Shell:

(replace dbusername with the username you want to create)
mysql> create user dbusername;

How to set a password for the MySQL User you just created:

(replace passhere with the password you would like to set)
mysql> set password for dbusername = password('passhere');

How to grant privileges for the username to the database:

mysql> grant all privileges on dbname.* to dbusername@localhost identified by 'passhere';

How to display database tables in a MySQL database?


First enter the database by executing:
mysql> use dbname;

Now show tables:
mysql> show tables; 

To search for a specific table without remembering its exact name:
(where keyword is the partial name you remember)
mysql> show tables in dbname like '%keyword'; 

How to exit MySQL via Shell:

mysql> exit

Loading...

BEST WAY TO SAY THANKS

Recent Posts

archive

BEST WAY TO SAY THANKS