Score:3

How do I install and configure the latest version of `solaar` to manage my Logitech wireless mouse or keyboard on Linux Ubuntu?

cn flag

I know I can do:

sudo apt update
sudo apt install solaar

to install the 3rd-party tool solaar on Ubuntu, so I can use it to pair and unpair new Logitech devices such as keyboards and mice to my unifying Logitech Receivers, and so I can see the battery status of many of these devices, but the solaar version installed is very old, doesn't show up properly in the top-right of my main screen, and overall seems buggy.

How do I install the latest one and configure it to work without special permissions, and to auto-start after each reboot?

Doesn't the latest version of solaar allow me to change settings, like the DPI sensitivity setting in a mouse? How do I change that setting?

Score:5
ru flag

The easy way to install/maintain/upgrade Solaar is to use a PPA.

Add the repository...

See https://launchpad.net/~solaar-unifying/+archive/ubuntu/stable

sudo add-apt-repository ppa:solaar-unifying/stable
sudo apt-get update

Install Solaar...

Note: Remove any manually installed Solaar first.

sudo apt install solaar

Note: If you already have Solaar installed using the PPA or Synaptic, Software Updater can be used to upgrade it.

If you don't wish to see the popup window at startup...

See https://pwr-solaar.github.io/Solaar/

Solaar’s GUI can be started in several ways

--window=show (the default) starts with its main window visible,
--window=hide starts with its main window hidden,
--window=only does not use the system tray, and starts with main window visible.

For more information on Solaar’s command-line interface use the help option...

solaar --help
Tadej avatar
in flag
I can run it only with `sudo solaar`.
Gabriel Staples avatar
cn flag
Well, it worked! Upvoted. I suppose my answer is best for those who build from source in order to get the absolute latest, or who want to tinker with the source code and build, or in the event the PPA doesn't get updated and there is a later release than what's in the PPA. I know virtually nothing about PPAs right now--not even what that stands for.
Gabriel Staples avatar
cn flag
I added uninstall instructions to the end of my answer too.
Gabriel Staples avatar
cn flag
You're still missing the udev rule installation step though. Is that part not required if you install your way?
heynnema avatar
ru flag
@GabrielStaples `PPA` stands for Personal Package Archive. And no manual playing with udev rules required :-)
Gabriel Staples avatar
cn flag
How did you know this PPA for `solaar` even existed, by the way?
heynnema avatar
ru flag
@GabrielStaples Like you, I was originally struggling with earlier versions of Solaar. They changed developers and I followed them to the newer site. They've been doing a good job of keeping it updated.
heynnema avatar
ru flag
@GabrielStaples They're already preparing a version for 22.04... https://launchpad.net/ubuntu/+source/solaar/1.1.1+dfsg-1
brasofilo avatar
kr flag
I added the repository and did a `sudo apt reinstall` and the thing finally worked. Thanks!
Score:2
cn flag

This also works. This answer is still worth an upvote and may prove more-useful over the answer I accepted in the following scenarios:

  1. you want to see screenshots of and have instructions how to change your settings in solaar, including the DPI resolution setting,
  2. you want to see an easy kill command to auto-kill the old solaar so you can start the new one after upgrading to the latest version,
  3. you want to see how to add or edit an entry in your Startup Applications,
  4. in the event that you want to get the latest-and-greatest and build from the source code, or
  5. in case the PPA doesn't get updated, and a GitHub release ends up being more-up-to-date than what's in the PPA in the future, or
  6. if you want to learn how to manually "install" something via symlinks into a bin dir in your PATH, as the approach presented here applies to just about any piece of software or script in the entire world and I use it all the time,
  7. you want to learn a bit more about where the Logitech mouse's settings are saved.

Here is how to manually install the latest release version of solaar from GitHub:

Tested on Ubuntu 18.04.

First, check your version:

solaar --version

Mine shows 0.9.2:

$ solaar --version
/usr/share/solaar/lib/solaar/gtk.py:33: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  __import__(module)
solaar 0.9.2

Now go to the GitHub releases page to see if a newer release exists: https://github.com/pwr-Solaar/Solaar/releases. I see 1.1.1, released Dec. 25, 2021, for Christmas. Download and extract it. I chose Solaar-1.1.1.zip. After downloading it, right-click it in your file explorer (I use nemo, because Ubuntu's default, nautilus, has a horrible usage of space--see the screenshots at the end of my answer), and go to "Extract Here" to extract the Zip file. Cd into this extracted path and do the following:

# install dependencies
sudo apt update
sudo apt install python3-pyudev python3-psutil python3-xlib python3-yaml \
    python3-gi gir1.2-gtk-3.0 gcc python3-dev gir1.2-notify-0.7 \
    gir1.2-ayatanaappindicator3-0.1

# cd into extracted dir (don't skip this--it's required for the next couple
# steps to work as written)
cd path/to/Solaar-1.1.1

# install the solaar udev rule
sudo cp rules.d/42-logitech-unify-permissions.rules /etc/udev/rules.d
sudo udevadm control --reload-rules
#
# Now unplug and plug back in the Logitech unifying receiver (or disconnect
# it from Bluetooth, if it's connected that way), OR reboot your computer

# Install solaar (NB: do NOT delete the extracted installation dir when done--you
# must leave it around since I'm making a symbolic link to the executable)
mkdir -p ~/bin
# create a symbolic link to the `solaar` executable inside ~/bin
ln -sfi "$(pwd)/bin/solaar" ~/bin
#
# Now, if this was your first time creating the ~/bin directory, **log out and
# log back in** to force Ubuntu's default ~/.profile file to add ~/bin to your
# PATH. If you don't have Ubuntu's default ~/.profile file, you can obtain it
# from your /etc/skel directory like this:
#       cp -i /etc/skel/.profile ~
# ...and then log out and log back in.

At this point, you should see your new solaar executable is in-use. Run this:

which solaar

...and you should see this:

/home/MY_USERNAME/bin/solaar

...instead of this, which was the old version:

/usr/bin/solaar

Good, if you see /home/MY_USERNAME/bin/solaar then it is correctly in your PATH and running it from your ~/bin dir as you specified by following the instructions above.

Let's check the version:

solaar --version

I see:

solaar 1.1.1

Nice! It worked.

Lastly, we need solaar to auto-start at startup. Open your Startup Applications GUI program and look for a "Solaar" entry. I have one here. If you don't have one, click "Add" to add one. If you do have it, click "Edit" to look at it.

enter image description here

Ensure in the "Command" box it says solaar. This starts the application by running the solaar command each time you log into your system graphically.

enter image description here

At this point, either reboot to get your newly-updated version of solaar running, OR kill the old solaar process and start the new one, like this:

# kill the old `solaar`
kill $(ps aux | grep 'solaar' | head -n 1 | awk '{ print $2 }')

# start the new one as a background process (hence the `&`)
solaar &

You can close the terminal at this time.

If you just ran solaar & above, a Solaar GUI window will pop up. It looks like this for me (I have the Logitech MX Vertical Wireless Mouse (renewed), or new, because it helps me with my carpal tunnel in my wrist, and has a nice scroll wheel with (supposedly) an optical encoder which won't break on me in 1 year of use like mechanical scroll wheel encoders do):

enter image description here

Notice the locks to the right of each setting. Click those to cycle through 3 modes for each setting: Locked --> Ignored --> and Unlocked (changes allowed).

Here you can see I unlocked my "Sensitivity (DPI)" setting to increase it from 1000 to 1300:

enter image description here

When done changing settings, click the lock icon to get it to lock again.

Now you can click the X in the top-right of the Solaar window to close it. Solaar will keep running in the background.

In the top-right of your screen you'll see this little Solaar battery icon, which is super convenient: enter image description here

Click it and go to "MX Vertical Wireless Mouse" (or whatever the name of your device is) to re-open the GUI settings window shown above to change more settings.

enter image description here

Done.

Where are the mouse's settings saved?

Keep in mind that the Logitech settings are not saved in the mouse's firmware or flash memory. They are saved locally on the computer, in solaar's settings somewhere. This means that you cannot just set the mouse's settings on one computer and expect them to carry over to another computer. Rather, you must configure the settings on each computer separately, and furthermore, for each user on each computer separately. That kind of stinks, but it is what it is.

Uninstall

To "uninstall" what we did above, just delete the symlink:

rm ~/bin/solaar

That's it!

References:

The solaar documentation and official sources are here:

  1. Official webpage: https://pwr-solaar.github.io/Solaar/
    1. Manual installation instructions: https://pwr-solaar.github.io/Solaar/installation - this is how I learned most of these installation steps below
  2. Official code repository: https://github.com/pwr-Solaar/Solaar
  3. My own notes: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/tree/master/etc/udev/rules.d
heynnema avatar
ru flag
Nice answer... but there's a much simpler way... please see my answer :-)
Gabriel Staples avatar
cn flag
@heynnema, I upvoted your answer as well. I've been trying to get solaar working properly for weeks and finally decided to sit down and just figure it out. My answer is what I came up with. I suppose its best for those who build from source or in case the PPA doesn't get updated.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.