[02:04] Hi, I'm the developer of Cardapio (https://launchpad.net/cardapio) and I was wondering if someone could answer some questions about the Appmenu applet [02:05] Mainly, this is the problem that I'm encountering: https://bugs.launchpad.net/cardapio/+bug/603795/comments/6 [02:05] Launchpad bug 603795 in Cardapio "Cardapio don't show on panel when new "Appmenu" Applet is activated (affected: 1, heat: 10)" [High,Confirmed] [02:18] tvst: This channel isn't very active, but someone capable of answering should see it. [02:20] omega: do you know what is the best way to get someone's attention on this? I'm sure the solution to this problem is known by the ayatana developers, as the default Ubuntu menu isn't affected by it... [02:20] I'd say here, and maybe try their mailing list (I don't know about their policies about that though) [02:26] You might like to try when it's not... 2 AM for most Canonical employees ;) [02:31] Point taken :) [02:31] I will try again tomorrow at a more european-friendly hour [02:32] (or south-african) [03:41] hi dashua [03:41] long time. :) [03:46] Hey guys. [03:50] Hey jcastro, how ya been? [03:50] hi Omega [03:50] Killer ink, contemplating my next piece :) [03:51] The cardapio dev came in and asked a few things earlier. === bilalakhtar is now known as bilalakhtar_ [11:45] good morning [11:55] sense: Good morning to you too! [11:56] hi bilalakhtar [11:56] hi sense [14:25] Is it true that the Ubuntu Font Beta was opened for everyone? [14:25] sabdfl just mailed on the list, but I still don't believe that it wasn't opened, since I saw the comments on thw ebupd8 page [14:27] bilalakhtar: just because someone published on webupd8 doesnt mean it is open ;) [14:28] vish: But so many people on the page have commented that they like the font and they are using it! [14:28] bilalakhtar: open teams were accidentally allowed ... [14:28] vish: Including Ubuntu Women [14:28] vish: And Accessibility [14:29] vish: And Kubuntu Users (originally) [14:29] So bad! I just became an Ubuntu Member and this had to happen! [14:29] * vish noticed that and did point out in UW team , but i dint really think it would be an error.. [14:30] bilalakhtar: also , the artwork team is open ;p [14:30] How did such a big 'accidental' change take place! [14:31] bilalakhtar: because no one is as perfect as you... :) [14:31] * bilalakhtar would like to say that no human being is perfect [21:11] Hey all. I am the developer for an app called Cardapio, and I was wondering if someone here could help me debug an AppMenu issue. [21:12] In a nutshell, this is the problem: https://bugs.launchpad.net/cardapio/+bug/603795/comments/6 [21:12] Launchpad bug 603795 in Cardapio "Cardapio don't show on panel when new "Appmenu" Applet is activated (affected: 1, heat: 10)" [High,Confirmed] [21:15] tvst: you're looking for either tedg or bratsche, but they're usually not around on weekends [21:15] however someone from cardapio did post on the mailing list [21:16] Yeah, I can help you with that. [21:16] tvst ^ [21:16] Yes, that was Jan-Christoph. But from the looks of it, that mailing list doesn't seem to be the right one for that, as it seems to be used mainly for announcements. Sorry if we posted in the wrong place. [21:16] bratsche, great! [21:17] I'm sorry too for suggesting the mailing list. [21:17] tvst: So, the issue is that appmenu-gtk does some kind of janky things with menubars and you probably don't want to export your menubars to the appmenu. [21:17] so, for starters, do you understand the problem? in one line: "cardapio doesn't show when appmenu is present" [21:17] the list is the right place, it's just people usually don't ask [21:17] Ah. [21:18] I revoke my apology in that case! [21:18] haha [21:18] Give me a sec to get you a proper answer. [21:18] sure! [21:20] tvst: Try running your app(let) with UBUNTU_MENUPROXY="" set in the environment. [21:20] ok, just a sec. [21:21] And if that works, then setenv() that in the beginning of your main() or something. [21:21] Hey jcastro, how's it going dude? [21:21] it seems i have to install appmenu on this computer. this will take a minute or two. [21:21] Are you using Meerkat or Lucid? [21:22] lucid [21:22] bratsche: pretty good, you? [21:22] You might need to install a PPA to get it on Lucid. [21:22] bratsche: spending some time doing stackexchange stuff [21:22] but others were complaining about the same problem on meerkat [21:22] oh, i know. i'm doing that right now. [21:23] just to be sure: are these the correct instructions? https://bugs.launchpad.net/cardapio/+bug/603795/comments/3 [21:23] Launchpad bug 603795 in Cardapio "Cardapio don't show on panel when new "Appmenu" Applet is activated (affected: 1, heat: 10)" [High,Confirmed] [21:23] Yeah, that should be fine. [21:24] tvst: When you show the appmenu, it attempts to hide the menubar in your app. Of course, it's expecting your app to be a normal window-based one. Perhaps I could add some code in there to ensure that the toplevel is a GtkWindow. [21:25] But either way, I'd recommend trying to run your applet with UBUNTU_MENUPROXY="" [21:25] That would be a good idea. But for now the environment variable (if it works) is a good solution [21:26] jcastro: Nice.. I'm trying to do some crazy auto-fu hackery here. [21:26] jcastro: I got kind of sunburned last week. It still fucking hurts. :/ [21:26] Although it's getting better now. [21:28] jcastro: Oh oh oh.. and I got to see Phish live last Tuesday! It was fucking awesome! It was actually, by FAR, the best live show I've ever seen. By anyone. Ever. :) [21:28] They have the most impressive light show of any band ever. [21:28] weird this seems to have stopped happening, even without the environment variable. i'll try logging off and then back on... [21:28] brb [21:31] lol i forgot to write down the environment variable before logging off, so can you repost it here please? :o) [21:31] UBUNTU_MENUPROXY [21:31] should I set it to 1? [21:31] or something? [21:32] That's fine. [21:32] Or just "" [21:34] works!! [21:35] great! [21:35] I knew it would be simple :) [21:35] Thanks bratsche [21:35] tvst: Nice! So I'd recommend just doing unsetenv ("UBUNTU_MENUPROXY") in your main() function before you run the gtk mainloop. [21:36] Or maybe you can communicate that to whoever maintains this app. [21:36] if that's not you [21:37] Ah, I see. Otherwise whenever Cardapio launches an app it will have a menu. Ok, I'll unset it. [21:39] Oh, it's all in Python. I'm not sure what the Python equivalent of unsetenv() is. Maybe it's still unsetenv(). [21:39] os.unsetenv :) [21:40] but it doesn't seem to do what it's supposed to. wait a sec... [21:43] hmm... os.unsetenv is totally not working. it simply doesn't unset the variable. [21:43] looking for a solution online [21:46] os.environ.clear() [21:48] bratsche: I got burned too when I went to san diego, I am peel city [21:48] clear() is not a good idea, because the user may have something important there (and cardapio relies on other environment variables). [21:49] tvst: when you're sorted can you please update the bug with the solution, I'd like to be able to point other app developers there who might run into the same problem [21:49] well pop() [21:49] i'm using os.environ.pop('UBUNTU_MENUPROXY') and while this *does* remove the variable from the environment it *doesn't* produce the correct result. [21:50] That is, AppMenu still shows the menu for apps launched by Cardapio even when there's no UBUNTU_MENUPROXY variable. [21:50] Try environ['UBUNTU_MENUPROXY'] = '' [21:50] doesn't work either... [21:51] strange. [21:52] When I run python in a terminal it works. [21:52] >>> import os [21:52] >>> os.environ['UBUNTU_MENUPROXY'] [21:52] 'libappmenu.so' [21:52] >>> os.environ['UBUNTU_MENUPROXY'] = '' [21:52] >>> os.environ['UBUNTU_MENUPROXY'] [21:52] '' [21:53] I don't really know Python though, so maybe this isn't doing what I think. [21:54] What I mean is that by setting os.environ['UBUNTU_MENUPROXY'] = '' is how I got the initial bug sorted out in the first place. This is because you told me setting UBUNTU_MENYPROXY = '' was sufficient (and it is!) [21:54] The problem is that now there's another bug (the first one is solved). [21:54] Oh okay. [21:54] >>> os.environ['UBUNTU_MENUPROXY'] = 'test' [21:54] >>> os.environ['UBUNTU_MENUPROXY'] [21:54] 'test' [21:54] >>> os.environ.pop('UBUNTU_MENUPROXY') [21:54] 'test' [21:54] >>> os.environ['UBUNTU_MENUPROXY'] [21:54] Traceback (most recent call last): [21:54] On this second bug, any app that is launched by Cardapio gets ignored by AppMenu. [21:54] File "", line 1, in [21:54] File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__ [21:54] raise KeyError(key) [21:54] KeyError: 'UBUNTU_MENUPROXY' [21:54] pop works fine here [21:55] jcastro: I'm not peeling.. just my feet and ankles are swollen and hurt like crazy. [21:55] Again, the second bug is that any app that is launched by Cardapio gets ignored by AppMenu. This is because now the variable UBUNTU_MENUPROXY exists in the environment. [21:55] The obvious solution is to remove it. With pop or whatever you want, but [21:56] that doesn't work! Even if the variable is UNSET, any apps launched by Cardapio still get ignored by AppMenu. [21:56] So I'm thinking that there's a problem with subprocess.popen(), [21:56] which is what I use to launch apps. [21:56] I'm debugging this right now and will get back to you in a couple of minutes. [21:57] tvst: hey Thiago :) [21:57] hey! [21:57] tvst, let me know if I can help testing [21:57] will do [21:58] tvst: http://bugs.python.org/issue3227 [21:59] It says it's fixed in 2.6 though [21:59] hmm. let me make a small shell script to test that. [22:01] ARGH! It seems that bug is NOT fixed!! [22:01] Hah. [22:02] I made a shellscript with 'printenv > ~/test.txt' in it. Then launched it from Cardapio, and lo and behold, test.txt contains this line UBUNTU_MENUPROXY=libappmenu.so [22:03] and did you try del os.environ['UBUNTU_MENUPROXY']? [22:03] yes. [22:03] did that work? [22:03] Here's what happens: [22:06] >>> os.environ['UBUNTU_MENUPROXY']='' [22:06] >>> print os.environ [22:06] {..., 'UBUNTU_MENUPROXY':'' , ...} [22:06] >>> os.environ.pop('UBUNTU_MENUPROXY') [22:06] >>> print os.environ [22:06] {...} yay no UBUNTU_MENUPROXY! [22:06] >>> subprocess.Popen('test.sh', shell = True, cwd = self.home_folder_path) [22:06] test.sh is simply 'printenv > test.txt' [22:06] look at test.txt and [22:06] ... [22:06] UBUNTU_MENUPROXY=libappmenu.so [22:06] ... [22:06] :( [22:08] *wait a second* [22:08] del os.environ['UBUNTU_MENUPROXY'] [22:08] do that [22:08] The lines above DO work when used in a Python console! [22:08] Just not in my script. [22:09] The plot thickens. [22:09] Omega: I'll try. But I think I know what's happening... [22:10] del os.environ[ ... ] doesnt work. [22:10] let me try something else. [22:12] eh. no go. [22:41] Wazzit? [22:41] ...lets check the wiki! [22:42] lol MeMenu [22:47] Omega: ok, I got UBUNTU_MENUPROXY to be *truly* removed from the environment when running subprocess.popen, but launched apps *still* get ignored by AppMenu. [22:47] So now this is looking like an AppMenu bug :-/ [22:49] tvst: How did you manage to do it? [22:49] I just did the os.environ.pop RIGHT BEFORE calling subprocess.popen [22:50] strange, huh? [22:50] Does it work correctly with the shellscript? [22:50] yes. [22:50] the result of 'printenv > test.txt' is a file where there's no mention of UBUNTU_MENUPROXY anywhere. [22:51] ('printenv > test.txt' is what's in the shell script) [22:51] Try it with a test app that uses the appmenu next [22:52] I did. [22:52] thunar, for example. [22:52] still shows the menubar :-/ [22:52] (I tried thunar because it is *never* running on my system, as opposed to nautilus) [22:52] I mean with an app that does nothing more than use appmenu [22:53] like what? [22:53] just an example app [22:53] i don't know what you mean. [22:53] I'll see if I can find one [22:53] by the way, i can also launch xterm from Cardapio, and when I run printenv inside of xterm I see the same thing as with the shell script: no mention of UBUNTU_MENUPROXY anywhere. [22:58] (message me by name when you find it) [23:28] Omega: any luck? [23:52] Omega: GOT IT!! [23:53] Right before running subprocess.Popen(...) all you have to do is set os.environ['UBUNTU_MENUPROXY'] = 'libappmenu.so' [23:53] ALL SOLVED! [23:54] I'll update the bug report when I confirm that it *really* is solved and that I'm not overlooking something stupid :) [23:54] tvst: :D [23:54] Also, I dced, so I pretty much misssed everything [23:55] before < tvst> Omega: GOT IT!! [23:55] So I assume AppMenu requires UBUNTU_MENUPROXY to be set to "libappmenu.so" ? [23:55] (just trying to understand *why* this works) [23:55] seems so [23:55] heh [23:55] How did you come across it? [23:56] Just trying whatever I could think of :) [23:57] but entirely blindly, since I had already seen that... [23:57] 05:06:22 PM) tvst: UBUNTU_MENUPROXY=libappmenu.so [23:57] Anyways, gotta run now. [23:58] Thanks for pointing me in the right direction [23:58] ttyl [23:59] Cya