Using the GNOME Extension to Access Gemini AI in Ubuntu

If you use Ubuntu 22.04 LTS or later and want to access the Google Gemini AI chatbot straight from your desktop outside of a web browser, you’re in luck!

The Gemini AI ChatBot GNOME Shell extension (unaffiliated with Google; it’s not an official thing) gives you immediate access to Gemini at any time from the applet it adds to the top panel — no need to open a web browser tab or fire up a standalone app.

Gemini, formerly known as Bard, is an AI language model developed by Google. Like ChatGPT, CoPilot et al it will generate human-like replies to questions and tasks, can translate, correct, or summarise text, generate and debug code, and more.

Like other AI of this ilk, Gemini is already very human-like in the sense that it’s happy to invent facts, spout confident-sounding wrong answers (and then double down on them), hallucinate, and, like so many of us real flesh bags, rely on outdated data.

Despite its quirks, AI can be extremely beneficial when used properly, envisaged as an assistant rather than a magic crystal ball. The product of this post, a snazzy GNOME Shell extension, provides a unique window to give it a whirl.

How to Use Gemini AI in Ubuntu

To take advantage of this extension, a Gemini AI API key has to be generated (which is free) from the Google AI Studio website. However, you should be aware that the Google AI Studio is not currently available in the United Kingdom or EU member states (due to impending AI regulations).

Google AI Studio is accessible in the USA, Brazil, New Zealand, Australia, Mexico, Africa, British Crown Dependencies, and several other countries. If your location is supportive, you’re all set. If not, perhaps consider using a VPN?

Clicking this button reveals a magical …API key

From the Google AI Studio Website:

  1. Sign in with a Google account
  2. Click the “Get API key” link
  3. Click the “Create API key” button
  4. Copy the key

Pay for Google Vertex? You can use your API key in this extension instead. Vertex can search the internet for the latest info to improve answers whereas free Gemini is trained on a fixed snapshot.

Now you have your API key you can go ahead and install the extension itself. Note: it does not function without a valid API key so you cannot skip the requirement.

The Gemini AI ChatBot GNOME Shell extension works with GNOME versions used in Ubuntu 22.04 LTS through Ubuntu 24.04 LTS though on the latter there is a bug that prevents the extension from loading (there is a workaround until an update is release).

For the easiest, most efficient way to search, install, and manage GNOME Shell extensions in Ubuntu you should install the Extensions Manager app, available via App Center (set search filter to DEB) or from Flathub (if you want the latest version).

To install it from the command line:

sudo apt install gnome-shell-extension-manager

Then:

  • Open Extension Manager
  • Search “Gemini AI”
  • Click the result (from Arda F)
  • Hit install

If you’re on Ubuntu 22.04 LTS through 23.10 you can then go ahead enter your API key:

  • Click the “Gemini” logo in the top panel
  • Click the cog icon to open the settings dialog
  • Enter your Gemini AI API key

I recommend toggling the ‘remember talk history’ option on too, though this isn’t required.

Save the settings, click the applet again, and enter a question/query/prompt in the input field to initiate a conversation with Gemini. You can copy an answer to your clipboard by clicking on it.

AI answers are only as good as the question

Unlocking the potential in AI chatbots requires careful, skilled ‘prompt engineering’.

The glut of “AI generated” eBay descriptions and Amazon product reviews demonstrate the downside to passive ‘one-click’ use: a sequence of words that sounds cognisant but light on substance yet full of breathless adjective-laden marketing spiel.

E.g., “…desirable for its two vertical lines, multiple dead pixels, and distinctive cracked glass screen, this monitor is certain to add a unique touch to your viewing experience” — an AI-generated description for a monitor I saw on eBay a few months ago.

Wonder if eBay’s generative AI would pitch my old monitor that fails to turn on as “eco-friendly”.

So all of the usual cautions apply re: AI. Don’t take answers as sacrosanct or accurate, verify any info you share/post elsewhere, don’t assume code generated will work, and for best results always use clear, specific, framed prompts.


Posted

in

, , , ,

by

Tags: