Skip to content

Commit 8fbc6c8

Browse files
committed
File paths to FHS. Fixed C9 runner
1 parent 3743159 commit 8fbc6c8

File tree

6 files changed

+29
-53
lines changed

6 files changed

+29
-53
lines changed

.c9/project.settings

-43
This file was deleted.

README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@ Running X11 in a Cloud9 workspace.
88
Installation
99
------------
1010

11+
Run the install script with privileges
12+
1113
sudo ./install.sh
1214

1315
Running
1416
-------
1517

16-
./run.sh
18+
Use the custom C9 runner
19+
20+
Run > Run With > C9vnc
21+
22+
Or run the script directly from the /opt/ directory
23+
24+
/opt/c9vnc/c9vnc.sh
25+
26+
You can also export an alias to this script and run with the alias
27+
28+
alias c9vnc=/opt/c9vnc/c9vnc.sh
1729

18-
or use the `X11` runner.
30+
c9vnc

c9vnc.run

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"cmd": [ "c9vnc" ],
3-
"script": [
4-
"bash /opt/c9vnc/run.sh"
5-
],
2+
"cmd": [ "/opt/c9vnc/c9vnc.sh" ],
63
"working_dir": "$project_path",
74
"info": "Your GUI is running at \\033[01;34m$url/vnc.html\\033[00m.\n\\033[01;31m"
85
}

install.sh

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
#!/bin/bash
22

3+
#Request sudo permissions
34
if [[ $UID != 0 ]]; then
45
echo "Please run this script with sudo:"
56
echo "sudo $0 $*"
67
exit 1
78
fi
89

9-
10+
#Get prerequisites
1011
sudo apt-get install supervisor xvfb fluxbox x11vnc
1112

13+
#Copy supervisord configuration to proper configuration directory
1214
cp supervisord.conf ${HOME}/.config/supervisord.conf
1315

16+
#Create the proper directory for the script
1417
sudo mkdir /opt/c9vnc
18+
19+
#Make sure that the runners folder exists
1520
mkdir ${HOME}/workspace/.c9/runners
1621

22+
#Copy the C9 runner to the C9 watch folder
1723
cp c9vnc.run ${HOME}/workspace/.c9/runners/c9vnc.run
18-
cp run.sh /opt/c9vnc/run.sh
1924

20-
git clone git://github.com/kanaka/noVNC /opt/noVNC/
25+
#Copy the run script to proper /opt/ directory
26+
cp run.sh /opt/c9vnc/run.sh
2127

28+
#Clone noVNC into proper /opt/ directory
29+
git clone git://github.com/kanaka/noVNC /opt/noVNC/

run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
echo VNC client running at https://$C9_HOSTNAME/vnc.html
44

5-
supervisord -c ${HOME}/.config/supervisord.conf
5+
supervisord -c ${HOME}/.config/supervisord.conf

supervisord.conf

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[supervisord]
22
nodaemon=true
3+
pidfile=/tmp/supervisord.pid
4+
logfile=/tmp/supervisord.log
35

46
[program:xvfb]
57
command=/usr/bin/Xvfb :99 -screen 0 1280x864x16 -ac -pn -noreset

0 commit comments

Comments
 (0)