← Back to list

Hey Gemini CLI — Put Linux into a Browser

It sounds like a joke, but in 2026, we are closer to this reality than ever: just tell Gemini CLI what to install for you.

Thorsten · 2026-05-09 13:03 · 0 claps · 3.7 min read
#gemini-cli #iap #novnc #cloud-computing #web-apps
Open on Medium ↗
Wiki topics: LLM · Large Language Models 🔓 · Open Source 😂 · Humor & Satire

Hey Gemini CLI — Put Linux into a Browser

It sounds like a joke, but in 2026, we are closer to this reality than ever: just tell Gemini CLI what to install for you.

A graphical Linux Desktop in a Browser

A graphical Linux Desktop in a Browser

Having a Linux Desktop in a browser is incredibly practical. You can use it as a jump-host to access private environments, bypass geo-blocking for services like rental cars, or collaborate with others in real-time.

But how to install it? Don’t ask me, let’s ask Gemini CLI.

Setting up a full-blown desktop environment in the cloud used to be a daunting task involving complex network rules and hours of configuration. Today, it’s a conversation between you, a terminal, and e.g. Gemini CLI.

Five Reasons Why You Need a Linux Browser-Tab

  1. Seamless Continuity: Start a task at the office, close your laptop, and pick up exactly where you left off at home.
  2. Datacenter Speed: My home fiber gets 44 Mbit/s. My cloud instance? 495 Mbit/s. It’s like having a supercomputer in a tab.
  3. The Bastion Host: It acts as a secure gateway to reach private databases or internal APIs shielded from the public internet.
  4. Geo-Flexibility: Need US-only rental car rates while sitting in Europe? Spin up your container in us-central1 and you're a local.
  5. Sharing is caring: Want to show your colleague how to solve a problem? Just invite them to your Linux desktop and let them look over your shoulder. And even take over keyboard and mouse!

The Concept: A Stateless Desktop in the Cloud

We are using Cloud Run, Google’s serverless platform. It’s perfect because it’s cost-efficient (pay-as-you-go) and highly scalable. By putting a Linux environment into a Docker container with noVNC, we turn any browser tab into a fully functional workstation.

The command

After starting Gemini CLI in Google Cloud Shell, I instructed it:

Create a Dockerfile that exports a Linux desktop using vnc and puts it into a browser using novnc, build it and run it on Google Cloud Run.

Just count the inaccuracies in this “command”: Cloud Run is not for building, I did not even tell which desktop environment to use, the Dockerfile itself does not export anything, I even did not care to correct my spelling mistake and many more. But Gemini CLI is forgiving and made the best out of my dont-call-it-command “command”. It made several mistakes that it corrected on its own. After 20 minutes, I was presented with a link and a password.

So today I became friends with Gemini CLI and noVNC. And started using my Linux Desktop in a browser.

Now I was scared

A Linux desktop in the cloud on my tap? Gemini had chosen the password “secret” which is a bit… unsecure. But even aklösdöjlaökj would not do the trick. I wanted two-factor authentication with no need to remember an additional password. I got it from Cloud IAP (Identity Aware Proxy) that allows me to require a Google Login to access my app:

Google Cloud Run lets you require authentication to use a service

Google Cloud Run lets you require authentication to use a service

Once I had set this, I needed to understand that being “Owner” of a project is not enough. In addition, you have to be IAP-secured Web App user in order to be allowed for accessing an app. You set this in Google Cloud’s IAM (Identity Access Management). Once done, the app was open only for me ans people I allow in — so I had become friends with IAP, too.

Why noVNC over other solutions?

  • Zero Client Setup: No software needed on your local machine.
  • Lightweight: Unlike Guacamole, noVNC is fast to set up and doesn’t demand usernames before you even start.
  • Visual Collaboration: You see the other user’s mouse cursor move in real-time — perfect for remote support.
  • Clipboard & Scaling: It has a built-in clipboard “bridge” and scales to your window size.

Shortcomings

  • Due to the nature of Cloud Run, sessions are limited to a maximum of 3600 seconds. Please write in the comments if Gemini CLI rewrites this for Kubernetes :)
  • Due to the nature of containerization, files will not be stored on disk if your session ends (technically, your container runtime). Tell me in the comments if AIDER can fix this.
  • The desktop wallpaper I don’t like, will you draw one for me?
  • Next time Gemini CLI will behave otherwise, so I made a predictable github repository for you: https://github.com/tstaerk/linux-in-a-browser — can you comment how to make it work for other clouds?

About me

Hello world, I am Thorsten Stärk.

I am a lifelong technology enthusiast who has been quite lucky with my career path. By day, I work for Google, which naturally influences my perspective — simply because that’s where I have the deepest technical insights. However, it is important to note: this is a strictly private blog. The projects and opinions shared here are born out of my own curiosity and are not part of my official role or duties at Google.

When I’m not exploring the depths of the cloud or prompting CLIs into submission, I share my passion for tech as a lecturer at Baden-Wuerttemberg Cooperative State University. I love breaking down complex systems for my students (who were first to ask me about Gemini CLI)— much like I try to do in this blog.


메타데이터
post_id
e883b5b65e02
slug
hey-gemini-cli-put-linux-into-a-browser-e883b5b65e02
url
https://medium.com/@thorsten_28158/hey-gemini-cli-put-linux-into-a-browser-e883b5b65e02
canonical_url
https://medium.com/@thorsten_28158/hey-gemini-cli-put-linux-into-a-browser-e883b5b65e02
author_url
https://medium.com/@thorsten_28158
status
ok
fetched_at
2026-06-11 18:57:12