# new ubuntu script

```
sudo apt update && sudo apt install -y firefox ubuntu-restricted-extras build-essential curl wget software-properties-common kde-plasma-desktop inkscape gimp openscad meshlab librecad python3 python3-tk python3-pip flatpak gnome-software-plugin-flatpak && \
[ -f /tmp/chrome.deb ] || wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb && sudo apt install -y /tmp/chrome.deb || sudo apt --fix-broken install -y && \
sudo ubuntu-drivers install && \
sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install -y wine64 wine32 winetricks lutris && \
[ -f /tmp/obsidian.deb ] || wget "$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | grep browser_download_url | grep amd64.deb | cut -d '"' -f 4)" -O /tmp/obsidian.deb && sudo apt install -y /tmp/obsidian.deb && \
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg > /dev/null && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null && \
sudo apt update && sudo apt install -y code && \
flatpak remote-add -y --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
flatpak install -y flathub com.ultimaker.cura org.freecadweb.FreeCAD org.kicad.KiCad org.blender.Blender com.github.tchx84.Flatseal com.prusa3d.PrusaSlicer && \
sudo pip3 install bCNC && \
[ -f /usr/local/bin/OpenBuildsCONTROL.AppImage ] || wget https://github.com/OpenBuilds/OpenBuilds-Control/releases/latest/download/OpenBuildsCONTROL.AppImage -O /usr/local/bin/OpenBuildsCONTROL.AppImage && chmod +x /usr/local/bin/OpenBuildsCONTROL.AppImage && \
[ -f /tmp/ugs.tar.gz ] || wget https://github.com/winder/Universal-G-Code-Sender/releases/latest/download/ugsplatform-linux.tar.gz -O /tmp/ugs.tar.gz && mkdir -p /opt/UGS && tar -xzf /tmp/ugs.tar.gz -C /opt/UGS && \
WINEPREFIX=~/.wine-sparkmax winecfg && \
[ -f ~/sparkmax-client-latest.msi ] || wget https://www.revrobotics.com/content/sw/max/sparkmax-client-latest.msi -O ~/sparkmax-client-latest.msi && \
WINEPREFIX=~/.wine-sparkmax wine msiexec /i ~/sparkmax-client-latest.msi && \
sudo mkdir -p /etc/skel/Desktop && cd /etc/skel/Desktop && \
for app in firefox code obsidian prusa-slicer cura freecad kicad blender gimp inkscape bCNC wine OpenBuildsCONTROL.AppImage; do \
  echo "[Desktop Entry]\nName=$app\nExec=$(command -v $app || echo $app)\nIcon=utilities-terminal\nType=Application\nTerminal=false" | sudo tee "$app.desktop" > /dev/null; \
  chmod +x "$app.desktop"; \
done && \
[ -x /usr/local/bin/OpenBuildsCONTROL.AppImage ] || /usr/local/bin/OpenBuildsCONTROL.AppImage && \
[ -d /opt/UGS ] || xdg-open https://github.com/winder/Universal-G-Code-Sender/releases

```

orignial@Robotronix-cad-orignial:~$ sudo apt update &amp;&amp; sudo apt install -y firefox ubuntu-restricted-extras build-essential curl wget software-properties-common kde-plasma-desktop inkscape gimp openscad meshlab librecad python3 python3-tk python3-pip flatpak gnome-software-plugin-flatpak &amp;&amp; \\  
\[ -f /tmp/chrome.deb \] || wget https://dl.google.com/linux/direct/google-chrome-stable\_current\_amd64.deb -O /tmp/chrome.deb &amp;&amp; sudo apt install -y /tmp/chrome.deb || sudo apt --fix-broken install -y &amp;&amp; \\  
sudo ubuntu-drivers install &amp;&amp; \\  
sudo dpkg --add-architecture i386 &amp;&amp; sudo apt update &amp;&amp; sudo apt install -y wine64 wine32 winetricks lutris &amp;&amp; \\  
\[ -f /tmp/obsidian.deb \] || wget "$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | grep browser\_download\_url | grep amd64.deb | cut -d '"' -f 4)" -O /tmp/obsidian.deb &amp;&amp; sudo apt install -y /tmp/obsidian.deb &amp;&amp; \\  
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg &gt; /dev/null &amp;&amp; \\  
echo "deb \[arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg\] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list &gt; /dev/null &amp;&amp; \\  
sudo apt update &amp;&amp; sudo apt install -y code &amp;&amp; \\  
flatpak remote-add -y --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo &amp;&amp; \\  
flatpak install -y flathub com.ultimaker.cura org.freecadweb.FreeCAD org.kicad.KiCad org.blender.Blender com.github.tchx84.Flatseal com.prusa3d.PrusaSlicer &amp;&amp; \\leasesopt/UGS \] || xdg-open https://github.com/winder/Universal-G-Code-Sender/re  
Hit:1 http://ca.archive.ubuntu.com/ubuntu plucky InRelease  
Hit:2 http://security.ubuntu.com/ubuntu plucky-security InRelease   
Hit:3 http://ca.archive.ubuntu.com/ubuntu plucky-updates InRelease   
Hit:4 http://ca.archive.ubuntu.com/ubuntu plucky-backports InRelease   
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease   
All packages are up to date.   
Notice: Some sources can be modernized. Run 'apt modernize-sources' to do so.  
firefox is already the newest version (1:1snap1-0ubuntu7).  
ubuntu-restricted-extras is already the newest version (67).  
build-essential is already the newest version (12.10ubuntu1).  
curl is already the newest version (8.12.1-3ubuntu1).  
wget is already the newest version (1.24.5-2ubuntu1).  
software-properties-common is already the newest version (0.109).  
kde-plasma-desktop is already the newest version (5:159ubuntu1).  
inkscape is already the newest version (1.2.2-8build1).  
gimp is already the newest version (3.0.0-2).  
openscad is already the newest version (2021.01-8build1).  
meshlab is already the newest version (2022.02+dfsg1-1).  
librecad is already the newest version (2.2.0.2-1build3).  
python3 is already the newest version (3.13.2-2).  
python3-tk is already the newest version (3.13.2-1).  
python3-pip is already the newest version (25.0+dfsg-1).  
flatpak is already the newest version (1.16.0-2).  
gnome-software-plugin-flatpak is already the newest version (48.0-1).  
The following package was automatically installed and is no longer required:  
 grub-pc-bin  
Use 'sudo apt autoremove' to remove it.

Summary:  
 Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0  
Note, selecting 'google-chrome-stable' instead of '/tmp/chrome.deb'  
google-chrome-stable is already the newest version (134.0.6998.165-1).  
The following package was automatically installed and is no longer required:  
 grub-pc-bin  
Use 'sudo apt autoremove' to remove it.

Summary:  
 Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0

All the available drivers are already installed.  
Get:1 http://ca.archive.ubuntu.com/ubuntu plucky InRelease \[265 kB\]  
Hit:2 http://security.ubuntu.com/ubuntu plucky-security InRelease   
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease   
Hit:4 http://ca.archive.ubuntu.com/ubuntu plucky-updates InRelease   
Hit:5 http://ca.archive.ubuntu.com/ubuntu plucky-backports InRelease  
Get:6 http://ca.archive.ubuntu.com/ubuntu plucky/main amd64 Packages \[1,437 kB\]  
Get:7 http://ca.archive.ubuntu.com/ubuntu plucky/main i386 Packages \[1,072 kB\]  
Get:8 http://ca.archive.ubuntu.com/ubuntu plucky/main Translation-en \[521 kB\]  
Get:9 http://ca.archive.ubuntu.com/ubuntu plucky/main amd64 c-n-f Metadata \[31.7 kB\]  
Get:10 http://ca.archive.ubuntu.com/ubuntu plucky/universe i386 Packages \[8,852 kB\]  
Get:11 http://ca.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages \[15.9 MB\]  
Get:12 http://ca.archive.ubuntu.com/ubuntu plucky/universe Translation-en \[6,266 kB\]  
Get:13 http://ca.archive.ubuntu.com/ubuntu plucky/universe amd64 c-n-f Metadata \[309 kB\]  
Fetched 34.6 MB in 12s (2,909 kB/s)   
All packages are up to date.   
Notice: Some sources can be modernized. Run 'apt modernize-sources' to do so.  
wine64 is already the newest version (9.0~repack-4build3).  
wine32:i386 is already the newest version (9.0~repack-4build3).  
winetricks is already the newest version (20250102-1).  
lutris is already the newest version (0.5.17-2).  
The following package was automatically installed and is no longer required:  
 grub-pc-bin  
Use 'sudo apt autoremove' to remove it.

Summary:  
 Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0  
Reading package lists... Error!  
Error: read, still have 8 to read but none left  
Error: Internal error, could not locate member control.tar{.zst,.lz4,.gz,.xz,.bz2,.lzma,}  
Error: Could not read meta data from /tmp/obsidian.deb  
Error: The package lists or status file could not be parsed or opened.  
/usr/local/bin/OpenBuildsCONTROL.AppImage: Permission denied  
\--2025-03-22 04:22:47-- https://github.com/winder/Universal-G-Code-Sender/releases/latest/download/ugsplatform-linux.tar.gz  
Resolving github.com (github.com)... 140.82.114.4  
Connecting to github.com (github.com)|140.82.114.4|:443... connected.  
HTTP request sent, awaiting response... 302 Found  
Location: https://github.com/winder/Universal-G-Code-Sender/releases/download/v2.1.12/ugsplatform-linux.tar.gz \[following\]  
\--2025-03-22 04:22:47-- https://github.com/winder/Universal-G-Code-Sender/releases/download/v2.1.12/ugsplatform-linux.tar.gz  
Reusing existing connection to github.com:443.  
HTTP request sent, awaiting response... 404 Not Found  
2025-03-22 04:22:47 ERROR 404: Not Found.

\--2025-03-22 04:22:47-- https://www.revrobotics.com/content/sw/max/sparkmax-client-latest.msi  
Resolving www.revrobotics.com (www.revrobotics.com)... 192.200.160.248  
Connecting to www.revrobotics.com (www.revrobotics.com)|192.200.160.248|:443... connected.  
HTTP request sent, awaiting response... 404 Not Found  
2025-03-22 04:22:48 ERROR 404: Not Found.

bash: /usr/local/bin/OpenBuildsCONTROL.AppImage: No such file or directory  
orignial@Robotronix-cad-orignial:~$ Gtk-Message: 04:22:48.965: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

```
install_if_missing() { pkgs=""; for p in "$@"; do dpkg -s "$p" &>/dev/null || pkgs="$pkgs $p"; done; [ -n "$pkgs" ] && sudo apt install -y $pkgs; } && \
sudo apt update && \
install_if_missing firefox ubuntu-restricted-extras build-essential curl wget software-properties-common kde-plasma-desktop inkscape gimp openscad meshlab librecad python3 python3-tk python3-pip flatpak gnome-software-plugin-flatpak && \
([ -f /tmp/chrome.deb ] || wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb) && sudo apt install -y /tmp/chrome.deb || sudo apt --fix-broken install -y && \
sudo ubuntu-drivers install && \
sudo dpkg --add-architecture i386 && sudo apt update && \
install_if_missing wine64 wine32 winetricks lutris && \
[ -f /tmp/obsidian.deb ] || wget "$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | grep browser_download_url | grep amd64.deb | cut -d '"' -f 4)" -O /tmp/obsidian.deb && sudo apt install -y /tmp/obsidian.deb && \
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/vscode.gpg > /dev/null && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/vscode.gpg] https://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null && \
sudo apt update && install_if_missing code && \
flatpak remote-add -y --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
flatpak install -y flathub com.ultimaker.cura org.freecadweb.FreeCAD org.kicad.KiCad org.blender.Blender com.github.tchx84.Flatseal com.prusa3d.PrusaSlicer && \
sudo pip3 install bCNC && \
[ -f /usr/local/bin/OpenBuildsCONTROL.AppImage ] || { sudo wget https://github.com/OpenBuilds/OpenBuilds-Control/releases/latest/download/OpenBuildsCONTROL.AppImage -O /usr/local/bin/OpenBuildsCONTROL.AppImage && sudo chmod +x /usr/local/bin/OpenBuildsCONTROL.AppImage; } && \
UGS_URL="$(curl -s https://api.github.com/repos/winder/Universal-G-Code-Sender/releases/latest | grep browser_download_url | grep 'ugsplatform-linux.tar.gz' | cut -d '\"' -f 4)" && \
[ -f /tmp/ugs.tar.gz ] || wget "$UGS_URL" -O /tmp/ugs.tar.gz && mkdir -p /opt/UGS && tar -xzf /tmp/ugs.tar.gz -C /opt/UGS && \
WINEPREFIX=~/.wine-sparkmax winecfg && \
[ -f ~/REV-Hardware-Client.exe ] || wget "$(curl -s https://api.github.com/repos/REVrobotics/REV-Software-Binaries/releases/latest | grep browser_download_url | grep 'REV-Hardware-Client-Setup' | grep exe | cut -d '"' -f 4)" -O ~/REV-Hardware-Client.exe && \
WINEPREFIX=~/.wine-sparkmax wine ~/REV-Hardware-Client.exe && \
sudo mkdir -p /etc/skel/Desktop && cd /etc/skel/Desktop && \
for app in firefox code obsidian prusa-slicer cura freecad kicad blender gimp inkscape bCNC wine OpenBuildsCONTROL.AppImage; do \
  echo "[Desktop Entry]\nName=$app\nExec=$(command -v $app || echo $app)\nIcon=utilities-terminal\nType=Application\nTerminal=false" | sudo tee "$app.desktop" > /dev/null; \
  chmod +x "$app.desktop"; \
done && \
[ -x /usr/local/bin/OpenBuildsCONTROL.AppImage ] || /usr/local/bin/OpenBuildsCONTROL.AppImage && \
[ -d /opt/UGS ] || xdg-open https://github.com/winder/Universal-G-Code-Sender/releases

```