【Ubuntu 11.10:Gnome3】gnome-shell-extension-tool でextensionを作成しようとするとエラーになる問題 [ubuntu]
--- 2011/10/13追記 ---
この問題をLaunchpadに報告したところ、「gnome-shellの開発チームに報告して下さい」と言われたので、報告しました。
https://bugzilla.gnome.org/show_bug.cgi?id=661623
上記URLにあるように、バグである事を認識されて修正してくれるようです。
いつ反映された物が出るかは分りませんが・・・
---2011/10/13追記終わり ---
偶然、gnome-shellのextensionを作成しようとgnome-shell-extension-toolを下記で起動しました。
そしたら、下記のようになりました。
oneiric@ocelot:~$ gnome-shell-extension-tool --create-extension
Name should be a very short (ideally descriptive) string.
Examples are: "Click To Focus", "Adblock", "Shell Window Shrinker".
Name: Sample
Description is a single-sentence explanation of what your extension does.
Examples are: "Make windows visible on click", "Block advertisement popups"
"Animate windows shrinking on minimize"
Description: Sample extension
Uuid is a globally-unique identifier for your extension.
This should be in the format of an email address (foo.bar@extensions.example.com), but
need not be an actual email address, though it's a good idea to base the uuid on your
email address. For example, if your email address is janedoe@example.com, you might
use an extension title clicktofocus@janedoe.example.com.
Uuid [Sample@ocelot]:
Created extension in '/home/oneiric/.local/share/gnome-shell/extensions/Sample@ocelot'
Traceback (most recent call last):
File "/usr/bin/gnome-shell-extension-tool", line 151, in <module>
subprocess.Popen(['gnome-open', extensionjs_path])
NameError: name 'extensionjs_path' is not defined
最後の青字の所がエラーです。その上、以前ならば最後にエディタが立ち上がっていたのに立ち上がりません。
但し、必要なファイルは~/.local/share/gnome-shell/extensions/<uuid>の下に出来ています。
それで、gnome-shell-extension-toolのソースを見たらPythonで記述してあって、extensionjs_pathを事前に定義している所がありませんでした。
というわけで、仮対処です。
<< 仮対処 >>
cd /usr/bin
sudo cp gnome-shell-extension-tool gnome-shell-extension-tool.org #オリジナルを退避
sudo vi gnome-shell-extension-tool
としてエディタを立ち上げて、最後の3行に行きます。
print "Created extension in %r" % (extension_path, )
subprocess.Popen(['gnome-open', extensionjs_path])
sys.exit(0)
と記述されているはずですので、下記に直します。※1行目のextension_pathの後のカンマは外さなくても動くようです。ただ、無駄な物だとおもったので外しました。
print "Created extension in %r" % (extension_path)
extensionjs_path = os.path.join(extension_path, 'extension.js')
subprocess.Popen(['gnome-open', extensionjs_path])
sys.exit(0)
※Pythonはインデントが重要ですのでそろえて下さい。
これで動かすと、下図のように最後にエディタが立ち上がります。
バグレポートをFix Patch付きで発行しました。
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/853882
この問題は、下記のgnome-shellのgit (master)でも同じ記述でしたので、多分gnomeにエラーが行くと思います。なので、時間がかかるかも知れません。
http://git.gnome.org/browse/gnome-shell/
さほど困らない問題ではあると思いますが・・・
←Python入門
アマゾンの評価を見ると
ある程度、他のプログラミング経験がある人向けみたい。
初めてプログラミングする人には向いていないみたいな
事が書いてありました。
私のpythonの経験は合計1日にも満たないです。
Pythonを使ってプログラムミングをすることは無いけど、
プログラムを見る事はあります。
今の所、ネット上の情報だけで何とかなっています。
ありがとうございます、参考になりました。
by なまけもの (2012-01-04 09:30)
☆なまけものさん☆
どういたしまして、gnome-shellのエクステンション、頑張って作ってください。
by あんきょ (2012-01-04 21:48)