Quote:
Originally Posted by glasnost
Hmm. I think that either I don't understand the situation well enough, or I'm not articulating my problem well enough. Let me try again:
Situation:
#mount -bind /var/local/xorg.conf /etc/xorg.conf
[1]#restart X
[2] /Etc/xorg.conf is overwritten by makexconfig
If / was mounted rw, then bound, then ro - /etc/xorg.conf would still be overwritten by makexconfig because makexconfig would need rw privs in order to write xorg.conf in the first place, no?
And if not, then wouldn't a reboot leave you with the edited xorg.conf? I think this is why coplate is suggesting the 'mount bind and edit makexconfig route.'
Or I'm completely wrong and confusing the situation.
|
[2] is caused by [1] - I.E: it was over-written because you told it to (the writing is part of the upstart, start process).
You can't mount to a ro mount point, at least not in Linux, which this is.
The "mount --bind" operation will not persist across re-boots, unless you write code to make it happen as part of the boot process.
The directory name is /etc not /Etc
/var/local is the file system on partition #3, the / file sytem is on partition #1.
The Kindle script provided by Lab126 changes the rw/ro status of the file system mounted as /
The script does not affect any other partitions / file systems.
The change of status of / is not reflected in /var/local (because the file systems are independent backing stores).
In analogy, in some operating systems you can change the rw/ro status of the B:\ drive (backing store) without affecting the A:\ drive (backing store).
Typical of a multi-rooted file tree.
Linux (and all other *nix) uses a single rooted file tree and a backing store(s) per mount point.
X11 is compiled to look at only one place for its configuration file, /etc/xorg.conf
That must be set before X11 starts or re-starts, you can change it while X11 is running because it is only read during X11 start-up.
= = = = = =
Now consider the sequencing of operations all that above implies -
Kindle is running normally, un-modified.
Your scripting is triggered (called) either by a KUAL menu entry or a u-dev rule (however/wherever you program it).
Make the root file system writable (so the mount command does not fail)
Do the bind mount with the custom file.
Return the root file system to ro
Restart X11 without calling upstart -
send: ctrl-alt-backspace to X11 on X11's keyboard input.
(or maybe it also has a restart signal (interrupt), I forget)
I just looked for it, but my google foo is failing today, try sending SIGINT to X11.
You can try the last on your desktop - X11 is X11 is X11 etc
You probably want to bring up an alternate session (ctrl-alt-function-key, other than F7 - which is usually what X11 is running on) before sending SIGINT to the X11 session running your GUI. ;