Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Conn O'Griofa
Hi Kurt,

 I've been using dnsmasq (a lightweight alternative) on my computers to do the 
 job and it works great. By default, dnsmasq only replies to 127.0.0.1:53 
 request, so this wouldn't introduce security weakness.

 Besides having a DNS cache (like dnsmasq) installed by default, the dhclient 
 add 127.0.0.1 as the first name server in /etc/resolv.conf.

 openSUSE is the only Linux distribution that has a DNS cache out of the box. 
 They just provide the nscd package installed by default.

 This is a pretty easy, simple, powerful feature. I strongly recommend it to 
 be implemented.

 How can I truly submit this proposal? My blueprint has been untouched and 
 unread for the last yo years.

I would like to add my support for this idea. I (and I assume several
others) have problems with slow DNS lookups on my Ubuntu installations
when compared to Windows; see bug #94940 [1]. Perhaps a DNS caching
server such as dnsmasq would alleviate the symptoms of that bug.

However, if dnsmasq were to be integrated into the default
installation (and the package was pre-configured as per the dnsmasq
wiki's instructions [2]), there would be a conflict with
NetworkManager.

As you can see from the community instructions, you need to edit your
/etc/resolv.conf and add the local machine's address (127.0.0.1) as
your first nameserver. This is a problem because any changes to this
file will be overwritten by NetworkManager each time it initializes a
new connection (which is warned in the commented section of the file).
The only solution that I am aware of, is to edit your active network
connection in NetworkManager's applet, change the setting from
Automatic (DHCP) to Automatic (DHCP) addresses only, and then
manually input your DNS servers like so: 127.0.0.1, your regular DNS
server 1, your regular DNS server 1.

If we are going to integrate dnsmasq into the default installation it
may serve us better to investigate the possibility of adding some kind
of autodetection of the presence of dnsmasq to NetworkManager itself.
We cannot expect users to manually edit their network connections for
each new installation (or indeed, each new wireless network profile
they create).

Let me also mention that dnsmasq has the capability of providing ICS
(internet connection sharing) [3]. This would be an excellent feature
to add to NetworkManager's graphical interface, which is yet another
feature that competing operating systems provide by default.

Thanks,
Conn

[1] https://bugs.launchpad.net/ubuntu/+source/nss-mdns/+bug/94940
[2] https://help.ubuntu.com/community/Dnsmasq
[3] https://help.ubuntu.com/community/Internet/ConnectionSharing

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Bruno Girin
On Wed, 2010-06-02 at 09:50 +0100, Conn O'Griofa wrote:
 Hi Kurt,
 
[snip]

 As you can see from the community instructions, you need to edit your
 /etc/resolv.conf and add the local machine's address (127.0.0.1) as
 your first nameserver. This is a problem because any changes to this
 file will be overwritten by NetworkManager each time it initializes a
 new connection (which is warned in the commented section of the file).
 The only solution that I am aware of, is to edit your active network
 connection in NetworkManager's applet, change the setting from
 Automatic (DHCP) to Automatic (DHCP) addresses only, and then
 manually input your DNS servers like so: 127.0.0.1, your regular DNS
 server 1, your regular DNS server 1.

And this in turn would break configurations where the DHCP server
provides the name of the DNS server to clients when they connect. Such a
configuration is extremely common for any network where people are
transient (public and semi-public networks like libraries, company
networks where users move from office to office, etc).


 
 If we are going to integrate dnsmasq into the default installation it
 may serve us better to investigate the possibility of adding some kind
 of autodetection of the presence of dnsmasq to NetworkManager itself.
 We cannot expect users to manually edit their network connections for
 each new installation (or indeed, each new wireless network profile
 they create).

I second that: integrating whatever solution (like dnsmasq) with NM is
essential.


 
 Let me also mention that dnsmasq has the capability of providing ICS
 (internet connection sharing) [3]. This would be an excellent feature
 to add to NetworkManager's graphical interface, which is yet another
 feature that competing operating systems provide by default.

It would be very nice indeed.

Bruno



-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Andreas Wenning
Hi

On Wednesday 02 June 2010 11:19:06 Bruno Girin wrote:
 On Wed, 2010-06-02 at 09:50 +0100, Conn O'Griofa wrote:
  Hi Kurt,
 
 [snip]
 
  As you can see from the community instructions, you need to edit your
  /etc/resolv.conf and add the local machine's address (127.0.0.1) as
  your first nameserver. This is a problem because any changes to this
  file will be overwritten by NetworkManager each time it initializes a
  new connection (which is warned in the commented section of the file).
  The only solution that I am aware of, is to edit your active network
  connection in NetworkManager's applet, change the setting from
  Automatic (DHCP) to Automatic (DHCP) addresses only, and then
  manually input your DNS servers like so: 127.0.0.1, your regular DNS
  server 1, your regular DNS server 1.
 
 And this in turn would break configurations where the DHCP server
 provides the name of the DNS server to clients when they connect. Such a
 configuration is extremely common for any network where people are
 transient (public and semi-public networks like libraries, company
 networks where users move from office to office, etc).

When using DNS provided by DHCP the solution is easy.

NetworkManager uses dhclient; so the solution is simply to make the change 
there. In /etc/dhcp3/dhclient.conf the line:
prepend domain-name-servers 127.0.0.1;
should be present.

This will make all programs use dnsmasq by default; and dnsmasq does by 
default filter out the 127.0.0.1 address and use the servers provided by DHCP.

I haven't tested what happens, if you give NetworkManager static DNS 
addresses; I suppose you would then not use dnsmasq. So we need to find a way 
to make it work in that case.

[snip]

Cheers,
Andreas
- - -
 ,-¤.  Kubuntu Linux
¤; http://www.kubuntu.org
 `-¤'  Linux for Human Beings

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Kurt Kraut
Hi,


My proposal can integrate easily with NetworkManager. It is requires a
single line change in /etc/dhcp3/dhclient.conf:

prepend domain-name-servers 127.0.0.1;

This will make NetworkManager to always add 127.0.0.1 as the first DNS
server and all DNS servers it will receive by DHCP will be added below
127.0.0.1 in /etc/resolv.conf

So, to implement my proposal, the following simple tasks should be done:

1) Add dnsmasq or nscd as a package to be installed by default in Ubuntu
2) Change a single line in /etc/dhcp3/dhclient.conf as a mentioned.

And voi lá! DNS cache by default. There are several blogs in the internet
teaching how to manually create a DNS cache. I'll point
http://embraceubuntu.com/2006/08/02/local-dns-cache-for-faster-browsing/ as
an example.


I personally see this so easy to implement that DNS cache could be activade
since Ubuntu 10.10.


Thanks for all your comments,


Kurt Kraut

2010/6/2 Conn O'Griofa connogri...@gmail.com

 Hi Kurt,

  I've been using dnsmasq (a lightweight alternative) on my computers to do
 the job and it works great. By default, dnsmasq only replies to
 127.0.0.1:53 request, so this wouldn't introduce security weakness.
 
  Besides having a DNS cache (like dnsmasq) installed by default, the
 dhclient add 127.0.0.1 as the first name server in /etc/resolv.conf.
 
  openSUSE is the only Linux distribution that has a DNS cache out of the
 box. They just provide the nscd package installed by default.
 
  This is a pretty easy, simple, powerful feature. I strongly recommend it
 to be implemented.
 
  How can I truly submit this proposal? My blueprint has been untouched and
 unread for the last yo years.

 I would like to add my support for this idea. I (and I assume several
 others) have problems with slow DNS lookups on my Ubuntu installations
 when compared to Windows; see bug #94940 [1]. Perhaps a DNS caching
 server such as dnsmasq would alleviate the symptoms of that bug.

 However, if dnsmasq were to be integrated into the default
 installation (and the package was pre-configured as per the dnsmasq
 wiki's instructions [2]), there would be a conflict with
 NetworkManager.

 As you can see from the community instructions, you need to edit your
 /etc/resolv.conf and add the local machine's address (127.0.0.1) as
 your first nameserver. This is a problem because any changes to this
 file will be overwritten by NetworkManager each time it initializes a
 new connection (which is warned in the commented section of the file).
 The only solution that I am aware of, is to edit your active network
 connection in NetworkManager's applet, change the setting from
 Automatic (DHCP) to Automatic (DHCP) addresses only, and then
 manually input your DNS servers like so: 127.0.0.1, your regular DNS
 server 1, your regular DNS server 1.

 If we are going to integrate dnsmasq into the default installation it
 may serve us better to investigate the possibility of adding some kind
 of autodetection of the presence of dnsmasq to NetworkManager itself.
 We cannot expect users to manually edit their network connections for
 each new installation (or indeed, each new wireless network profile
 they create).

 Let me also mention that dnsmasq has the capability of providing ICS
 (internet connection sharing) [3]. This would be an excellent feature
 to add to NetworkManager's graphical interface, which is yet another
 feature that competing operating systems provide by default.

 Thanks,
 Conn

 [1] https://bugs.launchpad.net/ubuntu/+source/nss-mdns/+bug/94940
 [2] https://help.ubuntu.com/community/Dnsmasq
 [3] https://help.ubuntu.com/community/Internet/ConnectionSharing

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Mohammed Bassit


 Let me also mention that dnsmasq has the capability of providing ICS
 (internet connection sharing) [3]. This would be an excellent feature
 to add to NetworkManager's graphical interface, which is yet another
 feature that competing operating systems provide by default.

This is already implemented in NetworkManager. I believe dnsmasq-base is
included by default in Lucid (in Karmic too I think).
You only need to select Shared to other computers when edit the IPv4
settings of a network connection [1].

As to caching DNS, I agree that it could significantly speed up the
loading of certain websites. I'm going to try installing dnsmasq and see
how it works out for me. 

Thanks,


[1] 
http://jeremy.visser.name/2009/03/24/simple-internet-connection-sharing-with-networkmanager/


-- 
Mohammed Bassit webceo...@gmail.com




-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Martin Owens
On Wed, 2010-06-02 at 14:41 +0100, Mohammed Bassit wrote:
 This is already implemented in NetworkManager. I believe dnsmasq-base
 is
 included by default in Lucid (in Karmic too I think).
 You only need to select Shared to other computers when edit the IPv4
 settings of a network connection [1]. 

Yes that's right, of course the design is rather ghastly at the moment,
but perhaps with attention the connection sharing could be more useful
by being discoverable.

Martin,


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Proposal: DNS cache by default for ubuntu-desktop

2010-06-02 Thread Mohammed Bassit

On Wed, 2010-06-02 at 10:29 -0400, Martin Owens wrote:
 On Wed, 2010-06-02 at 14:41 +0100, Mohammed Bassit wrote:
  This is already implemented in NetworkManager. I believe dnsmasq-base
  is
  included by default in Lucid (in Karmic too I think).
  You only need to select Shared to other computers when edit the IPv4
  settings of a network connection [1]. 
 
 Yes that's right, of course the design is rather ghastly at the moment,
 but perhaps with attention the connection sharing could be more useful
 by being discoverable.
 
 Martin,
 

Frankly I don't like the NetworkManager UI that much anyway. So yeah I
agree that it needs some love to make certain useful-but-unkown features
more discoverable.

Thanks,
Mohammed


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Why Nautilus and GNOME applications use URIs?

2010-06-02 Thread Christopher Lees
On Wed, 2010-06-02 at 11:07 +0100,
ubuntu-devel-discuss-requ...@lists.ubuntu.com wrote:
 Message: 1
 Date: Tue, 01 Jun 2010 23:39:40 -0300
 From: Dami?n Nohales damiannoha...@gmail.com
 Subject: Why Nautilus and GNOME applications use URIs?
 To: ubuntu-devel-discuss@lists.ubuntu.com
 Message-ID: 4c05c46c.1040...@gmail.com
 Content-Type: text/plain; charset=utf-8
 
 The issue is that when I use Ubuntu, I use a lot of SSH, FTP and Samba 
 connections through GVFS. These connections, if I don't mistake, are 
 mounted on the folder /home/user/.gvfs via FUSE, but in most GNOME 
 desktop applications gain access to these through URIs 
 (sftp://u...@server/path) instead of through your local address 
 (/home/user/.gvfs/sftp to user at server/path), the truth is that using 
 URIs instead of the local address is really annoying when working with 
 the system, especially with Nautilus.
 
 You see, not all applications support the GVFS URIs, which makes 
 difficult its integration with the GNOME desktop for the user, and 
 difficults to much in the use of the system (at least to me).
 For instance, the Meld diff viewer, a program is fairly common, but I 
 see that does not support GVFS URIs, this makes me a lot of bad things: 
 I can not drag and drop remote files from Nautilus to Meld, it will not 
 recognize (I don't know because it contradicts the use of Open With 
 ... in which local address is sending to Meld); In Open / Save dialogs 
 do not appear Nautilus Bookmarks to remote folders, so I have to look 
 hand (why use Bookmarks so :(?); on the other hand, the Nautilus scripts 
 and extensions do not work on remote folders; I can not copy from the 
 address bar in Nautilus the direction as I would in other programs ...

Fully agreed. It's a leaky abstraction - you're mounting the remote
drive as though it was a local disk, but then you can't actually use it
like a local disk. Dragging and dropping files from Nautilus onto
Open/Save dialogs brings up the message that you can't do that with
remote filesystems.

Ironically, you can drag and drop from Nautilus onto KDE programs with
no problems.

I can't think why it has been implemented in this way, because it
doesn't make sense and the leakiness of the abstraction causes you to
NOT use it!


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Why Nautilus and GNOME applications use URIs?

2010-06-02 Thread Aurélien Naldi
On Thu, Jun 3, 2010 at 6:57 AM, Christopher Lees
christopher_l...@iprimus.com.au wrote:
 On Wed, 2010-06-02 at 11:07 +0100,

 The issue is that when I use Ubuntu, I use a lot of SSH, FTP and Samba
 connections through GVFS. These connections, if I don't mistake, are
 mounted on the folder /home/user/.gvfs via FUSE, but in most GNOME
 desktop applications gain access to these through URIs
 (sftp://u...@server/path) instead of through your local address
 (/home/user/.gvfs/sftp to user at server/path), the truth is that using
 URIs instead of the local address is really annoying when working with
 the system, especially with Nautilus.

 You see, not all applications support the GVFS URIs, which makes
 difficult its integration with the GNOME desktop for the user, and
 difficults to much in the use of the system (at least to me).
 For instance, the Meld diff viewer, a program is fairly common, but I
 see that does not support GVFS URIs, this makes me a lot of bad things:
 I can not drag and drop remote files from Nautilus to Meld, it will not
 recognize (I don't know because it contradicts the use of Open With
 ... in which local address is sending to Meld); In Open / Save dialogs
 do not appear Nautilus Bookmarks to remote folders, so I have to look
 hand (why use Bookmarks so :(?); on the other hand, the Nautilus scripts
 and extensions do not work on remote folders; I can not copy from the
 address bar in Nautilus the direction as I would in other programs ...

 Fully agreed. It's a leaky abstraction - you're mounting the remote
 drive as though it was a local disk, but then you can't actually use it
 like a local disk. Dragging and dropping files from Nautilus onto
 Open/Save dialogs brings up the message that you can't do that with
 remote filesystems.

 Ironically, you can drag and drop from Nautilus onto KDE programs with
 no problems.

Hi,

when using Drag and Drop, nautilus switches from GIO/GVFS URI to local
path, depending on the drop target (i.e. it will paste a local path if
you drop to a gnome-terminal). I guess dropping on a gtk filechooser
assumes that the application is using GIO. It may need some special
casing for this case. On one hand, if an application is gtk-based it
really should use gio, on the other hand  I think at least firefox and
openoffice use gtk file chooser and won't use it.

For GIO-based applications, using the GIO URI is much better, but as
far as I remember, several applications transform local paths into GIO
URIs, so providing a local path should always work.

Best regards.

-- 
Aurélien Naldi

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss