Hi, There are at least three programs in LXDE that are used to launch an application: pcmanfm, lxlauncher, and lxpanel.
lxpanel has a bug when an application needs to be started in their own working directory, as specified in their .desktop file. The bug report is below. pcmanfm does not have this bug, but lxlauncher probably does, too. What to do? lxlauncher and lxpanel have the same copy-and-pasted code, but with slight differences (oh no!). Specifically, I am talking about the function translate_app_exec_to_command_line(), which in lxlauncher is called from lxlauncher_execute_app(), and in lxpanel from lxpanel_launch_app(). Should we create a new library, or is there a better alternative? Should this code be included in menu-cache? Thanks, Henry On Fri, Feb 22, 2013 at 12:00:50AM -0800, SourceForge.net wrote: > Bugs item #3598840, was opened at 2012-12-29 03:00 > Message generated for change (Comment added) made by > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=894869&aid=3598840&group_id=180858 > > Please note that this message will contain a full copy of the comment thread, > including the initial issue submission, for this request, > not just the latest update. > Category: lxpanel > Group: None > Status: Open > Resolution: None > Priority: 5 > Private: No > Submitted By: terzag () > Assigned to: Nobody/Anonymous (nobody) > Summary: LXPanel Menu doesn't use Path in desktop files > > Initial Comment: > In the Freedesktop specifications for .desktop files > (http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html), > there is a Path key that can be used to set the working directory for an > application. Some apps require to be run from their own dir to work (because > they look for their data files in the current directory) and the Path key is > used just for that. > It seems that the LXPanel Menu applet doesn't use the Path key (or fails to > set the right directory) and when an application needs it, it just fails to > start when run from the menu. > > I'm not sure what the right way to fix this is (simply cd-ing to the right > dir or setting an environment var?) but it should be quite simple. For the > record, running software from the Applications entry of PCManFM works fine. > > Using LXPanel 0.5.11 from the Ubuntu 12.10 repositories. > > > ---------------------------------------------------------------------- > > Comment By: PowerPup () > Date: 2013-02-22 00:00 > > Message: > Okay, was totally wrong last time. :P > > In LXPanel's misc.c there's a function called lxpanel_launch_app(): > http://sourcecodebrowser.com/lxpanel/0.5.5/misc_8c.html#a92623acde5b503a468d41876c618a510 > > This is what is called when an item left-clicked in the launchbar: > http://sourcecodebrowser.com/lxpanel/0.5.5/launchbar_8c.html#a88f69c292653fbdf1a06c717cc6b1c3e > > The function lxpanel_launch_app() does not appear to manage working paths > at all. (Unlike LXLauncher's lxlauncher_execute_app, both functions are so > similar that I got confused. :P Should have realized it was the wrong > program.) > > ---------------------------------------------------------------------- > > Comment By: PowerPup () > Date: 2013-02-21 12:30 > > Message: > Found the issue: > http://lxde.git.sourceforge.net/git/gitweb.cgi?p=lxde/lxlauncher;a=blob;f=src/lxlauncher.c;h=e450f15c5b0aeb4373c108cbb2f9b2bba9c3e12c;hb=c0ed230f74a36f49e22dc4b96958c84336a5dcc2 > > Lines 82-89 contains the functions that executes when clicking an > application from the menu. > > 82 static void on_app_btn_clicked( GtkButton* btn, MenuCacheApp* app ) > 83 { > 84 lxlauncher_execute_app( gdk_screen_get_default(), > 85 NULL, > menu_cache_app_get_exec(app), > 86 > menu_cache_item_get_name(MENU_CACHE_ITEM(app)), NULL, > 87 > menu_cache_app_get_use_terminal(app), > 88 NULL ); > 89 } > > The second parameter in lxlauncher_execute_app() (which defines the working > path) is NULL, it should be: menu_cache_app_get_working_dir(app) > > 82 static void on_app_btn_clicked( GtkButton* btn, MenuCacheApp* app ) > 83 { > 84 lxlauncher_execute_app( gdk_screen_get_default(), > 85 > menu_cache_app_get_working_dir(app), menu_cache_app_get_exec(app), > 86 > menu_cache_item_get_name(MENU_CACHE_ITEM(app)), NULL, > 87 > menu_cache_app_get_use_terminal(app), > 88 NULL ); > 89 } > > ---------------------------------------------------------------------- > > Comment By: PowerPup () > Date: 2013-02-21 11:34 > > Message: > I can confirm this in Lubuntu 12.10, as I cannot run CaveStory+ from the > menu. (But runs fine from the desktop.) > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=894869&aid=3598840&group_id=180858 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Lxde-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxde-list
