Xubuntuで用紙サイズがLetterになってしまうとき…

Xubuntuでいろいろ印刷するときに、用紙をA4と設定しても、プリンターの方で、「Letterになっています。強制印刷しますか?」のような警告が出ることがいつもでした。
原因は何だろうと思っていたら、次の変数でした。

/etc/environment
の中にLC_PAPERというものがあります。

これが、私の場合、

LC_PAPER="en_US.UTF-8"

となっていました。調べたところ、この設定だと用紙サイズのデフォルトは、Letterになること。
なので、これを

LC_PAPER="ja_JP.UTF-8"

と変えたところ、問題がなくなりました。
locale設定が用紙サイズにも影響しているんですね。
Xubuntuだけでなく、Ubuntuでも同じようなことが起こるのだと思います。

A study of shell script: Convert various image files formats into EPS format

I’m learning shell scripts these days.
Below is a script which converts various image file formats (jpg, png, etc…) into eps format using ImageMagick.
LaTeX user might find this script useful.

#!/bin/sh
#A script which converts various image file formats into EPS format.
#Usage: image2eps.sh filename
#Wild card can be used.

if [ $# = 0 ]
then
echo "Please specify the files you want to convert!"
echo "Usage: image2eps.sh filename"
exit 1
fi

for image in "$@"
do
if [ -f $image ]
then
convert $image `echo eps2:$image | sed 's/\..*$/.eps/'`
else
echo "$image: No such file"
fi
done

Shell color of Xubuntu

I noticed that Xubuntu overrides color of shell.
I looked for the solution and found the colorcode is in ~/.config/Terminal/terminalrc

[Configuration]
ColorForeground=#000000000000
ColorBackground=#ffffffffffff
ColorCursor=#000000000000
ColorSelection=#e3d6e3d6e3d6
ColorSelectionUseDefault=FALSE
ColorPalette2=#66660a3d0a3d
ColorPalette3=#000066661999
ColorPalette4=#4ecf2e2e6666
ColorPalette5=#171734344d4d
ColorPalette6=#800012d38000
ColorPalette7=#000080008000
ColorPalette8=#35357878b3b3
ColorPalette9=#999999999999
ColorPalette10=#80000ccd0ccd
ColorPalette11=#0000a6662999
ColorPalette12=#9d9d5c5ccccc
ColorPalette13=#262656568080
ColorPalette14=#cccc1e6dcccc
ColorPalette15=#0000aaaaaaaa
ColorPalette16=#52529393cccc
FontName=Droid Sans Mono 10
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscToolbarsDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
TabActivityColor=#262656568080

By commenting out the items regarding Color, I got the traditional look of shell.

shell