* networkmanager hostname woes
@ 2017-09-13 10:05 Thomas Danckaert
2017-09-13 17:01 ` Christopher Baines
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Thomas Danckaert @ 2017-09-13 10:05 UTC (permalink / raw)
To: help-guix
Hi Guix,
since the change to networkmanager, I've been running into the
following problem: when I connect to a wireless network using
networkmanager, I can no longer start graphical applications
(starting any program fails with “cannot open display :0.0” and
similar messages).
AFAIU, the cause is that networkmanager changes my hostname (after
DHCP?), in my case to “new-host2” or something similar, and this
seems to break the X session. When I manually restore the hostname
with “sudo hostname <original-hostname>”, the problem is solved. Is
there anyway to disable this behaviour for networkmanager?
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-13 10:05 networkmanager hostname woes Thomas Danckaert
@ 2017-09-13 17:01 ` Christopher Baines
2017-09-13 23:27 ` Arun Isaac
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Christopher Baines @ 2017-09-13 17:01 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
On Wed, 13 Sep 2017 12:05:29 +0200 (CEST)
Thomas Danckaert <thomas.danckaert@aeronomie.be> wrote:
> since the change to networkmanager, I've been running into the
> following problem: when I connect to a wireless network using
> networkmanager, I can no longer start graphical applications
> (starting any program fails with “cannot open display :0.0” and
> similar messages).
>
> AFAIU, the cause is that networkmanager changes my hostname (after
> DHCP?), in my case to “new-host2” or something similar, and this
> seems to break the X session. When I manually restore the hostname
> with “sudo hostname <original-hostname>”, the problem is solved. Is
> there anyway to disable this behaviour for networkmanager?
I've had this too, it's very frustrating. Luckilly, I think I found a
workaround. I created /etc/hostname and put the machines hostname in
it, and I don't think I've had the issue since.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-13 10:05 networkmanager hostname woes Thomas Danckaert
2017-09-13 17:01 ` Christopher Baines
@ 2017-09-13 23:27 ` Arun Isaac
2017-09-14 6:38 ` Christopher Baines
2017-09-15 12:14 ` ng0
[not found] ` <87h8w6ha74.fsf@gmail.com>
2017-09-14 8:17 ` Ludovic Courtès
3 siblings, 2 replies; 14+ messages in thread
From: Arun Isaac @ 2017-09-13 23:27 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix
Thomas Danckaert writes:
> Hi Guix,
>
> since the change to networkmanager, I've been running into the
> following problem: when I connect to a wireless network using
> networkmanager, I can no longer start graphical applications
> (starting any program fails with “cannot open display :0.0” and
> similar messages).
>
> AFAIU, the cause is that networkmanager changes my hostname (after
> DHCP?), in my case to “new-host2” or something similar, and this
> seems to break the X session. When I manually restore the hostname
> with “sudo hostname <original-hostname>”, the problem is solved. Is
> there anyway to disable this behaviour for networkmanager?
I have the exact same problem too. If somebody has a solution, I'd like
to hear about it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-13 23:27 ` Arun Isaac
@ 2017-09-14 6:38 ` Christopher Baines
2017-09-15 12:14 ` ng0
1 sibling, 0 replies; 14+ messages in thread
From: Christopher Baines @ 2017-09-14 6:38 UTC (permalink / raw)
To: Arun Isaac; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
On Thu, 14 Sep 2017 04:57:05 +0530
Arun Isaac <arunisaac@systemreboot.net> wrote:
> Thomas Danckaert writes:
>
> > Hi Guix,
> >
> > since the change to networkmanager, I've been running into the
> > following problem: when I connect to a wireless network using
> > networkmanager, I can no longer start graphical applications
> > (starting any program fails with “cannot open display :0.0” and
> > similar messages).
> >
> > AFAIU, the cause is that networkmanager changes my hostname (after
> > DHCP?), in my case to “new-host2” or something similar, and this
> > seems to break the X session. When I manually restore the hostname
> > with “sudo hostname <original-hostname>”, the problem is solved.
> > Is there anyway to disable this behaviour for networkmanager?
>
> I have the exact same problem too. If somebody has a solution, I'd
> like to hear about it.
I created /etc/hostname and put the machines hostname in it, and I
don't think I've had the issue since. Perhaps try that?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
[not found] ` <87h8w6ha74.fsf@gmail.com>
@ 2017-09-14 7:50 ` Thomas Danckaert
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Danckaert @ 2017-09-14 7:50 UTC (permalink / raw)
To: alex.sassmannshausen; +Cc: help-guix
From: Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
Subject: Re: networkmanager hostname woes
Date: Wed, 13 Sep 2017 17:47:43 +0200
>> AFAIU, the cause is that networkmanager changes my hostname (after
>> DHCP?), in my case to “new-host2” or something similar, and this
>> seems to break the X session. When I manually restore the hostname
>> with “sudo hostname <original-hostname>”, the problem is solved.
>> Is
>> there anyway to disable this behaviour for networkmanager?
> [...]
> This makes me think that it might be a network configuration
> derived issue — but I have not been able to get to the bottom of
> this
> yet…
>
> I see that you might be based in Belgium — I am too, and my home
> network
> uses most of the defaults from Proximus' B-Box 2. If this is the
> case
> for you too, then perhaps it is a matter of the default settings in
> that
> router?
Yes, I'm using the same router, and I can agree it's not
“professional”-grade :-). Still, I don't think a bad router
configuration should be able to change my hostname.
Following Christopher Baines' suggestion, I created /etc/hostname by
adding the following to my system configuration:
(define etc-hostname-service-type
(service-type (name 'etc-hostname)
(extensions
(list (service-extension etc-service-type
(lambda (hostname)
(list `("hostname"
,(plain-file "hostname" hostname)))))))))
and in the (operating-system (services ...)) list:
(service etc-hostname-service-type host-name)
I don't know if this kind of extension should be added to an existing
service (networkmanager itself, perhaps?). Though I have the feeling
a more proper solution should exist.
From what I've read, it might also be a DHCP issue: some DHCP
clients are configured to take on the hostname offered by the
router, perhaps that could/should be changed? I see that wicd has
its own settings for these things (/etc/wicd/wireless-settings.conf
contains things like usedhcphostname = 0). I'm hoping someone with
more experience can give some advice here :)
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-13 10:05 networkmanager hostname woes Thomas Danckaert
` (2 preceding siblings ...)
[not found] ` <87h8w6ha74.fsf@gmail.com>
@ 2017-09-14 8:17 ` Ludovic Courtès
2017-09-15 10:12 ` Thomas Danckaert
3 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-09-14 8:17 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix
Hi Thomas,
Thomas Danckaert <thomas.danckaert@aeronomie.be> skribis:
> AFAIU, the cause is that networkmanager changes my hostname
I’ve never experienced this (even though I don’t have /etc/hostname),
but that looks like a serious bug we should fix. Why would NM fiddle
with the host name?
I see that NM implements a “SetHostname” D-Bus RPC, and ‘nmtui’ has a
menu item to change the host name.
In NM, the ‘update_system_hostname’ function has this comment:
/* Hostname precedence order:
*
* 1) a configured hostname (from settings)
* 2) automatic hostname from the default device's config (DHCP, VPN, etc)
* 3) the last hostname set outside NM
* 4) reverse-DNS of the best device's IPv4 address
*
*/
Then nm-settings.c has code to deal with host names in all sort of
unpredictable ways. To give you an idea:
--8<---------------cut here---------------start------------->8---
#define HOSTNAME_FILE_DEFAULT "/etc/hostname"
#define HOSTNAME_FILE_UCASE_HOSTNAME "/etc/HOSTNAME"
#define HOSTNAME_FILE_GENTOO "/etc/conf.d/hostname"
[...]
#if defined(HOSTNAME_PERSIST_SUSE)
#define HOSTNAME_FILE HOSTNAME_FILE_UCASE_HOSTNAME
#elif defined(HOSTNAME_PERSIST_SLACKWARE)
#define HOSTNAME_FILE HOSTNAME_FILE_UCASE_HOSTNAME
#elif defined(HOSTNAME_PERSIST_GENTOO)
#define HOSTNAME_FILE HOSTNAME_FILE_GENTOO
#else
#define HOSTNAME_FILE HOSTNAME_FILE_DEFAULT
#endif
[...]
static gchar *
read_hostname_gentoo (const char *path)
--8<---------------cut here---------------end--------------->8---
So, like Chris wrote, it honors /etc/hostname or /etc/HoSTNaM3 depending
on the phase of the moon.
I don’t understand the logic in there, but a quick fix would be to have
‘network-manager-service-type’ create /etc/hostname.
What do people think?
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-14 8:17 ` Ludovic Courtès
@ 2017-09-15 10:12 ` Thomas Danckaert
2017-09-15 20:34 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Danckaert @ 2017-09-15 10:12 UTC (permalink / raw)
To: ludo; +Cc: help-guix
From: ludo@gnu.org (Ludovic Courtès)
Subject: Re: networkmanager hostname woes
Date: Thu, 14 Sep 2017 10:17:08 +0200
> I don’t understand the logic in there, but a quick fix would be to have
> ‘network-manager-service-type’ create /etc/hostname.
>
> What do people think?
I agree. What is the best way to do that?
- make network-manager-service extend etc-service? I think in this
case we'd need to pass the host-name to
network-manager-service-type somehow? It feels strange to make the
system config's host-name a configuration parameter of
network-manager-service-type just for this reason.
- Create /etc/hosts in network-manager activation, using the result
of ‘hostname’ at that point?
- ...?
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-13 23:27 ` Arun Isaac
2017-09-14 6:38 ` Christopher Baines
@ 2017-09-15 12:14 ` ng0
2017-09-15 12:34 ` ng0
2017-09-16 6:57 ` Thomas Danckaert
1 sibling, 2 replies; 14+ messages in thread
From: ng0 @ 2017-09-15 12:14 UTC (permalink / raw)
To: Arun Isaac; +Cc: Thomas Danckaert, help-guix
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
Arun Isaac transcribed 0.8K bytes:
>
> Thomas Danckaert writes:
>
> > Hi Guix,
> >
> > since the change to networkmanager, I've been running into the
> > following problem: when I connect to a wireless network using
> > networkmanager, I can no longer start graphical applications
> > (starting any program fails with “cannot open display :0.0” and
> > similar messages).
> >
> > AFAIU, the cause is that networkmanager changes my hostname (after
> > DHCP?), in my case to “new-host2” or something similar, and this
> > seems to break the X session. When I manually restore the hostname
> > with “sudo hostname <original-hostname>”, the problem is solved. Is
> > there anyway to disable this behaviour for networkmanager?
>
> I have the exact same problem too. If somebody has a solution, I'd like
> to hear about it.
I don't understand your problem. This is public documented behavior of
NM.
Assuming that we build networkmanager with dhclient option/configure:
add to /etc/dhcp/dhclient.conf:
send host-name "yourhostname";
This always worked for me on Gentoo.
--
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://www.krosos.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-15 12:14 ` ng0
@ 2017-09-15 12:34 ` ng0
2017-09-16 6:57 ` Thomas Danckaert
1 sibling, 0 replies; 14+ messages in thread
From: ng0 @ 2017-09-15 12:34 UTC (permalink / raw)
To: Arun Isaac, Thomas Danckaert, help-guix
[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]
ng0 transcribed 2.3K bytes:
> Arun Isaac transcribed 0.8K bytes:
> >
> > Thomas Danckaert writes:
> >
> > > Hi Guix,
> > >
> > > since the change to networkmanager, I've been running into the
> > > following problem: when I connect to a wireless network using
> > > networkmanager, I can no longer start graphical applications
> > > (starting any program fails with “cannot open display :0.0” and
> > > similar messages).
> > >
> > > AFAIU, the cause is that networkmanager changes my hostname (after
> > > DHCP?), in my case to “new-host2” or something similar, and this
> > > seems to break the X session. When I manually restore the hostname
> > > with “sudo hostname <original-hostname>”, the problem is solved. Is
> > > there anyway to disable this behaviour for networkmanager?
> >
> > I have the exact same problem too. If somebody has a solution, I'd like
> > to hear about it.
>
> I don't understand your problem. This is public documented behavior of
> NM.
> Assuming that we build networkmanager with dhclient option/configure:
>
> add to /etc/dhcp/dhclient.conf:
>
> send host-name "yourhostname";
>
>
> This always worked for me on Gentoo.
I read the full thread again, our problem might be different
but providing this file might be a fix which could work.
--
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://www.krosos.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-15 10:12 ` Thomas Danckaert
@ 2017-09-15 20:34 ` Ludovic Courtès
2017-09-16 12:03 ` Thomas Danckaert
0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-09-15 20:34 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix
Thomas Danckaert <post@thomasdanckaert.be> skribis:
> From: ludo@gnu.org (Ludovic Courtès)
> Subject: Re: networkmanager hostname woes
> Date: Thu, 14 Sep 2017 10:17:08 +0200
>
>> I don’t understand the logic in there, but a quick fix would be to have
>> ‘network-manager-service-type’ create /etc/hostname.
>>
>> What do people think?
>
> I agree. What is the best way to do that?
>
> - make network-manager-service extend etc-service? I think in this
> case we'd need to pass the host-name to
> network-manager-service-type somehow? It feels strange to make the
> system config's host-name a configuration parameter of
> network-manager-service-type just for this reason.
>
> - Create /etc/hosts in network-manager activation, using the result
> of ‘hostname’ at that point?
>
> - ...?
Hmm, good points. Maybe just create /etc/hostname unconditionally from
‘essential-services’? It can’t hurt, right?
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-15 12:14 ` ng0
2017-09-15 12:34 ` ng0
@ 2017-09-16 6:57 ` Thomas Danckaert
2017-09-16 8:11 ` ng0
1 sibling, 1 reply; 14+ messages in thread
From: Thomas Danckaert @ 2017-09-16 6:57 UTC (permalink / raw)
To: ng0; +Cc: help-guix
From: ng0 <ng0@infotropique.org>
Subject: Re: networkmanager hostname woes
Date: Fri, 15 Sep 2017 12:14:49 +0000
> Arun Isaac transcribed 0.8K bytes:
>>
>> Thomas Danckaert writes:
>>
>> > AFAIU, the cause is that networkmanager changes my hostname
>> (after
>> > DHCP?), in my case to “new-host2” or something similar, and this
>> > seems to break the X session. When I manually restore the
>> hostname
>> > with “sudo hostname <original-hostname>”, the problem is solved.
>> Is
>> > there anyway to disable this behaviour for networkmanager?
>>
>> I have the exact same problem too. If somebody has a solution, I'd
>> like
>> to hear about it.
>
> I don't understand your problem.
The problem is that changing the hostname after starting an X
session, breaks that session.
> This is public documented behavior of NM.
Can you point me to the networkmanager documentation? Could help to
find a proper way to configure this (adding some configuration
options to our networkmanager service perhaps). I couldn't
immediately find anything helpful.
> Assuming that we build networkmanager with dhclient
> option/configure:
seems like we do: the networkmanager package in in
gnu/packages/gnome.scm has an option (string-append
"--with-dhclient=" dhclient)))
> add to /etc/dhcp/dhclient.conf:
>
> send host-name "yourhostname";
I think some people prefer not to send their own hostname to any
router they connect to (assuming that's what “send host-name” does
:-) ). Do you think creating /etc/hostname instead is not a good
solution?
Thanks!
Thomas
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-16 6:57 ` Thomas Danckaert
@ 2017-09-16 8:11 ` ng0
0 siblings, 0 replies; 14+ messages in thread
From: ng0 @ 2017-09-16 8:11 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]
Thomas Danckaert transcribed 2.2K bytes:
> From: ng0 <ng0@infotropique.org>
> Subject: Re: networkmanager hostname woes
> Date: Fri, 15 Sep 2017 12:14:49 +0000
>
> > Arun Isaac transcribed 0.8K bytes:
> > >
> > > Thomas Danckaert writes:
> > >
> > > > AFAIU, the cause is that networkmanager changes my hostname (after
> > > > DHCP?), in my case to “new-host2” or something similar, and this
> > > > seems to break the X session. When I manually restore the
> > > hostname
> > > > with “sudo hostname <original-hostname>”, the problem is solved.
> > > Is
> > > > there anyway to disable this behaviour for networkmanager?
> > >
> > > I have the exact same problem too. If somebody has a solution, I'd
> > > like
> > > to hear about it.
> >
> > I don't understand your problem.
>
> The problem is that changing the hostname after starting an X session,
> breaks that session.
>
> > This is public documented behavior of NM.
>
> Can you point me to the networkmanager documentation?
Not documented as in documentation, but that this is known by
other systems. I've never read the documentation of NM in all
the years I've known this.
> Could help to find a
> proper way to configure this (adding some configuration options to our
> networkmanager service perhaps). I couldn't immediately find anything
> helpful.
>
> > Assuming that we build networkmanager with dhclient option/configure:
>
> seems like we do: the networkmanager package in in gnu/packages/gnome.scm
> has an option (string-append "--with-dhclient=" dhclient)))
>
> > add to /etc/dhcp/dhclient.conf:
> >
> > send host-name "yourhostname";
>
> I think some people prefer not to send their own hostname to any router they
> connect to (assuming that's what “send host-name” does :-) ). Do you think
> creating /etc/hostname instead is not a good solution?
>
> Thanks!
>
> Thomas
I don't have any opinion or further help, I just shared what I know
hoping that it could maybe help with further decisions.
How is not sharing your hostname with any router you connect to
a privacy option?
Assuming you don't share it with your local router, looking just
at email it still ends up (in the default case, if not set to forget
on the server) with computers inbetween you, me and gnu.org and
everyone and their email servers. You just have to be aware that the
net is insecure and broken.
Of course we can have a default hostname.
And if /etc/hostname helps to solve the initial problem, go for it.
--
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://krosos.org/dist/keys/
https://www.infotropique.org https://www.krosos.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-15 20:34 ` Ludovic Courtès
@ 2017-09-16 12:03 ` Thomas Danckaert
2017-09-19 12:06 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Danckaert @ 2017-09-16 12:03 UTC (permalink / raw)
To: ludo, guix-patches; +Cc: help-guix
[-- Attachment #1: Type: Text/Plain, Size: 1297 bytes --]
From: ludo@gnu.org (Ludovic Courtès)
Subject: Re: networkmanager hostname woes
Date: Fri, 15 Sep 2017 22:34:44 +0200
> Thomas Danckaert <post@thomasdanckaert.be> skribis:
>
>> From: ludo@gnu.org (Ludovic Courtès)
>> Subject: Re: networkmanager hostname woes
>> Date: Thu, 14 Sep 2017 10:17:08 +0200
>>
>>> I don’t understand the logic in there, but a quick fix would be
>>> to have
>>> ‘network-manager-service-type’ create /etc/hostname.
>>>
>>> What do people think?
>>
>> I agree. What is the best way to do that?
>>
>> - make network-manager-service extend etc-service? I think in
>> this
>> case we'd need to pass the host-name to
>> network-manager-service-type somehow? It feels strange to make
>> the
>> system config's host-name a configuration parameter of
>> network-manager-service-type just for this reason.
>>
>> - Create /etc/hosts in network-manager activation, using the
>> result
>> of ‘hostname’ at that point?
>>
>> - ...?
>
> Hmm, good points. Maybe just create /etc/hostname unconditionally
> from
> ‘essential-services’? It can’t hurt, right?
I don't think so, only for people committed to extreme minimalism.
The attached patch fixes the issue on my system. Will it do?
Thomas
[-- Attachment #2: 0001-system-Create-etc-hostname.patch --]
[-- Type: Text/X-Patch, Size: 975 bytes --]
From 76a461ff1540807d8beb98c298a8ea0165a6aaa4 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Sat, 16 Sep 2017 13:54:40 +0200
Subject: [PATCH] system: Create "/etc/hostname".
* gnu/system.scm (operating-system-etc-service): Add a plain-file with the
operating-system-host-name.
---
gnu/system.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/system.scm b/gnu/system.scm
index bb7e8531e..2ad4b3054 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -642,6 +642,7 @@ fi\n")))
("bashrc" ,#~#$bashrc)
("hosts" ,#~#$(or (operating-system-hosts-file os)
(default-/etc/hosts (operating-system-host-name os))))
+ ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
("localtime" ,(file-append tzdata "/share/zoneinfo/"
(operating-system-timezone os)))
("sudoers" ,(operating-system-sudoers-file os))))))
--
2.14.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: networkmanager hostname woes
2017-09-16 12:03 ` Thomas Danckaert
@ 2017-09-19 12:06 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-09-19 12:06 UTC (permalink / raw)
To: Thomas Danckaert; +Cc: help-guix, guix-patches
Hi Thomas!
Thomas Danckaert <post@thomasdanckaert.be> skribis:
> From: ludo@gnu.org (Ludovic Courtès)
> Subject: Re: networkmanager hostname woes
> Date: Fri, 15 Sep 2017 22:34:44 +0200
[...]
>> Hmm, good points. Maybe just create /etc/hostname unconditionally
>> from
>> ‘essential-services’? It can’t hurt, right?
>
> I don't think so, only for people committed to extreme minimalism.
> The attached patch fixes the issue on my system. Will it do?
>
> Thomas
>
> From 76a461ff1540807d8beb98c298a8ea0165a6aaa4 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert <thomas.danckaert@gmail.com>
> Date: Sat, 16 Sep 2017 13:54:40 +0200
> Subject: [PATCH] system: Create "/etc/hostname".
>
> * gnu/system.scm (operating-system-etc-service): Add a plain-file with the
> operating-system-host-name.
> ---
> gnu/system.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index bb7e8531e..2ad4b3054 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -642,6 +642,7 @@ fi\n")))
> ("bashrc" ,#~#$bashrc)
> ("hosts" ,#~#$(or (operating-system-hosts-file os)
> (default-/etc/hosts (operating-system-host-name os))))
> + ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
LGTM. Maybe just add a comment pointing to this discussion, so we know
why this file matters.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-09-19 12:07 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 10:05 networkmanager hostname woes Thomas Danckaert
2017-09-13 17:01 ` Christopher Baines
2017-09-13 23:27 ` Arun Isaac
2017-09-14 6:38 ` Christopher Baines
2017-09-15 12:14 ` ng0
2017-09-15 12:34 ` ng0
2017-09-16 6:57 ` Thomas Danckaert
2017-09-16 8:11 ` ng0
[not found] ` <87h8w6ha74.fsf@gmail.com>
2017-09-14 7:50 ` Thomas Danckaert
2017-09-14 8:17 ` Ludovic Courtès
2017-09-15 10:12 ` Thomas Danckaert
2017-09-15 20:34 ` Ludovic Courtès
2017-09-16 12:03 ` Thomas Danckaert
2017-09-19 12:06 ` Ludovic Courtès
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 read-only IMAP folder(s) and NNTP newsgroup(s).