Hi All:
Am trying to launch a script at login to mount an encrypted partition.
I've been trying the option to place a script and/or commands in
/usr/lib/x2go/extensions/post-start.d/scriptname.sh. I can get this to
work, but want to figure out a way to keep the password for the mount
hidden.
Q: if I compile the script with shc, can I call a binary using the /usr/lib/x2go/extensions/post-start.d/ approach? It appears right now that the compiled script/binary can only be started as root, and x2go seems to call scripts as the user logging in.
Q: alternatively, if I put one script in /usr/lib/x2go/extensions/post-start.d/ that calls another that contains the mount command with the password, is there a way to make the called script callable from the user login but also not "viewable" by the user. I've tried things like "chmod 711" but the script's content either remain visible if it executes or the script's content can't can't be seen but it doesn't execute.
Any help appreciated - thanks!
Am 02.10.2013 02:44, schrieb Ted Barnes:> Hi All:
Am trying to launch a script at login to mount an encrypted partition. I've been trying the option to place a script and/or commands in /usr/lib/x2go/extensions/post-start.d/scriptname.sh. I can get this to work, but want to figure out a way to keep the password for the mount hidden. [...]
Besides Mike's posts ...
We ran in similar issues, as we wanted to execute a pre-start script, so I digged into /usr/bin/x2goserver-run-extensions and found:
------<SNIP>------ find "$X2GO_LIB_PATH/extensions/$X2GO_MODALITY.d/" -maxdepth 1 -mindepth 1 | egrep "/[0-9]{3}_[[:alnum:]]+" | sort | while read x2go_extension; do ------<SNAP>------
So you have to give your scripts/binarys such names. In your example:
/usr/lib/x2go/extensions/post-start.d/001_sriptname.sh or something like that.
Greetz, Tim