Renaming USB-LAN dongle iface for gui logon with gdm on Xorg
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
[4.13.9-1-ARCH with gdm on Xorg]
I saw quite a few posts (e.g. here) related to starting a service at boot or recognizing a usb drive. But here I want to rename the default Ethernet (wired) iface of my USB LAN dongle to net0 at boot time, or at least BEFORE systemd service netctl-ifplugd@net0.service
kicks in.
I first tried the Archlinux forum suggestion:
$ sudo cat /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net",ACTION=="add", ATTRaddress=="_mac_address_here_", NAME="net0"
EDIT:
The udev rule is executed when I log on to console. No prbm there.
If I wait say 1 minute before I log in via the gdm login menu, the iface is also correctly renamed
However if I log on via my gdm logon menu immediately after it appears on screen (that takes me about 3 to 5 seconds), then the interface is not renamed by the udev
rule. When that happens, if I unplug and re-plug the USB LAN dongle, then the LAN interface gets renamed correctly.
However I want to avoid having to unplug and re-plug things every time I boot. Should be automatic.
Initially I thought that there was a pbm with my udev rule, then with a race condition between udev and network services kicking in. I now think this might be related to gdm on Xorg.
Any clue anybody ?
xorg udev network-interface gdm3
add a comment |Â
up vote
3
down vote
favorite
[4.13.9-1-ARCH with gdm on Xorg]
I saw quite a few posts (e.g. here) related to starting a service at boot or recognizing a usb drive. But here I want to rename the default Ethernet (wired) iface of my USB LAN dongle to net0 at boot time, or at least BEFORE systemd service netctl-ifplugd@net0.service
kicks in.
I first tried the Archlinux forum suggestion:
$ sudo cat /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net",ACTION=="add", ATTRaddress=="_mac_address_here_", NAME="net0"
EDIT:
The udev rule is executed when I log on to console. No prbm there.
If I wait say 1 minute before I log in via the gdm login menu, the iface is also correctly renamed
However if I log on via my gdm logon menu immediately after it appears on screen (that takes me about 3 to 5 seconds), then the interface is not renamed by the udev
rule. When that happens, if I unplug and re-plug the USB LAN dongle, then the LAN interface gets renamed correctly.
However I want to avoid having to unplug and re-plug things every time I boot. Should be automatic.
Initially I thought that there was a pbm with my udev rule, then with a race condition between udev and network services kicking in. I now think this might be related to gdm on Xorg.
Any clue anybody ?
xorg udev network-interface gdm3
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
[4.13.9-1-ARCH with gdm on Xorg]
I saw quite a few posts (e.g. here) related to starting a service at boot or recognizing a usb drive. But here I want to rename the default Ethernet (wired) iface of my USB LAN dongle to net0 at boot time, or at least BEFORE systemd service netctl-ifplugd@net0.service
kicks in.
I first tried the Archlinux forum suggestion:
$ sudo cat /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net",ACTION=="add", ATTRaddress=="_mac_address_here_", NAME="net0"
EDIT:
The udev rule is executed when I log on to console. No prbm there.
If I wait say 1 minute before I log in via the gdm login menu, the iface is also correctly renamed
However if I log on via my gdm logon menu immediately after it appears on screen (that takes me about 3 to 5 seconds), then the interface is not renamed by the udev
rule. When that happens, if I unplug and re-plug the USB LAN dongle, then the LAN interface gets renamed correctly.
However I want to avoid having to unplug and re-plug things every time I boot. Should be automatic.
Initially I thought that there was a pbm with my udev rule, then with a race condition between udev and network services kicking in. I now think this might be related to gdm on Xorg.
Any clue anybody ?
xorg udev network-interface gdm3
[4.13.9-1-ARCH with gdm on Xorg]
I saw quite a few posts (e.g. here) related to starting a service at boot or recognizing a usb drive. But here I want to rename the default Ethernet (wired) iface of my USB LAN dongle to net0 at boot time, or at least BEFORE systemd service netctl-ifplugd@net0.service
kicks in.
I first tried the Archlinux forum suggestion:
$ sudo cat /etc/udev/rules.d/10-network.rules
SUBSYSTEM=="net",ACTION=="add", ATTRaddress=="_mac_address_here_", NAME="net0"
EDIT:
The udev rule is executed when I log on to console. No prbm there.
If I wait say 1 minute before I log in via the gdm login menu, the iface is also correctly renamed
However if I log on via my gdm logon menu immediately after it appears on screen (that takes me about 3 to 5 seconds), then the interface is not renamed by the udev
rule. When that happens, if I unplug and re-plug the USB LAN dongle, then the LAN interface gets renamed correctly.
However I want to avoid having to unplug and re-plug things every time I boot. Should be automatic.
Initially I thought that there was a pbm with my udev rule, then with a race condition between udev and network services kicking in. I now think this might be related to gdm on Xorg.
Any clue anybody ?
xorg udev network-interface gdm3
edited Nov 6 '17 at 22:21
asked Nov 4 '17 at 13:44
Cbhihe
2841315
2841315
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Your problem is totally elsewhere. udev
started in very early boot stage from the initrd
image. initrd
doesn't contains your manually created rules in /etc
. Check it with lsinitramfs /boot/initrd*
.
You can add your rules file to initramfs, but the much more proper way is do as your distro suggests. For example in Debian there is a /etc/initramfs-tools/
folder, where you have to put your custom files which will be in newly created initrds.
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting togdm
onXorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.
â Cbhihe
Nov 6 '17 at 21:42
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Your problem is totally elsewhere. udev
started in very early boot stage from the initrd
image. initrd
doesn't contains your manually created rules in /etc
. Check it with lsinitramfs /boot/initrd*
.
You can add your rules file to initramfs, but the much more proper way is do as your distro suggests. For example in Debian there is a /etc/initramfs-tools/
folder, where you have to put your custom files which will be in newly created initrds.
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting togdm
onXorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.
â Cbhihe
Nov 6 '17 at 21:42
add a comment |Â
up vote
2
down vote
Your problem is totally elsewhere. udev
started in very early boot stage from the initrd
image. initrd
doesn't contains your manually created rules in /etc
. Check it with lsinitramfs /boot/initrd*
.
You can add your rules file to initramfs, but the much more proper way is do as your distro suggests. For example in Debian there is a /etc/initramfs-tools/
folder, where you have to put your custom files which will be in newly created initrds.
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting togdm
onXorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.
â Cbhihe
Nov 6 '17 at 21:42
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Your problem is totally elsewhere. udev
started in very early boot stage from the initrd
image. initrd
doesn't contains your manually created rules in /etc
. Check it with lsinitramfs /boot/initrd*
.
You can add your rules file to initramfs, but the much more proper way is do as your distro suggests. For example in Debian there is a /etc/initramfs-tools/
folder, where you have to put your custom files which will be in newly created initrds.
Your problem is totally elsewhere. udev
started in very early boot stage from the initrd
image. initrd
doesn't contains your manually created rules in /etc
. Check it with lsinitramfs /boot/initrd*
.
You can add your rules file to initramfs, but the much more proper way is do as your distro suggests. For example in Debian there is a /etc/initramfs-tools/
folder, where you have to put your custom files which will be in newly created initrds.
answered Nov 4 '17 at 19:30
Ipor Sircer
8,8921920
8,8921920
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting togdm
onXorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.
â Cbhihe
Nov 6 '17 at 21:42
add a comment |Â
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting togdm
onXorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.
â Cbhihe
Nov 6 '17 at 21:42
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
wiki.archlinux.org/index.php/mkinitcpio
â Ipor Sircer
Nov 5 '17 at 10:33
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting to
gdm
on Xorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.â Cbhihe
Nov 6 '17 at 21:42
No, that's off. Booting to console makes the problem disappear... everything else being the same. Booting to
gdm
on Xorg
or rather immediately starting a login session in gdm after the gdm login screen appears seems to makes the renaming rule croak. On the other hand, if I wait say 1 or 2 minutes before I login via the gdm login screen, the udev rule kicks in and all works well (wired interface on dongle renamed + priority connectivity to the dongle). So all this is related to gdm, not to the init runtime.â Cbhihe
Nov 6 '17 at 21:42
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402499%2frenaming-usb-lan-dongle-iface-for-gui-logon-with-gdm-on-xorg%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password