"Personalize Settings" Shinobar and Barry <Issues Remain>

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Need not re-connect nor restart X

#21 Post by shinobar »

@BarryK, gcmartin, and to all
Think what happens when we change the hostname.

At the first boot, the Puppy accesses to the DHCP server with the hostname, say 'pupppypcxxx'.
Only the DHCP server in the LAN exept the Puppy itself knows the nane 'pupppypcxxx' at this point of time.
Let's change the hostnane to 'somehost'. No one in the LAN exept the Puppy itself knows the name 'somehost'.
And then, what is the problem? ... Nothing... in usual case.

But gcmartin has ever encountered a problem. It may occur if the DHCP server reports the hostname 'pupppypcxxx' to other LAN system.
I guess it is a special case because most of the router in the market do not offer local DNS. They manage the LAN with only the IP's, and the MAC address in some case. Never use the hostnames.

How about with the Windows?
There is a test report from rcrsn51 regarding how the Windows are managing. I made another test to see how we Puppy should manage, with the Lupu-528 RAM mode.
  1. First boot, the LAN is connected with hostname 'puppypc'.
    Run pnethood, it sees an another PC, Windows 7, in my LAN.
  2. Changed the hostname to 'somehost', but did not restart X.
    Run pnethood, it still sees the Windows 7 PC.
  3. Restart X. Run pnethood, it still sees the Windows 7 PC.
... No problem.

The problem will occur if the Puppy is running samba before. The samba reports its netbios name to the LAN.
You need to restart the samba (need not re-connect, need not restart PC nor X) if you change the hostname when the samba is already running.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

gcmartin

#22 Post by gcmartin »

@Shinobar

That's not entirely true.

When any PC needs DHCP services, it starts with a broadcast. In ethernet, EVERYONE, see the broadcast.

Its NOT AND NEVER WAS some special case. That broadcast is ignored by most, but, all routers see this broadcast. A DHCP server will see and respond to the broadcast at which time the protocol is in a dialogue until acceptance and activation is in place.

If you or others are running syslog services you can and do see the hostname, along with the MAC and the final IP assign. The PCs on the LAN also respond to this information in there tables, depending on what PCs/servers/services you have running.

If you are monitoring entry, status, and exits on the LAN it can be done using any of the 3 items....depending on manufacturer and on administrator

Our job in PUPPY should be to comply to standards....not to only conform when it suits our needs. If we comply, everyone benefits.

The LAN is NOT a collection of individual machines as you imply. It is a SYSTEM of machines in a collection. And there are recordings active in the LAN to facilitate device identification and operations.

Lastly, SAMBA has absolutely NOTHING TO DO WITH THIS PROBLEM or its resolution....NOTHING!!!

Please don't take this as any attack as it is not. I am just sharing what we can do to make PUPs a mature system on the LAN. ;This does not mean that anyone has done anything intentional to have created this issue. I am just calling attention and asking the community to consider addressing it properly.

AS I have been consistent with everyone on this, its NOT a major issue. Even though it AFFECTS EVERYONE, it is a low level affect until you bump up upon a LAN service that responds with some unwarranted results. We can avoid this by addressing this very simple issue somewhere in our PUPPY process. You and Barry hold the keys at system startup to address this very simply....should you choose.

iI feel like I battling and I really shouldn't be. This is in the interest of the general PUPPY community. This is ONLY about this 1 issue and requesting it be addressed! When it is addressed, it benefits ALL Puppy users: Your PUP, my PUP, everyone's PUP.

Lastly, we (you or I) have NO such problems with Windows/Macs doing this kind of thing on the LAN. In fact, I don't have this problem with any h/w NAS on the LANs, either. This is a PUPPY specific approach. The Windows info you share is looking at the netbios protocol. This discussion is and has NEVER BEEN ABOUT NETBIOS. It's about LAN protocol and device standards and their general LAN operations. And,

You have been a big help to all of the users and developers alike. And, I respect that. Thanks for what you have done to get us to this point in time.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#23 Post by rcrsn51 »

@gcmartin: Am I clear on your situation? You wanted to connect Puppy to an enterprise LAN. You were instructed by the administrator to use a specific hostname. You changed the hostname using the current Puppy procedures.

However, in many other OS's (XP, Ubuntu, etc.) you are then required to do a reboot so that the new name is broadcast to the network. A little research reveals that Vista, Win7 and OS-X may have the same requirement. You feel that Puppy users should not need to do this.

I notice in BK's blog that he has added new code into Woof to address this situation. I am concerned that his changes were never vetted by the community to see if there are any negative side effects.

gcmartin

#24 Post by gcmartin »

rcrsn51 wrote:@gcmartin: Am I clear on your situation? You wanted to connect Puppy to an enterprise LAN. You were instructed by the administrator to use a specific hostname. You changed the hostname using the current Puppy procedures.

However, in many other OS's (XP, Ubuntu, etc.) you are then required to do a reboot so that the new name is broadcast to the network. A little research reveals that Vista, Win7 and OS-X may have the same requirement. You feel that Puppy users should not need to do this.

I notice in BK's blog that he has added new code into Woof to address this situation. I am concerned that his changes were never vetted by the community to see if there are any negative side effects.
Thanks Rcrsn51.

In XP (rather since 2000), even though the pop-up says 'reboot', you really haven't needed to do that for years. I was present at the 2000 Launch when Bill Gates indicated this and a "Loud cheer" from the audience when up.

And, in Puppy, there is NO instructions that say 'reboot'. "You really shouldn't have to since a stop the IP and request drives corrected information to the DHCP server." And, think of which you'd rather have to address this. I request of the DHCP server or a Live media reboot which takes me about 3-5 minutes on my laptop (depending of which PUP I am booting with which boot options)?

Here to help

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#25 Post by rcrsn51 »

gcmartin wrote:In XP (rather since 2000), even though the pop-up says 'reboot', you really haven't needed to do that for years. I was present at the 2000 Launch when Bill Gates indicated this and a "Loud cheer" from the audience when up.
Apparently you didn't read my test report above where I confirmed that a reboot is STILL needed in both XP Home and XP Pro.
I notice in BK's blog that he has added new code into Woof to address this situation. I am concerned that his changes were never vetted by the community to see if there are any negative side effects.
Is that a concern to you?

gcmartin

#26 Post by gcmartin »

rcrsn51 wrote:
gcmartin wrote:In XP (rather since 2000), even though the pop-up says 'reboot', you really haven't needed to do that for years. I was present at the 2000 Launch when Bill Gates indicated this and a "Loud cheer" from the audience when up.
Apparently you didn't read my test report above where I confirmed that a reboot is STILL needed in both XP Home and XP Pro.
You're right, I haven't read it. I will run a test and report back. I just tested on a recent MAC and this reboot is certainly NOT the case. I did test weeks (maybe months ago) and this wasn't the case on a REDHAT or a SUSE.

But, until then, let's assume you are correct in what you share. What Microsoft was saying since Win95 when this message began appearing is (I para-phrase) "to get this machine in LAN compliance, reboot!" (I think you agree with that...right)

We are merely addressing LAN compliance in Puppy. I hope this is not a semantics discussion.

Edited: Just tested on a Microsoft server test machine. This is NOT the case. The server upon hostname change did re-register with the DHCP server (router) on the LAN. So as not to get into semantics, this merely reports that Microsoft will either ask you reboot to comply or it will do it for you, depending on which of the MS system you have.

Hope this helps

gcmartin

#27 Post by gcmartin »

Thanks @R
I notice in BK's blog that he has added new code into Woof to address this situation. I am concerned that his changes were never vetted by the community to see if there are any negative side effects.
This is addressing the hostname change issue. And, he is introducing a change to allow the LAN to know the current (accurate) state of the Puppy machine.

And, Barry's approach doesn't just tie hostname to detection in FirstRUN for it allows any/all system app(s) (running under root, of course) to keep the LAN informed should a hostname change be made. for any reason. This is goodness for all.

We will be seeing those PUPs using his change soon as they build with his FirstRUN (and probably Shinobar's as well).

Thanks for reporting that to us here.

And THANKS Barry for understanding

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

To whom the DHCP server reports the hostname?

#28 Post by shinobar »

gcmartin wrote:When any PC needs DHCP services, it starts with a broadcast. In ethernet, EVERYONE, see the broadcast.
Yes, but the question is WHO use this information? ONLY the DHCP server does.
shinobar wrote:It may occur if the DHCP server reports the hostname 'pupppypcxxx' to other LAN system.
Probablly to the local dynamic DNS system. I also said I guess it is a special case because most of the router in the market do not offer local DNS.
Some enterprise LAN has such a local DYNAMIC DNS, but why you need to change the hostname if your LAN has local dynamic DNS?
i have built my own local DNS with fixed hostnames, so i need to change my hostname for my FIXED DNS.
BTW, my DHCP server provides the fixed hostname for the MAC address, but Puppy ignores it. I wonder why.

EDIT:
shinobar wrote:why you need to change the hostname if your LAN has local dynamic DNS?
I was wrong. Yes, you need to change your hostname and re-connect if your LAN has local dynamic DNS.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#29 Post by BarryK »

Regarding updating of the global HOSTNAME variable, that is good enough reason for restarting X after changing the hostname.

See my Woof commit:

http://bkhome.org/blog/?viewDetailed=02824

I think that Woof has got all situations covered now.
[url]https://bkhome.org/news/[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

refreshing the global environment

#30 Post by shinobar »

BarryK wrote:Regarding updating of the global HOSTNAME variable, that is good enough reason for restarting X after changing the hostname.
No.
The global HOSTNAME variable is updated by the /etc/profile. We need not restart X if we launch the rxvt because the rxvt reads the /etc/profile. You can test it:
  1. Change the hostname by the firstrun or the hostname-set (BTW, that on the quicksetup or connectwizard need to click its special button.), but do not restart X.
  2. Launch rxvt.
  3. Type 'echo $HOSTNAME'.
No problem when you run any program from the rxvt. The problem occurs for the roxterm who does not read /etc/profile, and if any program is launched from the menu and the program uses the HOSNAME. I don't know what program uses it. Restarting X is no help for this case. You need to exit X and type 'exit' and 'xwin'.

P.S. Attached a small test program to show the HOSTNAME environment variable.
Attachments
print-hostname.tar.gz
extract and click the script
(318 Bytes) Downloaded 562 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
drongo
Posts: 374
Joined: Sat 10 Dec 2005, 23:35
Location: UK

Connect after hostname change

#31 Post by drongo »

This may be a stupid question, but what happens if you connect to the network after you have changed the hostname? If everything is OK that would seem to be an acceptable workaround to me.

Or couldn't we just add some automatic "touch/reconfigure" script after a hostname change?

Then again, I rarely connect Puppy computers to MS domains or groups of MS computers, so this issue doesn't really affect me. :D

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#32 Post by rcrsn51 »

This is the issue that will not die.

Consider how Windows and other Linuxes handle this situation. You pick a hostname during the install process, BEFORE the OS launches. If you want to change the hostname DURING a session, you are expected to do a reboot. This guarantees that the new hostname registers properly with all the systems that require it.

Unfortunately, Puppy is trying to do this ass-backwards. Puppy lets you change the hostname DURING a session while avoiding a reboot. No wonder it's so problematic.

There is an obvious (to me) solution to the problem. But I'm not going to suggest it because I know what the response will be.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

Re: refreshing the global environment

#33 Post by BarryK »

shinobar wrote:
BarryK wrote:Regarding updating of the global HOSTNAME variable, that is good enough reason for restarting X after changing the hostname.
No.
The global HOSTNAME variable is updated by the /etc/profile. We need not restart X if we launch the rxvt because the rxvt reads the /etc/profile. You can test it:
  1. Change the hostname by the firstrun or the hostname-set (BTW, that on the quicksetup or connectwizard need to click its special button.), but do not restart X.
  2. Launch rxvt.
  3. Type 'echo $HOSTNAME'.
No problem when you run any program from the rxvt. The problem occurs for the roxterm who does not read /etc/profile, and if any program is launched from the menu and the program uses the HOSNAME. I don't know what program uses it. Restarting X is no help for this case. You need to exit X and type 'exit' and 'xwin'.

P.S. Attached a small test program to show the HOSTNAME environment variable.
What you are describing here is exactly what my latest change in Woof fixes. xwin exports the updated HOSTNAME, then X is restarted and the updated HOSTNAME is now the global HOSTNAME value.

An application such as roxterm that reads the global HOSTNAME variable will then be reading the updated value.

This is a very old technique developed by GuestToo (any of you guys remember him?) for the LANG variable, and it works well.

So, I don't understand your response. You described a problem with roxterm, I implemented a fix. In what way does my solution not fix it?

rcrsn51,
Perhaps I have overlooked some important point that you have made, but I have not yet seen anything that convinces me that a reboot is required.

Also, vague comments that people should be concerned about my changes in Woof, are just that, vague, unsubstantiated. And unhelpful. You would need to test the code and point out something specific that is wrong or needs improving.

You made a similar vague comment about bugs in Woof awhile back, well, more than once, it seems to be a theme of yours.
The one I recall, was in a Forum thread of an alpha release of Wary or Racy, the purpose of which was specifically to find bugs and fix them. It made your comment at that time quite ridiculous.

So, I'm peeved. I prefer helpful feedback. I tolerate your comments because that is the nature of this forum, people can post what they want. But, I much prefer reading posts from people who have identified specific problems and posted about them or post fixes.

Whiners are a pain.
[url]https://bkhome.org/news/[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: refreshing the global environment

#34 Post by shinobar »

shinobar wrote:No problem when you run any program from the rxvt. The problem occurs for the roxterm who does not read /etc/profile, and if any program is launched from the menu and the program uses the HOSNAME. I don't know what program uses it. Restarting X is no help for this case. You need to exit X and type 'exit' and 'xwin'.

P.S. Attached a small test program to show the HOSTNAME environment variable.
Tested on Racy-5.3 replacing Barry's recent hostname-set, network_default_connect, networkdisconnect, quicksetup and xwin.
EDIT: Sorry, this test is outdated. I missed Barry's last update:
http://bkhome.org/blog/?viewDetailed=02824

Code: Select all

#120505 automatic network reconnect. refer /usr/sbin/hostname-set
Changed the hostname 'puppyxx' to 'newhost'. Restarted X twice.
Attachments
newhost.png
rxvt shows new HOSTNAME,
but the script launched by Rox click
shows old HOSNAME value.
(2.38 KiB) Downloaded 807 times
Last edited by shinobar on Fri 11 May 2012, 23:41, edited 3 times in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: refreshing the global environment

#35 Post by shinobar »

BarryK wrote:This is a very old technique developed by GuestToo (any of you guys remember him?) for the LANG variable, and it works well.
I guess you are talking on this code at the last stage of xwin.

Code: Select all

  #v1.0.5 thanks GuestToo for advice on this, works with chooselocale script...
  NEWLANG="`cat /etc/profile | grep '^LANG=' | cut -f 2 -d '='`"
  if [ "$NEWLANG" ];then #precaution
   if [ "$NEWLANG" != "$LANG" ];then
    export LANG=$NEWLANG
   fi
  fi
 exec xwin
I am planning to change this part to the following for the lucid-528JP, Japanese edition:

Code: Select all

 . /etc/profile	# shinobar: reload profile
 exec xwin
not only for HOSTNAME but because some installed packages may have stuff in /etc/profile.d.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

New test

#36 Post by shinobar »

Was missing Barry's latest fix in the previous test.

Tested on Racy-5.3 replacing Barry's recent hostname-set, network_default_connect, networkdisconnect, quicksetup and xwin.
xwin wrote:#120505 automatic network reconnect. refer /usr/sbin/hostname-set
#120511 hostname-set changed HOSTNAME, via quicksetup, X is restarted, update $HOSTNAME (was exported at bootup in /etc/profile)...
Changed the hostname 'puppyxx' to 'newhost'. Restarted X
Attachments
newhostname2.png
HOSTNAME value is refreshed after restarting X
(2.17 KiB) Downloaded 771 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

gcmartin

#37 Post by gcmartin »

Tested Precise 5255.

FirstRUN, the single screen localization tool in this distro hits ALL of the marks for localization needs OOTB.

It handles everything that is expected for launch on behalf of the user fabulously, And, it has successfully navigated network notification such that all devices know its network name whenever FirstRUN is used in this Precise. This was tested on 3 different DHCP routers and the results are the same! As well, each router shows it in their tables and in syslog on the LANs. No more delays or mis-names. This is behind us. And, FirstRUN gives users a central point of reference for all of its localization offering.

The stability, the sophistication, and the maturity, along with it operating consistently within a LAN makes this distro, a stellar OS. Precise can be considered for use in every home, school, business, library, village, or community on the planet. It adheres to desktop needs and behaves with an ease of use that other distros struggle to achieve.

I have published for several years that FirstRUN has really changed the nature of Puppy, its user interaction, its ease of understanding, and now, its overall abherence to its role on the LAN, This is a truly magnificent contribute as was ever made.

Thanks you Barry and Shinobar for all the good efforts,

and for the understanding, in this solution to something I have witnessed mature over the years. Puppy, in moving from text startup localization to single screen localization has made it simple for users to have good knowledge of what they are doing for their system use. And, it provides a great launch-point for user acceptance of Puppy and the Puppy services provided them.

Thank you, both, for this great technological contribution...FirstRUN!!! :D

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

hostname

#38 Post by shinobar »

As for my conclusion, the network need to refresh after the hostname is changed only if there is a local Dynamic DNS.
My answer is in the firstrun-2.2.
http://www.murga-linux.com/puppy/viewtopic.php?t=58312
countrywizard.qs at line 1753- wrote:#v2.2: hostname
if [ "$HOSTNAME" = "$HOSTNAMEORG" ]; then
set_hostname # ensure hostname settings
else
# check if network is ready
LANG=C route | grep -q 'default[ ].*[ ]0\.0\.0\.0[ ]' && grep -wq 'nameserver' /etc/resolv.conf && NETREADY="y" || NETREADY=""

if [ "$NETREADY" ]; then
# check if there is local Dynamic DNS
nslookup $HOSTNAMEORG &>/dev/null && DDNS="y" || DDNS=""

MSG=$(gettext "Hostname is changed.")
_ReConnect=$(gettext "The network need to refresh in case there is a local Dynamic DNS.")
_Servers=$(gettext "NOTE: Some servers like 'samba' need to restart if they are already runnng.")
[ "$DDNS" ] && MSG="$MSG\n$_ReConnect"
MSG="$MSG\n$_Servers"
DISCONNECT=$(which networkdisconnect)
RECONNECT=$(which network_default_connect)
if [ "$DDNS" -a "$DISCONNECT" -a "$RECONNECT" ]; then
_ReConnectNow=$(gettext "Refresh the network connection now?")
MSG="$MSG\n\n$_ReConnectNow"
EXIT='abort'
errmsg yesno $MSG && REFRESH="y" || REFRESH=""
if [ "$REFRESH" ];then
(snip)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

gcmartin

#39 Post by gcmartin »

Although this was reported as solved, there seems to be a logic bug in the WOOF version for setting localization values in the system.

This bug surfaces when you, either,
  • do NOT have wired ethernet connection to a DHCP server, or,
  • you have 2 LAN adapters and you do NOT have wire in the 1st ethernet adapter, or,
  • your DHCP server is wired over the 2nd LAN adapter
The Bug is explained here.

Here to help

Post Reply