-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f561a49
commit ea871fb
Showing
6 changed files
with
292 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
#!/bin/bash | ||
DOCKER_GPG=/etc/apt/keyrings/docker.gpg | ||
apt-get install -y --no-install-recommends \ | ||
curl \ | ||
dbus-x11 \ | ||
feh \ | ||
firefox \ | ||
fluxbox \ | ||
fonts-wqy-microhei \ | ||
geany \ | ||
gtk2-engines-murrine \ | ||
gvfs-backends \ | ||
jq \ | ||
language-pack-gnome-zh-hant \ | ||
language-pack-zh-hant \ | ||
libbz2-dev \ | ||
libgl1-mesa-dri \ | ||
liblzma-dev \ | ||
libssl1.0 \ | ||
libwebkit2gtk-4.0 \ | ||
mesa-utils \ | ||
nano \ | ||
nemo \ | ||
net-tools \ | ||
openssh-server \ | ||
pwgen \ | ||
python3-pyqt5 \ | ||
python3-pyqt5.qtsvg \ | ||
python3-pyqt5.qtwebkit \ | ||
rsync \ | ||
ttf-ubuntu-font-family \ | ||
wget \ | ||
xdg-utils \ | ||
lxterminal \ | ||
xvfb \ | ||
zlib1g-dev \ | ||
zenity | ||
git clone https://github.com/Biodepot/Biodepot-workflow-builder | ||
cp -r Biodepot-workflow-builder/orange3 /orange3 | ||
cp -r Biodepot-workflow-builder/orangePatches /orangePatches | ||
apt-get install -y \ | ||
build-essential \ | ||
python3-dev \ | ||
python3-pip \ | ||
&& python3 -m pip install --upgrade \ | ||
pip==20.0.1 \ | ||
setuptools \ | ||
wheel | ||
cd / && pip3 install -r orange3/requirements-gui.txt | ||
beautifulsoup4 \ | ||
docker \ | ||
pysam | ||
pip3 install -e orange3 | ||
|
||
apt-get install -y --no-install-recommends gnupg | ||
mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o $DOCKER_GPG | ||
arch=$(dpkg --print-architecture) \ | ||
&& codename=$(awk -F= '/CODENAME/ {print $2;exit}' /etc/os-release) \ | ||
&& echo "deb [arch=$arch signed-by=$DOCKER_GPG] https://download.docker.com/linux/ubuntu $codename stable" > \ | ||
/etc/apt/sources.list.d/docker.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
containerd.io \ | ||
docker-ce \ | ||
docker-ce-cli | ||
pip3 install --user jsonpickle | ||
cp -r Biodepot-workflow-builder/widgets widgets | ||
cp -r Biodepot-workflow-builder/biodepot biodepot | ||
cp -r Biodepot-workflow-builder/coreutils coreutils | ||
|
||
apt-get install -y xorg | ||
cp -r Biodepot-workflow-builder/scripts/generate_setup.sh /usr/local/bin/generate_setup.sh | ||
chmod +x /usr/local/bin/generate_setup.sh | ||
pip3 install -e /biodepot | ||
curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \ | ||
&& chmod +x /usr/local/bin/docker-compose | ||
sed -i 's/"Orange Canvas"/"Bwb"/' /orange3/Orange/canvas/config.py | ||
rm -rf ~/.fluxbox | ||
cp -r Biodepot-workflow-builder/fluxbox_config ~/.fluxbox | ||
cp -r Biodepot-workflow-builder/user_config/* ~/. | ||
cp /orangePatches/schemeedit.py /orange3/Orange/canvas/document/schemeedit.py | ||
cp /orangePatches/canvasmain.py /orange3/Orange/canvas/application/canvasmain.py | ||
cp /orangePatches/widgetsscheme.py /orange3/Orange/canvas/scheme/widgetsscheme.py | ||
cp /orangePatches/signalmanager.py /orange3/Orange/canvas/scheme/signalmanager.py | ||
cp /orangePatches/link.py /orange3/Orange/canvas/scheme/link.py | ||
cp /orangePatches/signals.py /orange3/Orange/widgets/utils/signals.py | ||
cp /orangePatches/linkitem.py /orange3/Orange/canvas/canvas/items/linkitem.py | ||
cp /orangePatches/__main__.py /orange3/Orange/canvas/__main__.py | ||
cp /orangePatches/discovery.py /orange3/Orange/canvas/registry/discovery.py | ||
|
||
cp Biodepot-workflow-builder/scripts/startBwb.sh /usr/local/bin/startBwb.sh | ||
cp Biodepot-workflow-builder/scripts/startSingleBwb.sh /usr/local/bin/startSingleBwb.sh | ||
cp Biodepot-workflow-builder/scripts/runDockerJob.sh /usr/local/bin/runDockerJob.sh | ||
cp Biodepot-workflow-builder/scripts/startScheduler.sh /usr/local/bin/startScheduler.sh | ||
cp Biodepot-workflow-builder/scripts/build_workflow_containers.sh /usr/local/bin/build_workflow_containers.sh | ||
cp Biodepot-workflow-builder/scripts/whiteListToolDock.py /usr/local/bin/whiteListToolDock.py | ||
cp Biodepot-workflow-builder/scripts/addWorkflowsToToolDock.py /usr/local/bin/addWorkflowsToToolDock.py | ||
cp Biodepot-workflow-builder/scripts/addWidgetToToolDock.sh /usr/local/bin/addWidgetToToolDock.sh | ||
cp Biodepot-workflow-builder/scripts/removeWidgetFromToolDock.sh /usr/local/bin/removeWidgetFromToolDock.sh | ||
cp Biodepot-workflow-builder/scripts/generate_setup.sh /usr/local/bin/generate_setup.sh | ||
cp -r Biodepot-workflow-builder/executables /usr/local/bin/executables | ||
groupadd ftpaccess | ||
cp Biodepot-workflow-builder/sshd_config /etc/ssh/sshd_config | ||
cp Biodepot-workflow-builder/startSftp.sh /usr/local/bin/startSftp.sh | ||
cp Biodepot-workflow-builder/scripts/findResolution.sh /usr/local/bin/findResolution.sh | ||
|
||
cp -r Biodepot-workflow-builder/workflows /workflows | ||
cp -r Biodepot-workflow-builder/notebooks /notebooks | ||
cp -r Biodepot-workflow-builder/templates /templates | ||
cp -r Biodepot-workflow-builder/icons /icons | ||
cp -r Biodepot-workflow-builder/tutorialFiles /tutorialFiles | ||
cp Biodepot-workflow-builder/serverSettings.json /biodepot | ||
|
||
cp Biodepot-workflow-builder/startup.sh / | ||
cp Biodepot-workflow-builder/nginx.conf /etc/nginx/sites-enabled/default | ||
|
||
#cp Biodepot-workflow-builder/ config files for dev tools | ||
cp -r Biodepot-workflow-builder/dev-files/geany/ /root/.config/ | ||
cp -r Biodepot-workflow-builder/VM/xorg.conf /etc/X11/xorg.conf | ||
cp -r Biodepot-workflow-builder/VM/*.sh /usr/local/bin/ | ||
cp Biodepot-workflow-builder/VM/menu /root/.fluxbox/menu | ||
cp .fluxbox/bwb.svg /orange3/Orange/canvas/icons/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by fluxbox-generate_menu | ||
# | ||
# If you read this it means you want to edit this file manually, so here | ||
# are some useful tips: | ||
# | ||
# - You can add your own menu-entries to ~/.fluxbox/usermenu | ||
# | ||
# - If you miss apps please let me know and I will add them for the next | ||
# release. | ||
# | ||
# - The -r option prevents removing of empty menu entries and lines which | ||
# makes things much more readable. | ||
# | ||
# - To prevent any other app from overwriting your menu | ||
# you can change the menu name in ~/.fluxbox/init to: | ||
# session.menuFile: ~/.fluxbox/my-menu | ||
[begin] (Applications) | ||
[encoding] {UTF-8} | ||
[exec] (Bwb) {/usr/local/bin/startBwb.sh} </root/.fluxbox/bwb256.png> | ||
[exec] (Bwb-debug) {/bin/bash -c 'export XENVIRONMENT=.Xresources; lxterminal -e startBwb.sh orange-canvas -l 4'} </root/.fluxbox/bwb256.png> | ||
[exec] (Files) {dbus-launch nemo} | ||
[exec] (Resize) {/usr/local/bin/resize.sh} | ||
[exec] (Terminal) {/bin/bash -c 'export XENVIRONMENT=.Xresources; lxterminal'} | ||
[exec] (geany) {geany} | ||
[exec] (firefox) {firefox} | ||
[exec] (Quit) {quit_desktop.sh} | ||
[endencoding] | ||
[end] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Find the Xorg process for the current user | ||
XORG_PID=$(ps -u "$USER" -o pid,cmd | grep -E 'Xorg|X ' | grep -v grep | awk '{print $1}') | ||
|
||
# Check if Xorg process was found | ||
if [ -z "$XORG_PID" ]; then | ||
zenity --info --text="No Xorg process found for user $USER. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Prompt the user for confirmation using zenity | ||
if zenity --question --text="Are you sure you want to terminate your X11 session?"; then | ||
# User clicked "Yes" | ||
zenity --info --text="Terminating Xorg process (PID: $XORG_PID)..." | ||
kill "$XORG_PID" | ||
|
||
# Verify if the process is still running, and if so, forcefully kill it | ||
if ps -p "$XORG_PID" > /dev/null; then | ||
zenity --warning --text="Process did not terminate gracefully. Forcing termination..." | ||
kill -9 "$XORG_PID" | ||
fi | ||
zenity --info --text="Xorg process terminated." | ||
stty echo | ||
else | ||
# User clicked "No" | ||
zenity --info --text="Operation canceled by the user." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# Get all unique modes (resolutions) from the first column of xrandr output | ||
modes=$(xrandr | awk '{ print $1 }' | grep '^[0-9]*x[0-9]*$' | sort -u) | ||
|
||
# Check if we found any modes | ||
if [ -z "$modes" ]; then | ||
zenity --error --text="No available screen resolutions found." | ||
exit 1 | ||
fi | ||
|
||
# Display the unique list of available modes in zenity | ||
selected_mode=$(echo "$modes" | zenity --list --title="Select Screen Resolution" \ | ||
--text="Choose a screen resolution" \ | ||
--column="Resolution" --width=300 --height=400) | ||
|
||
# Check if the user pressed cancel or didn't select a mode | ||
if [ -z "$selected_mode" ]; then | ||
echo "No resolution selected. Exiting." | ||
exit 1 | ||
fi | ||
|
||
# Prompt the user to select an output if multiple displays are connected | ||
outputs=$(xrandr | grep " connected" | awk '{ print $1 }') | ||
output_count=$(echo "$outputs" | wc -l) | ||
|
||
if [ "$output_count" -gt 1 ]; then | ||
# Let the user choose an output if more than one is connected | ||
selected_output=$(echo "$outputs" | zenity --list --title="Select Display Output" \ | ||
--text="Choose a display output to apply the resolution" \ | ||
--column="Output" --width=300 --height=200) | ||
|
||
# Check if the user pressed cancel or didn't select an output | ||
if [ -z "$selected_output" ]; then | ||
echo "No display output selected. Exiting." | ||
exit 1 | ||
fi | ||
else | ||
# Use the single output if only one display is connected | ||
selected_output="$outputs" | ||
fi | ||
|
||
# Apply the selected resolution to the chosen output using xrandr | ||
if xrandr --output "$selected_output" --mode "$selected_mode" 2>/dev/null; then | ||
zenity --info --text="Resolution set to $selected_mode on $selected_output successfully." | ||
else | ||
zenity --error --text="Failed to set resolution. $selected_mode may not be supported on $selected_output." | ||
exit 1 | ||
fi | ||
|
||
# Check if the background image path is stored in ~/.fehbg | ||
if [ -f ~/.fehbg ]; then | ||
# Source ~/.fehbg to reapply the same background image | ||
source ~/.fehbg | ||
else | ||
zenity --warning --text="No existing background image found to reapply." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Section "Monitor" | ||
Identifier "Monitor0" | ||
Option "PreferredMode" "1920x1080" | ||
EndSection | ||
|
||
Section "Screen" | ||
Identifier "Screen0" | ||
Device "Card0" | ||
Monitor "Monitor0" | ||
SubSection "Display" | ||
Modes "1920x1080" | ||
EndSubSection | ||
EndSection | ||
|
||
Section "Device" | ||
Identifier "Card0" | ||
Driver "intel" # or "modesetting" or your specific driver | ||
EndSection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters