% Tips for Vine 4.0 
% 2007-02-26

%%%%%%%%%%%%%%%%%%
Keyboard: Caps_Lock--> Control
%%%%%%%%%%%%%%%%%%

put the following .Xmodmap at one's home

remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

%%%%%%%%%%%%%%%%%%
Printing commands
%%%%%%%%%%%%%%%%%%
- mpage: corresponds to "up" script. Doesn't work with 
  Matlab-windows created figures (i.e. my Diss).
  * Usage example: >mpage -2 -P ..... to print 2up

- on acroread
  type "/usr/bin/mpage -2 -P lp" in "printer command" box

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dvipdfm, dvips, xdvi, acroread...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

- dvipdfm options
  -l: landscape
  -p [letter|a4|...]: papersize

%%%%%%%%%%%%%%%%%%%%%%%
Japanese Input Methods
%%%%%%%%%%%%%%%%%%%%%%%

- Shift+space for Anthy
- ^C-\ also works in emacs
- KDE Menu - 設定 - SCIM入力メソッドの設定

%%%%%%%%%%%%%%%%%%
Code conversion
%%%%%%%%%%%%%%%%%%

- nkf -eLu: for euc output and LF

%%%%%%%%%%%%%%%%%%
cdrecord for data
%%%%%%%%%%%%%%%%%%

as root

1) make an image file
# mkisofs -r -J -o [output image file] [target directory]

2) verify the image file 
# mount -o loop [output image file] /mnt/cdrom
# umount /mnt/cdrom

3) toast a CDR
# cdrecord -v dev=0,0,0 speed=4 -data [image file]

%%%%%%%%%%%%%%%%%%
cdrecord for audio
%%%%%%%%%%%%%%%%%%

as root

1) ripper
# cdda2wav -D 0,0,0 -B
or
# cdda2wav -D 0,0,0 -t [track number]

2) toast a CDR
# cdrecord -v dev=0,0,0 speed=4 -audio [directory/*.wav]

%%%%%%%%%%%%%%%%%%%%%%%%%
Graphics
%%%%%%%%%%%%%%%%%%%%%%%%%

* GIMP ps2png conversion
- open ps file without anti-aliasing
- change size to web-page ready
- save ps as png with
  - compress level = 1

* gif2ps
/usr/bin/gif2ps
Usage: Gif2PS [-q] [-x] [-y] [-s SizeX SizeY] 
  [-p PosX PosY] [-i] [-n #Copies] [-h] GifFile

*tiff2ps
usage: tiff2ps [options] input.tif ...
options are:
 -1            generate PostScript Level I (default)
 -2            generate PostScript Level II
 -8            disable use of ASCII85 encoding with PostScript Level II
 -d #          convert directory number #
 -D            enable duplex printing (two pages per sheet of paper)
 -e            generate Encapsulated PostScript (EPS)
 -h #          assume printed page height is # inches (default 11)
 -i #          enable/disable (Nz/0) pixel interpolation (default: enable)
 -m            use "imagemask" operator instead of "image"
 -o #          convert directory at file offset #
 -O file       write PostScript to file instead of standard output
 -a            convert all directories in file (default is first)
 -p            generate regular PostScript
 -s            generate PostScript for a single image
 -T            print pages for top edge binding
 -w #          assume printed page width is # inches (default 8.5)
 -z            enable printing in the deadzone (only for PostScript Level II)

%%%%%%%%%%%%%%%%%%%%%%%%%%
Check server status
%%%%%%%%%%%%%%%%%%%%%%%%%%

/sbin/service [server] {start|stop|status|restart}
for proftpd, smb, nfs, network...

%%%%%%%%%%%%%%%%%%%%%%%%%%
Restart inetd
%%%%%%%%%%%%%%%%%%%%%%%%%%

 To re-read this file after changes, just do a 'killall -HUP inetd'
 or '/etc/rc.d/init.d/inet restart'

%%%%%%%%%%%%%%%%%%%%%%%%%%
find
%%%%%%%%%%%%%%%%%%%%%%%%%%

> find . -mtime 80 
= "find those modfied within 80 days under the current dir"

> find . -mtime -1 -exec mv {} /home \; 
= "find those modified today and move them to /home"

%%%%%%%%%%%%%%%%%%%%%%%%%%
mounting
%%%%%%%%%%%%%%%%%%%%%%%%%%

- CDROM
$ gnome-mount -t -d /dev/cdrom
--> will be mounted at /media/cdrom
--> to unmount
$ gnome-umount -t -d /dev/cdrom

- USB flash memory
$gnome-mount -t -d /dev/sda1
--> will be mounted at /media/disk
--> to unmount
$gnome-umount -t -d /dev/sda1

%%%%%%%%%%%%%%%%%%%%%%%%%%
cd 
%%%%%%%%%%%%%%%%%%%%%%%%%%

> cd -
= change directory to the previous directory

%%%%%%%%%%%%%%%%%%%%%%%%%%
xhost and DISPLAY
%%%%%%%%%%%%%%%%%%%%%%%%%%

- use client(=A) machine's display to run a program on host(=B)
      
On client
step 1: $ telnet 192.168.1.B
step 2: $ DISPLAY=192.168.1.A:0.0; export DISPLAY
step 3: (on another terminal window) $ xhost 192.168.1.B

! note that 'set' command is not necessary on bash (differs from tcsh)

%%%%%%%%%%%%%%%%%%%%%%%%%%
Unicode and lv
%%%%%%%%%%%%%%%%%%%%%%%%%%

- Use lv (less like viewer)
- to convert UTF8 encoded bookmarks.html (Mozilla's default) to EUC-J
$ lv -Iu8 -Oej bookmarks.html > bookmarks-euc.html 

%%%%%%%%%%%%%%%%%%%%%%%%%%
misc tools
%%%%%%%%%%%%%%%%%%%%%%%%%%

- Text utilities, invoke man [command] for details
  cut: cut by column
  uniq: delete redundant lines/pick up uniq lines

%%%%%%%%%%%%%%%%%%%%%%%%%%
.Xdefaults
%%%%%%%%%%%%%%%%%%%%%%%%%%

xrdb ~/.Xdefaults    = overwrite
xrdb -m ~/.Xdefaults = merge
xrdb -query          - show current status

%%%%%%%%%%%%%%%%%%%%%%%%%%
HD drive partition and format MANUALLY
%%%%%%%%%%%%%%%%%%%%%%%%%%

- use fdisk [device] to partition first
- then mkfs.ext2 [device] to format

%%%%%%%%%%%%%%%%%%%%%%%%%%
set local time
%%%%%%%%%%%%%%%%%%%%%%%%%%

$date MMDDhhmm
e.g. date 04160012 = Apr 16, 00:12am




ホームへ戻る (日本語) Back to home (English)