Remastering Puppy 2.01: .xinitrc file won't change

Please post any bugs you have found
Post Reply
Message
Author
jim232777
Posts: 23
Joined: Thu 18 May 2006, 13:56
Location: SC, US

Remastering Puppy 2.01: .xinitrc file won't change

#1 Post by jim232777 »

I'm trying to remaster 2.01 after adding XFCE. (this is my only addition.) Xfce requires a small change to the .xinitrc file in /root.

The script seems to go OK, and when I get to the part where it offers to let me change the contents of /tmp/root, I correct the .xinitrc file. However, when I finish the process, the CD that gets burned has the *original* file instead of the *modified* file that I saved to /tmp/root.

Everything else seems to be fine. If I boot the new CD, all I have to do is change the .xinitrc for things to work.

Any ideas?

Jim

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#2 Post by Dougal »

Did you change the xinitrc file that's inside the newly created sfs image?
It asks you after it creates the image with a pristine xinitrc.

If so it's strange, but I can tell you that Barry has added xinitrc to the files that get copied from your setup to the new image, so from 2.0.2 there won't be such a problem.

You can change it manually by opening up /usr/sbin/remasterpup2, then searching for part called "/etc section" (preceded by a lot of #'s, so just do a search for "######" or something). Then add a line sopying /root/.xinitrc to the list and you're done!
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

jim232777
Posts: 23
Joined: Thu 18 May 2006, 13:56
Location: SC, US

#3 Post by jim232777 »

AAAAAARGH!
Dougal wrote:Did you change the xinitrc file that's inside the newly created sfs image?
It asks you after it creates the image with a pristine xinitrc.
yep. sure did. changed /tmp/root/.xinitrc when it gave the message.
If so it's strange, but I can tell you that Barry has added xinitrc to the files that get copied from your setup to the new image, so from 2.0.2 there won't be such a problem.

You can change it manually by opening up /usr/sbin/remasterpup2, then searching for part called "/etc section" (preceded by a lot of #'s, so just do a search for "######" or something). Then add a line sopying /root/.xinitrc to the list and you're done!
OK. This time I edited remasterpup2, doing something like this.

Code: Select all

#######START WORKING ON /root#######
rm -rf /tmp/root 2> /dev/null
#do some work on /root before add it to the squashfs...
cp -a /initrd/pup_ro2/root /tmp/root #pristine /root
#copy all of my-applications/
cp -af /root/my-applications/* /tmp/root/my-applications/
#some dotpups get installed here...
cp -af /root/my-roxapps /tmp/root/
#window manager config files...
cp -af /root/.jwmrc /tmp/root/
cp -af /root/.fvwm95rc /tmp/root/
cp -af /root/.icewm/menu /tmp/root/.icewm/
cp -af /root/.xinitrc /tmp/root/.xinitrc                                                          <<<<<<<<<<<<<  this is the edit
#rox desktop settings...
cp -af /root/Choices/ROX-Filer/PuppyPin /tmp/root/Choices/ROX-Filer/
cp -af /root/Choices/ROX-Filer/globicons /tmp/root/Choices/ROX-Filer/
But again, after creating the image, burning a CD, and rebooting, my changes are gone. Where are they?!? Is there someplace that (again) creates the .xinitrc? I'm at my wit's end!

.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#4 Post by Dougal »

jim232777 wrote:But again, after creating the image, burning a CD, and rebooting, my changes are gone. Where are they?!? Is there someplace that (again) creates the .xinitrc? I'm at my wit's end!.
Sorry, as far as I can see all should work well... I don't think .xinitrc gets recreated anywhere.

Something else you could do is, at the end, just before the cd is burned, go to /mnt/partition-you-chose/the-building-directory/root/ and change xinitrc in there...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

sccat
Posts: 160
Joined: Mon 22 Aug 2005, 04:22

#5 Post by sccat »

The simpliest remaster method is not simple enough.

jim232777
Posts: 23
Joined: Thu 18 May 2006, 13:56
Location: SC, US

#6 Post by jim232777 »

Dougal wrote: Something else you could do is, at the end, just before the cd is burned, go to /mnt/partition-you-chose/the-building-directory/root/ and change xinitrc in there...
Well, it actually wasn't that simple, as by that point, it's all wrapped up in the squash file. I had to mount the pup_201.sfs, copy it to a directory, edit the appropriate places, create another pup_201.sfs, then put THAT back into the directory. The CD booted up into XFCE, with the correct .xinitrc

Shouldn't have to do it that way, but it worked. Barry or whoever maintains the remaster script may need to look at this . . .

thanks for the help,
Jim

sccat
Posts: 160
Joined: Mon 22 Aug 2005, 04:22

#7 Post by sccat »

How TO

"mount the pup_201.sfs, copy it to a directory, edit the appropriate places, create another pup_201.sfs"

Thanks.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#8 Post by Dougal »

sccat wrote:How TO

"mount the pup_201.sfs, copy it to a directory, edit the appropriate places, create another pup_201.sfs"

Thanks.
I actually didn't understand what he meant by "copy it to a directory", all you need to do is mount pup_201.sfs:

Code: Select all

mount -o loop /mnt/where-it-is/pup_201.sfs /mnt/data
(/mnt/data is arbitrary, you can choose some other mountpoint in /mnt)

Then you go into it and edit the .xinitrc file and then unmount:

Code: Select all

umount /mnt/data
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

sccat
Posts: 160
Joined: Mon 22 Aug 2005, 04:22

#9 Post by sccat »

Thanks.

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

#10 Post by BarryK »

jim232777,
When you modified remasterpup2 to copy .xinitrc, that's fine, but something
might be going wrong with the squashfs merge.
A bit later in the script, mksquashfs is executed, with the commandline option to merge the /tmp/root/ into the already existing squashfs file.
But, is there already the old .xinitrc in the squashfs file?
...I don't know, I'm just trying to guess what could have gone wrong.

jim232777
Posts: 23
Joined: Thu 18 May 2006, 13:56
Location: SC, US

#11 Post by jim232777 »

Dougal wrote: I actually didn't understand what he meant by "copy it to a directory", all you need to do is mount pup_201.sfs:

Code: Select all

mount -o loop /mnt/where-it-is/pup_201.sfs /mnt/data
(/mnt/data is arbitrary, you can choose some other mountpoint in /mnt)

Then you go into it and edit the .xinitrc file and then unmount:

Code: Select all

umount /mnt/data
OOPS! As a result of (a) getting obsessed with the copying issue and (b) trying to do too many things at once, my brain slipped out of gear on the fact that the squash file system is read/write. I was thinking "read only" like mounting an CD iso image. That's why I copied everything to a new directory and later re-created a new squashfs. You are, of course right.
BarryK wrote:something might be going wrong with the squashfs merge. . . . But, is there already the old .xinitrc in the squashfs file?
...I don't know, I'm just trying to guess what could have gone wrong.
Yeah, I was mulling that over. Just brainstorming here, but the squashfs merge might have problems and/or there might be a problem with unionfs and multiple copies of .xinitrc. Problem is, I'm just not very familiar with either of these systems, so I'm guessing.

Also, I wonder if the fact that we're talking about a 'hidden' file means anything. I think I discovered a similar problem with the .jwmrc (filename right? I'm at work right now . . .) file. After updating the menus to Puppy2 in my original XFCE installation, I ended up with Puppy 1.09 menus again in my remaster. I'm going to have to go back and pay particular attention to see if it's a bug, or if I just overlooked something.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#12 Post by Dougal »

jim232777 wrote:OOPS! As a result of (a) getting obsessed with the copying issue and (b) trying to do too many things at once, my brain slipped out of gear on the fact that the squash file system is read/write. I was thinking "read only" like mounting an CD iso image. That's why I copied everything to a new directory and later re-created a new squashfs. You are, of course right.
Ha! I caught my head yesterday thinking exactly the opposite: that I might have made a mistake and it's read-only...

One little thing that I thought might have caused the trouble (in some really strange way) is the way you had .xinitrc copied:

Code: Select all

cp -af /root/.xinitrc /tmp/root/.xinitrc
Maybe you should change it to how Barry did the other files:

Code: Select all

cp -af /root/.xinitrc /tmp/root/
I know your way works, but you never know...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Post Reply