Skip to content

Commit

Permalink
Add a couple hotkeys to start acquisition withouth a pointing device (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rgayon authored Mar 1, 2021
1 parent 5585aad commit 7df763f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/remaster_scripts/post-install-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function install_forensication_tools {
}

function install_basic_pkg {
readonly local COMMON_UTILS=( git jq python3-pip pv zenity )
readonly local COMMON_UTILS=( git jq python3-pip pv zenity vim )
readonly local WIRELESS_PKG=( firmware-b43-installer bcmwl-kernel-source )

apt-get -y update
Expand Down
37 changes: 37 additions & 0 deletions tools/remaster_scripts/post-install-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,41 @@ EOCHIPSHORT

}

function user_add_setup_script {
# Sets up a script to be run after GiftStick has booted and user is logged in.
# This currently adds:
# - A hotkey to start the acquisition script with no mouse interaction:
# ctrl + alt + f and ctrl + shift +y
readonly local SENTINEL=".gift_is_setup"
readonly local SETUP_SCRIPT="gift_setup.sh"
cat << EOSETUPSCRIPT | sudo tee ${SETUP_SCRIPT} > /dev/null
#!/bin/bash
if [[ ! -e \$HOME/${SENTINEL} ]]
then
xfconf-query --create --channel xfce4-keyboard-shortcuts \
--property "/commands/custom/<Primary><Shift>y" --type string \
--set "xfce4-terminal -e \\"bash -c 'sudo bash \$HOME/call_auto_forensicate.sh ; /bin/bash'\\""
xfconf-query --create --channel xfce4-keyboard-shortcuts \
--property "/commands/custom/<Primary><Alt>f" --type string \
--set "xfce4-terminal -e \\"bash -c 'sudo bash \$HOME/call_auto_forensicate.sh ; /bin/bash'\\""
touch \$HOME/${SENTINEL}
fi
EOSETUPSCRIPT

sudo mkdir -p .config/autostart

cat << EOSTARTUPSCRIPT | sudo tee .config/autostart/gift_setup.desktop > /dev/null
# This ensures the GiftStick setup script is run when the user logs in.
[Desktop Entry]
Name=GiftStick Setup
Type=Application
Exec=/bin/sh -c "bash \$HOME/${SETUP_SCRIPT}"
EOSTARTUPSCRIPT
}


user_add_setup_script

user_customise_desktop

0 comments on commit 7df763f

Please sign in to comment.