Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions ansible/roles/dev/tasks/apt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
- name: Block snapd via apt preferences
become: true
ansible.builtin.copy:
dest: /etc/apt/preferences.d/nosnap.pref
content: |
Package: snapd
Pin: release a=*
Pin-Priority: -10

- name: Add Google Chrome apt repo
become: true
ansible.builtin.deb822_repository:
name: google-chrome
types: deb
uris: https://dl.google.com/linux/chrome/deb/
suites: stable
components: main
architectures: amd64
signed_by: https://dl.google.com/linux/linux_signing_key.pub
register: chrome_repo

- name: Update APT Cache if Repo Changed
become: true
ansible.builtin.apt:
update_cache: true
when: chrome_repo.changed

- name: Install Google Chrome
become: true
ansible.builtin.apt:
name: google-chrome-stable
state: present
3 changes: 3 additions & 0 deletions ansible/roles/dev/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- name: Install platform-specific packages
ansible.builtin.include_tasks: apt.yml

- name: Oh-My-Zsh
git:
repo: https://github.com/ohmyzsh/ohmyzsh.git
Expand Down
11 changes: 9 additions & 2 deletions teleoperation/basestation_gui/gui_chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@ while ! curl -s http://localhost:8000 >/dev/null 2>&1; do
sleep 0.5
done

echo "Server is up, launching Chromium..."
exec chromium --app=${ADDRESS}
echo "Server up, launching browser..."
if command -v chromium &>/dev/null; then
exec chromium --app=${ADDRESS}
elif command -v google-chrome &>/dev/null; then # for debian/ubuntu
exec google-chrome --app=${ADDRESS}
else
echo "Error: neither chromium nor google-chrome found" >&2
exit 1
fi