setting hostname breaks X login in porteus4.0 [SOLVED]

Technical issues/questions of an intermediate or advanced nature.
User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

setting hostname breaks X login in porteus4.0

Post#16 by ncmprhnsbl » 03 Dec 2019, 05:16

further test: kde and nvidia driver: now behaves like all the others ie. baulked start (but doesn't mind changing hostname in X)
not suggesting drivers per se but there seems to be different outcomes with different driver/DE combos ..
i'm interested in this "Display Name: <hostname>:0"
what set this and how does X find out about it, if it needs to know it...
as well, should syslog reflect a hostname change? ie. the "porteus" part of a line like this.. what does it represent?

Code: Select all

Dec  3 14:53:36 porteus console-kit-daemon[1543]: WARNING: Failed to open connection to cgmanager. Is the cgmanager daemon running?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

setting hostname breaks X login in porteus4.0

Post#17 by ncmprhnsbl » 05 Dec 2019, 13:15

ok.. have found some fixes for what i'm experiencing at least.. and here's a module of it:
09-hostname-patch-for-p4.0.xzm
it contains hostname from slackware current and /etc/rc.d/rc.M with this section:

Code: Select all

# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
  /bin/hostname $(/bin/cat /etc/HOSTNAME) &
else
  # fall back on this old default:
  echo "porteus.example.net" > /etc/HOSTNAME
  /bin/hostname porteus.example.net &
fi
added after the cliexec section(so that hostname can set via cliexec= cheatcode) and the full path for cat seems to be necessary ..
the key seems to be that the initial tty login prompt was not displaying the changed hostname thus confusing xorg(to do with screen name?)
still a mystery to me why donald gets a different result... heck of coincidence that me and omero have broken our stuff in the exact same way..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

setting hostname breaks X login in porteus4.0

Post#18 by donald » 06 Dec 2019, 06:58

ncmprhnsbl wrote:
05 Dec 2019, 13:15
still a mystery to me why donald gets a different result...
....must be some kind of magic... :)

However, I renamed the changes folder and created a new/empty one >
reboot the OS > changed the host name via gui apps (root thunar/mousepad),
(xauth list still showed porteus) and rebooted immediately > the system
stopped at a blank screen.

So I removed all files from the (new) changes folder > reboot > changed the host name
like I did before.
But now i stayed a bit longer and made a lot of (customization) settings.
(changed the root/guest Pw, thunar settings, firewall, power manager etc.) >
xauth list still showed porteus but the NVIDIA X server settings app gui
showed the new host name (X server information - display name) > reboot >
no stop at a blank screen....

I have not the slightest idea what's going on here...LOL

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

setting hostname breaks X login in porteus4.0

Post#19 by ncmprhnsbl » 06 Dec 2019, 07:53

at the the start up, after the modules are loaded and welcome message, there is a tty login prompt(show briefly before X starts or stops there if cheatcode 3 is used)
what does it show? default is: porteus login: should be: <newhostname> login:
or ctrl+atl+fn to another tty
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

setting hostname breaks X login in porteus4.0

Post#20 by donald » 07 Dec 2019, 07:50

Hi ncmprhnsbl
With your 09..xzm the host name is set the way it should be,i think.
I see <some hostname> login: [ctrl+alt+Fn]

Without the patch I see "porteus login:"
Once logged in in that tty it changes to <some hostname> login:
and stays that way.
(but only for this tty, all other are still showing porteus login.

So yes, your patch work very well.
( I havn't had any doubt about it.It was just that my system didn't stop
at a blank screen.)

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

setting hostname breaks X login in porteus4.0

Post#21 by ncmprhnsbl » 07 Dec 2019, 13:00

donald wrote:
07 Dec 2019, 07:50
(but only for this tty, all other are still showing porteus login.
if you press enter without logging in, it refreshes to the correct hostname ...pretty much what happens when slim has it's second attempt..
there's more to this, but i'm at a loss as to how hostname is handled without the 'hostname' program . .obviously somehow, but not 100% properly..
anyhow the fix i posted seems sane enough for me.. so i'll mark this solved.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Post Reply