On Sat, Nov 24, 2012 at 12:20:32PM +0100, Jörg-Volker Peetz wrote:
> as already reported in the Debian bug tracking system
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687615 ) I encountered the
> following problem with lxpanel version 0.5.10:
> 
> setting "Terminal=urxvt" in the main config file does not work, while
> setting "Terminal=xterm" is o.k. With the urxvt setting the terminal is
> terminated immediately. Looking for the cause, I noticed that lxpanel
> appends a blank to the exec-command given in the desktop file used for the
> menu generation.
> 
> For example with octave, lxpanel tries to launch a command made up of
> three strings:
> 
> "urxvt", "-e", "/usr/bin/octave "
...
> Possibly this is an error in the code of lxpanel.

Not sure if I caught the right place for this, but can you test the
attached patch?


Thanks,
Henry
>From 7d4426ddcac16e1aff178a688f7f708a1c2bfa2d Mon Sep 17 00:00:00 2001
From: Henry Gebhardt <[email protected]>
Date: Sat, 24 Nov 2012 11:13:44 -0500
Subject: [PATCH] src/misc: translate_app_exec_to_command_line() don't append
 space at end

urxvt cannot handle spaces at the end, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687615
---
 src/misc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/misc.c b/src/misc.c
index 64f9382..a9fe385 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1429,7 +1429,8 @@ static char* translate_app_exec_to_command_line( const char* pexec,
                     file = g_shell_quote( tmp );
                     g_free( tmp );
                     g_string_append( cmd, file );
-                    g_string_append_c( cmd, ' ' );
+                    if (l->next)
+                        g_string_append_c( cmd, ' ' );
                     g_free( file );
                 }
                 add_files = TRUE;
@@ -1453,7 +1454,8 @@ static char* translate_app_exec_to_command_line( const char* pexec,
                     file = (char*)l->data;
                     tmp = g_shell_quote( file );
                     g_string_append( cmd, tmp );
-                    g_string_append_c( cmd, ' ' );
+                    if (l->next)
+                        g_string_append_c( cmd, ' ' );
                     g_free( tmp );
                 }
                 add_files = TRUE;
@@ -1476,7 +1478,8 @@ static char* translate_app_exec_to_command_line( const char* pexec,
                     file = g_shell_quote( tmp );
                     g_free( tmp );
                     g_string_append( cmd, file );
-                    g_string_append_c( cmd, ' ' );
+                    if (l->next)
+                        g_string_append_c( cmd, ' ' );
                     g_free( file );
                 }
                 add_files = TRUE;
@@ -1529,13 +1532,12 @@ static char* translate_app_exec_to_command_line( const char* pexec,
 _finish:
     if( ! add_files )
     {
-        g_string_append_c ( cmd, ' ' );
         for( l = file_list; l; l = l->next )
         {
+            g_string_append_c( cmd, ' ' );
             file = (char*)l->data;
             tmp = g_shell_quote( file );
             g_string_append( cmd, tmp );
-            g_string_append_c( cmd, ' ' );
             g_free( tmp );
         }
     }
@@ -1564,6 +1566,7 @@ gboolean lxpanel_launch_app(const char* exec, GList* files, gboolean in_terminal
             g_free(cmd);
         cmd = term_cmd;
     }
+    LOG(LOG_INFO, "lxpanel: spawning \"%s\"...\n", cmd);
     if (! g_spawn_command_line_async(cmd, &error) ) {
         ERR("can't spawn %s\nError is %s\n", cmd, error->message);
         g_error_free (error);
-- 
1.8.0

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to