/srv/irclogs.ubuntu.com/2012/05/22/#ubuntu-unity.txt

bobweaverbrb reboot time00:08
thumperbobweaver: some of the lenses and scopes are in vala, others in python00:34
thumperI don't believe there are any explicit tools00:34
bobweaverthanks thumper  sorry for cutting in and out I was restarting gnome-session00:34
bobweaverI am trying to hack in some new lens for ubuntu tv00:35
bobweaverby using others that are all ready there but I have to make some "templeates" (I think ) / somepartofdash.qml and was wondering if there was a easy way to make layout with out hand coding00:36
bobweaverI think that I have to make a section for what I am trying to do here http://bazaar.launchpad.net/~s-team/ubuntutv/trunk/files/head:/shell/dash/00:38
bobweaverthen tie the lens scope and daemon in but I could be wrong. all in all I am learning a ton and for that I just have one more thing that I love about Ubuntu :)00:38
thumperbobweaver: you do realise that the ubuntutv is a prototype and not a product right?00:47
bobweaverthumper,  yup 100% thumper  here is a video of me using a live cd that I created yesterday http://www.youtube.com/watch?v=VbRRrJEwZ3E00:48
bobweaverthumper,  I get a box of ubuntu cd from a local coc member I gives these to stores to handout to there customers  I also give them a book of pdf's that I have gotten from a number of places. I am trying to get cardboard cut outs to hold the  pre-installed computers. But There is one store that the owner is awesome and I would like to drop off a box with Ubuntu TV (prototype) at his store but would like to make most of the launchers wor00:53
bobweaverk before I do that. Just to spread the word and to get the hype going.00:53
bobweavermore then it already is ,that is .00:54
=== salem_ is now known as _salem
=== fenris is now known as Guest25535
=== Guest25535 is now known as ejat
=== njin is now known as njin1
=== njin1 is now known as njin2
=== njin2 is now known as njin
=== andyrock is now known as andyrock|uni
elkyHi, I keep having bug# 962852 happen to me every few weeks. seb128 and I debugged it last time but with no luck, and it's just happened again. Any thoughts?08:16
elkybug 96285208:16
ubot5Launchpad bug 962852 in unity (Ubuntu) "icons stuck at top of unity dash" [Low,Incomplete] https://launchpad.net/bugs/96285208:16
seb128gord, hey, did you ever see something like that? do you have any idea what debug infos would be useful?08:17
seb128gord, https://launchpadlibrarian.net/97974155/Screenshot%20at%202012-03-23%2020%3A14%3A50.png08:17
seb128gord, screenshot of the issue08:17
ais523hmm, I wonder what happens if you just restart Unity (alt-F2 unity)08:18
ais523actually, I wonder if you can get that toolbar appearance by adding several hundred invisible icons to the launcher08:19
ais523that's the sort of thing that's within the realms of possibility that it could happen due to a bug08:19
ais523and that icon that is half-visible in the screenshot is update manager + a notification, which could explain what changed while someone was away from the computer08:22
gordwoh, thats a strange one, i don't think there are easily accessible things that could be debugged out of it though. looks very tricky to debug08:22
elkyais523, the reference points to some of the lower icons stays visible, but with exaggerated spacing08:22
elkywell "visible"08:22
elkyaccessible, i can hover over the dock and get the tooltips show, and clicking works08:22
ais523when it happens, do you get tooltips (of any sort) if you hover over apparently empty spaces on the launcher?08:22
ais523and is everything where it "ought" to be when that happens, just invisible?08:22
elkyyes, that08:22
elkywell, in the right order, but as i said, with exaggerated spacing08:23
gordlaptop and the netbook aren't the same resolution are they?08:23
elkygord, no, this is a hp mini, with it's special snowflake resolution08:23
elkythe laptop is nvidia with not-huge resolution. it's not running right now, but i could start it after dinner and check08:24
ais523my current guess at the culprit is the rendering library08:25
elkyi need to go make dinner, i'll look back here after i'm finished08:26
ais523I've already caught the tooltips acting oddly with my own locally patched Unity (if you repeatedly change what a tooltip says, the text eventualy gets rendered in the wrong position on the tooltip)08:26
ais523*eventually08:26
elkyais523, any way to test your theory?08:55
ais523not that I can think of immediately08:56
ais523restarting Unity but not bamfdaemon should test whether the fault is with which icons exist or how they're being drawn, at least08:56
elkyhow do i do that?08:56
ais523alt-f2 then type "unity" in the box that appears08:56
elkymy recollections of debugging with seb suggested it didn't help anything08:57
elkyjust did it however, and no change yet08:57
elkyno change at all :(08:58
ais523it normally causes a pretty obvious screen redraw08:58
ais523alt-f2 can be temperamental, you can try doing it from a terminal instead08:58
ais523(although you can't then close the terminal until you log out, or you'll be left without a window manager)08:58
ais523that's actually probably worth doing anyway, as you'll see any warning or error messages from unity in the terminal08:58
elkywell yes, it redrew the screen09:00
elkybut not the change we wanted ;)09:01
gordelky, do you normally have enough launcher icons to fill up the launcher? ie: some of them fold09:01
elkygord, not usually09:02
elkyi might have had, i can't say now09:02
gorddoes feel like something to do with the maths surrounding that kind of thing09:02
elkythere's probably a way to check, yeah09:02
elkyais523, i actually pastebinned that last time for seb: <elky> oh, my terminal has a heap of output because i ran unity... http://paste.ubuntu.com/949268/09:03
gordnothing very useful in there i'm afraid09:04
ais523elky: and re-running unity doesn't clear up the problem?09:05
ais523I think I have another idea09:05
tsdgeosdidrocks: https://code.launchpad.net/~aacid/nautilus/fix_quicklist_underscore/+merge/10676009:07
didrockstsdgeos: great, having a look :)09:07
ais523elky: could you run the command "dbus-send --print-reply --dest=org.ayatana.bamf /org/ayatana/bamf/matcher org.ayatana.bamf.matcher.RunningApplicationsDesktopFiles" in a terminal (not the one you're using to run Unity)?09:07
ais523and tell me whether the reply looks sensible or not?09:07
tsdgeosdidrocks: have to logout for 3 min, back in a moment09:07
elkyais523, http://paste.ubuntu.com/1000498/09:08
elkywhy does it say unity2d?09:09
ais523now, /that's/ out of place, definitely09:09
elkythat's quite cute.09:09
elkysilly 2d, you don't belongs there!09:09
ais523when I do that, with my working terminal, it doesn't list unity-2d-panel as running09:10
elkynow, how do we figure why/when it started?09:10
tsdgeosbac09:10
tsdgeosk09:10
ais523I guess we could see if the process has a parent, although it probably doesn't09:11
ais523it's a little awkward to work out the raw dbus calls for a particular window09:11
elkymelissa@lamia:~$ pstree | grep 2d    ...     |-2*[unity-2d-panel---2*[{unity-2d-panel}]]09:12
ais523ah, neat, didn't know about that; I'd probably have tried to use pgrep09:12
ais523I suppose one crazy thing to try would be killall unity-2d-panel, to see what happens09:13
didrockstsdgeos: looks good to me, will merge and sponsor Thanks! :) (maybe I'll just change the free to a g_free() for coherence)09:13
tsdgeosdidrocks: ah it's g_free09:13
ais523are free and g_free actually identical?09:13
tsdgeosi thought it was gfree :D09:13
tsdgeosbut failed to compile09:13
tsdgeosand was a lazy bastard to not look for the correct naming09:13
elkyais523, anything else you want me to check before i do that, incase it leaves me needing to reboot?09:13
ais523I can't think of anything immediately, but I'll probably think of something just after it's already crashed the system :)09:14
ais523I guess we could look for windows belonging to unity-2d-panel, to figure out where they'd gone onscreen09:15
ais523but it wouldn't explain why the process was running09:15
elkyais523, alt-tab shows nothing09:15
didrocksais523: for a gchar*, there is no difference between the 2 :)09:15
ais523what do you mean by that?09:15
elkyalt-tabbing through open windows09:16
ais523didrocks: how does g_free know it's a gchar* and not some sort of object09:16
ais523elky: as in, what you expect, or nothing at all?09:16
elkythere's nothing i can't attribute to something else09:16
ais523unity-2d-panel is almost certainly marked as not user-focusable09:16
elkyah ok09:16
ais523as it wouldn't make sense to put it in the alt-tab display for people who were actually running Unity 2D09:16
elkytrue09:17
elkyok well how can we check for it?09:17
ais523if you repeat that dbus-send command, but with RunningApplications rather than RunningApplicationsDesktopFiles, you get a list of internal names that bamf's using for the various applications09:18
ais523then you can try to figure out which is which using more dbus-sends09:18
elkyok... so i just ran unity again from alt-f2 out of curiosity. I now have another unity2d09:18
ais523two of them?09:18
elkywell 3. there were 2 before09:18
ais523ah09:18
elkythe *2 in pstree means 209:18
didrocksais523: sizeof(object), a gchar* is just an alias to a char*. g_free just handles NULL09:19
ais523didrocks: free also handles null09:19
didrocksare you sure? after so many years of glib… ;)09:19
ais523yes, it's one of the very few standard C library functions that doesn't segfault if you pass it NULL as an argument09:20
ais523(it does have a tendency to segfault when passed any other invalid input, though)09:20
ais523hmm, nothing in unity(1) implies that it tries to open unity-2d09:21
ais523it doesn't make any sense for compiz to open unity-2d, either09:21
elkyais523, ah wait. when you said alt+f2, was it supposed to do searching of apps? i have to hit alt again afterwards to get the single input bar09:21
ais523elky: the current window manager /is/ compiz, right? (you can check by seeing if a compiz process is running and if a metacity window is running)09:22
ais523and alt-f2 opens a run dialog box that is cunningly disguised as a lens09:22
ais523it's equivalent to running a one-liner in the terminal, except without the terminal, and it sometimes autocompletes in obnoxious ways09:23
elkycompiz and compiz-decorator are there, no metacity09:23
ais523right, so restarting unity - which restarts compiz - is somehow loading unity-2d-panel09:23
ais523but unity(1) doesn't mention unity-2d-panel anywhere, and compiz has no reason to load unity-2d-panel because they're incompatible with each other09:24
elkyais523, just making sure. I've had the lens autocomplete in some weird ways; its filtering out "unity-2d" launchers, so perhaps those unity2d things are there by me opening them accidentally09:24
ais523I was wondering about that09:24
ais523use a terminal to restart unity to make sure (see if you get another unity-2d-panel or not)09:24
ais523hmm, maybe I'll go complain about alt-f2's behaviour someday, its autocomplete is wonky enough to make it near-unusable sometimes09:25
elkyais523, it did a very much different screen redraw just then09:26
elkyand no additional unity2ds09:26
elkyais523, you have my permission to cite this chat log when you do ;)09:27
elkykilled all the unity-2d-panel processes now too09:28
=== yofel_ is now known as yofel
ais523anything visible happen when you did?09:28
ais523the screen redraw from restarting unity is really noticeable, it takes several seconds on my netbook09:29
elkykilling the 2ds didn't do anything visible. starting them made the top panel blink, doing `unity` made the screen go away then come back09:31
seb128elky, do you have any other unity-2d process? like launcher ones?09:31
elky(i may also have missed the panel blink when killing them)09:31
elkyseb128, not in pstree09:32
ais523OK, I think the unity-2d stuff was a red herring09:32
ais523BAMF is doing its job correctly, which means that the launcher is getting sane input; it's just producing insane output09:32
ais523is the launcher still messed up?09:32
ais523even after restarting unity?09:32
elkyhttp://paste.ubuntu.com/1000519/ is what shows for "unity"09:32
elkyais523, i agree, 2d was a red herring because alt+f2 needs to take a flying leap :)09:33
ais523that looks correct09:33
elkyok well if you're out of ideas, I can deal with stupified unity for a few days, ping me as you think of anything else09:35
ais523I'm not really out of ideas, just trying to narrow things down09:35
elkyok, cool09:35
ais523I think it's pretty clear that the problem is in unity-launcher somewhere09:36
elkyis there a way I can log the output that the launcher is producing?09:38
ais523not really, I guess you could use a screen recording program and video it09:38
elkyyeah i didn't phrase that well09:39
ais523I guess the next thing is to work out if all the icons are "in position"09:39
ais523you say that towards the bottom, they're really spread out?09:39
ais523is there anything "in between" them, that you can interact with with mouse hovering or clicking?09:39
elkythey're spread out the whole way along. and some are not even showing, they're somewhere "above" the panel. they can scroll, but i can't see the scrolling to control it09:40
elkyclicking between the tooltipped areas does nothing09:41
ais523I'm going to go look at the source for that bit09:42
elkyone thing seb was going to try, was having the icons shrunk down to 32 instead of the gigantic default size09:42
ais523I use 32 as my default size09:42
ais523system settings | behaviour | look, and it's the bottom control in the dialog box09:42
elkyyep i've always set my unity to that size09:43
elkyeven when it was experimental09:43
elkythe default size is just absurd on a netbook09:43
elkyespecially a shallow resolution like the hp minis09:43
ais523I set it from the experimental settings before I realised it was in the regular settings too :)09:44
elkysame09:44
elkyi actually didn't know it was there until seb told me when we debugged last time09:45
elkyother than changing what's pinned, that's really the only change i make from unity defaults09:46
ais523gah, why does this code use inconsistent names for everything everywhere09:47
ais523trying to work out what the difference between a tray and a menu view panel is, and which the launcher is09:49
elkythat could well be part of the problem ;)09:49
elkyNaming for all this wizzy gui stuff is confusing anyway. I still have no idea what to call the bar thingy that slides out. or what the top-of-the-screen thingy is. or what the big rectangular thingy is.09:51
elkyNobody seems to use the same words as the next person09:51
elkysome even use the same word for all of them!09:51
gordtop bit = panel, left bit = launcher, rectangular thingy = dash09:51
ais523sorry, IRC client just segfaulted…09:52
ais523the bar that slides out when you tap Alt is called the HUD; the big rectangular thing you get when you tap Super is the Dash (and each individual screen of it is called a Lens)09:53
ais523I don't actually know what the bar at the top of the screen is called; the bit over the right is the "indicator menu", but that doesn't seem to apply to the whole bar09:53
didrocksthe top bar is the panel09:55
ais523right, thanks09:55
ais523(and that makes sense by analogy with gnome 2)09:55
elkyheh09:57
ais523bleh, this program is mixing nux and two different sets of raw OpenGL calls09:57
ais523I sort-of get the feeling from Unity's source that it was written in a hurry09:57
gordno, nux was something we chose because we could mix opengl calls and nux09:58
ais523right, makes sense09:58
elkyais523, Don't go saying that too loud, the laughter might be deafening.09:58
ais523just makes the code hard to follow09:58
ais523I've been considering writing a drop-in replacement for BAMF using entirely different algorithms, just for fun really, to see how accurate I can get it09:59
ais523also because the current architecture of BAMF fails at corner cases and there's no obvious way to fix it09:59
ais523anyway, I have to /away for a while, got a seminar to attend…09:59
seb128ais523, can we encourage you to contribute fixes to the current code rather? ;-)10:00
elkyais523, i wonder, you know how you said rewriting the icon or launcher name or whatever can make it trip out if you do it too much... what about highlights in, say, irc?10:00
elkycould they bank up too high and make it flip out?10:00
elkyso like every time xchat gets pinged10:01
didrockstsdgeos: FYI, avoid to edit those patch by hand10:01
didrockstsdgeos: you didn't bump the lines number, and so the patch applies, but the package FTBFS as the file is truncated10:01
tsdgeosdidrocks: i didn't apply it byhand10:02
tsdgeosi got the source and then did some quilt stuff10:02
didrockstsdgeos: hum, weid, the line numbers didn't change, quilt would obviously change the lines10:02
didrocks@@ -0,0 +1,133 @@10:02
tsdgeosnot saying i did something wrong :D10:02
didrocksyour file is taking now more lines10:02
tsdgeostrue10:03
didrockswas scratching my head why the file was truncated :)10:03
tsdgeosthat part i hand edited, since for some reason my header was somehow different10:03
tsdgeosand took one line more10:03
tsdgeosmy quilt diff didn't have the Index: nautilus-3.5.1/src/unity-bookmarks-handler.c stuff10:04
tsdgeosso i copied it back10:04
tsdgeosobviously too much10:04
didrocksif I replay your patch to the vanilla version and quilt refresh, it's fine10:04
didrocksthe lines are bump10:04
didrocksbumped*10:04
tsdgeosgood10:04
tsdgeosso no need for me to update my patch?10:04
didrocksno no, was just a notice :)10:06
tsdgeosdidrocks: any idea why i can't change the status of https://code.launchpad.net/~aacid/nautilus/fix_quicklist_underscore to merged?10:43
tsdgeosit's *my* branch10:43
tsdgeosi should be able to change it, no?10:43
didrocksit is already merged, isn't it?10:44
didrocks(the status)10:44
didrockstsdgeos: the credential is the destination owner one, which makes sense10:44
didrocksas you are claiming it's merged into the destination10:44
tsdgeosdidrocks: status of the merge request is merged10:45
tsdgeosnot status of the branch itself10:45
tsdgeosunder the "Branch information" stuff10:45
didrockswhat is the status of the branch?10:45
didrockswhere do you see it?10:45
tsdgeosscroll down a bit10:45
tsdgeosunder the "Branch information" header in https://code.launchpad.net/~aacid/nautilus/fix_quicklist_underscore10:45
didrocksah10:45
tsdgeoscan you edit that?10:46
didrocksnever used that TBH after years of coding in launchpad and bzr :)10:46
didrocksno, I can't edit yours10:46
tsdgeosi usually have a yellow edit button there10:46
tsdgeosi can't edit mine either :D10:46
didrocksweird, I guess it's because you did it in the "nautilus" namespace10:46
tsdgeosthe problem if that if I don't set that to "merged" it still shows in https://code.launchpad.net/~aacid10:46
didrockswhich corresponds to upstream nautilus10:46
tsdgeospolluting my view of that10:47
didrockswhere we both don't have the right10:47
didrocks(same for the bug, you opened it against upstream nautilus)10:47
tsdgeosi didn't open it10:47
tsdgeosi reassigned it :D10:47
didrocksok, the guy opening it did it against the wrong component :)10:47
tsdgeosso it'll be there forever?10:47
didrocksmaybe try on #launchpad, ask them to change the status?10:47
tsdgeoswill do10:48
tsdgeostx10:48
didrocksbut yeah, the credential should be either project owner OR branch owner10:48
tsdgeosdidrocks: i wasn't logged in ... :D10:55
didrockstsdgeos: ok, so a sensible explanation in the end :)10:56
tsdgeosdo you guys what is responsible for the "eject even if busy" dialog when trying to eject a busy device?11:03
tsdgeosit doesn't really work11:04
tsdgeosand you end up in an infinite loop11:04
tsdgeosof pressing "eject, i don't care"11:04
tsdgeosand the dialog showing up again :D11:04
kwootCan anybody tell me how to add something globally to the launcher using a script? For a desktop post-install script, so before users are known to the system.11:18
bobweaverkwoot,  you are talking about packaging ? and postinst or preinst ?11:21
kwootHi alan_g, well at the moment simply a bash script to be run manually (it already adds our network printers and joins to the AD domain using likewise). I also want to add our time registration tool in the launcher (just to make it nice) and some dekstop items to shares that I try to mount using pam_mount.11:23
kwootalan_g: if there are postinst hooks to the standard iso image (like if exist file x then exec that thing) would also be very nice11:24
bobweaverkwoot,  that is in debconf11:24
kwootalan_g: but the most important thing right now is adding someting to the launcher.11:24
bobweaverfor servers set up or not qbiquity11:25
kwootbobweaver: what is? the launcher thing?11:25
bobweaveryou can make small script run form applications11:25
bobweaver /usr/share/applications/name.desktop11:25
bobweaverexec =  gnome-terminal -e 'bash -lc " CODE GOES HERE "';11:26
kwootbobweaver: i found the usr/share/applications dir but adding a file there does not mean it shows up in the launcher11:26
bobweaverreally ?11:26
bobweaverkwoot,  http://askubuntu.com/questions/35488/what-custom-launchers-and-unity-quicklists-are-available11:28
kwootMy postinst adds a desktop file to /usr/share/applications. Then when a user signs in he gets a fresh homedir and a desktop session, but not an extra launcher. So where is the current laucher configuration stored?11:28
bobweaverI dont know I am sorry11:28
kwootbobweaver: the url is great, thanks! But it only works for already existing users. I will however use some of the scripts in my setup. Great stuff!11:31
bobweaverKwoot I wonder if there is option to put in auto not sure thou11:33
ais523<seb128> ais523, can we encourage you to contribute fixes to the current code rather? ;-) <-- the problem is that the current matching algorithm of the code is almost entirely a) dependencies on things that are unsafe to depend on, and b) special cases11:49
seb128ais523, what do you consider "unsafe to depend on"? just curious11:49
ais523seb128: which desktop file was used to actually launch an application11:49
seb128ais523, I guess a lot of that has to do with experience, there is no clean way to do matching (or at least there was not at the time bamf was started, some things improved since)11:50
ais523measured by getting the window manager to add it as an X property to its window11:50
ais523this works in all the most common cases, but there are a lot of cases (multiple .desktop files for the same application, application closes its initial window and launches another, application launched from command line…) that make it fail11:50
seb128like there is lot of diffling around and hacks to support exotic setups11:50
ais523and it's quite easy to end up with multiple copies of the same command in the launcher11:51
ais523I sort-of have theories on how to do it in a cleaner way, but they're very experimental and so I wouldn't want to try to apply them to the current codebase11:51
seb128right, well experimentation is cool and maybe something great will come out of it ;-)11:51
seb128still we can probably fix some of those cases on what we have11:51
seb128like the "closes its initial window and launches another" is fixed in trunk11:52
seb128it's bug #99591611:52
ubot5Launchpad bug 995916 in unity (Ubuntu) "No launcher icon or Alt+Tab entry for Gimp windows" [High,Fix committed] https://launchpad.net/bugs/99591611:52
ais523seb128: that's not exactly the case I'm thinking of11:53
ais523with me, it happens with Wine; it'll match it to the correct Wine application on the initial window, then to the wrong Wine application on the reload11:53
ais523even with trunk bamf11:54
elkyais523, I'm still here for a short time if you have more ideas :P11:54
ais523unless I've got the wrong repo11:54
ais523elky: I'm reasonably sure it's a bug in the code that does the layout for the launcher11:54
ais523but I couldn't actually find the code in question11:55
=== MacSlow is now known as MacSlow|lunch
elkyso did you see my theory earlier?11:55
ais523no11:55
ais523seb128: that said, I've /also/ seen 995916, which at least seems possible to fix with the current codebase11:56
elkyhttp://paste.ubuntu.com/1000680/11:56
seb128ais523, it would be good if you open bugs about the buggy cases you run into, or chat about with DBO or Trevinho (they are the ones doing most of the bamf work)11:56
ais523elky: that can't be the problem by itself, but it might be what triggers it11:57
ais523as in, the bug's somewhere else, but that might be the codepath that causes the bug to expose11:57
ais523bamf really needs help from the actual applications to do everything I want it to do, sadly11:58
seb128ais523, the issue with things like "run something from the command line" is that you get virtually no info to match to an icon and proper user friendly name for the launcher entry11:58
ais523well, unless I'm allowed to run the applications at package install time to check how they behave (obviously ridiculous), or on the buildds (only slightly less ridiculous)11:58
Trevinhoais523: actually it doesn't make the difference from which desktop you run an app in BAMF...11:59
ais523seb128: well, a modification I'm already using in my local Unity is, if there's only one window of an application open, to show its title as the launcher entry tooltip rather than the name of the application11:59
seb128ais523, right, which is why toolkits got improved support11:59
ais523Trevinho: yes it does, this is very easily proved using any "run in terminal" launcher entry11:59
Trevinhoit matches windows, associating them to .desktop files... This doesn't depend on which one you used11:59
seb128ais523, could you please open bugs with infos about those? that might help to discuss them and come to solutions11:59
ais523it does, because which .desktop file you used is saved as an xprop on the window11:59
Trevinhoais523: that's another case...11:59
Trevinhoais523: when using a launcheritem you're running a bamfapplication... that is currently in non-running state.12:00
ais523so bamf itself is starting the application, and remembering the desktop because of that?12:00
elkyais523, if you agree that's a possibility, we ought to be able to test the hypothesis then12:00
ais523it comes to the same thing from the user interface point of view12:01
Trevinhono ais523... the application is ran by unity, but the bamfApplication is already opened... Not newly generated by the daemon12:01
ais523elky: I guess it wouldn't be too hard to write a simple application that used dbus to spam the launcher (rather than notify-osd) with notifications, would be useful for testing generally even if it doesn't solve this problem12:01
ais523Trevinho: let me go set up a test right now12:02
ais523this would be easier if gnome-open actually matched its documentation…12:02
Trevinhohowever ais523 I ensure you that there are so many corner cases that it's not so easy to handle everything in the same way12:02
ais523guess I'll use nautilus instead12:02
ais523Trevinho: I agree that there are loads of corner cases12:02
ais523however, many of the ones I've seen in bamf source (the OpenOffice special cases, for instance) could be handled in a more general way than special-casing one application12:02
Trevinhoais523: not sure about OO... Not everything of that codepath can be generalized12:03
Trevinhosome parts yes, but not everything12:03
Trevinhoais523: the wine case is something I'd like to work on, but I simply had other priorities before... However there I think that just having wine to generate .desktop files with StartupWMClass that matches the .exe file could be an improvement, even if I'm not sure he can do that on installation time12:04
ais523ooh, I was hoping there was something along the lines of StartupWMClass in the .desktop file format12:04
ais523Trevinho: hmm, so what I did was created three .desktop files in .local/share/applications, each of which opened a shell in a terminal, but with different names (two using the same shell, one using the third)12:06
Trevinhoais523: for example for the web-app code (chromium) I always tried to avoid to introduce too much special code only chromium-related... It worked well, but there are some cases where we can't just "think in general", so I had to accept that few codepaths depends on chromium itself, even if they're reduced to the minimum12:06
ais523I opened each of them via Nautilus, in order to avoid BAMF getting involved in the launch12:06
ais523and bamf grouped them all together, but separately from a terminal I launched via the launcher12:06
ais523and if I launch a terminal via keyboard shortcut, that one groups with the launcher terminal12:07
ais523anyway, one improvement I /would/ like to make is to recognise whether a launcher entry is a subset of another12:07
Trevinhoais523: can you give a try to this: https://code.launchpad.net/~3v1n0/bamf/better-wmclass-filter ?12:08
Trevinhoais523: they should be grouped together, unless they don't have a different startupWMClass...12:09
ais523OK, I merged your changes with the trunk I already had12:09
=== _salem is now known as salem_
Trevinhomake sure you reload both unity and bamfdaemon12:11
ais523I know12:11
ais523bleh, it put everything onto the same desktop, I forgot it does that when you restart Unity (although ofc it's inevitable)12:12
elkyais523, cool. well i'm going to head to bed now, let me know how you go with the test if you make it12:12
elkyI'll leave the machine in its broken state until i get totally pissed off at it, ping me with debug ideas if you need to12:13
ais523Trevinho: well, I get completely the same result as stock BAMF with respect to the terminals12:15
ais523but now I have two copies of Akregator, the pinned one and the one that's actually running12:15
ais523your patch seems to have chosen a better one than the one I had pinned12:16
Trevinhothat's weird...12:16
ais523bleh, testing this would be easier if I could just open a .desktop file from the command line12:17
ais523gnome-open is meant to do it, but it opens the .desktop file in gedit rather than running the application it describes12:17
ais523(and this is with executable bit set)12:18
ais523Trevinho: OK, here's one for you; if I open test1.desktop (which is not the same BAMF application as gnome-terminal.desktop), and also gnome-terminal.desktop, then run the command gnome-terminal in each, then the terminal opened from the test1 window is part of the test1 application, and the terminal opened from the gnome-terminal window is part of the gnome-terminal application12:19
ais523and yet I ran exactly the same command in each case12:19
* ais523 diffs the xprop output12:20
Trevinhowell... it depends how you started them...12:21
ais523let me try running /usr/share/applications/gnome-terminal.desktop from Nautilus12:21
Trevinhohave you used --disable-factory in one of them?12:22
ais523not intentionally12:22
TrevinhoI mean, they're two different proceses...12:22
ais523oh, interesting: gnome-terminal.desktop groups with test112:22
Trevinhowell, if they matches the content is right...12:23
Trevinhojust gnome-terminal.desktop should have an higher priority12:23
Trevinhodepending on where is placed in your system and its basename12:23
ais523so test1 is in .local/share/applications, gnome-terminal is in /usr/share/applications12:24
Trevinhoso test1 has an higher prio12:24
ais523now, if I close all test1 windows, then open test2 via Nautilus, it counts as a test2 window not a test1 window12:25
ais523and if I then open test1, it counts as a test2 window too12:25
ais523(this is with your BAMF)12:26
ais523and I now have way too many terminal windows, let me close some12:26
ais523priority seems to be involved in the desktop files I'm opening /somehow/, but it's unclear how BAMF is getting at that information12:27
ais523oh, must be zeitgeist, obviously12:28
Trevinhowell... the idea is that if the .desktop files are pointing to the same app, then they're basically all the same from a launching point of view... The difference is that the first .desktop on the priority list is used... Until you don't pin another to the launcher12:28
ais523if I open a launcher from Nautilus, it puts it in zeitgeist, and then BAMF is looking at that to determine the highest priority…12:28
ais523does BAMF know what is and isn't pinned, by the way?12:28
Trevinhoais523: yes, it's possible that something sets the .desktop files as xproperty12:29
Trevinhoyes12:29
ais523Nautilus doesn't, I checked that one12:29
ais523set an xproperty, I mean12:29
Trevinhofavorite applications daemon-side are the applications on the launcher, even if not opened12:29
ais523but it does add zeitgeist entries for .desktop files it opens12:29
ais523and that must be shuffling the priorities around12:30
Trevinhoais523: need to go now... brb, feel free to report me your tests and results... If you add some debugging bits to src/bamf-matcher.c bamf_matcher_setup_window_state could help you in understanding what's going on12:32
ais523I find bamf's source pretty hard to follow, unfortunately, but I got the general gist of what it's doing12:32
ais523the algorithm I was wondering about was giving score for matching in a wide range of categories (window class, command line, window role, and even things like title and icon), and choosing the best match that way12:33
Trevinhoais523: yes, the matcher is a little bit tricky... but the main part is happening there about associating windows to applications12:33
ais523and ideally it'd be able to get a list of the URLs (files or whatever) open in each window of an application, to allow matching against a launcher that's one specific file rather than a whole application12:34
Trevinhowe're mostly using win class, command line, pids... Even if the pid (and so opened files) could cause some confusions for apps like chromium that have one pid for all sub-apps...12:36
ais523I don't see how the PID could help directly, it's an arbitrary number each time12:38
ais523do you mean the procfiles for the PID?12:38
* Zhenech looks over to tedg and whispers: meeeeerge ;)12:51
=== seb128 is now known as robert_ancell
=== robert_ancell is now known as seb128
=== MacSlow|lunch is now known as MacSlow
mhall119tedg: got a minute for a quick PM?13:41
Trevinhoais523: the pid helps when programs set the xproperty PID value to a window, so we can get from that the ran proc, and then the associated .desktop file13:51
=== andyrock|uni is now known as andyrock
tedgmhall119, No, calls all morning... this afternoon?14:00
mhall119tedg: sure, just let me know when you have a few minutes, it shouldn't take long14:04
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
=== nhandler_ is now known as nhandler
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
=== bregma_ is now known as bregma
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
=== salem_ is now known as _salem

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!