Y_hagurin’s diary

パソコンの奴隷

3パーティションでUbuntu 15.04を削除してPear OSをインストールする

Windows7とLinux Mint17.2とUbuntu15.04が
パーティションで入っているマシンに
Ubuntu15.04を削除してPear OS 8(64-bit)をインストールする

準備

インストール

  • Pear OSをインストールしたいマシンにインストールメディアを挿して起動する
  • すると、Pear OS 8のインストーラが立ち上がるので、下のうちの2番目"Start the installer directly"を選択する
    • Boot the Live System
    • Start the installer directly <=
    • xforcevesa - boot Live in safe graphics mode
    • hd - boot the first hard disk
  • "Welcome"画面
    • まず、言語の設定をする。ここではEnglishを選択して、Continue
      • 日本語も入ってはいる
  • "Preparing to install Pear"画面
    • ここでは特にチェックはいれずにそのままContinue
    • ネットはWi-Fiドライバが最初から使える
  • "Installation type"画面
    • 自分でパーティションを設定するために"Something else"ボタンを選択してContinue
    • 今回はUbuntu15.04を消したいのでUbuntu15.04がマウントされている領域を選択して"-"をクリックしてfree spaceにする
    • free spaceをクリックして"+"をクリック、新たなPear OSのための領域をマウントしていく
    • 今回は、以下の表のようなマウントにした。
Partition: Size Type Location Use as Mount point
Root: 35000(MB) Logical Beginning Ext4 /
Home: 約88(GB) Logical Beginning Ext4 /home
swap: 約15(GB) Logical End swap area -
  • "Where are you?"画面
    • TokyoのままContinue
  • "Keyboard layout"画面
    • Japanese - JapaneseのままContinue
      • test typeできるので、各自適当に打ってみよう
  • "Who are you?"画面
    • Pear OS 8用ログインアカウントを作成する
    • Your nameとpasswordを入力してContinue
  • インストールが始まる
  • インストールが完了したらInstallation Completeというウィンドウが表示されるので、Restart Nowをクリックして再起動
  • USBメモリをはずしてPearOSを起動

セットアップ

  • apt-getはいずれ必要になるであろうから事前準備をしておく
  • 普通にapt-getしてもうまくfetchできない
  • なので、/etc/apt/sources.listを編集する必要がある。
    • もとのsources.listを別名で取っておこう→$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.origin
    • Pear OSはサポートが終了しているのでaptのレポジトリを変更して別のレポジトリからfetchするようにしなければならない
    • 下記コマンドでfr.archiveとなっているところをold-releasesにする
    • pearlinux、extraとなっているところはとりあえずignoreすることにする
$ sudo sed -i -e 's/fr.archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
  • /etc/apt/sources.list の中身
#deb http://pearlinux-repo.fr/ Rocha main
deb http://old-releases.ubuntu.com/ubuntu raring main

#deb http://ppa.launchpad.net/nemh/gambas3/ubuntu raring main
deb http://old-releases.ubuntu.com/nemh/gambas3/ubuntu raring main

#deb http://ppa.launchpad.net/webupd8team/experiments/ubuntu raring main
deb http://old-releases.ubuntu.com/webupd8team/experiments/ubuntu raring main

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ raring main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ raring universe
deb-src http://old-releases.ubuntu.com/ubuntu/ raring universe
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ raring multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu raring-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu raring-security main restricted
deb http://old-releases.ubuntu.com/ubuntu raring-security universe
deb-src http://old-releases.ubuntu.com/ubuntu raring-security universe
deb http://old-releases.ubuntu.com/ubuntu raring-security multiverse
deb-src http://old-releases.ubuntu.com/ubuntu raring-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu raring partner
# deb-src http://archive.canonical.com/ubuntu raring partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
#deb http://extras.ubuntu.com/ubuntu raring main
#deb-src http://extras.ubuntu.com/ubuntu raring main
  • これでapt-getが使えるようになる
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
  • あとはお好みで…
$ sudo apt-get install zsh
$ chsh -s /bin/zsh
$ exit

$ sudo apt-get install tmux curl emacs git pandoc open-sshserver unity-tweak-tool ibus-mozc
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2
$ sudo apt-get update
$ sudo curl -L http://install.ohmyz.sh | sh
$ sudo apt-get install sublime-text
$ exit

$ upgrade_oh_my_zsh
$ sudo reboot

ブラウザで文字入力をする際にEmacsバインドを優先する

ブラウザで文字入力をしている際に
ショートカットキーよりもEmacsバインドを優先して機能するように設定する

ブラウザ内の文字入力時にEmacsキーバインドを使えるようにする

  • ターミナルを開く(Ctrl+Alt+t)
  • ~/.gtkrc-2.0というファイルを作成して編集する
$ emacs ~/.gtkrc-2.0
  • .gtkrc-2.0に下記設定内容を記述し保存
include "/usr/share/themes/Emacs/gtk-2.0-key/gtkrc"
gtk-key-theme-name = "Emacs"
  • 一度ブラウザを閉じて再度開く(再ログインは必要なし)

Ubuntu 15.04にMozcをインストールする

Ubuntu 15.04 64-bit版に
日本語入力環境Mozcをインストールする

mozcをaptでインストール

  • ターミナルを開く
$ sudo add-apt-repository ppa:japanese-testers/mozc
$ sudo apt-get update
$ sudo apt-get install ibus-mozc
  • System SettingのText Entryを開く f:id:Y_hagurin:20150902211719p:plain
  • 画面左下の"+"ボタンから"Japanese (Mozc)(IBus)"を選択して追加する
  • Surper+SpaceでIMEを切り替えて使う
  • ディスプレイ上部のメニューバーに出てくる文字入力の設定で、Mozcを選択してもよい
    • Input ModeをHiraganaにすると日本語を打てるようになる

Ubuntu 15.04のSRWare IronにFlash Playerを入れる

Ubuntu 15.04 64-bit版
SRWare Iron 42.0.2250.1 (64-bit)

Ironとchromeをインストール

Chrome内にあるFlashをIronにコピーする

  • Terminalを開く
  • ChromeFlashをIronにコピーする
$ sudo cp /opt/google/chrome/Pepperflash/libpepflashplayer.so /usr/share/iron/plugins/
  • FlashをIronでも動くようにする
    • manifest.jsonの中を見て、Flashのバージョンを調べる
      • "/"+"version"で検索すればすぐ見つかる
$ less /opt/google/chrome/PepperFlash/manifest.json
  • 調べたバージョンが18.0.0.233のとき、下のコマンドの一番最後を"18.0.0.233"とする
    • 各自インストールしたChrome内にあるFlashのバージョン番号(manifest.jsonに記載)をコマンド最後に入れる
$ /usr/share/iron/iron --ppapi-flash-path=/usr/share/iron/plugins/libpepflashplayer.so --ppapi-flash-version=18.0.0.233
  • 以降、Ironを起動するとFlashが使えるようになる

Ubuntu 15.04のUIをMac-likeにする(MacbuntuとUltra-flat-yosemite)

Ubuntu15.04をMacのように使いたい
1. Macbuntuと2. Ultra-flat Yosemiteと3. キーバインドについて

Macbuntu

Ubuntu 15.04 (64-bit版)に
Macbuntu10.10(v2.3)のテーマをインストールする
(MacbuntuをISOからインストールする訳ではなくテーマだけ)
(※あまりきれいにならなかった…)

  • macbuntu10.10をダウンロードしてインストール
$ wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.10/v2.3/Macbuntu-10.10.tar.gz -O /tmp/Macbuntu-10.10.tar.gz
$ tar xzvf /tmp/Macbuntu-10.10.tar.gz -C /tmp
$ cd /tmp/Macbuntu-10.10/
$ ./install.sh force
  • 手順に沿って進めていく

    • 基本"Y"を選択して進めていけばいいと思う
  • 自動起動するアプリにDockyを追加する

    • Dashメニューを開いて"Startup"と打てば"Startup Applications"が出てくるのでクリック
    • "Add"で追加画面を開く
    • "Name:"は適当に"Docky"、"Command:"に"docky"と入力してSave
    • 次回起動時から勝手にDockyが出てくるようになる
  • 変わってなければgnome-tweak-toolをインストールして開いて、設定

$ sudo apt-get install gnome-tweak-tool
$ gnome-tweak-tool
  • gnome-tweak-toolのAppearanceタブからMacbuntu IconやMacbuntu Cursorを選択

Ultra-flat-yosemite

Ubuntu 15.04 64-bit版に
Ultra-flat-yosemiteをインストールする

ultra-flat-yosemiteのダウンロード

$ sudo cp -r ~/Download/Ultra-Flat Yosemite Light /usr/share/themes/
  • gnome-tweak-toolをインストールして開く(Unity-tweak-toolでもよい)
$ sudo apt-get install gnome-tweak-tool
$ gnome-tweak-tool
  • gnome-tweak-toolのAppearanceタブにあるWindwoとGTK+からUltra-Flat Yosemite Lightを選択 f:id:Y_hagurin:20150902213113p:plain

  • Unity-tweak-toolを使ってもよい(gnome-tweak-toolではなく)

    • unity-tweak-toolをインストールして起動
$ sudo apt-get install unity-tweak-tool
$ unity-tweak-tool

f:id:Y_hagurin:20150902213149p:plain

  • Themeのところをultra-flat-yosemiteにする f:id:Y_hagurin:20150902213206p:plain

  • あとは好みにあわせてDockyの位置を変えたりLauncherを消したりすればMac-likeになる


スクロールバーをUnityからMac-likeなUIに変更する

  • ウィンドウ右に表示されるscrollbarをMac-likeに変更する
    • 恐らくMacbuntuをインストールする必要がある
  • Termialを開いてscrollbarのUIをMacbuntu用に変更
$ gsettings set com.canonical.desktop.interface scrollbar-mode normal

MacEmacsバインドを常用してる人は…

3パーティションでUbuntu 15.04をインストールする

Windows7とLinux Mint17.2のデュアルブート環境に
新たにUbuntu 15.04 64-bitを別パーティションでインストールする。
Windows7とLinux Mint17.2とUbuntu15.04の3パーティションにする。
今回のようなマルチブートでは最後にインストールするUbuntu15.04が
起動時のOS選択時にデフォルトで一番上に来る。
ISO: ubuntu-15.04-desktop-amd64.iso

準備編

Ubuntu ISOファイルをダウンロード

過去の記事Windows7ノートPCにデュアルブートでLinuxMint17.1をインストール - Y_hagurin’s diaryを参考に。

  • Download Ubuntu Desktop | Download | UbuntuからUbuntu15.04 64-bitをダウンロード
    • 次のContributeページですべて$0にすれば無料で落とせる
    • 日本語用ISOファイルもあるっぽい
  • ダウンロードしたISOファイル(ubuntu-15.04-desktop-amd64.iso)を使ってUSBインストールイメージを作成
    • STEP1: 使用するUSBメモリを選択
    • STEP2: ダウンロードしたISOファイルを選択
    • STEP3: 保存領域 0M
    • STEP4: 3つのチェックはなし
    • STEP5: カミナリマークをクリックして作成

インストール編

過去の記事Windows7ノートPCにデュアルブートでLinuxMint17.1をインストール - Y_hagurin’s diaryを参考に。

  • USBメモリを挿した状態で再起動
    • BIOSの設定でExternal Deviceを優先的に起動するようにしておく(過去の記事参考)
  • Welcome画面で、"Install Ubuntu"をクリック
  • Wi-Fiを接続
  • アップデートや3rdパーティソフトを入れるかどうか自分で決めて選択し、"continue"をクリック
  • "Installation type"画面で、パーティションに関する設定に進む
    • "Something else"を選択して自分でパーティションを設定することにする
    • 空けたい箇所を選択し、"Change..."をクリックして容量を指定する
    • インストールしたいUbuntuのマウントを設定したら"Install Now"をクリック
Partition: Size Type Location Use as Mount
Root: 30G Logical Beginning Ext4 /
Home: 約90G Logical Beginning Ext4 /home
swap: 15G Logical End swap area -
  • "Where are you?"画面で"Tokyo"のまま"Continue"する
  • キーボードの設定をする。ここではJapanese - Japaneseで設定した
  • "Who are you?"画面でUbuntuログインアカウントを作成する
  • インストールが始まる
  • 完了したらRestartしてUSBメモリをはずす