Re: Scripts behavior



On 14 Apr 2003, Johnathan Bailes wrote:

> 
> > >From my reading of the code its supposed to change to the directory the 
> > view displays. If it doesn't, that is a bug and will be fixed some day.
> > However, if you use NAUTILUS_SCRIPT_CURRENT_URI now that will continue to 
> > work the day when we fix this.
> > 
> > -- 
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >  Alexander Larsson                                            Red Hat, Inc 
> >                    alexl redhat com    alla lysator liu se 
> > He's a time-tossed coffee-fuelled cyborg on the hunt for the last specimen of 
> > a great and near-mythical creature. She's a violent thirtysomething 
> > archaeologist on the trail of a serial killer. They fight crime! 
> 
> Sorry for the late reply Alexander and Nautilus-hacker elite.
> 
> I thought that should be the default behavior as well but on the
> g-scripts nautilus scripting site they explained my problem to a T and
> the behavior seemed to indicate the issue was directly related to the
> script actually being executed in the $HOME dir and not the directory
> being viewed.  
> 
> I found a bug that seemed to be directly related.  Bug #110407
> 
> I am running RedHat9 could this be a factor?
> 
> I have my scripts hacked together to work though.  
> 
> Thanks for all the hard work.  
 
Ah, this seems to be a problem with the libegg 
egg_screen_execute_command_line_async function. It always uses $home as 
cwd in the multi-head case. In the non-multihead case it uses 
g_spawn_command_line_async () which uses cwd.

This patch changes this behaviour:
Index: egg-screen-exec.c
===================================================================
RCS file: /cvs/gnome/nautilus/cut-n-paste-code/libegg/egg-screen-exec.c,v
retrieving revision 1.1
diff -u -p -r1.1 egg-screen-exec.c
--- egg-screen-exec.c	6 Nov 2002 10:39:04 -0000	1.1
+++ egg-screen-exec.c	16 Apr 2003 09:21:13 -0000
@@ -247,7 +247,7 @@ egg_screen_execute_command_line_async (G
 	if (gdk_screen_get_default () != screen)
 		envp = egg_screen_exec_environment (screen);
 
-	retval = g_spawn_async (g_get_home_dir (),
+	retval = g_spawn_async (NULL,
 				argv, envp, G_SPAWN_SEARCH_PATH,
 				NULL, NULL, NULL, error);
 	g_strfreev (argv);


 
Mark. Do you want to change this in libegg?


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a lonely chivalrous dwarf on a search for his missing sister. She's a 
mistrustful Buddhist lawyer from out of town. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]