Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Apr 2014, 23:21
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
"Personalize Settings" Shinobar and Barry <Issues Remain>
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [39 Posts]   Goto page: Previous 1, 2, 3
Author Message
drongo


Joined: 10 Dec 2005
Posts: 353
Location: UK

PostPosted: Fri 11 May 2012, 03:16    Post subject: Connect after hostname change  

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. Very Happy
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8565
Location: Stratford, Ontario

PostPosted: Fri 11 May 2012, 04:13    Post subject:  

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.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 11 May 2012, 04:48    Post subject: Re: refreshing the global environment  

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.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2386
Location: Japan

PostPosted: Fri 11 May 2012, 09:13    Post subject: Re: refreshing the global environment  

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:
#120505 automatic network reconnect. refer /usr/sbin/hostname-set

Changed the hostname 'puppyxx' to 'newhost'. Restarted X twice.
newhost.png
 Description   rxvt shows new HOSTNAME,
but the script launched by Rox click
shows old HOSNAME value.
 Filesize   2.38 KB
 Viewed   633 Time(s)

newhost.png


_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html

Last edited by shinobar on Fri 11 May 2012, 19:41; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2386
Location: Japan

PostPosted: Fri 11 May 2012, 09:24    Post subject: Re: refreshing the global environment  

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:
  #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:
 . /etc/profile   # shinobar: reload profile
 exec xwin

not only for HOSTNAME but because some installed packages may have stuff in /etc/profile.d.

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
shinobar


Joined: 28 May 2009
Posts: 2386
Location: Japan

PostPosted: Fri 11 May 2012, 19:56    Post subject: New test  

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
newhostname2.png
 Description   HOSTNAME value is refreshed after restarting X
 Filesize   2.17 KB
 Viewed   612 Time(s)

newhostname2.png


_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
gcmartin

Joined: 14 Oct 2005
Posts: 3645
Location: Earth

PostPosted: Fri 25 May 2012, 17:15    Post subject:  

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!!! Very Happy

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2386
Location: Japan

PostPosted: Sun 01 Jul 2012, 02:55    Post subject: hostname  

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)

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
gcmartin

Joined: 14 Oct 2005
Posts: 3645
Location: Earth

PostPosted: Mon 24 Sep 2012, 20:29    Post subject:  

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

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [39 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0845s ][ Queries: 13 (0.0114s) ][ GZIP on ]