View Single Post
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#697
Originally Posted by marmistrz View Post
Hi
How is it determined whether a app is treated as blacklisted or not? Which part of executable is taken?
Why does blacklisting
Code:
brainparty
Launched by
Code:
/opt/brainparty/brainparty
works but blacklisting
Code:
allegro
launched by
Code:
meecolay /opt/allegro/bin/allegro
doesn't work, and blacklisting
Code:
meecolay
doesn't work too?

Sorry if posting in the wrong thread
I'm asking about it as it's connected with the development of MeeCoLay
marmistrz, I don't have meecolay installed right now, but by looking at the package contents at http://maemo.org/packages/package_in...ay-core/0.9.1/ , /usr/bin/meecolay is just a script... so it is in fact a /bin/sh (which on my device is linked to busybox, so in fact busybox?) process... Have you tried blacklisting busybox? If not, please do it and check what happens

Another case is how the resulting program is run - it is a child process created from busybox /bin/sh via "exec the_real_app_command". Even if my considerations don't have any sense or or just plain wrong, I hope they give more details for other guys here working on cssu to answer your question better and quicker.

Edit 1 (maybe will edit later if I work out what does that code do): see http://gitorious.org/community-ssu/h.../hd-comp-mgr.c , lines 3804 - 3855 (EDIT 2: SORRY I GAVE YOU WRONG LINES EARLIER)

Edit 3: here we go according to
Code:
gboolean hd_comp_mgr_is_blacklisted(MBWindowManager *wm, MBWindowManagerClient *c)
...
XClassHint class_hint;
...
ret = XGetClassHint (wm->xdpy, c->window->xwindow, &class_hint);
...
if (ret && class_hint.res_class)
   wname = g_strdup(class_hint.res_name);
...
if (g_strrstr(blacklist, wname) && !(c->portrait_supported || c->portrait_requested))
   blacklisted = TRUE;
...
if(c->stacked_below && (wname == NULL))
   if(hd_comp_mgr_is_blacklisted(wm, c->stacked_below))
      blacklisted = TRUE;
The window will be blacklisted when one of following conditions is made:
1. XClassHint.res_name for the created window is on the blacklisted list
2. MBWindowManagerClient->portait_supported is false (I doubt you can do anything about this one...)
3. The window stacked below (parent window as I understand) does not support portrait and this window's XClassHint.res_name is null... This option also is a no-go for you, as you rather cannot set XClassHint.res_name for a window created by external aplication being run by your script... Besides, I think this is only for child dialogs of other apps, etc.

There is also line
Code:
gboolean blacklisted = hd_comp_mgr_is_blacklisted_parse_desktop_file(wname, class_hint.res_class, c->window->pid);
somewhere between those lines - so maybe after creating a .desktop file with X-CSSU-Force-Landscape=true, the problem will be solved?

I think you should try to do something with the first option - getting res_name of XClassHint structure for windows created by different apps and blacklist them all... UNLESS you play with qt-components and e.g. create your own qt which sets this value as e.g. 'marmistrz rocks' for all windows and blacklist this value

sorry for TOTAL offtopic, this is better for Development section of TMO...

Edit 4: fixed few little typos and grammar errors

Last edited by misiak; 2012-06-10 at 14:41.
 

The Following 6 Users Say Thank You to misiak For This Useful Post: