/etc/profile.d/lang.sh
export LANG=en_US
↓
export LANG=ja_JP.utf8
http://sourceforge.jp/magazine/09/09/16/108201/4
2014年12月20日土曜日
2014年12月14日日曜日
dhcpd - 複数NIC
eth0 - 192.168.100.1
eth1 - 192.168.200.1
dhcpd.conf
subnet 192.168.100.0 netmask 255.255.255.0 {
interface eth0;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option routers 192.168.100.1;
range 192.168.100.2 192.168.100.100;
}
subnet 192.168.200.0 netmask 255.255.255.0{
interface eth1;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option routers 192.168.200.1;
range 192.168.200.2 192.168.200.100;
}
eth1 - 192.168.200.1
dhcpd.conf
subnet 192.168.100.0 netmask 255.255.255.0 {
interface eth0;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option routers 192.168.100.1;
range 192.168.100.2 192.168.100.100;
}
subnet 192.168.200.0 netmask 255.255.255.0{
interface eth1;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option routers 192.168.200.1;
range 192.168.200.2 192.168.200.100;
}
2014年12月4日木曜日
キーボード(jp) - TigerVNC 1.4.80 (OSX)
/tigervnc/vncviewer/cocoa.mm
int cocoa_event_keysym(const void *event)
{
:
modifiers = 0;
if ([nsevent modifierFlags] & NSAlphaShiftKeyMask)
modifiers |= alphaLock;
if ([nsevent modifierFlags] & NSShiftKeyMask)
modifiers |= shiftKey;
if ([nsevent modifierFlags] & NSAlternateKeyMask)
modifiers |= optionKey;
//追加
int code = my_event_keysym(key_code,modifiers);
if ( code != -1 ) return code;
chars = key_translate(key_code, modifiers);
if (chars == nil)
return NoSymbol;
:
}
//追加
static const int kvk_map_qwerty[][3] = {
{ 0x00, XK_a ,XK_A },
{ 0x01, XK_s ,XK_S },
{ 0x02, XK_d ,XK_D },
{ 0x03, XK_f ,XK_F },
{ 0x04, XK_h ,XK_H },
{ 0x05, XK_g ,XK_G },
{ 0x06, XK_z ,XK_Z },
{ 0x07, XK_x ,XK_X },
{ 0x08, XK_c ,XK_C },
{ 0x09, XK_v ,XK_V },
{ 0x0B, XK_b ,XK_B },
{ 0x0C, XK_q ,XK_Q },
{ 0x0D, XK_w ,XK_W },
{ 0x0E, XK_e ,XK_E },
{ 0x0F, XK_r ,XK_R },
{ 0x10, XK_y ,XK_Y },
{ 0x11, XK_t ,XK_T },
{ 0x12, XK_1 ,XK_exclam },
{ 0x13, XK_2 ,XK_quotedbl },
{ 0x14, XK_3 ,XK_numbersign },
{ 0x15, XK_4 ,XK_dollar },
{ 0x16, XK_6 ,XK_ampersand },
{ 0x17, XK_5 ,XK_percent },
{ 0x18, XK_asciicircum ,XK_asciitilde },
{ 0x19, XK_9 ,XK_parenright },
{ 0x1A, XK_7 ,XK_quoteright },
{ 0x1B, XK_minus ,XK_equal },
{ 0x1C, XK_8 ,XK_parenleft },
{ 0x1D, XK_0 , XK_0 },
{ 0x1E, XK_bracketleft ,XK_braceleft },
{ 0x1F, XK_o ,XK_O },
{ 0x20, XK_u ,XK_U },
{ 0x21, XK_at ,XK_grave },
{ 0x22, XK_i ,XK_I },
{ 0x23, XK_p ,XK_P },
{ 0x25, XK_l ,XK_L },
{ 0x26, XK_j ,XK_J },
{ 0x27, XK_colon ,XK_asterisk },
{ 0x28, XK_k ,XK_K },
{ 0x29, XK_semicolon ,XK_plus },
{ 0x2A, XK_bracketright ,XK_braceright },
{ 0x2B, XK_comma ,XK_less },
{ 0x2C, XK_slash ,XK_question },
{ 0x2D, XK_n ,XK_N },
{ 0x2E, XK_m ,XK_M },
{ 0x2F, XK_period ,XK_greater },
{ 0x5D, XK_backslash, XK_bar },
{ 0x5E, XK_underscore , XK_underscore },
{ 0x68, XK_Kanji },
};
int my_event_keysym(UInt16 key_code,UInt32 modifiers)
{
int i;
int shift = (shiftKey & modifiers)? 1 : 0;
for (i = 0;i < sizeof(kvk_map_qwerty)/sizeof(kvk_map_qwerty[0]);i++){
if (key_code == kvk_map_qwerty[i][0])
return kvk_map_qwerty[i][1 + shift];
}
return -1;
}
int cocoa_event_keysym(const void *event)
{
:
modifiers = 0;
if ([nsevent modifierFlags] & NSAlphaShiftKeyMask)
modifiers |= alphaLock;
if ([nsevent modifierFlags] & NSShiftKeyMask)
modifiers |= shiftKey;
if ([nsevent modifierFlags] & NSAlternateKeyMask)
modifiers |= optionKey;
//追加
int code = my_event_keysym(key_code,modifiers);
if ( code != -1 ) return code;
chars = key_translate(key_code, modifiers);
if (chars == nil)
return NoSymbol;
:
}
//追加
static const int kvk_map_qwerty[][3] = {
{ 0x00, XK_a ,XK_A },
{ 0x01, XK_s ,XK_S },
{ 0x02, XK_d ,XK_D },
{ 0x03, XK_f ,XK_F },
{ 0x04, XK_h ,XK_H },
{ 0x05, XK_g ,XK_G },
{ 0x06, XK_z ,XK_Z },
{ 0x07, XK_x ,XK_X },
{ 0x08, XK_c ,XK_C },
{ 0x09, XK_v ,XK_V },
{ 0x0B, XK_b ,XK_B },
{ 0x0C, XK_q ,XK_Q },
{ 0x0D, XK_w ,XK_W },
{ 0x0E, XK_e ,XK_E },
{ 0x0F, XK_r ,XK_R },
{ 0x10, XK_y ,XK_Y },
{ 0x11, XK_t ,XK_T },
{ 0x12, XK_1 ,XK_exclam },
{ 0x13, XK_2 ,XK_quotedbl },
{ 0x14, XK_3 ,XK_numbersign },
{ 0x15, XK_4 ,XK_dollar },
{ 0x16, XK_6 ,XK_ampersand },
{ 0x17, XK_5 ,XK_percent },
{ 0x18, XK_asciicircum ,XK_asciitilde },
{ 0x19, XK_9 ,XK_parenright },
{ 0x1A, XK_7 ,XK_quoteright },
{ 0x1B, XK_minus ,XK_equal },
{ 0x1C, XK_8 ,XK_parenleft },
{ 0x1D, XK_0 , XK_0 },
{ 0x1E, XK_bracketleft ,XK_braceleft },
{ 0x1F, XK_o ,XK_O },
{ 0x20, XK_u ,XK_U },
{ 0x21, XK_at ,XK_grave },
{ 0x22, XK_i ,XK_I },
{ 0x23, XK_p ,XK_P },
{ 0x25, XK_l ,XK_L },
{ 0x26, XK_j ,XK_J },
{ 0x27, XK_colon ,XK_asterisk },
{ 0x28, XK_k ,XK_K },
{ 0x29, XK_semicolon ,XK_plus },
{ 0x2A, XK_bracketright ,XK_braceright },
{ 0x2B, XK_comma ,XK_less },
{ 0x2C, XK_slash ,XK_question },
{ 0x2D, XK_n ,XK_N },
{ 0x2E, XK_m ,XK_M },
{ 0x2F, XK_period ,XK_greater },
{ 0x5D, XK_backslash, XK_bar },
{ 0x5E, XK_underscore , XK_underscore },
{ 0x68, XK_Kanji },
};
int my_event_keysym(UInt16 key_code,UInt32 modifiers)
{
int i;
int shift = (shiftKey & modifiers)? 1 : 0;
for (i = 0;i < sizeof(kvk_map_qwerty)/sizeof(kvk_map_qwerty[0]);i++){
if (key_code == kvk_map_qwerty[i][0])
return kvk_map_qwerty[i][1 + shift];
}
return -1;
}
2014年12月2日火曜日
X11rdp - slackware 14.1
wget https://fedorahosted.org/releases/l/i/linux-pam/Linux-PAM-1.1.8.tar.gz
tar xvf Linux-PAM-1.1.8.tar.gz
cd Linux-PAM-1.1.8.tar.gz
./configure
make
make install
wget http://downloads.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz
tar xvf xrdp-v0.6.1.tar.gz
cd xrdp-v0.6.1
./bootstrap
./configure
make
make install
/usr/include/X11/extensions/Printstr.h (761行目)
PrivateRec *devPrivates; -> DevUnion *devPrivates;
wget http://server1.xrdp.org/xrdp/x11rdp_xorg71.tar.gz
tar xvf x11rdp_xorg71.tar.gz
makedir /opt/X11rdp
cd x11rdp_xorg71
bash ./buildx.sh /opt/X11rdp
ln -s /opt/X11rdp/bin/X11rdp /usr/local/bin
/etc/xrdp/xrdp.ini (72行目)
xserverbpp=24 -> xserverbpp=16
/etc/xrdp/startwm.sh (6行目)
SESSIONS="gnome-session blackbox fluxbox startxfce4 startkde xterm"
一つを選択、もしくは先頭に
例 SESSIONS="startkde"
tar xvf Linux-PAM-1.1.8.tar.gz
cd Linux-PAM-1.1.8.tar.gz
./configure
make
make install
wget http://downloads.sourceforge.net/project/xrdp/xrdp/0.6.1/xrdp-v0.6.1.tar.gz
tar xvf xrdp-v0.6.1.tar.gz
cd xrdp-v0.6.1
./bootstrap
./configure
make
make install
/usr/include/X11/extensions/Printstr.h (761行目)
PrivateRec *devPrivates; -> DevUnion *devPrivates;
wget http://server1.xrdp.org/xrdp/x11rdp_xorg71.tar.gz
tar xvf x11rdp_xorg71.tar.gz
makedir /opt/X11rdp
cd x11rdp_xorg71
bash ./buildx.sh /opt/X11rdp
ln -s /opt/X11rdp/bin/X11rdp /usr/local/bin
/etc/xrdp/xrdp.ini (72行目)
xserverbpp=24 -> xserverbpp=16
/etc/xrdp/startwm.sh (6行目)
SESSIONS="gnome-session blackbox fluxbox startxfce4 startkde xterm"
一つを選択、もしくは先頭に
例 SESSIONS="startkde"
2014年10月30日木曜日
TigerVNC - OSX(yosemite)
yosemite クリーンインストール後
Xcode インストール
MacPorts インストール
sudo port install gettext
sudo port install fltk-devel
sudo port install ImageMagic
(sudo port install fltk ではエラーになる 14/10/30)
git clone https://github.com/svn2github/tigervnc
cd ./tigervnc/trunk
cmake ./
make
Xcode インストール
MacPorts インストール
sudo port install gettext
sudo port install fltk-devel
sudo port install ImageMagic
(sudo port install fltk ではエラーになる 14/10/30)
git clone https://github.com/svn2github/tigervnc
cd ./tigervnc/trunk
cmake ./
make
2014年7月15日火曜日
2014年6月28日土曜日
タブを保存しない - firefox
firefox 30.0
browser.tabs.warnOnClose
browser.tabs.warnOnCloseOtherTabs
browser.warnOnQuit
全て false
browser.tabs.warnOnClose
browser.tabs.warnOnCloseOtherTabs
browser.warnOnQuit
全て false
2014年6月22日日曜日
2014年5月23日金曜日
2014年4月11日金曜日
ssh - 多段 part2
vncserver 192.168.100.2(Win7)
[ルーター]
sshd(中継) 192.168.100.3 / 192.168.2.1(OSX 10.8)
vnc client 192.168.2.2(linux,win)
OSX
システム環境設定 - 共有で
インターネット共有
共有する接続経路 : Ethernet
相手のコンピュータが使用するポート : Wi-Fi
Wi-Fiオプション : ネットワーク名、チャンネル(36〜、5Ghz)、セキュリティ
リモートログイン、インターネット共有をチェック
linux
Network設定
SSID : ネットワーク名
モード : インフラストラクチャ
セキュリティ
IPv4 方式 : 自動(DHCP)
ssh -t -L 1234:localhost:1235 user@192.168.2.1
ssh -t -L 1235:localhost:1236 user@192.168.100.3
ssh localhost -L 1236:192.168.100.2:5900
vncviewer localhost:1234
win
TeraTerm : ttermpro.exe /ssh-L1234:localhost:1235 user@192.168.2.1
putty : putty.exe -ssh -t -L 1234:localhost:1235 user@192.168.2.1
ssh -t -L 1235:localhost:1236 user@192.168.100.3
ssh localhost -L 1236:192.168.100.2:5900
vncviewer localhost:1234
[ルーター]
sshd(中継) 192.168.100.3 / 192.168.2.1(OSX 10.8)
vnc client 192.168.2.2(linux,win)
OSX
システム環境設定 - 共有で
インターネット共有
共有する接続経路 : Ethernet
相手のコンピュータが使用するポート : Wi-Fi
Wi-Fiオプション : ネットワーク名、チャンネル(36〜、5Ghz)、セキュリティ
リモートログイン、インターネット共有をチェック
linux
Network設定
SSID : ネットワーク名
モード : インフラストラクチャ
セキュリティ
IPv4 方式 : 自動(DHCP)
ssh -t -L 1234:localhost:1235 user@192.168.2.1
ssh -t -L 1235:localhost:1236 user@192.168.100.3
ssh localhost -L 1236:192.168.100.2:5900
vncviewer localhost:1234
win
TeraTerm : ttermpro.exe /ssh-L1234:localhost:1235 user@192.168.2.1
putty : putty.exe -ssh -t -L 1234:localhost:1235 user@192.168.2.1
ssh -t -L 1235:localhost:1236 user@192.168.100.3
ssh localhost -L 1236:192.168.100.2:5900
vncviewer localhost:1234
2014年3月29日土曜日
2014年3月26日水曜日
2014年3月22日土曜日
カーネル - slackware
make bzImage modules (-jX)
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-XXX
cp System.map /boot/System.map-XXX
cp .config /boot/config-XXX
cd /boot
rm System.map
ln -s System.map-XXX System.map
/etc/lilo.conf
image = /boot/vmlinuz-XXX
root = /dev/sda1
label = new_kernel
read-only
http://docs.slackware.com/howtos:slackware_admin:kernelbuilding
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-XXX
cp System.map /boot/System.map-XXX
cp .config /boot/config-XXX
cd /boot
rm System.map
ln -s System.map-XXX System.map
/etc/lilo.conf
image = /boot/vmlinuz-XXX
root = /dev/sda1
label = new_kernel
read-only
http://docs.slackware.com/howtos:slackware_admin:kernelbuilding
2014年3月19日水曜日
sshが遅い - CentOS 6.5
/etc/ssh/sshd_config
#GSSAPIAuthentication no
GSSAPIAuthentication yes
を
GSSAPIAuthentication no
#GSSAPIAuthentication yes
#GSSAPIAuthentication no
GSSAPIAuthentication yes
を
GSSAPIAuthentication no
#GSSAPIAuthentication yes
2014年3月18日火曜日
パッケージ作成 - slackware
make
mkdir PACKAGE
make install DESTDIR=PACKAGE
cd PACKAGE
makepkg ../PACKAGE.txz
例
make
mkdir /tmp/package
make install DESTDIR=/tmp/package
cd /tmp/package
su -c 'makepkg ../package.txz'
mkdir PACKAGE
make install DESTDIR=PACKAGE
cd PACKAGE
makepkg ../PACKAGE.txz
例
make
mkdir /tmp/package
make install DESTDIR=/tmp/package
cd /tmp/package
su -c 'makepkg ../package.txz'
2014年3月11日火曜日
firefoxの日本語化 - slackware 14.1
Firefox ESR 24.1
ja.xpi
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.1.0esr/linux-i686/xpi/ja.xpi
Edit -> Preferences -> Content 内の
Languages Choose で「japanese [ja]」を一番上に追加
about:config
general.useragent.locale Value=ja-JP
ja.xpi
https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.1.0esr/linux-i686/xpi/ja.xpi
Edit -> Preferences -> Content 内の
Languages Choose で「japanese [ja]」を一番上に追加
about:config
general.useragent.locale Value=ja-JP
chromium - CentOS 6.5
cd /etc/yum.repos.d
wget http://people.centos.org/hughesjr/chromium/6/chromium-el6.repo
wget http://people.centos.org/hughesjr/chromium/6/chromium-el6.repo
2014年3月10日月曜日
パッケージ管理 - slackware
/etc/slackpkg/mirrors
適当な場所のコメントを外す
slackpkg
http://docs.slackware.com/slackware:slackpkg
適当な場所のコメントを外す
slackpkg
http://docs.slackware.com/slackware:slackpkg
2014年3月7日金曜日
distccd - ubuntu
sudo distccd --nice X --jobs X --allow XXX.XXX.XXX.XXX/X --port XXXX
例
sudo distccd --nice 1 --jobs 5 --allow 192.168.1.0/24 --port 3632
例
sudo distccd --nice 1 --jobs 5 --allow 192.168.1.0/24 --port 3632
2014年3月5日水曜日
無線LAN - debian
/etc/wpa_supplicant/wpa_supplicant.conf
wpa_passphraseで作成、編集
pairwise=CCMP TKIP
group=CCMP TKIP
/etc/network/interface
DHCP
iface wlanX inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
IP固定
iface wlanX inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wpa_passphraseで作成、編集
pairwise=CCMP TKIP
group=CCMP TKIP
/etc/network/interface
DHCP
iface wlanX inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
IP固定
iface wlanX inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
無線LAN - slackware
/etc/wpa_supplicant.conf
wpa_passhraseで作成、編集
/etc/rc.d/rc.inet1.conf
IFNAME[X]="wlanX"
IPADDR[X]="xxx.xxx.xxx.xxx"
NETMASK[X]="xxx.xxx.xxx.xxx"
WLAN_ESSID[X]="xxxxxxxxxx"
WLAN_WPADRIVER[X]="wext"
WLAN_WPA[X]="wpa_supplicant"
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network
wpa_passhraseで作成、編集
/etc/rc.d/rc.inet1.conf
IFNAME[X]="wlanX"
IPADDR[X]="xxx.xxx.xxx.xxx"
NETMASK[X]="xxx.xxx.xxx.xxx"
WLAN_ESSID[X]="xxxxxxxxxx"
WLAN_WPADRIVER[X]="wext"
WLAN_WPA[X]="wpa_supplicant"
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network
2014年3月3日月曜日
無線LAN - CentOS
/etc/wpa_supplicant/wpa_supplicant.conf
wpa_passphraseから作成、編集
/etc/sysconfig/wpa_supplicant
INTERFACES="-iwlanX"
DRIVERS="-DXXXX"
/etc/sysconfig/network-scripts/ifcfg-wlanX
DEVICE=wlanX
ONBOOT="yes"
IPADDR=XXX.XXX.XXX.XXX
NETMASK=XXX.XXX.XXX.XXX
GATEWAY=XXX.XXX.XXX.XXX
DNS1=XXX.XXX.XXX.XXX
chkconfig NetworkManager off
chkconfig network on
chkconfig wpa_supplicant on
wpa_passphraseから作成、編集
/etc/sysconfig/wpa_supplicant
INTERFACES="-iwlanX"
DRIVERS="-DXXXX"
/etc/sysconfig/network-scripts/ifcfg-wlanX
DEVICE=wlanX
ONBOOT="yes"
IPADDR=XXX.XXX.XXX.XXX
NETMASK=XXX.XXX.XXX.XXX
GATEWAY=XXX.XXX.XXX.XXX
DNS1=XXX.XXX.XXX.XXX
chkconfig NetworkManager off
chkconfig network on
chkconfig wpa_supplicant on
2014年3月1日土曜日
2014年2月9日日曜日
shntool - ubuntu
shnsplit CDImage.wav -f CDImage.cue
cueシートがエラーの場合
nkf CDImage.cue > new_CDImage.cue
cueシートがエラーの場合
nkf CDImage.cue > new_CDImage.cue
2014年1月9日木曜日
bluetooth - xubuntu 13.10
sudo apt-get install pulseaudio-module-bluetooth
pactl load-module module-bluetooth-discover
http://askubuntu.com/questions/366032/pulseaudio-not-detecting-bluetooth-headset-automatically
pactl load-module module-bluetooth-discover
http://askubuntu.com/questions/366032/pulseaudio-not-detecting-bluetooth-headset-automatically
登録:
投稿 (Atom)