Author Topic: Need to preserve installs as first day.  (Read 808 times)

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3829
Re: Need to preserve installs as first day.
« Reply #15 on: September 23, 2012, 04:20:22 AM »
Quote
Need to preserve installs as first day.

Clonezilla
3 minutes to make......3 minutes to restore.
There are scripts to customize

Xx
« Last Edit: September 23, 2012, 04:40:40 AM by Xenaflux »
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: Need to preserve installs as first day.
« Reply #16 on: September 23, 2012, 04:29:27 AM »
I've been wondering how to lock the desktop in my educative remaster once it is installed since the kids at school can easily change configs and that make teachers go crazy  ;D

In Windows there is an application (I don't know it's name) that every time you reboot the computer is like the first day, no changes are stored. That application is used in places where many people uses the computers: schools, internet cafes and others.

What can be done in Linux about this?

Install the remaster 'live' to HDD seems to be the simple answer.

At each boot it is back to pristine.

Is there some reason this won't do as you wish?


If you are using an installed OS, would not something akin to kde-config, run at startup, not do it also?

It could be used to replace the existing user setting with the defaults.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Crow

  • Hero Member
  • *****
  • Posts: 8818
  • OBJECTS IN MIRROR... ARE LOSING
Re: Need to preserve installs as first day.
« Reply #17 on: September 23, 2012, 09:56:29 AM »
Just17 I'm not sure to understand how to do that.

It seems as a good answer in the short term but that will means that kids works would not be saved (same as in the windows program)

Quote
If you are using an installed OS, would not something akin to kde-config, run at startup, not do it also?

It could be used to replace the existing user setting with the defaults.

Same like the problem with the KDE update? fine  ;D  Could you elaborate more please?

Xenaflux, seems like an overkill but it's an option  ;D
« Last Edit: September 23, 2012, 12:38:31 PM by Crow »
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: Need to preserve installs as first day.
« Reply #18 on: September 23, 2012, 10:36:35 AM »
Just17 I'm not sure to understand how to do that.

It seems as a good answer in the short term but that will means that kids works would not be saved (same as in the windows program)

Quote
If you are using an installed OS, would not something akin to kde-config, run at startup, not do it also?

It could be used to replace the existing user setting with the defaults.

Same like the problem with the KDE update? fine  ;D  Could you elaborate more please?

Xenaflux seems like an overkill but it's an option  ;D

The OS in a live session does not retain changes to it.
That does not prevent any files being saved anywhere that is accessible to the user.
They could be saved on the same partition, a different partition or on a removable device.

You just create a remaster with all the software and settings you wish to have available to the user.

Then do a live install to a partition on the HDD.
***

The kde-config tool is designed to replace the user's KDE environment with the default one.
That gives the default user's home settings, so it matters little what changes might have been made during use, if they will all be deleted on shut-down or reboot.

***

All is needed is to ensure the users save stuff they wish to keep into a specific folder.

They soon learn to do that  :D

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3881
Re: Need to preserve installs as first day.
« Reply #19 on: September 23, 2012, 10:55:39 AM »
kde-config would only replace kde settings on reboot. It would not reset changes made to other applications settings. For example, if someone played around with some of the multiple settings in vlc, it may not work and you would also need to remove ~/.config/vlc.

Galen

Offline pags

  • Hero Member
  • *****
  • Posts: 2602
  • Keep it clean.
Re: Need to preserve installs as first day.
« Reply #20 on: September 23, 2012, 11:49:28 AM »
I've been wondering how to lock the desktop in my educative remaster once it is installed since the kids at school can easily change configs and that make teachers go crazy  ;D

In Windows there is an application (I don't know it's name) that every time you reboot the computer is like the first day, no changes are stored. That application is used in places where many people uses the computers: schools, internet cafes and others.

What can be done in Linux about this?


Install the remaster 'live' to HDD seems to be the simple answer.

At each boot it is back to pristine.

Is there some reason this won't do as you wish?


If you are using an installed OS, would not something akin to kde-config, run at startup, not do it also?

It could be used to replace the existing user setting with the defaults.




Yep.

That was my first suggestion...

Offline CaptainSarcastic

  • Sr. Member
  • ****
  • Posts: 323
Re: Need to preserve installs as first day.
« Reply #21 on: September 23, 2012, 03:54:06 PM »
You mean on your system they're not?


I mean folders in home and such where personal settings and such are saved.  By changing the permissions on files usually modified by users to read-only it seems like you should be able to accomplish what the OP was asking for.  I haven't done any experimentation, but it just came to mind as a possible means of keeping users from making persistent changes.

Also, I just checked the repos, and there is an XFCE kiosk mode in there.  I'm not sure if that would be an option for the OP or not.

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3829
Re: Need to preserve installs as first day.
« Reply #22 on: September 23, 2012, 06:16:30 PM »
Quote
Xenaflux, seems like an overkill but it's an option

Yes, .......seems like......!
Restore 1 PC to original.............5 minutes
Restore 5 PCs to original............5 minutes
Restore 10 PCs to original..........5 minutes
Restore 20 PCs to original..........5 minutes
No thinking, no headache !
That is.... provided no-one tinkers with the network

Yup, it's overkill
 ;D ;D ;D ;D ;D
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline pags

  • Hero Member
  • *****
  • Posts: 2602
  • Keep it clean.
Re: Need to preserve installs as first day.
« Reply #23 on: September 24, 2012, 06:19:01 AM »
Just17 I'm not sure to understand how to do that.

It seems as a good answer in the short term but that will means that kids works would not be saved (same as in the windows program)

Quote
If you are using an installed OS, would not something akin to kde-config, run at startup, not do it also?

It could be used to replace the existing user setting with the defaults.

Same like the problem with the KDE update? fine  ;D  Could you elaborate more please?

Xenaflux seems like an overkill but it's an option  ;D

The OS in a live session does not retain changes to it.
That does not prevent any files being saved anywhere that is accessible to the user.
They could be saved on the same partition, a different partition or on a removable device.

You just create a remaster with all the software and settings you wish to have available to the user.

Then do a live install to a partition on the HDD.
***

The kde-config tool is designed to replace the user's KDE environment with the default one.
That gives the default user's home settings, so it matters little what changes might have been made during use, if they will all be deleted on shut-down or reboot.

***

All is needed is to ensure the users save stuff they wish to keep into a specific folder.

They soon learn to do that  :D



There's that...

I don't know if PERSISTENCE could be setup to work with a live install to HDD, but that would allow all kinds of modifications (except upgrading the kernel), with a complete reset being accomplished by wiping out the persistence file(s)...

Restoring the home folder to some saved defaults could be setup to either wipe user data along with it (by keeping all user data in the user's home folder, and wiping it along with the settings), or to keep it.  The simplest way to keep it (to my mind, without changing the perceived usage currently in place), would be to setup a separate "user data" directory", with whatever folders (Music, Documents, Video, etc) you want preserved, and then create symlinks from the user's folder to these before creating the "defaults" you would save and restore from...this would then just restore the links the the data folders, while wiping the hidden config file...

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: Need to preserve installs as first day.
« Reply #24 on: September 24, 2012, 06:38:38 AM »
Quote
I don't know if PERSISTENCE could be setup to work with a live install to HDD, but that would allow all kinds of modifications (except upgrading the kernel), with a complete reset being accomplished by wiping out the persistence file(s)...

Persistence can be used on the LiveHDD.

If the changes are going to be wiped between sessions I don't see purpose of using it though.

Of course it could be used to retain OS changes and eventually when the thing became unusable the changes could be wiped to start from scratch again.

That would facilitate an admin adding or updating apps between remasters, provided the users had no access to the root password.

Simply wiping the contents of the user account would allow for a new user set up to be created on boot up, IIRC based on /etc/skel  ....  and an autostart script to create the links for storage included in the remaster, should allow user data to be retained.

I haven't tried it, but imagine it would be as simple as that.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Crow

  • Hero Member
  • *****
  • Posts: 8818
  • OBJECTS IN MIRROR... ARE LOSING
Re: Need to preserve installs as first day.
« Reply #25 on: September 24, 2012, 07:37:25 AM »
I think I understand about half what has been written   ???  but seems very interesting and I will start to tinkering using some of what has been said.

It seems some of the would be solutions are DE specific, while the "live" option is more generic and probably closer to my abilities.

Thank you all, seems I have work to do.
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline Phil

  • Hero Member
  • *****
  • Posts: 768
Re: Need to preserve installs as first day.
« Reply #26 on: September 24, 2012, 08:00:06 AM »
Just sticking my oar in (to cause more confusion):

To back up my system / I use clonezilla livecd, proven many times over to me. It backs up a partition. Its easy.

To back up and maybe preserve/freeze my /home I use rsync:

rsync --archive --delete <what> <there>

Nice and easy, but watch the slash in the <what>

/home/ means the contents of home
/home means the home directory and all of its contents.

A reverse script does a restore
(alternative the tar command to an squashed archive, reverse to restore)

For personal data have them store their personal files somewhere else, as if they save anything in /home it will be obliterated.
This would need backing up separately, maybe rsync again.

Next stage I would have a ponder and try out various suggestions. If scripts are needed have a go and sound out the gurus for refining. Test to destruction, and then go live.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11054
  • MLUs Forever!
Re: Need to preserve installs as first day.
« Reply #27 on: September 24, 2012, 09:10:02 AM »
I think I understand about half what has been written   ???  but seems very interesting and I will start to tinkering using some of what has been said.

It seems some of the would be solutions are DE specific, while the "live" option is more generic and probably closer to my abilities.

Thank you all, seems I have work to do.

What DE is your remaster based on?

Can you tie down exactly what is and is not acceptable in the working arrangement?

Is it preferred or desirable to delete the user account at each boot (shutdown or start up)?

Does each student using the PC have their own log in or do they use a generic user account?

Does each student require a secure location to save their files, or are files saved in a communal location or maybe on their own USB stick?

When doing a remaster   /etc/skel   can contain your preferred account arrangement for all users created.
Each account created will have those same settings.

If you can supply more details then more specific suggestions could be forthcoming   ;)

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline horusfalcon

  • Hero Member
  • *****
  • Posts: 998
  • Wayfarer of The Western Wastes
Re: Need to preserve installs as first day.
« Reply #28 on: September 26, 2012, 09:53:15 PM »
Let me add that the script you are thinking about learning to write could be done with Bash scripting - Python is a bit of overkill, maybe?  (Not trying to say learning Python might not be a good thing for you, but Bash is already there, and ready to go on any Linux machine.)

(I don't know what you might already know, but think of Bash scripting kind of like old-fashioned MS-DOS Batch files on steroids if that will help.)

There are all kinds of great articles out there on Bash scripting, and web sites that have a lot of ready-made "script recipes" that might give you a jump-start on what you want.

A gentle intro to the subject from Linux.com.

https://www.linux.com/learn/tutorials/284789-writing-a-simple-bash-script-

This is from the Linux Documentation Project, and a great place to start.

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

This from IBM DeveloperWorks makes clear why Bash is a good choice, and has some great pointers, too.

http://www.ibm.com/developerworks/linux/library/l-bash/index.html

Mendel Cooper at the University of Illinois has put together one of the most definitive guides to Bash scripting I've ever seen, available online for free.

http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/

A lot of what's involved, no matter what language you write in, is knowing what to write to get your tasks accomplished.  If you know how what you want to do is most easily accomplished, it'll be a snap no matter what language it's written in.  (Good design is the key to good programming.  Time well spent in the design phase will tend to cut time in the coding and debug phases tremendously, and help you turn out better, more efficient, and more compact code.)

If these installs are "pure" PCLinuxOS LXDE, a simple replacement of the users' ~/.config/ folders that relate to LXDE should do the trick for ya without disturbing user data that may be on the machine.  I think the folders and files of interest would be (and where a folder is listed, all files and subfolders are of interest):

~/.config/leafpad      - folder for the default text editor for LXDE
~/.config/libfm          - folder for libraries for PCManFM
~/.config/lxautostart - folder controlling what LXDE starts up automatically on login
~/.config/lxpanel          - folder controlling how the LXDE Panel is configured
~/.config/lxsession      - folder controlling how the LXDE session is configured, including the desktop
~/.config/lxterminal      - folder controlling how LXTerminal is configured
~/.config/openbox        - folder controlling OpenBox, if you use it as your window manager
~/.config/pcmanfm      - folder controlling configuration of PCManFM
~/.config/lxtask.conf    - file controlling how LXDE Task Manager is configured.
~/.config/user-dirs.dir    - file controlling what DBUS uses for user directories?  (Still learning about this...)
~/.config/user-dirs.local - file controlling how DBUS behaves in the local environment?

It might be "cheaper" to just replace the entire ~/.config/ hierarchy, but this affects application configurations and a lot of other stuff, too.  (Might be what you want?)

You might also look into what /etc/skel does for a Linux System - basically it provides sane "defaults" for user accounts when they are created.  Alterations here affect all users, and are only to be undertaken if you're SURE all users need to be affected.
       
Just17's questions about student accounts and such are right on the money.  Answering these will help define the tasks any program would have to accomplish.

Trying to administer computers used by bright young students (who always have a propensity for surprising even the best system administrator) is a real challenge.  It's an environment where you'll learn fast or die - you'll get sharper at Linux because you have to.

Good luck, and good hunting, Crow!

Later ON,
D
"The Way is not a matter of knowing or not knowing.  One word to a wise man; one lash to a bright horse."

Dell Latitude D620, PCLinuxOS 2012.08 KDE4/LXDE, 3.2.18.pclos.bfs, specs here.