HOSTNAME fixes ROX slowness problem - SOLVED
01Micko
Starting with 01Micko's approach we would arrinve at desktop with a PC on the LAN that is unique. This would suffice for most newbies who would NOT take the time or effort to change the hostname from the defautl that may ve offered on screen to them.
It this is done on initial boot (pfix=ram) there could also be an option somewhere which would force/ask the booting user to enter/change a name for this booting PC. This would, I thnk address 90& of situations for having the system named and the user to know what the name of the booting PC is. As well, all system applications would have consistent information no matter which field they would use internally for their ooperation. Were this to be done, we would cover most situations of IDing the system hostname fields and would significantly reduce/negaate a need to use the hostname command once the system is at desktop.
This seems reasonable.
Does anyone see a problem with an approach like that?
It this is done on initial boot (pfix=ram) there could also be an option somewhere which would force/ask the booting user to enter/change a name for this booting PC. This would, I thnk address 90& of situations for having the system named and the user to know what the name of the booting PC is. As well, all system applications would have consistent information no matter which field they would use internally for their ooperation. Were this to be done, we would cover most situations of IDing the system hostname fields and would significantly reduce/negaate a need to use the hostname command once the system is at desktop.
This seems reasonable.
Does anyone see a problem with an approach like that?
HOSTNAME problem
To make hostname=HOSTNAME for ROX, we need to reboot PC after the hostname is changed.
Rebooting X is not enough because the script /usr/bin/xwin does not read /etc/profile at reboot.
I am not sure it causes problem, but i think there is a hint.
BTW, connecting tools for puppy should be improved to use the hostname provided from the DHCP service.
Rebooting X is not enough because the script /usr/bin/xwin does not read /etc/profile at reboot.
I am not sure it causes problem, but i think there is a hint.
BTW, connecting tools for puppy should be improved to use the hostname provided from the DHCP service.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]
Hint at HOSTNAME problem. One path to solution
Hi Shinobar. Thanks for helping.shinobar wrote:To make hostname=HOSTNAME for ROX, we need to reboot PC after the hostname is changed.
Rebooting X is not enough because the script /usr/bin/xwin does not read /etc/profile at reboot.
I am not sure it causes problem, but i think there is a hint.
BTW, connecting tools for puppy should be improved to use the hostname provided from the DHCP service.
Couple of points.
#1
All (most) consumer routers do NOT supply a hostname to a PC when issuing IP personality to the PC.
#2 - Is this a possible hint to a solution?
I did find something of interest, when running latest PUP268.
- The system boots to FirstRun/Personalize Settings.
- I changed the hostname field from puppypc to Luci268-01
- I clicked OK to confirm
- System gave the normal restart desktop message
- I then selected SHUTDOWN > Exit to Prompt
- At the prompt, I typed logout
- at the next prompt, I typed xwin
- desktop restarted
- I clicked console icon on desktop, typed "echo $HOSTNAME" and was surprised to find that the hostname is updated by the system to Luci268-01.
I run a LIve media environment, and this is verifiable by anyone for Pup268. I am not sure how many other PUPs that use FirstRUN to go to desktop, but those PUP distros, who use Personalize Settings may also have the same benefit that its has with Playdayz's-01Micko's distro
Is this a hint to solution?
So, it seems that changes made in the Personalize Settings Utility MAY accomplish the job whenever it run IFF it can accomplish a logout and xwin when the hostname is changed. Can FirstRun be modified to do this when the hostname is changed?
This may be a solution that CAN be incorporated or modeled for all PUPs. If so,
Here's a good read about the what, how and why of hostname and domain names:
http://jblevins.org/notes/hostname
http://jblevins.org/notes/hostname
Interesting read amigo. with that in mind here is what is going in my /etc/rc.d/rc.sysint file just after rc.update is run
That won't upset the apple cart if the user has changed "localhost" and added addresses to /etc/hosts (though at the stage it's run that's extremely unlikely to have happened anyway, unless some one has done a remaster/rebuild)
EDIT: Works fine
EDIT2: My hostname is persistent after a reboot.
I'll attach my /etc/rc.d/rc.sysinit, note, this is from latest woof
Code: Select all
if [ "`cat /etc/hostname`" = "puppypc" ];then #110807
echo -n "Updating unique hostname..." >/dev/console
echo "puppypc${RANDOM}" > /etc/hostname
PUPHOSTNAME="`cat /etc/hostname`"
HOSTSFILEFIRST="`grep -w 'puppypc' /etc/hosts|sed 's% puppypc%%'`" #first line
HOSTSFILEREST="`grep -v 'puppypc' /etc/hosts`" #rest of file
echo "$HOSTSFILEFIRST $PUPHOSTNAME" > /etc/hosts
echo "$HOSTSFILEREST" >> /etc/hosts
status_func 0 #outputs a "done" msg
fi
EDIT: Works fine
Code: Select all
# cat /etc/hostname
puppypc9408
# cat /etc/hosts
127.0.0.1 localhost puppypc9408
192.168.1.1 pc2
192.168.1.2 pc3
192.168.1.3 pc4
# echo $HOSTNAME
puppypc9408
# uname -n
puppypc9408
# cat /proc/sys/kernel/hostname
puppypc9408
# sysctl kernel.hostname
kernel.hostname = puppypc9408
I'll attach my /etc/rc.d/rc.sysinit, note, this is from latest woof
- Attachments
-
- rc.sysinit.gz
- to open:
gunzip rc.sysinit.gz - (10.62 KiB) Downloaded 400 times
Puppy Linux Blog - contact me for access
This is well thought-thru, well structured, and well-presented here for understanding.01micko wrote: ... here is ... /etc/rc.d/rc.sysint file just after rc.update is run ... That won't upset the apple cart if the user has changed "localhost" and added addresses to /etc/hosts (though at the stage it's run that's extremely unlikely to have happened anyway, unless some one has done a remaster/rebuild) ... hostname is persistent after a reboot. ...
What 01Micko presents here, will work not only for Live media who are booting for the first-time, but also for startup tools similar to what @Shinobar's FirstRUN/Personalize Settings does for first-boot or for some subsequext use. It paves the way for any distro developer to use other desktop tools or applications that rely on consistent system information in this area.
Does anyone see any downsides? I don't see any at this time.
Help if you can. And Thanks again @01Micko for your level on LAN understanding and your OTB addressing this for all of us.
Doesn't his break pup-advert-blocker, each reboot?01micko wrote:Interesting read amigo. with that in mind here is what is going in my /etc/rc.d/rc.sysint file just after rc.update is run
[code-removed]
EDIT2: My hostname is persistent after a reboot.
I'll attach my /etc/rc.d/rc.sysinit, note, this is from latest woof
If so, you can search for:
Code: Select all
# pup-advert-blocker IPs below
Code: Select all
# pup-advert-blocker IPs above
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
sc0ttman
The test is to see if the hostname is "puppypc". If anything else is found then that code block is skipped.
If pupadvert blocker is installed previously with a bunch of addresses the addresses are preserved. See the variable "HOSTSFILEREST"
Cheers
The test is to see if the hostname is "puppypc". If anything else is found then that code block is skipped.
If pupadvert blocker is installed previously with a bunch of addresses the addresses are preserved. See the variable "HOSTSFILEREST"
Cheers
Puppy Linux Blog - contact me for access
LightHouse64 PUP is handling it correctly
LightHOUSE64 PUP is running a "Modified" version of Personalize Settings on 64bit PCs.which does everything we are discussing in this thread.
As most of us know, Personalize Settings is becoming an user appealing startup utility for doing some very basic system needs on the Puppy desktop; instead of continually stopping during boot processing to ask users questions for system settings needs. This approach is practical as well as appealing while giving any user a Menu item that he can return to whenever needed to make some setting change.
I don't know what he's done as 64bit Linux "MAY" offer something 32bit does not, but, his Personalize Settings updates ALL known needs for hostname in the system when you click OK. This means that every field that a hostname change should address is being addressed, correctly, all within the running desktop!. Maybe he found something in Personalize Settings that handles this for all system fields-files that is overlooked in 32bit PC's use of Personalize Settings.
I am appealing to TazOC for some insights that could be applied in the 32bit community (or ALL PUPs, in general).
Hope this helps
As most of us know, Personalize Settings is becoming an user appealing startup utility for doing some very basic system needs on the Puppy desktop; instead of continually stopping during boot processing to ask users questions for system settings needs. This approach is practical as well as appealing while giving any user a Menu item that he can return to whenever needed to make some setting change.
I don't know what he's done as 64bit Linux "MAY" offer something 32bit does not, but, his Personalize Settings updates ALL known needs for hostname in the system when you click OK. This means that every field that a hostname change should address is being addressed, correctly, all within the running desktop!. Maybe he found something in Personalize Settings that handles this for all system fields-files that is overlooked in 32bit PC's use of Personalize Settings.
I am appealing to TazOC for some insights that could be applied in the 32bit community (or ALL PUPs, in general).
Hope this helps
- Attachments
-
- Personalize Settings in LightHouse64.png
- 64bit LightHouse64
- (103.12 KiB) Downloaded 1036 times
-
- After PS completion.png
- ALL pertinent fields are accurate
- (32.15 KiB) Downloaded 1087 times
whoops, oh yeah, didn't read it correctly.. I'm gonna go ahead and add this..01micko wrote:sc0ttman
The test is to see if the hostname is "puppypc". If anything else is found then that code block is skipped.
If pupadvert blocker is installed previously with a bunch of addresses the addresses are preserved. See the variable "HOSTSFILEREST"
Cheers
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Re: LightHouse64 PUP is handling it correctly
The only change to Personalize Settings in Lighthouse 64-511 Update 1 (related to hostname) is the same one that Shinobar has incorporated at line 1199 of /usr/sbin/countrywizard.qs in firstrun-1.8.4:gcmartin wrote:I am appealing to TazOC for some insights that could be applied in the 32bit community (or ALL PUPs, in general).
Code: Select all
hostname $HOSTNAME
echo -n $HOSTNAME > /etc/hostname
echo "127.0.0.1 localhost $HOSTNAME" > /tmp/hosts
grep -vw 'localhost' /etc/hosts >> /tmp/hosts
[ -s /tmp/hosts ] && mv -f /tmp/hosts /etc/hosts
I also changed a line in /usr/sbin/ipinfo from
Code: Select all
# tab 1 - interfaces
var01=`echo Hostname: "$HOSTNAME"`
Code: Select all
# tab 1 - interfaces
var01=`echo Hostname: "$(hostname)"`
-TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
gcmartin - well done in bringing clarity to this.
If I may defend rcrsn51's comments - maybe he feels as I do, that Puppy has allowed "free-thinkers" to compute the way they want to, without adhering to external "standards".
Windows has its own approach to "standards" - it is a quicksand.
Mac imposes it's own standards - it opposes individuality.
Puppy sets me free - I choose what I want to do. (Thanks Barry!)
I understand why the Hostname issue must be adressed, but I also understand why some feel that they do not want to see Puppy become subservient to other peoples rules.
You have said "I have never subscribed to the "every man (application) for himself" in systems development"
I have a different view.
Independence is what made puppy useful for me.
Please do not shackle Puppy to those who invented TCP/IP and other network "standards". Such people work for defence forces and governments.
They understand centralised control, and subjugation of the individual.
Ok, lets improve any faults within Puppy, but without having to force Puppy users to conform.
If I may defend rcrsn51's comments - maybe he feels as I do, that Puppy has allowed "free-thinkers" to compute the way they want to, without adhering to external "standards".
Windows has its own approach to "standards" - it is a quicksand.
Mac imposes it's own standards - it opposes individuality.
Puppy sets me free - I choose what I want to do. (Thanks Barry!)
I understand why the Hostname issue must be adressed, but I also understand why some feel that they do not want to see Puppy become subservient to other peoples rules.
You have said "I have never subscribed to the "every man (application) for himself" in systems development"
I have a different view.
Independence is what made puppy useful for me.
Please do not shackle Puppy to those who invented TCP/IP and other network "standards". Such people work for defence forces and governments.
They understand centralised control, and subjugation of the individual.
Ok, lets improve any faults within Puppy, but without having to force Puppy users to conform.
Thanks @greengeek for your comments.
I agree with you about the freedom to create without shackles. This thread is NOT about shackling anything.
Its about your Puppy Linux system operation and its about your LAN operation.
As I remember, @Rcrsn51 (whom I regard highly for the many many contributions he makes. Whenever he says something I listen. ) did NOT come out with concerns about Puppy freedom, his concern was about whether there is harm in leaving the problem built into Puppy. Further scrutiny shows that there is harm when hostname fields do not agree. This thread's contributions have resolved that concern for all of us.
Linux is a system. Its not a single program. Its applications and services, that run, expect a certain set of standards for it to integrate and to operation politely.
This thread's discussion and its solution is about just that. Not being shackled as you infer, but about providing a standard set of services to allow your PC to operate politely; internally and externally. This gives us the freedom to do all kinds of things while the underlying system insures proper operations for us.
Further as is noted by Shinobar's and by Tazoc's efforts, it provides you, the user, the ability to freely select in such a way to maintain stability and polite executions internally and externally.
Please understand this this is and was NOT a personal crusade. It was about bringing awareness to resolving a problem.
You now will be able to have your system experience the benefits provided by the contributions you find from this thread. I do NOT take credit for this solution. The contributors are my heroes for their recognitions and addresses they provide us.
Timeline:
Also, because of Puppy's design, if you are not happy with this work by the contributors, anyone may, either use Shinobar's FirstRUN and reset all of your Puppy PC names to the same (in violation of what every instructor and LAN administrator on the planet teaches) or you may modify your Puppy to pull out the harmless additions everyone has contributed for you.
So, I hope you understand and see that this thread's contribution is NOT about conformity. But, it is about correcting an overlooked "fault".
The intent here is to make a great distro. That means all the necessary tests to be called a great OS is in its behavior on the desktop, within the LAN and within the WAN.
This thread is a very very small step to go along with ALL of the small steps as Puppy matures. And it is maturing very, very rapidly! I have written before about some of the great contributions made over the past 12-18 months in this community. These have been game changers that are part of the maturation we are witnessing. It's making newbie use as well as season veteran use, a breeze for the well thought thru solutions provided for all of us. Heck we can now run 32bit Puppy flavors on PCs utilizing up to 64GB of RAM, today, on a LiveCD. This was unheard of a year ago. Puppy is maturing in ways and at rates that other mainstream distros cannot.
Question for anyone
Please point out how the hostname resolutions instituted, have a negative impact on a user's creativity? Has this thread given the appearance that creativity is in peril?
Acknowledgements
I don't think I have done this until now, but I want to thank everyone who has responded to this thread. Collectively, you have made this problem understood and resolved. Thanks EVERYONE!
Hope his helps
I agree with you about the freedom to create without shackles. This thread is NOT about shackling anything.
Its about your Puppy Linux system operation and its about your LAN operation.
As I remember, @Rcrsn51 (whom I regard highly for the many many contributions he makes. Whenever he says something I listen. ) did NOT come out with concerns about Puppy freedom, his concern was about whether there is harm in leaving the problem built into Puppy. Further scrutiny shows that there is harm when hostname fields do not agree. This thread's contributions have resolved that concern for all of us.
Linux is a system. Its not a single program. Its applications and services, that run, expect a certain set of standards for it to integrate and to operation politely.
This thread's discussion and its solution is about just that. Not being shackled as you infer, but about providing a standard set of services to allow your PC to operate politely; internally and externally. This gives us the freedom to do all kinds of things while the underlying system insures proper operations for us.
Further as is noted by Shinobar's and by Tazoc's efforts, it provides you, the user, the ability to freely select in such a way to maintain stability and polite executions internally and externally.
Please understand this this is and was NOT a personal crusade. It was about bringing awareness to resolving a problem.
You now will be able to have your system experience the benefits provided by the contributions you find from this thread. I do NOT take credit for this solution. The contributors are my heroes for their recognitions and addresses they provide us.
Timeline:
- 01Micko recognize this anomaly several years ago and started work but never revisited it
- Shinobar added hostname to FirstRUN, last year to make it easy and conscious
- TaZOC was the first implementation that successfully managed all internal Puppy fields updating via Personalized Settings wihtout desktop shutdown
- 01Micko revisited his work and gave us the OTB boot-time hostname update to handle the system fields so that when the Live media boots to desktop, all fields would agree and LAN behavior would not conflict
- Barry embraced 01Micko's work in WOOF because it makes sense to address this.
Also, because of Puppy's design, if you are not happy with this work by the contributors, anyone may, either use Shinobar's FirstRUN and reset all of your Puppy PC names to the same (in violation of what every instructor and LAN administrator on the planet teaches) or you may modify your Puppy to pull out the harmless additions everyone has contributed for you.
So, I hope you understand and see that this thread's contribution is NOT about conformity. But, it is about correcting an overlooked "fault".
The intent here is to make a great distro. That means all the necessary tests to be called a great OS is in its behavior on the desktop, within the LAN and within the WAN.
This thread is a very very small step to go along with ALL of the small steps as Puppy matures. And it is maturing very, very rapidly! I have written before about some of the great contributions made over the past 12-18 months in this community. These have been game changers that are part of the maturation we are witnessing. It's making newbie use as well as season veteran use, a breeze for the well thought thru solutions provided for all of us. Heck we can now run 32bit Puppy flavors on PCs utilizing up to 64GB of RAM, today, on a LiveCD. This was unheard of a year ago. Puppy is maturing in ways and at rates that other mainstream distros cannot.
Question for anyone
Please point out how the hostname resolutions instituted, have a negative impact on a user's creativity? Has this thread given the appearance that creativity is in peril?
Acknowledgements
I don't think I have done this until now, but I want to thank everyone who has responded to this thread. Collectively, you have made this problem understood and resolved. Thanks EVERYONE!
Hope his helps
Solved
There are 2 elements to this problem. First, what happens when ANY PUP is booted for first-tiime from LiveCD or Netboot (pfix=ram). Next, a tool to assist changing the hostname after the system reaches desktop.
Solved by Barry's incorporation into WOOF for base ISOs built. The base allows all PUP LIveCD/ISO to boot with a unique, out-of-the-box (OTB) LAN hostname with all internal Puppy subsystems files consistent with that host's name.
The following distros ALSO employs Shinobar's Personlaize Seettings (FirstRUN) in such a way that when anyone changes the hostname field in Personalize Settings, all proper Puppy files and fields are correspondingly updated as wel without ANY user needing to "restart the desktop" or "logout at Ctrl-Alt-F1 prompt" or "save-session+reboot"l:
Solved by Barry's incorporation into WOOF for base ISOs built. The base allows all PUP LIveCD/ISO to boot with a unique, out-of-the-box (OTB) LAN hostname with all internal Puppy subsystems files consistent with that host's name.
The following distros ALSO employs Shinobar's Personlaize Seettings (FirstRUN) in such a way that when anyone changes the hostname field in Personalize Settings, all proper Puppy files and fields are correspondingly updated as wel without ANY user needing to "restart the desktop" or "logout at Ctrl-Alt-F1 prompt" or "save-session+reboot"l:
- TaZOC has solved this in LightHouse64
- 01Micko has solved this in SLACKO
- Attachments
-
- 3 PCs on a LAN.png
- External view of an Example LAN
- (92.39 KiB) Downloaded 643 times
Last edited by gcmartin on Sun 21 Aug 2011, 18:38, edited 4 times in total.