Aug 182009
 

The S.M.A.R.T. status is not a perfect measure of your hdd health but it can sometimes provide pre-failure notification. Here is how to check the S.M.A.R.T. status on Ubuntu:

Install the smartmontools using:

sudo aptitude install smartmontools

To display all the S.M.A.R.T. information for an IDE drive, run

sudo smartctl -a /dev/hda

To display all the S.M.A.R.T. information for an SATA drive, run

sudo smartctl -a -d ata /dev/sda

if the hard disc drive has S.M.A.R.T. switched off, then enable it using -s on:

sudo smartctl -s on -a -d ata /dev/sdb

help on the output:
http://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes

Aug 182009
 

You need at least:

sudo aptitude install latex-cjk-chinese

or install all chinese related packages:

sudo aptitude install latex-cjk-all

http://ubuntuforums.org/showthread.php?t=350101

\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK*}{UTF8}{song}
这是一个测试
\end{CJK*} (this is a test)
\end{document}

The above LaTeX code does not work when cyberbit fonts are not installed (no latex package yet – bug bad latex-cjk examples and needs-packaging: latex-cjk-cyberbit).

This works with the standard ubuntu packages:

\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{UTF8}{gbsn}
非常感 test
\end{CJK} (this is a test)
\end{document}
  • Use gbsn for simplified or bsmi for traditional characters set
Aug 182009
 

http://www.ubuntugeek.com/howtorecover-your-username-and-passwordfix-grub-21-error-in-ubuntu.html

If you have a Linux machine and forgot the password you set during the installation process or if one of your friends gave you his old computer including a Linux installation without giving providing you his user name and password you can use this tutorial to help you to recover the account by setting a new password:

  1. Turn on your computer, and as soon as you see the Press Esc to enter grub message, press the escape key [ESC].
  2. Select the option that says (recovery mode).
Aug 182009
 

I connected my old notebook hard disk to my desktop computer (as the HDD was exchanged). To expunge the trash folder I did:

cd /media/disk/home/philipp/.local/share/Trash/info/
ls
rm -rf *
cd /media/disk/home/philipp/.local/share/Trash/files/
ls
rm -rf *
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Aug 182009
 

update (2010-10): Please consider http://blog.philippklaus.de/2010/10/chinese-input-using-ibus/ for Chinese input on more recent versions of Ubuntu.


http://en.wikipedia.org/wiki/Chinese_input_methods_for_computers#Pronunciation
http://en.wikipedia.org/wiki/Pinyin_method#Implementations

http://www.scim-im.org/

https://help.ubuntu.com/community/SCIM
https://wiki.ubuntu.com/InputMethods/SCIM/Setup

Install scim:

sudo aptitude install scim-pinyin
sudo aptitude install language-pack-gnome-en-base gnome-user-guide-en language-pack-gnome-en

Enable support for complex character input (System → Administration → Language Support)

https://help.ubuntu.com/community/SCIM#Using
SCIM should now start along with every application. To trigger it, use any of these shortcut keys : [CTRL]+[Space] or [Shift]+[Space]

While inputting, if you want to switch back and forth between your CJK language and your session language, you can just use the shortcut key, or even just the [Shift] key alone. Fast and easy!

Aug 182009
 

http://linuxhelp.blogspot.com/2006/11/ifconfig-dissected-and-demystified.html

eth0      Link encap:Ethernet  HWaddr 00:70:40:42:8A:60
       inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
       UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
       RX packets:160889 errors:0 dropped:0 overruns:0 frame:0
       TX packets:22345 errors:0 dropped:0 overruns:0 carrier:0
       collisions:0 txqueuelen:1000
       RX bytes:33172704 (31.6 MiB)  TX bytes:2709641 (2.5 MiB)
       Interrupt:9 Base address:0xfc00

lo        Link encap:Local Loopback
       inet addr:127.0.0.1  Mask:255.0.0.0
       UP LOOPBACK RUNNING  MTU:16436  Metric:1
       RX packets:43 errors:0 dropped:0 overruns:0 frame:0
       TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
       collisions:0 txqueuelen:0
       RX bytes:3176 (3.1 KiB)  TX bytes:3176 (3.1 KiB)
  • Link encap:Ethernet – This denotes that the interface is an ethernet related device.
Aug 182009
 

Analyse the situation by taking a look at the configuration and stats:

ifconfig -a
netstat -s

Check if your gateway and DNS servers are reachable. If only one of the dns servers is not reachable edit /etc/resolv.conf manually (will be overwritten by next network change).

To set the network interface eth1 to 100MBits full duplex with no autonegotiation:

sudo ethtool -s eth1 autoneg off speed 100 duplex full
sudo ifdown eth1 && sudo ifup eth1

and for permanent setup change /etc/network/interface :

pre-up /usr/sbin/ethtool -s $IFACE speed 100 duplex full autoneg off
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Aug 182009
 

failback connection (routing):
https://help.ubuntu.com/community/InternetAndNetworking/DualHomedGatewayDHCP
advanced routing: http://lartc.org/howto/
secondary virtual interface on one physical interface: http://www.ubuntugeek.com/ubuntu-networking-configuration-using-command-line.html
default gateway: http://www.cyberciti.biz/faq/howto-debian-ubutnu-set-default-gateway-ipaddress/
static DNS with DHCP: https://help.ubuntu.com/community/StaticDnsWithDhcp and http://ubuntuforums.org/showthread.php?t=544383#2

multi homing (using two internet connections at the same time) using policy routing: http://www.debian-administration.org/article/Policy_routing

plan:

  • redundant internet connections (but with default network adapter for internet)
  • manual firewall settings (using ufw)
  • manual network setup in /etc/network/interfaces : static IP for local network, dhcp for KHG network
  • setup for WOL

first step:

  • rename the network devices (see above)
  • verify that /etc/init.d/halt contains NETDOWN=no
  • edit /etc/network/interfaces