Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating chrome browser into Steam image to extend its usefulness #190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions images/steam/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ _FIX_LIBC6

ARG REQUIRED_PACKAGES=" \
steam \
sudo vim unzip tmux\
libvulkan1 libvulkan1:i386 \
mesa-vulkan-drivers mesa-vulkan-drivers:i386 \
libgbm1:i386 libgles2:i386 libegl1:i386 libgl1-mesa-dri:i386 libgl1:i386 libglapi-mesa:i386 libglx0:i386 \
Expand All @@ -63,6 +64,10 @@ RUN apt-get update -y && \
# Fix steam updater UI font file \
ln -s /usr/share/fonts/truetype/dejavu /usr/share/fonts/truetype/ttf-dejavu && \
# \
# Install Google Chrome \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt install ./google-chrome-stable_current_amd64.deb -y --no-install-recommends && \
rm ./google-chrome-stable_current_amd64.deb && \
# Cleanup \
apt-get remove -y python3-six software-properties-common && \
apt-get autoremove -y && \
Expand All @@ -76,6 +81,10 @@ RUN rm /usr/bin/zenity && ln -s /usr/bin/true /usr/bin/zenity
# refresh system font cache. For font warnings on startup see: https://github.com/ValveSoftware/steam-runtime/issues/482
RUN fc-cache -f -v

# set root password
RUN echo "root:retro" | chpasswd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't do this, you can already open up a root shell using Docker

docker exec -u root -it <container_name> /bin/bash

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to mention this change. Initially, this pull request was mostly intended for my personal use. Since when I connect in full screen via Moonlight, I prefer to operate within the terminal inside Moonlight. Therefore, to make things easier for myself, I set a root password so I could switch to the root user.

If, in the future, there's support for keeping the container after closing an app, then the need to install applications inside the container will become more common. In that case, perhaps granting sudo privileges to the retro user would be more appropriate? (I noticed that the retro user is created in the 10-setup_user.sh script of the base image, without sudo privileges.)


COPY --chmod=777 configs/waybar/config.jsonc /cfg/waybar/config.jsonc
COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh
COPY --chmod=777 scripts/system-services.sh /etc/cont-init.d/system-services.sh
COPY --chmod=777 steamos-update /usr/bin/steamos-update
Expand Down
112 changes: 112 additions & 0 deletions images/steam/configs/waybar/config.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// -*- mode: jsonc -*-
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": [
"sway/workspaces",
"sway/mode",
"sway/scratchpad",
"custom/kitty",
"custom/steam",
"custom/chrome"
],
"modules-center": [
"sway/window"
],
"modules-right": [
"pulseaudio",
"network",
"cpu",
"memory",
"temperature",
"sway/language",
"clock"
],
"custom/kitty": {
"format": "{} ",
"tooltip": false,
"on-click": "kitty"
},
"custom/chrome": {
"format": "<u>google</u>",
"tooltip": false,
"on-click": "google-chrome-stable"
},
"custom/steam": {
"format": "<u>steam</u>",
"tooltip": false,
"on-click": "/usr/games/steam"
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C",
"format-icons": ["", "", ""]
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr}",
"tooltip-format": "{ifname} via {gwaddr}",
"format-linked": "{ifname} (No IP)",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
}
}
}