File tree Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
# reference: /bin/run.sh
3
3
4
- echo " Setting up noVNC auto-connection"
4
+ echo " >> Setting up MATLAB environment"
5
+ export USAGE=cloud
6
+ export VARIANTmatlab=matlabLNU
7
+
8
+ mkdir -p /home/work/Desktop
9
+ cat > /home/work/Desktop/MATLAB.desktop << EOF
10
+ [Desktop Entry]
11
+ Version=1.0
12
+ Type=Application
13
+ Name=MATLAB R2019b
14
+ Comment=
15
+ Exec=/opt/matlab/R2019b/bin/matlab
16
+ Icon=/opt/matlab/R2019b/bin/glnxa64/cef_resources/matlab_icon.png
17
+ Path=
18
+ Terminal=true
19
+ StartupNotify=false
20
+ Path=/home/matlab/Documents/MATLAB
21
+ EOF
22
+ chmod +x /home/work/Desktop/MATLAB.desktop
23
+
24
+ echo " >> Setting up noVNC auto-connection"
5
25
rm /opt/noVNC/index.html
6
26
ln -s /opt/noVNC/redirect.html /opt/noVNC/index.html
7
27
8
28
rm -rf /tmp/.X*
9
29
10
- echo " Starting background VNC server"
30
+ echo " >> Starting background VNC server"
11
31
export PASSWORD=matlab
12
32
printf " ${PASSWORD} \n${PASSWORD} \n\n" | /opt/kernel/su-exec $LOCAL_USER_ID :$LOCAL_GROUP_ID vncpasswd
13
33
14
- ls -al /home/work
34
+ cp -R /home/matlab/.config /home/work
35
+ cp -R /home/matlab/Documents /home/work
36
+ cp /home/matlab/.vnc/xstartup /home/work/.vnc/xstartup
37
+ chown -R $LOCAL_USER_ID :$LOCAL_GROUP_ID /home/work
15
38
/opt/kernel/su-exec $LOCAL_USER_ID :$LOCAL_GROUP_ID /usr/bin/vncserver -geometry 1600x1200
39
+ cat > /home/work/.xscreensaver << EOF
40
+ mode: off
41
+ EOF
16
42
17
- echo " VNC server is started."
43
+ echo " >> VNC server is started."
18
44
19
45
# The next line is executed by the kernel runner's service port handler.
20
46
# "$SUEXEC" /opt/noVNC/utils/launch.sh --listen 6080 --vnc localhost:5901 > /dev/null 2>&1 &
You can’t perform that action at this time.
0 commit comments