FreeSurfer 7.2.0が発表されました。
このバージョンからついに deb ファイルが提供されるようになりました。嬉しいことですね。
デフォルトのインストール先は、/usr/local/freesurfer/7.2.0 となります。
FreeSurfer 7.2.0が発表されました。
このバージョンからついに deb ファイルが提供されるようになりました。嬉しいことですね。
デフォルトのインストール先は、/usr/local/freesurfer/7.2.0 となります。
最近、あるワークステーションを新規にセットアップしました。
いつもファイルはDropbox経由で同期することによって楽しているので、今回も同じようにしたら、
1週間たっても同期がされません。
おかしいなと思っていろいろ調べてみたら、公式ドキュメントにヒントがありました。
同期できない場合 – 互換性のない特殊文字と不良なファイル名に関する問題の解決方法
Linux で 1 万件以上のフォルダを監視する
Linux 版の Dropbox デスクトップ アプリは、デフォルト設定により 1 万件以上のフォルダを監視することはできません。制限数を超えた場合は監視されないため、同期中に無視されます。簡単な回避策として、まずターミナルを開き、次を入力してください。
echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p
このコマンドでシステムに 10 万件までのフォルダを監視するように指示することができます。コマンドを入力しパスワードを入力したら、すぐに Dropbox が同期を再開します。
私のDropbox内のフォルダ数はどのくらいだろう?と思って、以下のコマンドでディレクトリ数を数えてみました。
find Dropbox -type d | wc -l
その結果ですが、14454 と出てきました。1万件超えています。
そこで、アドバイス通り、以下のコマンドを入力しました。
echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p
そうしたところ、同期がはじまりました!システムで何か変な設定をしてしまったのではないかと心配だったのでほっとしました。
普段使っているDropboxは、少しずつ増えていっているので、おそらく監視しているフォルダ数がそれほど多くないのかもしれませんね。
Ubuntu 18.04で経験した現象ですが、無線LANは接続できるのに、有線LANで接続しようとすると、
「デバイスは管理されていません」”device not managed” と出てしまって接続できないことがあります。
こんな感じです。
ネットを探してみるといろいろな情報が出てきますが、日本語の情報だと、「PCにあったドライバをインストールする」という情報が多いです。
しかし、これは汎用的ではありません。もっと根本的な解決法がほしいと思いました。
I tried to install igraph simply by running install.packages(‘igraph’), which resulted in compile error.
Gathering information scatterd on websites, I came to the conclusion.
My Circumstance is as follows;
Ubuntu
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
$ uname -a
Linux vincent 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
R-studio
Version 1.1.383
sudo apt update sudo apt install libssl-dev libcurl4-openssl-dev libxml2-dev
Then running install.packages(‘igraph’) in R-studio succeeded without error.
私は、Ubuntu 16.04 (をカスタマイズしたLin4Neuro 16.04)でfcitx+mozcで日本語入力を行っています。
エディタはvimを利用しています。
多くの方がネットに記載されていますので、詳細は書きませんが、私がvimで日本語文書を書くとき、
という問題がありました。
この点に関して、私がよく参考にさせていただいている「いくやの斬鉄日記」にまさにこれに関する記事があり、中国語ですが、この問題を解決する .vimrc に記載する設定のリンクが紹介されていました。
早速、以下を ~/.vimrc に記載しました。(中国語のコメントは、英語に変換してあります)
"##### auto fcitx ########### let g:input_toggle = 1 function! Fcitx2en() let s:input_status = system("fcitx-remote") if s:input_status == 2 let g:input_toggle = 1 let l:a = system("fcitx-remote -c") endif endfunction function! Fcitx2zh() let s:input_status = system("fcitx-remote") if s:input_status != 2 && g:input_toggle == 1 let l:a = system("fcitx-remote -o") let g:input_toggle = 0 endif endfunction set ttimeoutlen=150 "Leave Insert mode autocmd InsertLeave * call Fcitx2en() "Enter Insert mode autocmd InsertEnter * call Fcitx2zh() "##### auto fcitx end ######
これでvimを起動したところ、日本語でいろいろ書いた後に、ESCを押してノーマルモードに戻ると、自動でmozcがoffになりました。やった!という感じです。
しかし、もう少し使っていて、不便に感じることがありました。それは、vimを起動して最初の挿入モードになるときに必ず mozc が立ち上がってしまうことです。日本語の文章を書くときはいいのですが、スクリプトを書くときは邪魔になります。ここは自動じゃないほうがいいなと思いました。
で、上の記載をよくよく見ると
Fcitx2en() というファンクションと
Fcitx2zh() というファンクションがあり、
前者はESCが押された時に自動でinput method (IM)をoffにする機能であり
後者は挿入モードになった時に自動でIMをonにする機能のようです。
私は後者の機能がいらないんだと気づきました。
なので、以下のように、Fcitx2zh()のところを削除しました。
"##### auto fcitx ########### let g:input_toggle = 1 function! Fcitx2en() let s:input_status = system("fcitx-remote") if s:input_status == 2 let g:input_toggle = 1 let l:a = system("fcitx-remote -c") endif endfunction set ttimeoutlen=150 "Leave Insert mode autocmd InsertLeave * call Fcitx2en() "##### auto fcitx end ######
こうしたところ、私の期待していたように
となりました。
これでvimがさらに便利になりました。
自分の備忘録として記載しておきます。
2018.09.09追記:この記事は古くなっています。最新版は、こちらに準備しましたので、こちらをご覧ください。
先日、ANTsをMacにインストールする方法を記載しましたが、Ubuntuでも同じことができるので、記載します。
開発者によるHow-toはこちらに記載されています。
私は、今、Thinkpad X250とT430を使っています。Thinkpad T430では、BIOSで、タッチパッドを無効にすれば、そのままタッチパッドが無効になったので、よかったのですが、同じことをX250でやっても効果がありません。
それでいろいろ調べてみました。
結論は、以下の方法が一番早いかと思います。
ターミナルで以下をタイプします。
$ synclient TouchpadOff=1
ただ、これは、一時的なもので、ずっとそうしたくない場合は、自動でこれが動くようにしてあげればいいわけです。
私はXFCE環境なので、XFCEでどうするかを調べました。
2つのファイルを準備する必要があります。
これには、以下の2行だけ記載されています。
#!/bin/sh synclient TouchpadOff=1
これを実行権限をつけた後、パスの通っているディレクトリに保存します。私は、~/binに起きました。
これには、以下の3行だけ記載されています。
[Desktop Entry] Type=Application Exec=disable-touchpad.sh
この保存場所が大事なのですが、
~/.config/autostart
に保存します。autostartがなければ自分で作れば大丈夫です。
これで、ログアウトし、再度ログインすると、めでたく、Touchpadが無効になっています。
ちなみに、検索するとよく出てくる
/usr/share/X11/xorg.conf.d/50-synaptics.conf
の一番最後に、以下を記載
Section "InputClass" Identifier "no need for accelerometers in X" MatchProduct "SynPS/2 Synaptics TouchPad" Option "Ignore" "on" EndSection
というのは、ひとつ間違えるとシステムが起動しなくなることもあり得るので、注意が必要です。
Connectomeに関心が集まっている昨今、様々なソフトウェアが発表されています。
それらの中にConnectome Mapping Toolkitがあります。Connectome Mapperがその根幹をなすものですが、Connectome mapperを動かすためには、
を事前に準備しなくてはならず、そのうえでConnectome mapperを入れないといけません。
結構大変な作業です。
順天堂放射線科の神谷先生と情報交換をしながら、Ubuntuにこれらのソフトをいれ、Connectome mapperを起動させる手順書を作成しました。
悩んでいる人は試してみる価値があると思いますので、試してみてください。
PDFはこちらからダウンロードできます。
なお、Lin4Neuroの最新版(20140313)には、FreesurferとDiffusion Toolkitを除くこれらのソフトのすべてが入っています。めんどくさがりの方は、最新版のLin4Neuroを使用することをおすすめします。
It’s been months since I swithed completely to Xubuntu 12.04 from MS Windows on my ThinkPad T430s. Basically I’m satisfied with Xubuntu 12.04, but there are some points which need tweaks. They are…
Somehow battery on ThinkPad T430s lasts only around 2hours on Xubuntu, which is much shorter than Windows.
XFCE is not so good at dealing with projectors or external monitors. I’m still struggling with this matter, so I don’t make any comments now.
As of battery life, I found a very good tool, which is TLP.
By installing TLP, the battery life gets longer by one hour without any modification, which is great.
You can find how to install TLP here.
Thinkpad T430sにXubuntu 12.04を入れました。インストール自体は何の問題もなかったのですが、入れてから1日の間に10回以上システムがフリーズしました。マウスもキーボードも何の操作も受け付けなくなってしまうのです。
これでは、信頼できないマシンになってしまいます…。
いろいろ調べたところ、カーネルを3.4にアップデートしたところ、問題が解決したという記事をみつけました。
実際にやってみました。
つまり、後ろにamd64.debとあるものとall.debとあるものです。32bitの場合でしたらi386.debとall.debになります。
sudo dpkg -i linux-*
sudo apt-get update sudo apt-get upgrade sudo apt-get autoremove
uname -r
これで3.4.0-030400-genericと表示されれば新しいカーネルになったことを確認できます。
こうしたところ、私のThinkpad T430sは全くフリーズしなくなりました。カーネルの問題だったということですね。これで安心して解析ができます。
N.B.: This is the old post. If you want to install the latest FSL (5.0.10 and later), you need to use fslinstaller.py.
If you use Debian or Ubuntu, you can install FSL easily using neurodebian repository.
Below is what you need to install FSL.
Follow the guideline described here.
$ sudo apt-get update
$ sudo apt-get install fsl fsl-doc fslview fslview-doc fsl-atlases fsl-possum-data fsl-first-data fsl-feeds dicomnifti libvtk5-dev vtk-examples vtk-doc
This is the thing people often forget. Without this, you can’t run fsl from shell.
. /etc/fsl/fsl.sh
That’s it.
Note: This article is pretty old. Now you can install MINC toolkit more easily. Please see the instruction in http://www.bic.mni.mcgill.ca/ServicesSoftware/ServicesSoftwareMincToolKit. (24 Oct 2014)
We have few resources how to install N3 on Ubuntu. I could successfully install N3 (aka mni-n3) on Ubuntu 10.04. I write down what I did.
NB: This is only for 64bit Ubuntu 10.04. They don’t maintain 32bit binary for minc.
The following commands must be executed with root privileges (use sudo) except for the last one.
You can do this by adding the following line to the /etc/apt/sources.list.
#MINC software
deb http://packages.bic.mni.mcgill.ca/ubuntu-lucid/ ./
Note: You have to include “./” at the end of the line.
$ sudo apt-get update
Through many trials and errors, I found out that we have to specify the following 4 packages; minc, minc-tools, n3, and libmni-perllib-perl to have n3 work properly. Of course you can install other packages such as mni-autoreg, register, display, or mincblob. (However, I haven’t fully tested about these packages.)
$ sudo apt-get install libmni-perllib-perl minc minc-tools n3
Note: Ignore the Warning: “The following packages cannot be authenticated!” and press Y when asked: “Install these packages without verification [y/N]?”
Add the phrase “export PATH=/usr/local/bic/bin:$PATH” in your .bashrc file (located in your home directory). You don’t have to be root doing this.
Now you are ready to use N3 on your Ubuntu 10.04!