2015年7月26日日曜日

thinkfan - ubuntu 15.04

/etc/thinkfan.conf

:
hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input

2015年7月2日木曜日

TigerVNC (no TLS) - Windows7(64bit)

Viewer のみ作成

cmake-XXX
x86_64-5.1.0-release-posix-seh-rt_v4-rev0.7z
それぞれのbinへのPATHを通す

nasm へのPATHを通す

msys+7za+wget+svn+git+mercurial+cvs-rev13.7z
内の、msys.batを起動

zlib-1.2.8
libjpeg-turbo-1.4.1
fltk-1.3.3
>cmake -G "MSYS Makefiles" .
>make

tigervnc-master
>cmake -G "MSYS Makefiles" 
-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++"
-DZLIB_LIBRARY="{zlib-1.2.8 directory}¥libzlibstatic.a"
-DZLIB_INCLUDE_DIR="{zlib-1.2.8 directory}"
-DJPEG_LIBRARY="{libjpeg-trubo-1.4.1 directory}¥libturbojpeg.a"
-DJPEG_INCLUDE_DIR="{libjpeg-trubo-1.4.1 directory}"
-DFLTK_BASE_LIBRARY="{fltk-1.3.3 directory}¥lib¥libfltk.a"
-DFLTK_IMAGES_LIBRARY="{fltk-1.3.3 directory}¥lib¥libfltk_images.a"
-DFLTK_INCLUDE_DIR="{fltk-1.3.3 directory}"
.

./vncviewer/CMakeFiles/vncviewer.dir/linklibs.rsp
-Wl,-Bstatic -lgcc -lstdc++ -lwinpthread
を最後に追加

>make ./vncviewer

2015年6月23日火曜日

バッチファイルの改行

行の最後に 「 ^ 」

2015年1月18日日曜日

sshd - ubuntu


起動
 sudo start ssh

停止
sudo stop ssh

2014年12月20日土曜日

ローケル - slackware 14.1

/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月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;
}

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;
}