How to Remove “Recent Item” @ Gnome-Shell?

  • rm -fr ~/.local/share/recently-used.xbel
  • touch ~/.local/share/recently-used.xbel
  • chmod ugo-wr ~/.local/share/recently-used.xbel
  • sudo chattr +i ~/.local/share/recently-used.xbel

Option 2

  • rm -fr ~/.local/share/recently-used.xbel
  • mkdir ~/.local/share/recently-used.xbel

Comments off

Enable L2TP/IPSec VPN on Ubuntu

I use China Unicom 3G on my Android phone in China. To get rid of #GFW in China, with Richard guidance, I set up L2TP/IPSec VPN on Ubuntu, hosted @ http://Linode.com. Simply document the steps.

IPSec

sudo apt-get install openswan

Use Pre- Shared Key. Change /etc/ipsec.conf

version 2.0
 config setup
     nat_traversal=yes
     virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
     oe=off
     protostack=netkey
conn L2TP-PSK-NAT
     rightsubnet=vhost:%priv
     also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
     authby=secret
     pfs=no
     auto=add
     keyingtries=3
     rekey=no
     ikelifetime=8h
     keylife=1h
     type=transport
     left=YOUR.SERVER.IP.ADDRESS
     leftprotoport=17/1701
     right=%any
     rightprotoport=17/%any

and change /etc/ipsec.secrets to

YOUR.SERVER.IP.ADDRESS %any: PSK "YourSharedSecret"

Apply the following change

for each in /proc/sys/net/ipv4/conf/*
 do
     echo 0 > $each/accept_redirects
     echo 0 > $each/send_redirects
 done

Verify IPSec configuration, then restart the daemon

sudo ipsec verify
sudo /etc/init.d/ipsec restart

L2TP

Install xl2tpd

sudo apt-get install xl2tpd

Change /etc/xl2tpd/xl2tpd.conf

[global]
 ipsec saref = yes
[lns default]
 ip range = 10.1.2.2-10.1.2.255
 local ip = 10.1.2.1
 refuse chap = yes
 refuse pap = yes
 require authentication = yes
 ppp debug = yes
 pppoptfile = /etc/ppp/options.xl2tpd
 length bit = yes

PPP

sudo apt-get install ppp

Change /etc/ppp/options.xl2tpd

require-mschap-v2
 ms-dns 8.8.8.8
 ms-dns 8.8.4.4
 asyncmap 0
 auth
 crtscts
 lock
 hide-password
 modem
 debug
 name l2tpd
 proxyarp
 lcp-echo-interval 30
 lcp-echo-failure 4

Add a test user in /etc/ppp/chap-secrets

# user      server      password            ip
 test        l2tpd       testpassword        *

Restart xl2tpd

sudo /etc/init.d/xl2tpd restart

Apply iptables firewall rules

iptables --table nat --append POSTROUTING --jump MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

Automate ipsec and xl2tpd daemons when system boots

chkconfig ipsec on
chkconfig xl2tpd on

And add the following into /etc/rc.local

iptables --table nat --append POSTROUTING --jump MASQUERADE
for each in /proc/sys/net/ipv4/conf/*
do
echo 0 > $each/accept_redirects
echo 0 > $each/send_redirects
done
/etc/init.d/ipsec restart

Comments off

Install Gnome3 on Ubuntu Natty 11.04

  1. sudo add-apt-repository ppa:gnome3-team/gnome3
  2. sudo apt-get update
  3. sudo apt-get dist-upgrade
  4. sudo apt-get install gnome-shell

Uninstall repository

  1. sudo apt-get install ppa-purge
  2. sudo ppa-purge ppa:gnome3-team/gnome3

Comments off

Create Fedora 15 Bootable USB on Ubuntu Natty

Struggled unstable Gnome3 on Ubuntu Natty for a while, then decided to try Fedora 15 which has default Gnome3. Now I need to create a Fedora 15 bootable USB on Ubuntu Natty. Here are steps:

  1. Download Fedora 15 ISO certainly
  2. Double click the ISO file, then copy the file LiveOS/livecd-iso-to-disk from the ISO to wherever you want
  3. sudo apt-get install syslinux (if you don’t have it)
  4. Format the USB, eg /dev/sdc1
  5. sudo ./livecd-iso-to-disk –overlay-size-mb 512 /path/Fedora-15-i686-Live-Desktop.iso /dev/sdc1

Comments off

Apply VirtIO for KVM over KVM (Day 3)

Based on what we discussed, we come out the solution roll- out in detail

  1. Reference @ http://www.linux-kvm.org/page/Virtio > VirtIO requires Kernel level 2.6.25+ (I believe the installed CentOS5.5 kernel is higher than 2.6.31 @ one of our customers. To check, run “uname -a” without quote) and KVM version >= 60 (run “rpm -qa | grep -i kvm” to verify). The 2 pre- reqs for VirtIO look complied on current env.
  2. (Optional. Do this step if step 4 doesn’t work) Within kernel, the following params should be configured as the following (this indicates kernel needs re- compiled. Reference @ http://www.linux-kvm.org/page/Virtio )
    CONFIG_VIRTIO_BLK=y (Device Drivers -> Block -> Virtio block driver)
    CONFIG_VIRTIO_NET=y (Device Drivers -> Network device support -> Virtio network driver)
  3. Download virtio-win.iso, run
    yum install virtio-win
    You can find the download @ /usr/share/virtio-win/virtio-win.iso
  4. Mount the iso then apply @ Windows VM (created over KVM) by following steps @ http://rcritical.blogspot.com/2011/01/seeting-up-redhat-virtio-driver-for.html or a Fedora guide or on RHEL54 guide (same to CentOS55)

Some other background:

  • The performance of a 2G file transfer from native Windows box takes 40 minutes to a Windows VM over KVM on CentOS5.5. (versus 2 minutes on Windows VM over VMware)
  • There are 14 blades installed (2 on VMware and 12 on KVM/ CentOS55). 140 VMs created total.
  • Customer PM asks we identify the issue and verify the proposed solution tomorrow before Chinese lunar year on SINGLE VM and SINGLE Host OS, then plan implementation on entire environment if the solution is tested and proved.

We’ll give a progress update to customer GM tomorrow afternoon.

Comments off

Apply VirtIO for KVM over KVM (Day 2)

I talked w/ David Ke Zhu @ dev team and confirmed that VirtIO is a mandatory plugin driver to apply in order to improve the IO performance of disk + network. HSLT depends on this driver. (Thanks to David).

Good > the install step is simple on host OS. Bad > all Windows VM need patched as well! (not Linux VM)
Apply the latest kernel on host OS. Supposed >= 2.6.31 and latest KVM associating to such level of kernel

Download virtio-win.iso package from supplemental disc
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/…Installing_the_KVM_Windows_para_virtualized_drivers

Install package onto Windows VM @ step: Procedure 12.1. Using virt-manager to mount a CD-ROM image for a Windows guest -> this step should update VM xml conf with appropriate param needed before VM system boot.

I can bet this would fix the issue as The virtio-win package contains the para-virtualized block and network drivers for all supported Windows guests.

Comments off

Apply VirtIO for KVM over KVM (Day 1)

We received a complaint regarding KVM performance issue today. Customer reports the performance is poor when copying files from native bare- metal Windows box to Windows 2003 VM created over KVM on CentOS 5.5 host box.

Searching @ RHEL KVM doc >
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-KVM_restrictions_and_support.html

It reads Windows 2003 32 or 64bit is supported as fully virtualized guest on RHEL5, but requires “optimized with para- virtualized drivers”

To install para- virtualized driver is detailed @

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-KVM_Para_virtualized_Drivers.html#sect-Virtualization-KVM_Para_virtualized_Drivers-Installing_the_KVM_Windows_para_virtualized_drivers

Additional info on KVM limitation
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/sect-Virtualization-Virtualization_limitations-KVM_limitations.html

We’d consider to apply this. It should fix the performance issue.

If CentOS5.5 is installed, the similar solution > http://www.centos.org/modules/newbb/viewtopic.php?topic_id=23513&forum=37
mkinitrd –with virtio_pci –with virtio_blk —with virtio -f /boot/initrd-$(uname -r) $(uname -r )

Comments off

« Previous entries Next Page » Next Page »