Quick Country
October 19, 2011 —
BarryK
A few days ago, I started to implement shinobar's firstrun into Woof, but I was customizing it so much that I realised that I would be better off writing it from scratch. So, I created Quick Setup, script 'quicksetup'.
These are symlinks to 'quicksetup':
quickcountry
timezone-set
chooselocale
The last two replace the scripts of the same name, and work with or without X.
I implemented the country settings, same as shinobar's firstrun, but when I started on the X setup and hostname, I had second thoughts. I implemented resolution selection by means of xrandr, however I don't think it appropriate to be offering the xrandr solution as the first choice. Also, I don't know if this is the right place to be setting the hostname.
There is a variable, DISTRO_XORG_AUTO in /etc/DISTRO_SPECS. If 'yes', then X starts automatically at first boot, otherwise the Xorg Wizard is run. Wary is built with 'no', so behaviour is as before, locale, keyboard and Xorg Wizard text-mode dialogs.
However, Racy has a recent version of Xorg and is built with 'yes', so now at first boot execution goes straight to the desktop, no text-mode dialogs at all. However, instead of bringing up the full Quick Setup, the symlink 'quickcountry' is executed, which only brings up the country settings:
After clicking the 'OK' button, a restart of X is performed if necessary, then the welcome1stboot is offered -- I intend to redesign that to offer the Xorg Wizard more prominently. Setting hostname will be offered somewhere in the network setup Wizard.
Script /usr/sbin/quicksetup is internationalised, and /usr/sbin/quicksetup.pupdev has full instructions for creating a language translation file.
Comments
faster bootupUsername: linuxcbon
I have an idea, why not remove choose locale, choose keyboard, choose timezone, choose graphics from boot ? These can be later chosen by the user, in jwm. Boot then can be fast and easy. BTW I am testing but testing is a hard job.
Resolution selection
Username: Terryphi
"Good idea to give Xorg Wizard more prominence. I have found it impossible on my hardware to go straight to the desktop with a resolution of 1024x768 - which is what my eyes require! Improving resolution selection should be a priority. Xorg always seems to go want to go to a default resolution.
countrywizard
Username: shinobar
"If you want to separate the country settings from the firstrun, you can just call /usr/bin/countrywizard.qs. In lucid and slaco, the firstrun.sh or /root/Startup/fullstart calls /usr/bin/firstrun which offers country settings with hostname and X resolution. But you can call /usr/bin/countrywizard.qs there, you are offered only the country settings.
countrywizard, firstrun, xrandshell
Username: shinobar
"my firstrun-1.9.pet has /usr/bin/firstrun, which is a symlink to /usr/sbin/countrywizard.qs. The pinstall.sh overwrites /usr/sbin/countrywizard and /usr/sbin/xrandrshell both the symlinks to /usr/sbin/countrywizard.qs. That is all the 3 are symlinks to the same script /usr/sbin/countrywizard.qs. But they shows different behaver. countrywizard offers only country settings. xrandrshell offers X resolution, and firstrun offers both plus hostname.
Preinstalled Seamonkey/Firefox extensions
Username: Iguleder1
"Barry, I found a way to pre-install extensions for Firefox and Seamonkey without having to create a profile first! It's really simple - I found out that xpi extensions are zip archives. Just unzip an extensions, open install.rdf and get its ID, which is a GUID. In the case of TorButton, it's "{e0204bd5-9d31-402b-a99d-a6aa8ffebdca}". Here's how to pre-install TorButton for all users, if so (assuming Firefox is located in /usr/local/apps/firefox): [code]install -m644 -D torbutton-current.xpi $INSTALL_DIR/usr/local/apps/firefox/extensions/\{e0204bd5-9d31-402b-a99d-a6aa8ffebdca\}.xpi[/code] Very simple and works great here, with the advantage of being future-proof and easy.
Xorg autostart
Username: shinobar
"As you know Xorg can autostart in newer version as Lucid, slaco and Racy. But also the older Xorg in Puppy/Wary can. You can see the solution in the Wary-511-01q. It starts Xorg with vesa. Of course some hardwares have difficulty in autostart X, regardless the Xorg is newer or old. The Wary-511-01q also has a solution for that. The Wary-511-01q has the graphical boot menu thanks to the Grub4Dos and has a boot option, 'Safe mode'. The safe mode boots Puppy with the boot option pfix=nox. It leads to the command line and offers xorgwizard with a menu dialog. Please see how it works the Wary-511-01q with the 'Safe mode' boot option. http://shino.pos.to/linux/wary/
xrandr, hostname
Username: shinobar
"Barry> I don't think it appropriate to be offering the xrandr solution as the first choice. Also, I don't know if this is the right place to be setting the hostname. I agree the xrandr solution is not beautiful. As for the hostname, it is not proper to offer it in network setup because in many case the internet connection is made automatically without wizards.
I Prefer The Old CL Wizards
Username: abushcrafter
"I have to restart X because I use the UK keyboard layout. So this is just a nuisance. Will there be the option of the good old CL wizards please? btw how do I change my password for comments on your blog?
Cl wizards
Username: aragon2
"@abushcrafter [b]There is a variable, DISTRO_XORG_AUTO in /etc/DISTRO_SPECS. If 'yes', then X starts automatically at first boot, otherwise the Xorg Wizard is run. Wary is built with 'no', so behaviour is as before, locale, keyboard and Xorg Wizard text-mode dialogs.[/b] Aragon
Something that works
Username: gcmartin
"Hi Barry. I fully understand that there are multiple approaches to setup. But some of us will share that FirstRUN works. And instead of having a newbie/user go to several places in the plethora of desktops menus and tools for some of the simple stuff, you have to admit, that Shinobar's simple methods does this all in one single screen. Furter, it allow any user if they need to make a change, they can come to the one screen assure that it will relfect the current system setting, for adjusting or changing behavior. Might you consider a single screen for newbies (which was the approach you started with). The ONLY thng FirstRUN was missing was a password set tool. It had packed about 1 years of study prior to going into it for an organized single screen approach to booting. September,2010, it arrived on the scene demonstrating a practical method for boot without multiple user interventions before desktop. No other distro or OS on the planet had done that up until then. If you feel multiple screens is a better approach, we'll follow, but, I think your original approach was an overall best for all. Hope this helps
Something that works
Username: gcmartin
"I thnik your original was boot to an X desktop and provide a single screen for system tailoring. That's what FirstRUN had given us. Hope I got that right.
Re Quick Setup
Username: BarryK
"Thanks for the feedback. You might be thinking, why am I inventing the wheel when shinobar has done such a good job? Well, that is not really happening -- I am studying shinobar's code very carefully and importing blocks of it where appropriate. In many cases, even where I have rewritten the code, it is inspired by, and guided, by the ideas and code that shinobar has created. Yes, I have slept on it, reconsidering today, might bring back the X and hostname setup into the first window. Running the script with it's full name 'quicksetup' achieves this -- although it is not quite complete yet. Yes, many people are going to prefer the "old" text-mode dialogs, and even when the default is automatic X startup I will offer a fallback to the text-mode dialogs. Regarding setting the resolution by xrandr, it is less than satisfactory as it changes the resolution after X has started, causing an extra delay and screen restart/flicker -- it would be better to get xorg.conf to force X to use the required resolution. But, if that is what is really wanted up-front in the "firstrun" window, I suppose that I can live with that -- but it bothers me that many people will use it instead of fixing X "properly".
Trying to help
Username: GCMartin
"Barry, in trying to help this effort of a single startup user selection screen I posted [b]this new thread[/b] asking for ideas from the community. http://www.murga-linux.com/puppy/viewtopic.php?p=574540#574540 Hopefully it will provide a single place where ideas can be provided to you. Hope this helps
changing keyboard layout
Username: shinobar
"abushcrafter> I have to restart X because I use the UK keyboard layout. You need not restart X when you only change the keyboard layout with my code. Try [b]firstrun-1.9.pet[/b]. http://www.murga-linux.com/puppy/viewtopic.php?t=58312
setup
Username: scsijon
"my 2 bob, Maybe with so many variations in ideas, all we just need is another puppy pfix tag. ie pfix=autox uses firstrun or barry's equivalent. scsijon
keymap-set
Username: BarryK
"shinobar's 'keymap-set' script is brilliant coding, it has gone into Woof as-is. I confirm, yes, the script updates keyboard layout without having to restart X.
pfix=autox
Username: 01micko
"haha! i like it scsijon! Some machines don't like booting to X, some do, this would be a great idea. However, having firstrun (aka quicksetup) needn't depend on the setup of X. In slacko xorgwizard runs first (console mode) then shino's first run (very slightly modded) runs, then welcomefirstboot.
Re: No Restart X For Change Of Keyboard Layout
Username: abushcrafter
"<blockquote>20 Oct 2011, 8:36 by shinobar changing keyboard layout abushcrafter> I have to restart X because I use the UK keyboard layout. You need not restart X when you only change the keyboard layout with my code. Try firstrun-1.9.pet. http://www.murga-linux.com/puppy/viewtopic.php?t=58312 </blockquote> Great that is a nice improvement.
Shinobar's connection to WARY
Username: GCMartin
"Don't know why i didn't mention this earlier. But, hasn't all of Shinobar's work over the 18 months have Barry's WARY running with FirstRUN? Probably should have mentioned this earlier.
Setting hostname
Username: BarryK
"shinobar stated: [i]As for the hostname, it is not proper to offer it in network setup because in many case the internet connection is made automatically without wizards.[/i] The problem with that statement is that if the connection is made automatically at first startup, then it is already to late to set the hostname in 'firstrun'. It would make no difference setting hostname by a later network setup tool. But, you probably mean that as the connection has been automatically established, the user might not bother to run any other network setup tool, so having the hostname setting up-front will at least bring that to their attention. ...I think that I have understood your comment correctly.
Symlinks to 'quicksetup'
Username: BarryK
"The full complement of symlinks to 'quicksetup' are now: [i]chooselocale countrywizard quickcountry timezone-set xrandrshell[/i]
hostname
Username: 01micko
"We now have a unique hostname. It is set before puppy has booted. Why not just have a note that states if HOSTNAME is changed it is not fully stuck until a saved reboot is made? It may be a better option in the shutdown wizard. Remember.. the kernel won't know it's changed until a reboot. This could be critical in some situations. My 2c
Hostname
Username: GCMartin
"From my user perspcetive, FirstRUN offer the opportunity to set this PC name to something I would recognize from say Windows/MAC shuld it show in their network screen. I may choose Suze, Edward, etc. What I see in Slacko, Lighthouse, I think some of Pemasu's work and others, is that when this run, most (some all) of the Puppy fields and files are set to reflect the new hostname. (In some of these cases, where FirstRUN is used, it has required me to exit X to Prompt, and enter logout or enter "login root" to redrive the system. Then I find that all of the fields are, now, properly set so that any Puppy application will find consistent hostname information. Further should there be a need to later change the hostname should I need to do it after system has been running awhile, I simply come back to FirstRUN (Menu>SEtup>Personalize Settings) and redrive the process with the new hostname. Seems that the combination of Shinobar,01Micko, and TaZoC have collaborated to address this in the distros they produce. Understanding its importance in one thing, but implementing has been a bit of a task in the community until these distro developers began to address this. Hope this helps.
Tags: woof