[Home] [Linguistics:] [Fielework:] [Databases:] [Linux:] [Debian:] [Windows:] [Miscellaneous]

Linux howtos 270x320(64976bytes)

This page is a reminder for me to configure Debian GNU/Linux.

upgrade kernel-images (stable distribution)
anthy
anthy on KTerm and Konsole
anthy-dic-tool
canna
customise X-window login display settings
upgrade kernel-images (testing distribution)
Flashplayer
KTerm and XTerm
apt
troubleshooting apt-get by using dpkg
aaccessing /dev
give permission to sound server
ncftp
rsync
reconfigure X-server
recongigure Mozilla
fstab
know your id. get username's information
give users access to files and directories.
chmod
cron
check available spaces in fiiles
ntpdate
install true type fonts
X
Mouse button
setting keyboard to use single quote and underscore in Japanese input settings with non-Japanese Keyboard
save disk space in your /home
Japanese language settings on X
Anthy and Scim on X
Anthy and UIM on X
change default settings for xdvi display
Kde
xmms
mplayer
gnome
Default window size - gnome-terminal
Xfce4
Icewm
compile kernel
complie a kernel with ALSA
install adobe reader
lilo
share bookmarks
dot files
grub boot problem
guarddog
java runtime environment
Toolbox

Tips

Links


HOWTO upgrade kernel-images (stable distribution)

Installing Debian Gnu Linux woody3.0r2 (stable)

files to back up to upgrade kernels [/home]
Install woody 3.0r2 with CD (stable) [ Follow the CD's navigation.]

Preparing to upgrade to kernel-image-2.4.18-1-k7 # emacs /etc/ssh/sshd_config # emacs /etc/lilo.conf

image=/vmlinuz
label=Linux
read-only
initrd=/initrd.img [add this line.]
# resticted
# alias=1

# emacs /etc/kernel-img.conf

do_initrd = Yes [add this line.]

Installing kernel-image-2.4.18-1-k7 [this version is the newest stable distribution.]

# apt-get install kernel-image-2.4.18-1-k7 (Specific for nx9005
# emacs /etc/pcmcia/config.opts [to avoid conflict between network card and pcmcia at boot.] # modconf

Add modules for floppy, ieee1934, mouse, keyboard, network card (natsemi), file system for vfat, sound card (Trident), usb (mouse, keybord). Specific for nx9005)

Installing pcmcia-modules-2.4.18-1-k7

# apt-get install kernel-pcmcia-modules-2.4.18-1-k7

(Specific for nx9005
# emacs /etc/modules.conf [to avoid conflicts at boot.] # emacs /etc/moditils/action [newer kernels use separate files in /moditils for the modules.conf. Add the same line to the action file.] # modconf Canna Specific for nx9005)

# apt-get install x-window-system

# apt-get install kde

# mkdir xp

# emacs /etc/fstab [change corresponding lines shown as below:]
# apt-get install ncftp tex yatex tipa mew

# cd /xp/home/linux
# cp .emacs .mew .Xresources /home/[non-root user name]/
# cp hosts.deny hosts.allow /home/[non-root user name]/

# apt-get install mozilla-browser
# apt-get install mozilla-psm
install

HOWTO install Flashplayer

Flashplayer
[follow the instruction on the page. Flashplayer will be installed to ~/.mozilla/plugins. From version 9 (as of 21 Apr 07). The istallation automatically set up the flishplayer for Firefox as well.]

HOWTO Anthy

You need to do Japanese langauge settings on X before using anthy.

# apt-get install anthy anthy-el sumika ja-trans manpages-ja jless tcsh-kanji kterm doc-debian-ja doc-linux-ja-text doc-linux-ja-html xfonts-shinonome xfonts-a12k12
Add the following lines to your .emacs file.

HOWTO anthy on KTerm and Konsole

# emacs .Xresources

Howto anthy-dic-tool (how to compile your own dictionary file)

You can use sumika to organize your own dictionary for anthy.

# apt-get install sumika

Alternatively, you can organize your own dictionary manually as follows:

$ cd ~/your-home-directory
$ anthy-dic-tool --dump > $HOME/.anthy/your-temporal-dictionary-file
$ nkf -e < your-temporal-dictionary-file > your-private-dictionary-file.src
$ emacs your-private-dictionary-file.src [edit your file.]
$ cat your-private-dictionary-file.src | anthy-dic-tool --load

Example

じり 1 事業主借
品詞 = 名詞

じし 2 事業主貸
品詞 = 名詞

HOWTO Canna

I don't use canna and kinput2 anymore, but I don't remove the following procedures for reference purposes.

# dpkg-reconfigure -plow locales [choose Japanese ones, but don't set it]
# apt-get install language-env canna freewnn-jserver canna-utils egg kinput2-common kinput2-canna skkserv [minimumn packages for Japanese environment to work]

$ set-language-env -l ja[Don't do this as a ROOT!!!]

Since I back up canna related files, when I set up canna server, I copy back to the files to relevant places as follows:

# cp canna /etc/init.d/
# cp hosts.canna /home/your-home-directory/
# /etc/init.d/canna restart

If you don't have the backup files, do the followings:

When you first use canna, you will get the following message:
emacs error: egg japanese backend:unable to connect server.

Modify /etc/hosts.canna as follows:
localhost
unix


Modify /etc/init.d/canna as follows:
#CANNA_SERVER_OPT="-u canna"
CANNA_SERVER_OPT="-u canna -inet"


Restart canna server
#/etc/init.d/canna restart

You can use Japanese with [Ctrl]+[o].
When you use canna for the first time, it askes you whether to build user dictionary. Say, yes.

HOWTO customise X-window login display settings

# cd /xp/home/linux/
# cp Xresources Xsetup /usr/X11R6/X11/xdm/

HOWTO upgrade kernel-images (testing distribution)

# emacs /etc/apt/sources.list
replace stable with testing except for security related sources.
# apt-get update
# apt-get install kde [the installation doesn't seem to complete at this stage, but don't worry.]
# shutdown -r now
You can start Xserver, but kde doesn't work.
# apt-get install kde [this time kde should be successfully installed.]
# apt-get update
# apt-get upgrade

/var must be nearly full. set up the followings to clean it up periodically:
# emacs /etc/cron.monthly/purgelog [add the follownings.]

#!/bin/sh
find /var/log -name "*.gz" -exec rm -rf {} 2>/dev/null \;


# chmod 744 /etc/cron.monthly/purgelog [add the correct rights]

HOWTO KTerm and XTerm

KTerm*background: darkslategrey
KTerm*foreground: gray85
KTerm*VT100*textColor0: Black
KTerm*VT100*textColor1: OrangeRed
KTerm*VT100*textColor2: yellowgreen
KTerm*VT100*textColor3: goldenrod
KTerm*VT100*textColor4: RoyalBlue3
KTerm*VT100*textColor5: dodgerblue
KTerm*VT100*textColor6: LightSkyBlue2
KTerm*VT100*textColor7: grey85
KTerm*VT100*geometry:70x40+30+25 !! width x height + left + top

HOWTO apt

Here is my /etc/apt/sources.list file.

keeping packages without upgrading Other examples: uim-xim uim-common uim-utils uim-gtk2.0 libuim0 for the unstable disribution don't work when I apt-get upgrade. I needed to downgrade these packages to testing versions. I emacs /etc/apt/preferences like below.

HOWTO troubleshooting apt-get by using dpkg

If you can't install or remove packages by doing apt-get, try dpkg --configure -a. If you still can't get out from the situation by doing dpkg --configure -a, try dpkg --forget-old-unavail and then do dpkg --clear-avail. You may be able to apt-get remove the packages.

HOWTO accessing /dev

Permission to folders and files
d r w x r w x r w x

Owner Other Group
Directory Read Write Execute Read Write Execute Read Write Execute

Number - Read (R) Write (W) Execute (X)
0 - No No No
1 - No No Yes
2 - No Yes No
3 - No Yes Yes
4 - Yes No No
5 - Yes No Yes
6 - Yes Yes No
7 - Yes Yes Yes

Command

HOWTO give permission to sound server

The followings will enable you to use Kmix as non-root users. (Sound permission
add users to /etc/group)

HOWTO ncftp

# ncftp -u [USERNAME] -p [PASSWORD] [SERVER DOMAIN NAME]

Connecting to ***.***.***.**...
ProFTPD 1.2.6 Server (ProFTPD SunOS 5.8) [example]
Logging in...
User mogemoge logged in.
Logged in to example.com
ncftp / >
ncftp / > quit

You have not saved a bookmark for this site.

Would you like to save a bookmark to:
ftp://mogemoge:PASSWORD@example.com

Save? (yes/no) yes
Enter a name for this bookmark, or hit enter for "example": example

You logged into this site using a password.
Would you like to save the password with this bookmark?
Save? [no] yes
Bookmark "example" saved.

HOWTO rsync

The DIRECTORY will be syncronized into /DESTINATION/, i.e. /DESTINATION/DIRECTORY/. Files which are not in the destination directory will be deleted.

HOWTO reconfigure Xserver

HOWTO reconfigure Mozilla

I don't use Mozilla mailer.

HOWTO fstab

Here are my fstab files: Access to vfat
I could not access my Windows partition (vfat) as non-root after upgrading form KDE 1.* to 3.1. Since umask=022 in /etc/profile, I added umask=000 as shown above then it worked.

If you would like to access a portable usb HD. Do the following:

# mount -t vfat /dev/sda1 /usbhd

HOWTO mount usb HDD
# fdisk -l /dev/sda [checking where is your usb hdd is.]
# mount -t vfat /dev/sda* /mnt/usbhdd
If you would like to mount the usb HD automatically, add the following line in fstab: id related issues.

HOWTO know your id.

HOWTO get username's information.

HOWTO give users access to files and directories.

HOWTO chmod:

HOWTO cron

# emacs /etc/default/ntpdate [Change the file as follows:] # emacs /etc/crontab [add the following line to the file.] # emacs /etc/init.d/ntpdate [add the following line to the file.] Check /var/log/daemon.log to see how cron setting is working.

HOWTO check available spaces in fiiles

HOWTO ntpdate

HOWTO install TrueType fonts to X

Currently the best Japanese fonts are IPA (as of 27 July 2006). Xubuntu 6.06 Dapper does not use this font. The following link tells you everything you need to use those fonts:

Links:
The following is the default installation of fonts for debian GNU Linux (if you want to use better Japanese fonts follow the link above.)

HOWTO X

HOWTO fix problem: connection to ":0.0" refusede by server

If your X doesn't start getting message like Sever is adrealy active for display......, you may fix it by $ xlost +localhost. The error message is something like below.

Xlib: connection to "0:0" refused by server
Xlib: invalid MIT-MAGIC-COOKIE-1 Key giving up
Xinit: unable to connect to Xserver
Xinit: No such process (eccor3): server error


HOWTO mouse button

Write one of the following lines in your dot bashrc file.

xmodmap -e "pointer = 3 2 1 4 5" [left-handed mouse settings. note that 4 and 5 are direction of the wheel.]
xmodmap -e "pointer = default" [default setting]
xmodmap -e "pointer = 1 2 3 6 7 4 5" [for intellimouse]

HOWTO set keyboard to use single quote and underscore in Japanese input settings with non-Japanese Keyboard

I you want to change keyboard settings (for example, from jp to us), do the following:

# dpkg-reconfigure xserver-xorg

If your input method is in Japanese but you are using non-JP keyboard, you often fail to type under slash _ and single quotation `' and you will have problems to use LaTeX. Just use non-JP keyboard such as US one.

Also see Backslash key on English Keyboard on Japanese OS for Windows.

HOWTO save disk space in your /home

If you always have error messages when you start your Kde, it is very likely that your .xsession-errors file is getting larger and larger every time you start kde. In that case, check the size of the .xsession-errors file and do the following:

# rm .xsession-error

HOWTO Japanese language settings on X

Also see anthy and emacs to use anthy on emacs.

# dpkg-reconfigure -plow locales [choose Japanese ones, but don't set it] The following language-env settings are for sarge and are not necessary for etch as Japanese input works on Firefox by only setting dot uim files if installing anthy-uim.

# apt-get install language-env
$ set-language-env -l ja [Don't do this as a ROOT!]

  • Follow the navigation as shown below.
  • Anthy and Scim on X

    I use the following settings on my nx9005 since uim does not work on openoffice.org.

    Link: # emacs /etc/apt/sources.list [add the following lines to the file.] # apt-get install scim scim-uim scim-m17n uim anthy
    # emacs ~/.xsession [add the following lines] If you are changing from kinput2-canna to scim-anthy, comment out the kinput2 related lines as follows:

    # 日本語入力 (XIM) の設定
    # XIM サーバーを起動する
    #if type kinput2 &> /dev/null ; then
    # kinput2 -canna &
    #fi
    #XMODIFIERS=@im=kinput2 ; export XMODIFIERS

    Restart X.

    You can turn on and off Scim by Ctrl+SPCE, but this will conflict with emacs's Ctrl+SPCE for 'mark set'. You can change scim setting with Scim start up utility on the screen.

    Anthy and UIM on X

    $ apt-get install uim uim-anthy

    The following dot uim file is the only necessary setting for etch (as of 26 Sept 2006).

    $ emacs .uim [add the following line to the file.] Uim and anthy settings for my IBM thinkPad x31 (April 2005, Debian Sarge). This setting does not work for openoffice.org

    Latest uim settings- Japanese input method

    $ apt-get install uim uim-anthy

    The following setting in dot xsession file is not necessary for etch (as of 26 Sept 2006). I leave them here for reference purposes.

    # emacs .xsession [add the following lines to the file.] The following setting in dot Xresources file is not necessary for etch (as of 26 Sept 2006). I leave them here for reference purposes.

    $ emacs .Xresources [add the following line to the file.]

    The following settings do not work for the latest versions of uim (April 2005). I leave them for reference purposes. The settings did not work for openoffice.org on my nx9005 but worked fine on my IBM ThinkPad 600E and X31.

    # apt-get install libuim0 uim-common uim-gtk2.0 uim-utils uim-xim

    Chage ~/.Xsession as follows:

    HOWTO change default settings for xdvi display

    Links: If you want to change default settings of xdvi, change your dot emacs file like this:

    (setq dvi2-command "xdvi -s 8 -geometry 730x670+0+0") ; width x height + left + top

    You can also change the default settings for xdvi as follows:

    The default font size is too small for me.

    # emacs /usr/X11R6/lib/X11/app-defaults/XDvi

    HOWTO customise look on login screen (xdm)

    # emacs /usr/X11R6/lib/X11/xdm/Xsetup [create a Xsetup file.] # emacs /usr/X11R6/lib/X11/xdm/Xresources
    Change the default settings as follows:

    Xlogin*geometry: 480x270+280+180
    Xlogin*foreground: darkkhaki
    Xlogin*background: maroon
    Xlogin*greetColor: snow
    Xlogin*promptColor: darkkhaki
    Xlogin*failColor: yellow
    xlogin*greeting: Debian GNU/Linux Kernel 2.4.25-1-k7

    HOWTO boot without X (get out of xdm loop)

    Ctrl-F1-6 or boot holding a Shift key down or Ctrl-r

    HOWTO install XFree86 devel for Debian

    HOWTO install adobe reader

    This is how to install AdobeReader 7.0.* (Japanese version) into Linux (as of 7 July 2006). The followings are obsolete. I leave them here for reference purposes.

    HOWTO acroread-asianfont

    The followings are obsolete. I leave them here for reference purposes.

    Links:
    Print Japanese fonts on Adobe Reader 7.0

    To print Japanese mincho and Gothic fonts on acroread, you need to take three steps to install acroread-asianfont as shown below
    The following procedures does not work:

    Asian fonts settings for acroread:

    HOWTO Kde

    HOWTO Kde Japanese settings

    # apt-get install kde-i18n-ja

    $ kpersonalizer

    HOWTO xmms

    No sound when playing CD from drive?
    go to option and set the input to digital audio extract.

    HOWTO mplayer

    HOWTO listen to DR DK live-stream

    Links:
    Since I like classical music, I usually listen to DR klassik by doing the following:

    $ mplayer -playlist http://www.dr.dk/netradio/kl-wmp.asx

    HOWTO deactivate a menubar on top of the screen in the style of MacOS

    HOWTO keyboard shortcut

    HOWTO add icons to panels

    HOWTO wallpapers

    # mkdir wallpapers /home/tatsuya/.kde/share/
    # cp [my_favorite_wallpapers] /home/tatsya/.kde/share/wallpapers

    HOWTO Gnome

    Default window size: gnome-terminal

    # emacs /usr/share/applications/gnome-terminal.desktop

    add the following line:

    ###############################

    Exec=gnome-terminal --geometry=110x45+1+5

    ###############################

    Note for the values for -geometory: width x hight + left + top

    HOWTO Xfce4

    Panel problem

    If your panel dissapear from the desktop, remove .cache directory in your home directory and restart X.

    Keyboard layout

    Open /etc/X11/xorg.conf and change like below:

    ####################################
    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    # Option "XkbModel" "jp106"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    # Option "XkbLayout" "jp"
    EndSection
    ####################################

    HOWTO Icewm

    If your want to use your own settings on Icewm desktop, do the followngs:

    ~/$ mkdir .icewm
    $ cp /etc/X11/icewm/preferences ~/.icewm
    $ cp /etc/X11/icewm/toolbar ~/.icewm

    Examples: adding emacs to the toolbar:

    $ emacs ~/.icewm/toolbar

    prog "Emacs21" /usr/share/icons/crystalsvg/16x16/apps/emacs.png /usr/bin/emacs21 [Add this line. You need to find emacs.png to show the icon on the toolbar.]

    HOWTO compile kernel

    Get kernel-source at www.linux.or.jp

    Unpack
    # mv linux-2.*.*-tar.bz2 /usr/src/
    # cd /usr/src /usr/src# tar jxvf linux-2.*.*.tar.bz2

    configure
    # cp /boot/config-2.4.18-686 /usr/src/linux-2.*.*/.config
    # cd /usr/src/linux-2.*.*
    /usr/src/linux-2.*.*# make oldconfig

    Build
    /usr/src/linux-2.*.*# make dep
    /usr/src/linux-2.*.*# make bzImage
    /usr/src/linux-2.*.*# make modules
    # make modules_install

    Install
    # mv arch/i386/boot/bzImage /boot/vmlinuz-2.*.*
    /usr/src/linux-2.*.*# cp -p System.map /boot/System.map-2.*.*
    /usr/src/linux-2.*.*# cp -p .config /boot/config-2.*.*
    # ln -s /boot/vmlinuz-2.*.* /boot/vmlinuz
    # ln -s /boot/System.map-2.*.* /boot/System.map
    # mkinitrd -o /boot/initrd-2.*.*.img /lib/modules/2.*.*
    # emacs /etc/lilo.conf [add the following lines.]

    HOWTO complie a kernel with ALSA

    ALSA replaces OSS/Free, which is sound driver for Kernel-2.2. ALSA 0.4.0 or later only support Kernel-2.2 or later. When compiling Kernel you need to turn on sound port. I would be good to read documents on insmod, modprobe, kmod.

    Recompile kernel
    Install

    HOWTO lilo

    HOWTO boot with old kernels

    If you are unable to boot from an old kernel with lilo after installing a new kernel, do the followings:

    HOWTO share bookmarks

    also see Sharing bookmarks (Windows)
    // Specify which bookmarks file to use:
    user_pref("browser.bookmarks.file", "/win/Documenst and Settings/USER DIRECTORY/Application Data/Mozilla/Firefox/Profiles/XXXXXXX.default");
    [This line should be in one line.(no line break).]

    HOWTO dot files

    # cp .emacs .mew .Xresources test.ling.tex /home/[USER DIRECTORY] [The .Xresouces file is for display settings for XTerm, KTerm and Emacs. Don't forget to untick Appearance & Themes - > Colors -> "Apply colors to non-KDE applications" of Control Center of KDE. This will enable your display settings by the .emacs and the .Xresources files.]

    HOWTO grub

    When you boot your machine, you get error 22 message and are unable to boot. Don't panic! Super Grub Disk enable you to boot the machine.

    HOWTO guarddog

    The following settings would be minimum to email, web browsing and streaming. Also see Guarddog setting for wireless network on Xubuntu 6.06 Dapper.

    HOWTO install Java Runtime Environment

    LINKS:

    HOWTO Toolbox

    If Toolbox does not accept your typing words in the dialogue boxes when using search and find commands), move ToolboxWine dicrectory, which the Toolbox manual suggests that it should be in in /usr/share/, into a directory in which you can change chown and chgrp from root to user. Now Toolbox should work.


    TOP