WOLのルータ超え設定:OG400Xi

Splashtopの評価をしていて、なかなかよさそうじゃないかなぁという印象。TeamViewerでよいのではないか、とも思ったけど、リモートアクセス中にモニタをブラックアウトできる分、マシなのかもしれないと思い直す。
で、外から事務所のPCを起動したい、ということで、インターネットからルータ超えのWOL設定をする。
  
事務所の環境は、
足回りはNTT西日本 フレッツ光ネクスト、ルータはOG400Xi
ローカルのPCはWindows8.1Pro
リモート側は、iPad mini iOS9.3.5、アプリはRemoteBoot WOL
  
PC設定
PCのNICのプロパティとBIOSWOLを有効にする。
  
ルータ OG400Xiの設定
ルータ設定>Wake on LAN設定 で、受信インタフェースをPPP1に。
デフォルトは、WOL:有効、受信インタフェース:WAN、受信ポート番号:7779
PPP1はフレッツの接続設定になっている。受信インターフェースがWANでは起動しない。
ルータ設定>アドレス変換設定>静的IPマスカレード でテーブルに追加。
プロトコルUDP、ポート:(任意)、ローカルIPアドレス:(起動するPCのアドレス)
OG400XはWAN側で開放したポート番号と同じにしないと通らない、みたいな記事も見かけていたが、ポート番号を揃えなくても起動した。
  
RemoteBoot WOLの設定
ブロードキャストはOFFにして、起動するPCのNICMACアドレス、ルータのPPP1に振られたIPアドレス、受信ポート番号を設定する。
OG400Xは設定変更すると再起動する。固定IPにしてないから、その都度IPアドレスが振り直されるので、それを確認して入れる。
Wi-Fiでローカルからブートする場合は、ブロードキャストをONにすれば起動する。

二段階認証

最近、もっとも古くから使っているODNアカウントに大量のスパムが送られてくるようになった。
yahooアカウントは、2013年5月のパスワード流出したかも事件の際に二段階認証に変更したが、ほかのアカウントもセキュリティを上げないといけないのかなと思い直し、二段階認証を選択できるwordpress.com、googleoutlook.comのアカウントを二段階認証に変更した。
yahooは独自にモバイルデバイス用に「Y!OTP」というアプリを提供しているが、wordpress.comもoutlook.comもgoogle「Authenticator」というアプリでワンタイムパスワードを受け取る。SMSでも受け取れるが、アプリはオフラインでもトークンを作るらしいので、アプリのほうがよいと思う。
  
で、困るのが、タブレットなどで使っているg+やgドライブなどのgoogle関連アプリ。二段階認証を適用すると、そのままではサインインできなくなってしまった。
アプリ固有のパスワードを作って使うのだが、タブレットに設定したgメールアカウントのパスワード変更すると、gメールは使えるのだが、他アプリはワンタイムパスワードを入れない限り使えない。
四苦八苦したところ、結果としては、googleアカウントを一度削除してしまって、アプリ固有のパスワードでアカウントの再登録するのがよさそう。タブレット用の固有パスワードをひとつ作れば済む。
ただ、GoTasksは連動しなかったので、GoTasks用の固有パスワードを作り、GoTasksをアンインストール後、再インストールした。

value-domainとwordpress.comとgoogle appsの関連を設定

value-domainドメインを取って、webをwordpress.comでホスティングして、ドメインマッピングした。
改めて各ドメインの費用を見比べるとjpドメインとか高いんだな。今回は.asiaを取る。キャンペーンで480円/年。
 
value-domainの管理画面から、「AS-ネームサーバの変更」でDNSを変更する。
独自ドメインの指定 http://ja.support.wordpress.com/domain-mapping/
Domains » Map an Existing Domain http://en.support.wordpress.com/domains/map-existing-domain/

Update your domain’s name servers to the following:
NS1.WORDPRESS.COM
NS2.WORDPRESS.COM
NS3.WORDPRESS.COM

 
wordpress.com側では、独自ドメインの追加オプションを$13.00/年で購入して、取得したドメインを追加して主要ドメインを変更する。
 
当初、メールはいらないという予定だったのが、やっぱり問い合わせ先のドメインメールも欲しいとなって、急きょgoogle appsをホストする方向に。(webサーバもgoogleにすればよかったな..)6,000円/年/ユーザー
 
google apps開始のウィザードで、取得しているドメインマッピングするを選択して、進む。
ドメインレジストラのリストから「その他」を選び、CNAMEレコードを加えるためのホスト名とターゲット名の値をコピーして、WORDPRESS.COMの管理画面からドメイ所有の確認のためDNSレコードを追加する。

CNAME xxx(host)xxx gv-xxxxxxxxxxx(target)xxxxxxxxxxx.domainverify.googlehosted.com.

 
ついでウィザードを進めると、gmailドメインで運用するためのMXレコードの値が出てくるので、wordpress.comのDNSに追加する。
http://support.google.com/a/bin/answer.py?hl=ja&answer=174125

MX 1 ASPMX.L.GOOGLE.COM.
MX 5 ALT1.ASPMX.L.GOOGLE.COM.
MX 5 ALT2.ASPMX.L.GOOGLE.COM.
MX 10 ASPMX2.GOOGLEMAIL.COM.
MX 10 ASPMX3.GOOGLEMAIL.COM.

なりすまし防止にSPFレコードを追加する。

txt @ v=spf1 include:_spf.google.com ~all


追記2013.3.1
今回はドメインを取ったので、googleウェブマスターツールへの追加はDNSのCNAMEレコードを書き足すことで所有確認をした。
ウェブマスターツールで(ドメイン)/sitemap.xmlを追加する。

Dell Inspiron Mini 12のUbuntu 12.04 LTSで突然音が出なくなった件

ふと気づくと、音が出ない。数日前まで動画再生でサウンドは生きていたので、直前のアップデートかなにかが影響したんだろうか??
画面的にはミュートのON/OFFやボリュームの増減はできている風なのだが、肝心の音がまったく出ない状態。

こちらのページ(参照)を参考に、HdaIntelSoundHowtoの手順を踏んでみたら、結果的に、サウンドが復活した。

HdaIntelSoundHowto(参照
(最終更新日時 2012-11-12 22:22:38 更新者 jamie-kitson)
  
まず、サウンドカードのモデルの確認をする。

First you must find which model of sound card you use, so run this command:

cat /proc/asound/card0/codec* | grep Codec

~$ cat /proc/asound/card0/codec* | grep Codec
Codec: Realtek ALC269

そしてALC269は例として載っていた。
vista?マイク?なんか例なのか?という気もしないではないが、)/etc/modprobe.d/alsa-baseに"options snd-hda-intel model=basic"を書き足すとある。

Example

I'd like to add an example to clarify: my mic did not work under Ubuntu (whereas playback did and the mic itself worked under Vista). I actually found out that my Realtek audio codec was ALC269 by typing

cat /proc/asound/card0/pcm0c/info

(and/or by looking into Vista Control Panel (Sound)). Looking at the ALSA-Configuration.txt this corresponds to model basic, so I added

options snd-hda-intel model=basic

at the end of /etc/modprobe.d/alsa-base and rebooted.

/etc/modprobe.d/alsa-baseというファイルはなく、新規に作成して"options snd-hda-intel model=basic"1行を加えて保存、再起動してみると・・音が出るようになった。

モバイルのためのfacebookページの各投稿のログイン不要パーマリンク

忘備録的にメモ。
  
以前なら、パソコン用の表示の日付でパーマリンクを得て、"www"を"m"に置き換えればモバイル用になったと思ったが、いつの間にやら仕様が変わったようだ。
それでも確かに表示されるのだが、ログインを求められる。facebookページであるのだから、ログインなしに開いて欲しい。。。
広告が出ないし、ガラケーでもリンクをたどれたので便利だったのに、フーム...
 
確認していくとURLはわかったが、テキストだけの投稿と写真付きの投稿でURLが違う。
 
テキストの投稿は、引数に、投稿のID「story_fbid」とFBページのID「id」の2つの固有の15桁の数字を入れるとログイン不要で表示できる。(SSLでも同じ)

http://m.facebook.com/permalink.php?story_fbid=xxxxxxxxxxxxxxx&id=xxxxxxxxxxxxxxx

 
投稿IDは、投稿日をクリックした時のパーマリンクで"/posts/xxxxxxxxxxxxxxx"という15桁の数字を含んでいるのがそれ。FBページのIDはこちらを参考。"www"を"graph"に置き換える。
 
FacebookページIDを簡単に確認する方法(参照
 
写真付きはpermalink.phpではなくphoto.phpを使っている。

http://m.facebook.com/photo.php?fbid=xxxxxxxxxxxxxxx&id=xxxxxxxxxxxxxxx

 
FBページのURLの"www"を"m"に置き換えてモバイル用の表示にした後、当該の写真をクリックするとURLを得られる。

http://m.facebook.com/photo.php?fbid=xxxxxxxxxxxxxxx&id=xxxxxxxxxxxxxxx&set=a.xxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxx&relevant_count=1&refid=17

この"&set=a."以下を省いてOK。
 
Firefoxでは、なぜか、同じようにモバイル用ページから当該の写真をクリックして得られるURLにもう一つ引数がついてくる。

https://m.facebook.com/photo.php?fbid=xxxxxxxxxxxxxxx&id=xxxxxxxxxxxxxxx&set=a.xxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxx&relevant_count=1&refid=17&_ft_=fbid.xxxxxxxxxxxxxxx

最後の"_ft_=fbid.xxxxxxxxxxxxxxx"というユニークな15桁の数字がでてくるが、こちらが投稿IDのようだ。基本的には写真に投稿コメントが紐付いているのだろうか。
 
仮に写真付きのエントリーで、permalink.phpを使う場合は"_ft_=fbid."の15桁の数字を"story_fbid="に入れる。

http://m.facebook.com/permalink.php?story_fbid=xxxxxxxxxxxxxxx&id=xxxxxxxxxxxxxxx

  
ちなみに、投稿IDをpermalink.phpに入れさえすればいい訳なので、写真のIDと思われる"photo.php?fbid="の「fbid」15桁、または、"set=a.xxxxxxxxxxxxxxx.xxxxxx.xxxxxxxxxxxxxxx"はなくても関係ないんだけど、これ一発で取得できるといいんだけどなぁ。

SSD RunCore Pro IVはTRIM機能をサポートしていない(?)

Ubuntu 12.04にバージョンアップしたかったのは、以前にSSDに換装したため、10.04だとTRIM機能がないし・・と思っていたからなんだけど...

12.04を入れただけでは自動設定にはならないらしいというので、ちょっと調べてみると、もしかして対応していないのか?えっ、そんなことって

sudo hdparm -I /dev/sda
 
/dev/sda:
 
ATA device, with non-removable media
  Model Number: RunCore 32G-C SSD
  Serial Number: ************
  Firmware Revision: 2030S
Standards:
  Supported: 8 7 6 5
  Likely used: 8
Configuration:
  Logical max current
  cylinders 16383 16383
  heads 16 16
  sectors/track 63 63
  --
  CHS current addressable sectors: 16514064
  LBA user addressable sectors: 62533296
  LBA48 user addressable sectors: 62533296
  Logical Sector size: 512 bytes
  Physical Sector size: 512 bytes
  device size with M = 1024*1024: 30533 MBytes
  device size with M = 1000*1000: 32017 MBytes (32 GB)
  cache/buffer size = unknown
  Nominal Media Rotation Rate: Solid State Device
Capabilities:
  LBA, IORDY(can be disabled)
  Standby timer values: spec'd by Standard, no device specific minimum
  R/W multiple sector transfer: Max = 1 Current = 1
  DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 udma6
   Cycle time: min=120ns recommended=120ns
  PIO: pio0 pio1 pio2 pio3 pio4
   Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
  Enabled Supported:
  * SMART feature set
   Security Mode feature set
  * Power Management feature set
  * Write cache
  * Look-ahead
  * Host Protected Area feature set
  * WRITE_BUFFER command
  * READ_BUFFER command
  * DOWNLOAD_MICROCODE
   SET_MAX security extension
  * 48-bit Address feature set
  * Device Configuration Overlay feature set
  * Mandatory FLUSH_CACHE
  * FLUSH_CACHE_EXT
  * SMART self-test
  * General Purpose Logging feature set
  * Gen1 signaling speed (1.5Gb/s)
  * Gen2 signaling speed (3.0Gb/s)
Security:
  Master password revision code = 65534
   supported
  not enabled
  not locked
   frozen
  not expired: security count
  not supported: enhanced erase
HW reset results:
  CBLID- above Vih
  Device num = 0 determined by the jumper
Integrity word not set (found 0x0000, expected 0x1ea5)

 
メーカーの商品特徴(参照)には

Garbage Collection機能内蔵でSSDの弱点であった速度劣化を防止。Trim処理が不要です。

とあったけど、「不要」って、TRIMをサポートしてないって意味なのかな???
 

sudo fstrim -v /
fstrim: /: FITRIM ioctl failed: サポートされていない操作です

dell inspiron mini12のUbuntu 10.04 LTSから12.04 LTSにアップグレードした(続き)

GMA500(Poulsbo)のビデオの関係で、ログイン画面がうまく表示されない件、解決した。
 
ブートオプションで起動させるやり方が示されていて、なんでできないのか、PC固有の問題なのか、さっぱりわからなかったが、/etc/default/grubをなにをどう書き換えてもまったく動きがかわらないので、もしやと思えばなんのことはない、ブートローダがgrub2ではなくgrub Legacyだった・・・
 
ブートローダがgrub2ではなかったのは10.04->12.04へバージョンアップしたから?
いずれにしても、GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty1"で解決。
 
情報が更新されていたので引用しておく。
 
HardwareSupportComponentsVideoCardsPoulsbo(参照

Ubuntu 12.04
Live (Desktop) CD
The problem with 12.04 is that the default kernel included on the desktop CD (all variants) is 3.3.2. This kernel works, but requires some custom boot parameters. Without these parameters you will either get a black screen or distortion.

  1. Switch to a console - Ctrl-Alt-F1
  2. Restart X with 'sudo service lightdm restart'

That should bring you back to a functional graphical desktop, so that you can proceed testing or installing.

                                                          • -

Post installation
With the default 3.3.2 kernel, you need to add some options to the grub boot options or you will get a black screen.

Starting with kernel 3.3.4 , the gma500_gfx driver works without adding any boot options.

There are several potential solutions for this console=tty1, disable splash, or 915 Resolution

 
Option 1 - console=tty1

Perhaps the easiest method is to use "console=tty1" as a boot option.

gksudo gedit /etc/default/grub

Find the following line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Add console=tty1 in between the quotes, the end result looking as follows

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty1"

save and exit, then update grub with

sudo update-grub

 
Option 2 - Disable splash

Some people find they need to disable the splash.

Essentially the same as above, just remove splash from the GRUB_CMDLINE_DEFAULT options.

 
Option 3 - 915 Resolution

First, no what your desired resolution is. On many devices this is 1366x768, so we'll use that in the examples below. Be sure to change it to your desired resolution

Using any editor, create a file /etc/grub.d/01_915resolution , add in lines

echo insmod 915resolution
echo 915resolution 58 1366 768 32

Make the file executable

sudo chmod a+x /etc/grub.d/01_915resolution

Next, edit /etc/default/grub, assign value 1366x768x32 to variables GRUB_GFXMODE and GRUB_GFXPAYLOAD_LINUX:

GRUB_GFXPAYLOAD_LINUX=1366x768x32

Then update grub.

sudo update-grub

NOTE: some gma500 users may have to switch to a different tty and then back to tty7 even after performing the above modification to have a correct desktop. To do this press Ctrl-Alt-F6 then press Ctrl-Alt-F7.