Wednesday, October 31, 2012

Ubuntu starting in low graphics mode?

If you ever encountered Ubuntu starts in low graphics mode, it could be due to the following:
  1. your "/" or "/boot" partition are full. Do a check with df -h, if it is the case then clean out some useless stuff and do a reboot
  2. the lightdm or gdm is corrupted. Uninstall it completely with sudo apt-get purge gdm or sudo apt-get purge lightgdm, then reinstall with sudo apt-get install gdm. Select lightdm or gdm from the menu. (you might try lightdm first, if it still give problem, go with gdm)
  3. the desktop might have corrupted. If you are using XFCE4 like I do, continue with sudo apt-get purge xubuntu-desktop and sudo apt-get install xubuntu-desktop. Same method work for ubuntu-desktop.

Tuesday, October 30, 2012

Things to take note when sharing files


  • Using Webmin as interface to configure the sharing, it is very important to set valid users beside the read/write permission. Leaving the valid users input blank will give chance for other unauthorized user to bypass the read/write permission and gain access to the folder with read only permission.

LVM with RAID

http://home.gagme.com/greg/linux/raid-lvm.php

Monday, October 29, 2012

Removing Ubuntu Unity 3D?

I will share the resources I gather in regard removing the annoying Unity 3D and run only your favorite windows manager:

Ubuntu 12.10 - Remote desktop from Win7 give blank screen

There is always problem here and there with fresh install Ubuntu. It is really unlike Windows 7, no matter what you have install things will normally work just right away without much configuration.

XRDP session in Ubuntu can't escape as well. I believe a lot have experienced login from Windows 7 to Ubuntu will see only the wallpaper without any taskbar. There are many many work around online and most of them required a lot of command line input and even some require reinstallation / removal of certain piece of software inside.

Gathering info from all those advices, one can realize it actually something to do with what is being loaded up upon login from remote. The gnome-session-fallback seems not working on Ubuntu 12.10 possibly due to Unity-2D is completely gone out of 12.10. And if you are like me who prefer xfce4 than any other, then the solution is as simple as below:
  1. locate the startwm.sh in /etc/xrdp
  2. you can do vi or simply fire up leafpad with sudo privilege. the last line of it should be ./etc/X11/Xsession
  3. replace it with xfce4-session (or you can simply add a "#" in front of the "xsession" line to disable it and enter xfce4-session in a new line)
  4. now login again from remote desktop connection and voila!
Configuring different desktop session:

  1. Lubuntu: lxsession -s Lubuntu -e LXDE
  2. Gnome Fallback: gnome-session --session=gnome-fallback

Thanks to NuxIT from linuxquetions.org for the idea of such a simple solution. The original discussion thread can be found here:
http://www.linuxquestions.org/questions/linux-networking-3/problems-connecting-to-xrdp-xfce-desktop-after-ubuntu-upgrade-943189/

Additional resources:

Bandwidth Monitor - Bandwidthd


Download: http://bandwidthd.sourceforge.net/

How to install:
  • http://community.spiceworks.com/how_to/show/1261-how-to-use-bandwidthd-to-monitor-your-network
  • http://infodotnet.blogspot.com/2008/02/install-and-configure-bandwidthd-per-ip.html

Sunday, October 28, 2012

Check / Rebuild RAID in Ubuntu?

Come across a command that at least can tell me something about my RAID10.

Original URL: http://ubuntuforums.org/showthread.php?t=1844859

The command:
sudo dmraid -sa to get a report on the array
sudo dmraid -rebuild "name from above" to rebuild it.

Bonding / Teaming in Ubuntu 12.10

For those who has 4 x Gbe (Intel NIC) configuration with 1 x IPMI network, here is what you can do:

  1. Install ifenslave
  2. Load up the driver for bonding (will add in info later, check reference link as for now)
  3. Locate "interface" /etc/network
  4. Change the content accordingly based on this sample:
=============================================
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# Adaptive Load Balancing Teaming
auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto eth2
iface eth2 inet manual
bond-master bond0

auto eth3
iface eth3 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 192.168.0.11
gateway 192.168.0.1
netmask 255.255.255.0
bond-mode balance-alb
bond-miimon 100
bond-slaves eth0 eth1 eth2 eth3
=============================================
  • then use command sudo ifdown XXX to bring down all your existing network connection
  • next, sudo ifup bond0
  • in certain circumstance, you might need to do sudo -s, then bring up all the four Gbe LAN by using ifup eth0, ifup eth1, etc
  • to check whether the bonded network loaded up properly, you can go /proc/net/bonding/ and check the bond0
Some useful references:

Windows Files Sharing with Linux

Configure sharing for Windows under Linux is really a headache for linux beginner like me. There are a lot of tutorials out there to teach you how to do it but none of that really give a quick and straight forward solution to new learner.

After a day of hunting for solution, finally I come across Webmin. This is really life saver for windows based user who just embrace Linux, as all settings can be done within web browser. It makes configuring Linux as easy as working with NAS web configuration.

However, the pain to share file for windows doesn't get lesser even with that. In windows we can easily bring up Advanced File Sharing dialog and set permission based on per individual user. Afaik in Linux the file permission cannot be set based on individual user, there is only 3 permission if you right click > properties.

So how do we set file share permission based on individual user in Linux? The answer is by using the read-list, write-list in the smb.conf (samba sharing configuration file). Here's a simple guideline:
  1. Log into Webmin
  2. Create share folder under Samba Windows Files Sharing
  3. Under Security & Access Control, assigned the user into appropriate field (for example, User A in read-only, User B in Read-Write)
  4. You might want to add user(s) under Invalid User in order to prevent unauthorized access to the shared folder.
  5. Once you are done with this, open up Nautilus / Thunar / Dolphin, locate the folder you gonna to share, right-click > properties > under "Others", set to Read/Write, and enable Recursive for sub-folder and files under same directory.
  6. Next restart samba service.
  7. Now you should have setup the file sharing properly.
If you don't, please do not hesitate to drop me a comment, I will try to answer as my steps listed above might miss out something, and due to very limited experience now, I might mislead in certain aspect, but don't worry, let's figure it out together.
 

Ubuntu installed on Xeon E3 shutdown out of sudden?

In recent installation of Ubuntu 12.10 on Intel Xeon E3-1200 V1 system, I have encountered random shutdown out of no reason. The most obvious symptom I can observe is the HDDs running on RAID10 would first go down before the system is completely power off.

Steps that I have done to troubleshoot including:
  • unplug & plug all the HDDs.
  • relocate all SATA cables
  • relocate the RAM to another slot
  • change power cord
  • check CPU temperature
Nothing solved the problem. I then reset the BIOS.

Before power up the server, reading the manual of motherboard I realize the Execute Disable Bit seems not officially supported on Ubuntu. I then disable the function.

Everything seems working fine afterwards. I have not tested whether it is the BIOS which caused the problem or the Execute Disable Bit create the problem, but if you do encounter the same problem like I did, try disable it. May save your day. =)

Saturday, October 27, 2012

Mount disk

To mount & read NTFS you have to install yum install ntfs-3g

As far as I know the best GUI tool to mount a disk is come with Gnome, which is the Gnome-Disk-Utility. If you want to run it from terminal, the name is kinda weird as it is completely different from its name - palimpsest

By using Gnome-disk-utility, mounting a disk is just two steps:

  1. select the partition
  2. click on the "Play" button shown on the right screen.
  3. Voila! (well, this is not a step, so... two steps, ok? =P)

The best file manager

Personally I find Nautilus to be the most powerful file manager, second with Thunar, especially when it comes to browse network. Dolphin is very handy, with the split panel button shown on the toolbar, but it seems to be the slowest when accessing network resources.

The only thing Nautilus annoying is the default icon display at the location. To permanently change it to location bar without clicking Ctrl+L everytime, simply:

  • install yum dconf-editor.x86_64
  • fire up dconf-editor
  • under org > gnome > nautilus > preference > "always use location entry"
  • be sure to have your existing Nautilus instance close, else you will find the check box cannot be ticked.

Friday, October 26, 2012

Working with Samba

Things to install

  1. yum install samba
  2. yum install samba-client


For beginner, it is much much easier to configure Samba with SWAT. Here's how:
  1. First you need to yum install xinetd.
  2. Next, yum install samba-swat.x86_64
  3. You will then need to edit the file under /etc/xinetd.d/swat, change the disable=yes to disable=no
  4. Instruction in Arch Linux might have ask you to run "xinetd daemon", but I have run into trouble with that. Instead, I do "xinetd" and successfully log into SWAT configuration page in web browser.
Some important things to take note when configuring shares for access from Windows:

  • for every changes made to share, samba server need to be restart. This is very different from share within Windows, whereby all changes are made effective immediately



Some useful reference:

Editing a file belong to root

This is actually fairly simple, but for a Windows user like me I suffer quite some time to figure out.

It is fairly simple to do this, say you want to edit a configuration file under /etc, fire up Terminal, and run as "su", then under 'su' run leafpad (I'm using XFCE). This leafpad is different from what you launched from app menu, it will allow you edit and save the file as root user.

Easy isn't it? I spent almost half an hour to figure out this though. =)

Getting started with Linux (Fedora)

Migrating from Windows to Fedora could be a dilemma. I have tried many times install Fedora but give up before success.

This post contain pool of resources one should read when first started with Linux:

Thursday, October 25, 2012

Samba for Windows Shared Files

To access windows shared files, one would need to install Samba and configure it properly. Resources below would guide you throughout the process, and there are a lot more resources that would help you understand Linux better:
  • http://www.reallylinux.com/
  • http://www.reallylinux.com/docs/sambaserver.shtml

Installation of Libre Office

To install LibreOffice 3.6 properly under Fedora 17, you will need to do two steps:
  1. Download and yum install all the rpm come with the download package
  2. yum install "freedesktop" rpm under the "Desktop Integration" folder. Someone mentioned that desktop integration specify for Fedora has no longer available since the freedesktop work well under Fedora.
It's done then!

How to improve font rendering in Fedora?

Here's a collection of links related to font rendering:

Easy installation of basic & 3rd party apps

There are a few tools that provide easy installation:

  1. Fedora Utils - fedorautils.sourceforge.net/
  2. EasyLife - sourceforge.net/projects/easylife-linux/
  3. AutoPlus - this is generally unreachable now since dnsmouse.org has down

XFCE's keyboard customization


Original content from:
http://alensiljak.blogspot.com/2012/04/windows-key-for-applications-menu-in.html

Windows Key for Applications Menu in xfce

If you want to use Win key to open the Applications menu in xfce, follow the instructions here and, instead of typing "xfce4-popup-menu", use "xfce4-popup-applicationsmenu".


============

How to "Show Desktop" in XFCE?

The Show Desktop icon can be enabled by right-clicking the task panel > "Add New Items".

To configure keyboard control, go to Settings > Windows Manager > Keyboard Tabs & look for "Show Desktop". Default key combination is Ctrl + Alt + D.

I personally prefer it to use Windows + D, which is identical to how we use it in Windows.