You are not logged in.

#1 2010-05-24 17:57:26

Psycho_zs
Member
Registered: 2010-05-24
Posts: 18

compiz launch directory

Hi all!
I've noticed strange thng about compiz: it runs from /, not from ~/
If I launch gnome-terminal with compiz keybinding, it opens in /
If I type "nautilus ." in bashrun, launched with compiz keybinding, then nautilus opens in /
Everything launches correclty in ~/ when using metacity.

Where can I find compiz default dir?

Offline

#2 2010-05-24 21:24:35

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: compiz launch directory

how do you launch compiz?

Offline

#3 2010-05-25 03:22:05

Psycho_zs
Member
Registered: 2010-05-24
Posts: 18

Re: compiz launch directory

nope, it looks more like gnome-settings-daemon problem
Anything, that is launched by gnome-settings-daemon custom keybinding appears to have / as current dir. And it can not exec commands like "cd && bashrun"
I launched compiz from bashrun, so it inherited the dir.

Any thoughts about how to fix g-s-d?

launching g-s-d manually from ~/ does not help.

Last edited by Psycho_zs (2010-05-25 03:24:45)

Offline

#4 2010-05-25 06:06:49

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: compiz launch directory

yep. Looks like the "keyboard shortcuts" in gnome works from /

However if you use compiz, you can use the "commands" plugins to run commands..
(This assuming you can launch compiz correctly)

I launch fusion-icon from gnome session startup programs, and have no issue with its path.

Offline

#5 2010-05-25 09:39:20

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: compiz launch directory

IMHO, gnome shouldn't do that. However, to work around this for bashrun, simply add "cd $HOME" at the end of .config/bashrun/rc. Then applications started from bashrun should inherit its cwd.

Offline

#6 2010-05-25 16:18:02

Psycho_zs
Member
Registered: 2010-05-24
Posts: 18

Re: compiz launch directory

I remember bumping into same thing in ubuntu, so I'd better post a bug about g-s-d upstream...
https://bugzilla.gnome.org/show_bug.cgi?id=619631

Offline

#7 2010-05-25 17:11:36

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: compiz launch directory

I just took a look at the source of gnome-settings-daemon and found this in main.c:

 static void
daemon_detach (void)
{
...
       /* get outta the way */
        chdir ("/");
}

So they're doing it on purpose, it seems. I don't use gnome, but I guess commenting out that line won't hurt. Maybe there's a reason they're doing it, though.

Offline

#8 2010-06-10 12:44:32

martindemello
Member
Registered: 2009-01-16
Posts: 13

Re: compiz launch directory

From the ubuntu bugzilla thread: https://bugs.launchpad.net/ubuntu/+bug/373111

Here's a workaround: Using gconf-editor and editing the run_command_* and command_* in /apps/metacity/global_keybindings and /apps/metacity/keybinding_commands, respectively. Keyboard shortcuts created this way will start the applications with the correct environment.

Offline

Board footer

Powered by FluxBB