<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font size="4">Hi, <br>
</font></p>
<p><font size="4">I found the situation a bit difficult to set up a
Cuis app for a multi-user environment.</font></p>
<p><font size="4">The idea is to have the Cuis app installed as root
in the host filesystem. The starter script of the cuis app,
copies the image and other stuff on the user space, then the vm
is started with this image.</font></p>
<p>All in all, I found myself in a lock-in lock-in situation.</p>
<p>In one hand I use AppLauncher to launch the app once the command
line options to cuis image were handled. So path to user image,
app resources are correct.</p>
<p>In the other hand, Cuis insists on logging early on file in its
own startup process (in read only directory) and user change again
in read only directory, before a -d option is executed (-d
"DirectoryEntry setUserBaseDirectory: '$HOME/$USERDATA/Resources'
asDirectoryEntry") to set the userBaseDirectory to the user space.<br>
</p>
<p>Main issue here, it seems DirectoryEntry userChangesDirectory did
not get a chance to be changed to user space, so BOOM! <br>
</p>
<p>assureStartupStampLogged<br>
"If there is a startup stamp not yet actually logged to disk,
do it now."<br>
"Note: This renames the existing user changes file, and
creates a new one."<br>
| changesFile directory oldUserChanges |<br>
(SourceFiles notNil and: [(changesFile := SourceFiles at: 2)
notNil]) ifTrue: [<br>
changesFile isReadOnly ifFalse: [<br>
changesFile setToEnd; newLine; newLine.<br>
changesFile nextChunkPut: StartupStamp; newLine.<br>
self forceChangesToDisk ]].<br>
(Preferences at: #autoNumberUserChanges) ifTrue: [<br>
oldUserChanges := DirectoryEntry userChangesDirectory //
self userChangesFileName.<br>
oldUserChanges exists ifTrue: [<br>
directory := oldUserChanges parent.<br>
PreviousUserChangesName := directory nextNameFor:
oldUserChanges nameWithoutExtension extension: 'changes'.<br>
oldUserChanges rename: PreviousUserChangesName ]].<br>
<b> DirectoryEntry userChangesDirectory </b>// self
userChangesFileName appendStreamDo: [ :stream |<br>
stream newLine; newLine.<br>
stream nextChunkPut: StartupStamp; newLine.<br>
stream flush ].<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a></pre>
</body>
</html>