* [Bluez-devel] bluez-gnome and OBEX DBus names
@ 2008-04-30 7:42 Florian Echtler
2008-05-09 12:50 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Florian Echtler @ 2008-04-30 7:42 UTC (permalink / raw)
To: BlueZ development
[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]
Hello everyone,
I'm running bluez-gnome 0.26 and obex-data-server 0.3 from Gentoo. My
Bluetooth setup is running fine, with the exception of OBEX reception.
When I start the bluetooth-applet from a shell, I get the warning
"Bluetooth OBEX start failed: Invalid path". A bit of dbus-monitoring
shows that this error comes from the OBEX server:
method call sender=:1.96 -> dest=org.openobex
path=/org/openobex/server1; interface=org.openobex.Server; member=Start
string ""
boolean true
boolean true
error sender=:1.94 -> dest=:1.96
error_name=org.openobex.Error.InvalidArguments reply_serial=16
string "Invalid path"
A look in ods-server.c shows that it's testing for the first parameter
of the method call to be an existing directory, but the bluetooth-applet
is passing an empty string.. and this is because the applet uses
g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE) and
g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD) to retrieve the
directory names.
So, I now have one suggestion - see the attached patch, two small error
checks to make debugging this _much_ easier - and one question:
how is the average user (yes, there are such things now ;-) expected to
know how to set these *!$%& directories? I needed 20 minutes of glib
source diving to find the relevant code - why doesn't Gnome, e.g., set
this automatically?
Thanks, Yours, Florian
--
0666 - Filemode of the Beast
[-- Attachment #2: bluez-gnome-0.26-patch --]
[-- Type: text/x-patch, Size: 759 bytes --]
diff -ur applet-old/obex.c applet/obex.c
--- applet-old/obex.c 2008-04-30 09:29:57.000000000 +0200
+++ applet/obex.c 2008-04-30 09:30:28.000000000 +0200
@@ -139,6 +139,9 @@
dir = g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
+ if (!dir)
+ g_printerr("Warning: G_USER_DIRECTORY_DOWNLOAD not set - check ~/.config/user-dirs.dirs!");
+
dbus_g_proxy_begin_call(opp_server, "Start",
start_opp_notify, NULL, NULL,
G_TYPE_STRING, dir,
@@ -206,6 +209,9 @@
dir = g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE);
+ if (!dir)
+ g_printerr("Warning: G_USER_DIRECTORY_PUBLIC_SHARE not set - check ~/.config/user-dirs.dirs!");
+
dbus_g_proxy_begin_call(ftp_server, "Start",
start_ftp_notify, NULL, NULL,
G_TYPE_STRING, dir,
[-- Attachment #3: Type: text/plain, Size: 320 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Bluez-devel] bluez-gnome and OBEX DBus names
2008-04-30 7:42 [Bluez-devel] bluez-gnome and OBEX DBus names Florian Echtler
@ 2008-05-09 12:50 ` Marcel Holtmann
2008-05-09 13:19 ` Bastien Nocera
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2008-05-09 12:50 UTC (permalink / raw)
To: BlueZ development
Hi Florian,
> I'm running bluez-gnome 0.26 and obex-data-server 0.3 from Gentoo. My
> Bluetooth setup is running fine, with the exception of OBEX reception.
> When I start the bluetooth-applet from a shell, I get the warning
> "Bluetooth OBEX start failed: Invalid path". A bit of dbus-monitoring
> shows that this error comes from the OBEX server:
>
> method call sender=:1.96 -> dest=org.openobex
> path=/org/openobex/server1; interface=org.openobex.Server; member=Start
> string ""
> boolean true
> boolean true
>
> error sender=:1.94 -> dest=:1.96
> error_name=org.openobex.Error.InvalidArguments reply_serial=16
> string "Invalid path"
>
> A look in ods-server.c shows that it's testing for the first parameter
> of the method call to be an existing directory, but the bluetooth-applet
> is passing an empty string.. and this is because the applet uses
> g_get_user_special_dir(G_USER_DIRECTORY_PUBLIC_SHARE) and
> g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD) to retrieve the
> directory names.
>
> So, I now have one suggestion - see the attached patch, two small error
> checks to make debugging this _much_ easier - and one question:
the patch has been applied. Thanks.
> how is the average user (yes, there are such things now ;-) expected to
> know how to set these *!$%& directories? I needed 20 minutes of glib
> source diving to find the relevant code - why doesn't Gnome, e.g., set
> this automatically?
Actually GNOME should do this. However if you kept upgrading GNOME over
time from an old installation, it might have missed it. Don't ask me
details, but for a clean installation it is set.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] bluez-gnome and OBEX DBus names
2008-05-09 12:50 ` Marcel Holtmann
@ 2008-05-09 13:19 ` Bastien Nocera
0 siblings, 0 replies; 3+ messages in thread
From: Bastien Nocera @ 2008-05-09 13:19 UTC (permalink / raw)
To: BlueZ development
On Fri, 2008-05-09 at 14:50 +0200, Marcel Holtmann wrote:
<snip>
> > how is the average user (yes, there are such things now ;-) expected to
> > know how to set these *!$%& directories? I needed 20 minutes of glib
> > source diving to find the relevant code - why doesn't Gnome, e.g., set
> > this automatically?
>
> Actually GNOME should do this. However if you kept upgrading GNOME over
> time from an old installation, it might have missed it. Don't ask me
> details, but for a clean installation it is set.
Not GNOME actually, but xdg-user-dirs[1]. A decent installation should
have this running in the user's session, and Nautilus allows you to
rename/move the directories and keep the configuration up-to-date as
expected.
[1]: http://freedesktop.org/wiki/Software/xdg-user-dirs
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-09 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 7:42 [Bluez-devel] bluez-gnome and OBEX DBus names Florian Echtler
2008-05-09 12:50 ` Marcel Holtmann
2008-05-09 13:19 ` Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).