How to bypass xorgwizard during boot time?

Using applications, configuring, problems
Message
Author
simargl

#16 Post by simargl »

.
Last edited by simargl on Sun 01 Sep 2013, 15:29, edited 1 time in total.

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#17 Post by watchdog »

I am unemployed and just having nothing to do I tried a hack of /usr/bin/xwin. I builded a puppy_slacko_5.5.sfs modified in the following way:
1-Copy your desired xorg.conf in /etc/X11/myxorg.conf
2-As first line of /usr/bin/xwin script add a line as:

Code: Select all

cp /etc/X11/myxorg.conf /etc/X11/xorg.conf
I booted in ram mode with the modified slacko sfs and it runs quicksetp at beginning but if you close it without savings the xorg.conf was the right one and keyboard, for example, was already set with my locale. When I boot in ram mode slacko I have not to pass through xorgwizard, so I don't know if this can help.

EDIT: I confirm: I have had success to bypass xorgwizard and country settings in Insidious Puppy which I took for my trial. Add at what said above that you must rename /etc/rc.d/rc.country as /etc/rc.d/rc.country.old and comment lines in /usr/bin/xwin relative to changed keyboards. It works here.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#18 Post by anikin »

Hi watchdog,
that's a bit different from what I meant. Anyway, follow the link provided by don570 a few posts above and you can bypass it. I've had success, partial, because I can't figure out how to make it go to the desktop without typing 'xwin jwm'.
In a nutshell:
1) in root/.profile, I have this:

Code: Select all

#want to go straight into X on bootup only...
 if [ ! -f /tmp/bootcnt.txt ];then
  touch /tmp/bootcnt.txt
  dmesg > /tmp/bootkernel.log
  exec xwin
 fi
fi
and this in:
2) etc/rc.d/rc.local:

Code: Select all

touch /tmp/bootcnt.txt
and boot to cli and type 'xwin' or 'xwin jwm'. Not as elegant as simargl's solution, but an elegant solution requires cooperation of someone with knowledge. So far, all we have is an exchange of pleasantries, the two knowledgeable guys have had here. I will post my results later on.

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#19 Post by Peterm321 »

annikin wrote: I've had success, partial, because I can't figure out how to make it go to the desktop without typing 'xwin jwm'.
I dispensed with "xwin" quite some time ago after it was modified to automatically update xorg.conf, I created a small script to start X:

Code: Select all

#!/bin/bash
exec /usr/X11R7/bin/xinit /root/.xinitrc -- -br -nolisten tcp  dpms -allowMouseOpenFail  


anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#20 Post by anikin »

Hi Peterm321,
can you please, provide more details:
1) where do I put this script
2) xinit is in /usr/bin, should I relocate/copy it to /usr/X11R7/bin
3) any other steps?

Thank you in advance.

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#21 Post by Peterm321 »

anikin Yesterday, at 19:01 wrote: Hi Peterm321,
can you please, provide more details:
1) where do I put this script
2) xinit is in /usr/bin, should I relocate/copy it to /usr/X11R7/bin
3) any other steps
Hi anikin

1) I suppose you could put this script in any location listed in your PATH (echo $PATH). Perhaps /usr/local/bin might be suitable.

2) No. You can amend the script to reflect where xinit is located.

3) If you want to disable xwin, itself a script, you can always amend it:

At the beginning of xwin I put this:

Code: Select all

echo -e "\n\n\n USE runx\n\n\n"
exit 0
A slightly lazy approach I used rather than trawl through the code to amend it to stop overwriting xorg.conf. If you install a later version of Puppy, this kind of amendment will need to be carried over.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#22 Post by anikin »

Thank you for the explanation.
I have remastered Barry's Raring-5.6.94, Micko's Slacko-5.6-PAE and Pemasu's Raring 3.9.9.2. All are starting up to X, I then type 'xwin' and get to the desktop. All are using a single xorg.conf - the unneeded ones have been removed together with the files, that I believe are xorgwizard related. And there's a truckload of them, not 4 as I mentioned earlier. In total they weigh in at 290 K. I'm sure, more will be discovered later. To cut it short, without xorgwizard the startup process is much, much faster, even if you have to type 'xwin'. Here's something curious. There's no xorgwizard now, but there's still an attempt to overwrite xorg.conf at bootup. (see an attached image) And it still requires this line at the end:

Code: Select all

#PuppyHardwareProfile=Intel_r__82945GM_Chipset
. With your script there is no such attempt, xorg.conf remains untouched. But the script doesn't bring puppy to the desktop.
Attachments
xconf.jpeg
(31.32 KiB) Downloaded 339 times

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#23 Post by Peterm321 »

anikin Today, at 06:42 wrote: With your script there is no such attempt, xorg.conf remains untouched. But the script doesn't bring puppy to the desktop.
Erm, I hope I am not leading you down a rather complicated path. A solution that I adopted may not be all that fine for someone else. I should mention that I have a full HD install, also I have an addon PCI Graphics card that sits on top, for lack of a better word, of an onboard video controller. Although this disables the onboard video controller in the bios, lspci still "sees" it. For a while kernels that adopted udev caused a kernel panic. The latest kernels do not panic, but xorgwizard fails. For example I have tried Raring 3991 on this machine and xorgwizard fails (goes to black screen & requires reboot). This problem can be fixed by deleting the onboard video device in the /sys/devices/pci* subsystem. Ideally this should be done at the beginning of the initial boot script at /etc/rc.d/rc.sysinit.

However leaving that side issue, the point is that I have been willing to hack the /etc/rc.d/rc.sysinit script, mind you it took a while to figure it out. With a full HD install the config files get updated there and then but interfering with xwin may not be so kind to a frugal install as when Xorg exits there is some further scripts processed including shutdow scripts and system updating. When I exit, using my system, it is to the command prompt and I run my own script to poweroff or reboot am not so sure this would suit you though, or anyone else so it might be worth looking at xwin more closely than I did and see whether the parts that overwrite xorg.conf can be amended.


In terms of the desktop, I understand it is the ROX-Filer program that starts the desktop. For Wary 5.0 this is in $HOME/.xinitrc. There are lines like

Code: Select all

#w468 on old PCs this sometimes does not start, see further down...
if [ -f $HOME/Choices/ROX-Filer/PuppyPan1 ];then
 rox -p $HOME/Choices/ROX-Filer/PuppyPin -r $HOME/Choices/ROX-Filer/PuppyPan1
else
 rox -p $HOME/Choices/ROX-Filer/PuppyPin
fi
I actually have just tested this by killing the ROX-Filer task, the desktop goes blank. Typing

rox -p $HOME/Choices/ROX-Filer/PuppyPin

At the command prompt restores the desktop icons.

Anyway starting Xorg in the way I describe does produce a desktop but am not sure this would work in all cases particularly when starting a new install. There may be files that need Xorgwizard/Xorg to be run at least once. On a full HD install these files are then all available, not so sure about a frugal or other kind of install. What you might consider is to set up xorg.conf etc the way you want and *then* amend xwin to stop altering it.

Strangely there doesnt seem to be much opposition to the way the starup scripts keep overwriting xorg.conf but it might be worth filing a request in the request or bugs forum(s) to see if the Puppy Derivatives authors are willing to add an option to disable or bypass this aspect but if there aren't many complaints then this change is unlikely I fear.

One trick I find useful to find what scripts are doing what is to use the grep -ir command. For example to find any scripts in /root or /etc that refer to PuppyPin you can cd to /root and or /etc at the command prompt and type
grep -ir PuppyPin *
(and it will search the scripts for this string).

Post Reply