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