Opened 8 years ago

Last modified 6 years ago

#13867 new patch

gnome-shell/Gnome3: Use GNOME Proxy Settings

Reported by: lesnoland Owned by:
Milestone: Patches Needing Improvement Component: libpurple
Version: 2.7.11 Keywords: gnome3 network proxy

Description (last modified by lesnoland)

Sorry for the constant modifications.

Gnome3 changed the way it is handling the Network Proxy settings, and pidgin is no longer working with it.

Network Settings:

As I see in gtkprefs.c, pidgin is looking for 'gnome-network-properties' and 'gnome-network-preferences' which no longer exist, they were replaced by 'gnome-control-center network'. Adding 'gnome-control-center network' will assure backward compatibility with Gnome2 and also will provide a way to 'Configure' the Network Proxy from the control center.

LibPurple? Grab Proxy:

I have looked in the libpurple code and I found in proxy.c libpurple is trying to grab the settings using gconftool-2. This was replaced in Gnome3 by 'gsettings'. I will provide an example below on how commands should be executed to grab the same output.

Grab socks5 proxy from the system:

Gnome2: gconftool-2 -g /system/proxy/socks_host

Gnome3: gsettings get org.gnome.system.proxy.socks host

Grab system proxy mode:

gsettings get org.gnome.system.proxy mode

Grab all stuff:

gsettings list-schemas | grep proxy

gsettings list-keys org.gnome.system.proxy

I hope this helps, as I am not familiar enough with the libpurple code to create a patch.

Attachments (2)

proxy.c.patch (6.3 KB) - added by lesnoland 8 years ago.
Gnome3 LibPurple? Socks Patch
proxy.c.GSettings.API.patch (6.5 KB) - added by lesnoland 8 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by datallah

  • Status changed from new to pending

There's no patch here.

comment:2 Changed 8 years ago by lesnoland

  • Description modified (diff)
  • Status changed from pending to new
  • Type changed from patch to defect

comment:3 Changed 8 years ago by lesnoland

  • Description modified (diff)

comment:4 Changed 8 years ago by lesnoland

  • Description modified (diff)

comment:5 Changed 8 years ago by lesnoland

  • Description modified (diff)
  • Type changed from defect to enhancement

Changed 8 years ago by lesnoland

Gnome3 LibPurple? Socks Patch

comment:6 Changed 8 years ago by lesnoland

Added a working patch, supports socks5 for now.

Patch is backward compatible with Gnome2.

Changed 8 years ago by lesnoland

comment:7 Changed 8 years ago by lesnoland

  • Type changed from enhancement to patch

Added another patch. Cleared up all the 'bad' code from Gnome2 and implemented GSettings API (the required way to communicate with Gnome). This patch supports SOCKS/HTTP but is not compatible with Gnome2.

comment:8 Changed 7 years ago by QuLogic

Ticket #15122 has been marked as a duplicate of this ticket.

comment:9 Changed 7 years ago by QuLogic

  • Keywords gnomeshell removed
  • Milestone set to Patches Needing Improvement

I would like to apply this second patch, but there are way too many unnecessary comments, and the indenting is completely wrong.

comment:10 Changed 7 years ago by salinasv

Any news on this?

Also, I don't think our current supported version of glib have gio. Maybe it will be needed to add some compatibility #if.

comment:11 Changed 6 years ago by abustany


I'd be willing to give the original patch some love, but would like to agree on the general direction first:

  1. I'd probably like to split the gnome specific proxy handling in a separate file, but if you'd rather keep it one in one file it's fine with me as well.
  2. As salinasv pointed out, we probably need to ifdef the GSettings implementation, so that it only gets compiled in for GLib > 2.26. Fallback would be to just use the global proxy information, I'd drop the g_spawn hacks.
  3. If required, we can probably support gnome 2 as well, in that case I'd use the actual gconf libs.

comment:12 Changed 6 years ago by abustany

Note, another option would be to use libproxy and get the proxy handled correctly for free. After thinking about it, it might be a wiser option? That would pull in a new dependency though (although libproxy itself is lightweight, only the plugin add dependencies).

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!