Opera Portable Howto

前言

剛從這篇「討論」得知,原來opera目前有developer版阿,
我還在想說在linux的版本怎麼都一直處在12.16。
然後連到「這一頁」,下載「Opera Linux版」。
發現是「Deb」檔,不是像以前那樣可以下載「.tar.bz」,解開就可以使用了。
而且我還特地解開「deb」檔,觀看「DEBIAN/postinst」,果然如我想的
有一段會加入這個檔「/etc/apt/sources.list.d/opera-developer.list」內容是「deb http://deb.opera.com/opera-developer/ stable non-free #Opera Browser (final releases)」。跟安裝「Google Chrome」一樣,都會有這個動作。
呵呵,不過無意間,竟然讓我發現一個「script」檔,可以把這個「deb」檔,解開製作成「portable(standalone)」版。是從「這一頁」看到的

步驟

  • 連到「這一頁」。下載「standalone-opera.sh」這個「script」。放到剛剛下載的「opera-developer_26.0.1655.0_amd64.deb」同一層。
1
wget -c wget https://gist.githubusercontent.com/ruario/8416e36372f1a976a713/raw/85576f14d8ac37621143c39bb710e74fc40e7052/standalone-opera.sh

1
git clone https://gist.github.com/8416e36372f1a976a713.git standalone-opera
  • 執行下面的指令,注意:過程會提示說明,會用到sudo,這時只要輸入密碼就行了。
1
2
$ chmod u+x standalone-opera.sh
$ ./standalone-opera.sh opera-developer_26.0.1655.0_amd64.deb

就會產生一個資料夾「opera-developer_26.0.1655.0_amd64」。

然後執行下面的指令就行了。

1
opera-developer_26.0.1655.0_amd64/run &

當然也可以在檔案總管之類的File Manager,點選那個檔。
不然就是要自己寫「.desktop」檔案。
「/usr/share/applications/」有很多可以參考。
寫完後,可以放到「~/.local/share/applications」或是「桌面(~/Desktop)」。
剛發現「opera-developer_26.0.1655.0_amd64/usr/share/applications/opera-developer.desktop」原本就有了,可以直接拿來用或是改寫。

「prefile」會放在「opera-developer_26.0.1655.0_amd64/prefile」

1
ls opera-developer_26.0.1655.0_amd64/prefile

官方網頁

探索「deb」檔

解開「deb」檔

1
2
3
$ dpkg -x opera-developer_26.0.1655.0_amd64.deb opera-developer
$ dpkg -e opera-developer_26.0.1655.0_amd64.deb
# ar xf opera-developer_26.0.1655.0_amd64.deb

觀看「DEBIAN/postinst」

1
$ vi DEBIAN/postinst

額外一提

發現作者還有另外一個「standalonechrome」,還沒測試,先紀錄一下 :-)

還有幾個蠻特別的「Gist」