2018年2月22日木曜日

Fire TV stick

Fire TV stickを購入しました。パッケージや本体は以下のような感じです。

I purchased a Fire TV stick and I opened its package.



























Add new locale to Bash on Ubuntu on Windows

When I start to use new PC that I cleanly installed Windows 10 Fall Creators Update, I found that there was no Japanese locale.
$ locale -a
C
C.UTF-8
en_US.utf8
POSIX
$
I tryed to install Japenase locale using apt command, but I did not know the pakacke name of Japanese locale. Then I use a search engine, I found following blog page.
ubuntuで(できるだけ)全部のlocaleを追加する
https://qiita.com/inayuta/items/a057020f5d836329b804
language-pack-jaをインストールしてもいいです。
root@localhost # apt-get install language-pack-ja
The answer is simple...

新たなロケールをインストールする(Windows 10 Fall Creators Update - Bash on Ubuntu on Windows)

新規にWindows 10 Fall Creators UpdateをインストールしたPCでBash on Ubuntu on Windowsを使おうとして、日本語のlocaleがないことに気が付きました。
$ locale -a
C
C.UTF-8
en_US.utf8
POSIX
$
aptコマンドでインストールすればよさそうですが、日本語localeのパッケージ名がわかりません。例によって、検索エンジンで調べてみると以下のブログを見つけました。
ubuntuで(できるだけ)全部のlocaleを追加する
https://qiita.com/inayuta/items/a057020f5d836329b804

language-pack-jaをインストールしてもいいです。
root@localhost # apt-get install language-pack-ja
これだけだったのですね。

2018年2月1日木曜日

I can not print Excel sheet two-sided

When I tried to print out Excel worksheets with two-sided confiuguraion, I sometimes can not print out with two-side print.

I found following Q&A:
Q: Cannot print two-sided in Excel, but can in Word?
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other-msoversion_other/cannot-print-two-sided-in-excel-but-can-in-word/1dd47955-6f66-4f91-8b9c-8513d572c068?auth=1
From this Q&A, the reason is following:
Excel keeps it printing configuration on each sheet.
If you want to print all sheets with two-side configuration, you should check and unify all printing configuration that using two-side printing.

I see some messages from Ubuntu 16.04 using ssh login

I see some messages from Ubuntu 16.04 using ssh login as following:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-112-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

2 packages can be updated.
0 updates are security updates.


Last login: Thu Feb  1 13:51:02 2018 from xx.yy.xx.yy
If you want to supress this message, you create .hushlogin file at your home directory. This .hushlogin file is reffered from login process. There is the description about this in man of login.
$ man login

       $HOME/.hushlogin
           Suppress printing of system messages.

$
This messges is created by scripts in /etc/update-motd directory.
Ubuntu 14.04でSSHログイン時のメッセージをカスタマイズ
https://mistymagich.wordpress.com/2015/07/17/ubuntu-14-04%E3%81%A7ssh%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3%E6%99%82%E3%81%AE%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%82%92%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA/

Ubuntu14.04ではSSHログイン時にPAMを使用している場合、/etc/pam.d/sshdの中で、pam_motdモジュールを使用して、/run/motd.dynamicファイルに書かれているものを出力しています。

/run/motd.dynamicはプログラムによって生成されており、元となるデータは/etc/update-motd.dディレクトリに数字_ファイル名というスクリプトファイルで存在しています。数字順に実行していき、標準出力された文字列を/run/motd.dynamicに出力しています。

Unbuntu 16.04へsshでログインした時のメッセージ

Unbuntu 16.04へsshでログインした時に以下のようなメッセージが表示されることがあります。
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-112-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

2 packages can be updated.
0 updates are security updates.


Last login: Thu Feb  1 13:51:02 2018 from xx.yy.xx.yy
これを抑止するには、ホームディレクトリに.hushloginというファイルを作ります。この.hushloginはloginプロセスが参照しているようで、manに記述があります。
$ man login

       $HOME/.hushlogin
           Suppress printing of system messages.

$
上記のメッセージは以下のようにして作られているようです。
Ubuntu 14.04でSSHログイン時のメッセージをカスタマイズ
https://mistymagich.wordpress.com/2015/07/17/ubuntu-14-04%E3%81%A7ssh%E3%83%AD%E3%82%B0%E3%82%A4%E3%83%B3%E6%99%82%E3%81%AE%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%82%92%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA/

Ubuntu14.04ではSSHログイン時にPAMを使用している場合、/etc/pam.d/sshdの中で、pam_motdモジュールを使用して、/run/motd.dynamicファイルに書かれているものを出力しています。

/run/motd.dynamicはプログラムによって生成されており、元となるデータは/etc/update-motd.dディレクトリに数字_ファイル名というスクリプトファイルで存在しています。数字順に実行していき、標準出力された文字列を/run/motd.dynamicに出力しています。