kiyoshi のすべての投稿

Create 501 user for Read-only cdrom

sudo adduser –uid 501 tmpuser;

sudo passwd tmpuser;

restart and login as tmpuser; (not listed on login screen because uid is less than 1000, but you can go ahead).

You can change neither permission nor ownership of files on the cdrom because you cannot change the cdrom’s  file system, but you can copy files to somewhere where you can do anything.

 

cron set

1. Check crond:

[info] Usage: /etc/init.d/cron {start|stop|status|restart|reload|force-reload}.

/etc/init.d/cron status;

2. crontab -u root -e;    you will be promted to select editor. follow it;

3. create ip_update.log & ip_update.log and chmod appropriately.

 

Run Japanese program under English system locale

1. System is set with English locale.

2.  #dpkg-reconfigure locales;

generate ja_JP.UTF-8 locale (check *), while en_US.UTF-8 intct.

Select en_US.UTF-8 as system locale.

3. Check:

kiyoshi@debian-yu:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=”en_US.UTF-8″
LC_NAME=”en_US.UTF-8″
LC_ADDRESS=”en_US.UTF-8″
LC_TELEPHONE=”en_US.UTF-8″
LC_MEASUREMENT=”en_US.UTF-8″
LC_IDENTIFICATION=”en_US.UTF-8″
LC_ALL=
kiyoshi@debian-yu:~$ locale -a
C
C.UTF-8
en_US.utf8
ja_JP.utf8
POSIX

4. Run Japanese program (not necessarily compiled in Japanese locale):

4.1.   $ LANG=ja_JP.UTF-8 ./BM;   O.K. ( ./BM is just a example)

4.2.  kiyoshi@debian-yu:~$ LANG=ja_JP.UTF-8
kiyoshi@debian-yu:~$ locale
LANG=ja_JP.UTF-8
LANGUAGE=
LC_CTYPE=”ja_JP.UTF-8″
LC_NUMERIC=”ja_JP.UTF-8″
LC_TIME=”ja_JP.UTF-8″
LC_COLLATE=”ja_JP.UTF-8″
LC_MONETARY=”ja_JP.UTF-8″
LC_MESSAGES=”ja_JP.UTF-8″
LC_PAPER=”ja_JP.UTF-8″
LC_NAME=”ja_JP.UTF-8″
LC_ADDRESS=”ja_JP.UTF-8″
LC_TELEPHONE=”ja_JP.UTF-8″
LC_MEASUREMENT=”ja_JP.UTF-8″
LC_IDENTIFICATION=”ja_JP.UTF-8″
LC_ALL=
;

Can run Japanese program.

4.3.  In .bashrc, add the following line:

export LANG=ja_JP.UTF-8

All the three above works O.K.

 

Japanese environment setting jessie

1. Japanese input is realized through: uim anthy

2.  Japanese in the program ( e.g. BM ) is partly English (probably in the gtk+ library).

3.  Reconfigure locales:

#dpkg-reconfigure locales;

Select  “ja_JP.UTF-8;

root@debian-yu:/home/kiyoshi# locale
LANG=ja_JP.UTF-8
LANGUAGE=
LC_CTYPE=”ja_JP.UTF-8″
LC_NUMERIC=”ja_JP.UTF-8″
LC_TIME=”ja_JP.UTF-8″
LC_COLLATE=”ja_JP.UTF-8″
LC_MONETARY=”ja_JP.UTF-8″
LC_MESSAGES=”ja_JP.UTF-8″
LC_PAPER=”ja_JP.UTF-8″
LC_NAME=”ja_JP.UTF-8″
LC_ADDRESS=”ja_JP.UTF-8″
LC_TELEPHONE=”ja_JP.UTF-8″
LC_MEASUREMENT=”ja_JP.UTF-8″
LC_IDENTIFICATION=”ja_JP.UTF-8”
LC_ALL=
4. Even the program already compiled in “en_US.UTF-8”  ( e.g. BM ) exhibited Japanese label correctly, but all the system run in Japanese.

xfce menu customization

mkdir ${XDG_CONFIG_HOME:-~/.config}/menus/

cp $prefix/etc/xdg/menus/xfce-applications.menu ${XDG_CONFIG_HOME:-~/.config}/menus

Did not proceed successfully.

But more easily:

some textfile > right click > open with other editor > select whichever you like > check always use this as default:

This was perfectly enough to set default editor.

Backup debian-noriko using SystemRescueCD

1. Boot SystemRescueCD (4.6.0)

keymap 22;  connect HDD for bkup;

startx;   may not be necessary, but convenient for utilizing other applications paralelly.

mkdir /mnt/target;

mount /dev/sdb5 /mnt/target;

( ls /mnt/target; shows the contents of backupHDD, or use emelFM2)

mkdir /mnt/target/t;   for accommodating  image files.

#partimage; run partimge: or via program manager.

Following GUI, make and save partition image

e.g. /mnt/target/t/sda1

( This has to be repeated for all partitions except extended and swap partition):

# Back up entire MBR:
dd if=/dev/sda of=/mnt/target/t/sda-MBR-backup bs=512 count=1

Partition Table Backup

sfdisk -d /dev/sda > /mnt/target/t/sda-part-table.sf

Rename dir t : debian-noriko-151024

 

Debian jessie on Endeavor for DOT

At Synaptic package manager:

install pkg-config;

install libusb-dev; libgtk2.0-dev;

If you are trapped in dependency problems, broken packages etc, stay calm in Synaptic manager: Edit->Fix broken packages; Mark all upgrades;apply:  You better not get into command line business.

make BM;

link error: ‘cos@@GLIBC_2.2.5’

LDFLAGS +=  -lm

adding -lm  to LDFLAGS is needed.

There remains some compiling warnings because of deprecated gtk command, but runs O.K.

(missed!) is observed very rare on this machine which is reasonable because this has most powerfule cpu ever.

 

SystemRescueCD

1. Download  **.iso.

2. Burn CD.

2.1 Set blanc CD in the driev. (Important!)

2.2. To find the drive:

root@debian-yu:/home/kiyoshi# wodim devices
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
Device was not specified. Trying to find an appropriate drive…
Detected CD-R drive: /dev/cdrw
Using /dev/cdrom of unknown capabilities
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : ‘TSSTcorp’
Identification : ‘CDDVDW TS-L633A ‘
Revision       : ‘TM00’
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
wodim: No such file or directory. Cannot open ‘devices’.
2.3. root@debian-yu:/home/kiyoshi/Softwares# ls
Acronis  systemrescuecd-x86-4.6.0.iso

wodim dev=/dev/cdrw systemrescuecd-x86-4.6.0.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : ‘TSSTcorp’
Identification : ‘CDDVDW TS-L633A ‘
Revision       : ‘TM00’
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Speed set to 4234 KB/s
Starting to write CD/DVD at speed  24.0 in real TAO mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Track 01: Total bytes read/written: 467294208/467294208 (228171 sectors).

 

Backup Debian

1. Find mounted media:

root@debian-yu:/etc# mount |grep media
/dev/sdb1 on /media/kiyoshi/0D34-FE56 type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=utf8,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/sdc5 on /media/kiyoshi/HD-WIU2 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
root@debian-yu:/etc#