From 69aab1c326fc51f8c93f432d73831ae96a35e0cf Mon Sep 17 00:00:00 2001 From: Michal Czyz Date: Wed, 27 Mar 2024 11:37:47 +0100 Subject: [PATCH] Cleanup Signed-off-by: Michal Czyz --- .../ubuntu-gui/devcontainer.json | 0 .github/workflows/ci.yml | 18 +++++++------- Dockerfile-lxqt | 6 +---- README.md | 18 +++++++++++++- common.sh => scripts/deprecated/common.sh | 0 .../deprecated/desktop-update.sh | 0 .../deprecated/update-config.sh | 0 scripts/install-desktop.sh | 24 ------------------- 8 files changed, 27 insertions(+), 39 deletions(-) rename .devcontainer/{ => deprecated}/ubuntu-gui/devcontainer.json (100%) rename common.sh => scripts/deprecated/common.sh (100%) rename desktop-update.sh => scripts/deprecated/desktop-update.sh (100%) rename update-config.sh => scripts/deprecated/update-config.sh (100%) diff --git a/.devcontainer/ubuntu-gui/devcontainer.json b/.devcontainer/deprecated/ubuntu-gui/devcontainer.json similarity index 100% rename from .devcontainer/ubuntu-gui/devcontainer.json rename to .devcontainer/deprecated/ubuntu-gui/devcontainer.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b70e02e..1bd0780 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,15 +36,15 @@ jobs: if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' run: docker push ghcr.io/antmicro/openroad-codespace:orfs - - name: Devcontainer build - run: | - npm install -g @devcontainers/cli - devcontainer build --config .devcontainer/ubuntu-gui/devcontainer.json --workspace-folder . --push false --image-name ghcr.io/antmicro/openroad-codespace:desktop - # docker image tag test:latest ghcr.io/antmicro/openroad-codespace:test - - - name: Push container image to GitHub Container Registry (GHCR) - if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' - run: docker push ghcr.io/antmicro/openroad-codespace:desktop + # - name: Devcontainer build + # run: | + # npm install -g @devcontainers/cli + # devcontainer build --config .devcontainer/ubuntu-gui/devcontainer.json --workspace-folder . --push false --image-name ghcr.io/antmicro/openroad-codespace:desktop + # # docker image tag test:latest ghcr.io/antmicro/openroad-codespace:test + + # - name: Push container image to GitHub Container Registry (GHCR) + # if: github.event_name != 'pull_request' && github.repository == 'antmicro/openroad-codespace' + # run: docker push ghcr.io/antmicro/openroad-codespace:desktop - name: Docker build run: | diff --git a/Dockerfile-lxqt b/Dockerfile-lxqt index 28ec44e..d3eb0f0 100644 --- a/Dockerfile-lxqt +++ b/Dockerfile-lxqt @@ -1,9 +1,5 @@ -FROM ghcr.io/antmicro/openroad-codespace:desktop +FROM ghcr.io/antmicro/openroad-codespace:orfs COPY ./scripts/install-desktop.sh /usr/local/bin/install-desktop.sh RUN bash /usr/local/bin/install-desktop.sh RUN chsh -s /bin/bash - -# COPY ./scripts/install-lxqt.sh /usr/local/bin/install-lxqt.sh -# RUN bash /usr/local/bin/install-lxqt.sh -# RUN chsh -s /bin/bash diff --git a/README.md b/README.md index 21cdd22..17ad1c2 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ First time Codespace users are encouraged to read the tutorial [creating a codes ## Using the Codespace +### OpenROAD GUI + 1. At the bottom, there should be tab `PORTS`, where you will find the `Forwarded Address`. A link is provided, which you can follow to open the OpenROAD GUI ![open](https://github.com/antmicro/openroad-codespace/blob/mczyz/dev/img/open_vnc.gif) @@ -32,6 +34,20 @@ make make gui_final ``` +### Useful scripts + +You can change the resolution with script: + +``` +/usr/local/bin/set-resolution +``` + +Desktop initialization is performed in: + +``` +/usr/local/share/desktop-init.sh +``` + ## VSCode 1. You can also use VSCode to connect to Codespaces @@ -51,4 +67,4 @@ Useful resources: ### Desktop-lite feature -The desktop-lite feature is provided by the [devcontainers organization](https://github.com/devcontainers/features/tree/main/src/desktop-lite). In this repo, a modified version of the feature is used via the [update-link] script. +The desktop-lite feature is provided by the [devcontainers organization](https://github.com/devcontainers/features/tree/main/src/desktop-lite). In this repo, a modified version of the feature is used via the [TODO-link] script. diff --git a/common.sh b/scripts/deprecated/common.sh similarity index 100% rename from common.sh rename to scripts/deprecated/common.sh diff --git a/desktop-update.sh b/scripts/deprecated/desktop-update.sh similarity index 100% rename from desktop-update.sh rename to scripts/deprecated/desktop-update.sh diff --git a/update-config.sh b/scripts/deprecated/update-config.sh similarity index 100% rename from update-config.sh rename to scripts/deprecated/update-config.sh diff --git a/scripts/install-desktop.sh b/scripts/install-desktop.sh index 6eee9ed..3eedeb6 100644 --- a/scripts/install-desktop.sh +++ b/scripts/install-desktop.sh @@ -117,25 +117,6 @@ export DEBIAN_FRONTEND=noninteractive apt_get_update -# On older Ubuntu, Tilix is in a PPA. on Debian stretch its in backports. -if [[ -z $(apt-cache --names-only search ^tilix$) ]]; then - . /etc/os-release - if [ "${ID}" = "ubuntu" ]; then - check_packages apt-transport-https software-properties-common - add-apt-repository -y ppa:webupd8team/terminix - elif [ "${VERSION_CODENAME}" = "stretch" ]; then - echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list - fi - apt-get update - if [[ -z $(apt-cache --names-only search ^tilix$) ]]; then - echo "(!) WARNING: Tilix not available on ${ID} ${VERSION_CODENAME} architecture $(uname -m). Skipping." - else - package_list="${package_list} tilix" - fi -else - package_list="${package_list} tilix" -fi - # Install X11, fluxbox and VS Code dependencies check_packages ${package_list} @@ -145,11 +126,6 @@ if ! type vncpasswd > /dev/null 2>&1; then check_packages ${package_list_additional} fi -# Install Emoji font if available in distro - Available in Debian 10+, Ubuntu 18.04+ -if dpkg-query -W fonts-noto-color-emoji > /dev/null 2>&1 && ! dpkg -s fonts-noto-color-emoji > /dev/null 2>&1; then - apt-get -y install --no-install-recommends fonts-noto-color-emoji -fi - # Check at least one locale exists if ! grep -o -E '^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen