Archive for the 'tips' Category Page 2 of 24



Install Ubuntu Chromium browser (Google Chrome for Linux)

Update: Using Ubuntu Lucid Lynx? Here is corresponding article for you:
Install Google Chrome (Chromium) on Ubuntu Lucid Lynx.

One of the easiest way to try Chromium browser in Ubuntu Linux (Google Chrome browser for Unix/Linux operating system is named as Chromium) is to use daily binary builds at https://launchpad.net/chromium-project. Today Ubuntu is the most popular Linux disributions for desktops so there are daily builds available for the following Ubuntu versions: hardy, intrepid, jaunty, karmic.

First let your Ubuntu know where it should find chromium-browser deb package:

vi /etc/apt/sources.list

add the following lines:

deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main

Replace jaunty with hardy, intrepid or karmic depending which version you run at your computer. If you feel this information is not sufficient for you, follow this link to get Ubuntu official information on this matter or follow Launchpad help.

The next step is to install Chromium browser:

sudo apt-get update
sudo apt-get install chromium-browser
or
sudo aptitude install chromium-browser

Once you press enter Ubuntu will download around 18 MB of data from launchpad’s server and will install Chromium with gnome menu entries and shortcuts. Now you can go to System menu –> Internet –> Chromium Web Browser in order to launch Google browser.

Ubuntu Chromium (google chrome for linux)

Ubuntu Chromium Google browser (Google Chrome Ubuntu)

As you might know there is still no official release of chromium/chrome available for Linux, so these daily builds from launchpad are for testing/observations purposes only. For example, there is no flash plugin available so you will be able to see html pages like this one and no swf/flash content. Anyway thanks to Google for great browser which has all chances to become “browser number one” for Linux or even for the rest of operating system such as Windows or Mac. Who knows? :)

You might also find this page using Google and the following keywords: Ubuntu Chrome, Google Chrome Ubuntu, Chrome for Ubuntu and others.

Tiny bash scripts: check Internet connection availability

Sometimes it is necessary to check whether server you want to run some big bash script is connected to Internet. Usually it makes sense while running scripts periodically using cron.  Below is the tiny bash script for this purpose:

#!/bin/bash

WGET="/usr/bin/wget"

$WGET -q --tries=10 --timeout=5 http://www.google.com -O /tmp/index.google &> /dev/null
if [ ! -s /tmp/index.google ];then
	echo "no"
else
	echo "yes"
fi

As you see it tries to download google’s index page, if it’s not empty script returns “yes”, if there is not Internet connection available script will return “no”. If it is impossible to fetch the page in more than 5 seconds script will return “no” as well.

Anything to add? You are welcome! :)

Mount remote filesystem via ssh protocol using sshfs and fuse [Fedora/RedHat/Debian/Ubuntu way]

sshfs

Imagine the following situation: you have to compile some Linux/Unix application or kernel module that requires kernel source present at your hard drive, say, in /usr/src/kernels/kernel-2.6.21-i386/ or elsewhere. But there is not enough disk space to copy these sources or install kernel-devel or linux-source packages (in Fedora/RedHat or Ubuntu/Debian distros respectively)… Sounds familiar? Believe me, sometimes it happens :)

As a solution you can mount the directory of some remote PC that contains needed kernel source. It can be done via several protocols like smb, ftp etc. In this article we will mount remote directory using ssh protocol that is one the most popular for remote and secure access to Linux boxes over the network.

Below are the steps which should be taken to get the ball rolling. We need two packages: sshfs and fuse-utils.

ssh1. Install necessary packages:

a. Ubuntu/Debian:

sudo aptitude install fuse-utils sshfs

b. Fedora/Centos/RedHat:

yum install fuse-sshfs fuse fuse-libs

c. Other Linux: download and compile sshfs/fuse from sources

2. Check that kernel module fuse is loaded:

lsmod | grep fuse

There should be the line containing “fuse” in the output (of not try modprobe fuse).

3. Mount remote filesystem using something like this (two commands):

mkdir -p /mnt/sshfs/
sshfs remote-user@remote-machine:/some/directory /mnt/sshfs

where remote-user is the username allowed to login remote-machine via ssh protocol. It will ask you to type the password so just type it and press return :)

4. That’s it. Good luck!

Ubuntu Iptables Firewall: set of useful links

Ubuntu as any other Linux distribution comes with netfilter iptables as default firewall. This is one of the best firewall software for Unix family operating systems: it allows to perform various filtering operations and makes it possible to match packets using numerous ways starting from data in IP packet header and ending with Layer 7 packet inspection (but this is another topic).

Below you can find a list of articles on the Web helping to understand the logic of Ubuntu iptables setup as well as create powerful firewall from your Ubuntu system:

1. Official Ubuntu Iptables How To:

There is a wealth of information available about iptables, but much of it is fairly complex, and if you want to do a few basic things, this How To is for you.

2. Simple firewall for Ubuntu using iptables

Don’t forget to look through page’s comments as there is a lot of useful staff there.

3. Setting Up An Iptables Firewall On Ubuntu With Firehol from Howtoforge:

FireHOL is a stateful iptables packet filtering firewall configurator. It is abstracted, extensible, easy and powerful. It can handle any kind of firewall, but most importantly, it gives you the means to configure it, the same way you think of it.

4. Basic sshd and iptables security in Ubuntu

5. Use iptables as firewall with a daemon on system startup

This howto is intended to set up a firewall without installing firestarter (useful if you don’t use any wm, eg: servers). It uses iptables which is available with a fresh Ubuntu install, and a init.d script to run it as a daemon on boot.

6. Set up Ubuntu as a firewall/gateway router with webmin

7. Netfilter & Iptables in Ubuntu (French)

8. Set a custom firewall (iptables) and Tips [Beginners edition]

9. Set a custom firewall (iptables) and Tips [Advanced user only]

10. iptables premier

“Do I need a firewall?” is a FAQ on the Ubuntu Forums. In order to answer that question we need to understand what you want to do accomplish by using (configuring) a firewall. The purpose of this post is to introduce iptables and encourage appropriate use.

11. Block brute force attacks with iptables in Ubuntu or Turning away the bruters

Without proper protection your server is a sitting duck waiting for a bot to guess the right combination and hit the jackpot. But with just 2 commands we can stop that.

Of course you can try google to find more articles about how to configure iptables in Ubuntu Linux but I am sure that above mentioned links will help you to move forward with configuring Ubuntu iptable and take the first steps on builing secure and stable iptables firewall box.

VMware server console keyboard problem in Ubuntu Intrepid Ibex

Few days ago I have upgraded my Ubuntu to latest 8.10 (Intrepid Ibex) and found that keyboard just doesn’t work in VMware Server Console. The problem was that I couldn’t use keyboard under guest operating system including Windows, Linux etc. After few hours of research I found simple solution which works for me:

$ setxkbmap
$ echo "xkeymap.nokeycodeMap = true" >> ~/.vmware/config

After this restart vmware-server-console and see if it helps. If not you can see other solutions of the same problem at this site:
http://nthrbldyblg.blogspot.com/2008/06/vmware-and-fubar-keyboard-effect.html

I hope it helps!
Continue reading…




Pages: Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Next
Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››