GNOME Bugzilla – Bug 155913
'Add to panel->launcher' failed when logged in as root in solaris.
Last modified: 2005-05-12 09:06:59 UTC
Steps to reproduce: 1. Right click panel, and choose 'add to panel->launcher' in the popup menu 2. 'create launcher' dialog will popup. enter some text in name field and enter 'gedit' in command field, then click ok. Bug:Error dialog popup and show:can't save launcher to disk.
Created attachment 32815 [details] [review] Patch fixes the bug. This happens only on solaris machines, here `g_get_home_dir ()` returns "/" for the `root`, and not as "/root" as in case of linux. Here we use `gnome_util_home_file` macro to get the path, which internally concatenates "/" with home_dir. Hence the Path will be set to "//.gnome2/...." instead of "/.gnome2/....". Then later on gnome-vfs calls (gnome_vfs_create_uri()) are made, where it is not able to create a uri for this. Hence the bug. This bug can be fixed by using `g_build_filename` instead of `g_strconcat` in `gnome_util_home_file` macro (which is a part of libgnome), which returns proper path.
Has this been tested on other platforms than Solaris so we don't fix it on one and break it on others?
Yes, It works fine on both Solaris and linux.
Ok. Commited on both branches.