[go: up one dir, main page]

Search

flanaras' adventures

Anything that I might come along :)

Install Spotify on openSUSE Leap + Tumbleweed

Hello,

If you want to install Spotify on openSUSE and you see that Spotify doesn’t provide rpm binaries don’t worry, you can still do it!

Image with Spotify working on openSUSE Leap 42.1

I have tested this with Leap 42.1, 15.0 & 15.1 and Tumbleweed (20180124 and older). It should work with other versions of Leap as well.

It seems that there are two possibilities, on my installation of openSUSE I can use the script and download and package Spotify, although on a fresh installation the script will fail.

How to:

Start by cloning the repository [opensuse-spotify-installer (master)]

Before installing make sure that you have the package update-desktop-files, so

 > sudo zypper in update-desktop-files

 

After that, run: (at some point you will be asked to enter your root password)

 > ./install-spotify.sh

It will take some time to download and install.

In order to run it type:

 > spotify

Problems:

Nothing provides libcurl-gnutls.so.4()(64bit):

On my tumbleweed 20180828 I get the following problem while installing:

 Problem: nothing provides libcurl-gnutls.so.4()(64bit) needed by spotify-client-1.0.88.353.g15c26ea1-14.x86_64
Solution 1: do not install spotify-client-1.0.88.353.g15c26ea1-14.x86_64
Solution 2: break spotify-client-1.0.88.353.g15c26ea1-14.x86_64 by ignoring some of its dependencies

Find your libcurl.so.4:

 > find /usr/lib64 -name libcurl\*

Link your libcurl.so.4 to libcurl-gnutls.so.4

 > cd /usr/lib64
 > sudo ln -s libcurl.so.4 libcurl-gnutls.so.4

 

— You can uninstall it by:

 > rpm -e spotify-client

or

 > ./install-spotify.sh -u

Enjoy your music! 😀

PS: I’ve approved the comment about megamaced’s spotify-easyrpm (github.com). I haven’t tested it myself but it is getting some attention from the community.

 

— edit: changed the link of the repository to my fork, the repository I forked doesn’t work on leap after he updated his version.

— update [27/05/2016]: The repository that I cloned, got updated and now works with openSUSE Leap by default. Instructions got updated.

— update [20/06/2016]: Changes from the last update don’t work on a fresh installation.

— update [26/01/2018]: Changed title specifying a multi version solution and added the tested versions.

— update [2018/08/16]: Tested and works on Leap 15.0 also.

— update [2018/08/31]: Edited the method and added the problem section.

— update [2018/12/13]: Added mention of spotify-easyrpm.

— update [2019/12/19]: Still functional for Leap 15.1.

** Now the original repository may work but I redirect to mine in the case he does any changes and doesn’t work any more on Leap.

Featured post

Fixing an ECM Casa IV boiler leak

Hi there,

Today’s topic is slightly different than usual.

Issue

Recently, I had an issue with an ECM Casa IV. During a regular maintenance decalcification, the Casa IV tripped a switch in the fuse box (short circuited). Disconnecting the Casa from power, there was nothing else that tripped the switch but as suspected, connecting the Casa and letting it heat up led to the same behaviour.

Time to look closer within. Removing the case, shows some residues on the top of the boiler around the heating elements, thermostats and pipes. This looks like a good lead.

Issues with leaking boilers

Apparently, this is a somewhat common issue. In my research, I found a couple mentions of leaking boilers or short circuit.

  1. A post on narkive.com named: Shortcut caused by leaking boiler. This describes a boiler leak on an ECM Casa II caused by loosed up heating element nuts
  2. Whole latte love has troubleshooting page about ECM Casa V leaking

In general, the boiler will start leaking at some point. There are seals / gaskets that make it watertight that degrade over time.

Environment

I’m working on an ECM Casa IV, but Casa IV and Casa V are very similar espresso machines. Casa V is the successor of Casa IV without changing many internal components, for example they share the same boiler, heating element, etc. Profitec Pro 300 is also sharing some components.

Others opening up Casa boilers

There’s a very nice article by Alexey S. Lavrov that shows how to open an ECM Casa IV boiler in order to change the boiler gasket (part number P2042.2). This is great reference since it’s exactly the same model and pictures are included!

Another helpful article is by Clive Coffee, showing how to change the heating element on a Casa V, having a step by step guide with pictures and warnings. This page made me aware to be careful when removing the boiler so I don’t break the fill tube. They mentioned, the boiler should be emptied before disassembly. Their method requires to tilt the machine and let the water run out from the steam wand. I didn’t find this too useful, since not much water came out from the steam wand, instead I found an entry on whole latte love, showing how to do this by removing a couple of pipe couplings on the top of the boiler. This assures us an empty boiler.

In case of Alexey, this was done with a bowl and towels when removing the boiler.

Opening up an ECM Casa IV

Taking the two mentioned articles showing how to open a Casa IV / V as examples, it’s time to give it a shot.

First things first. Make sure the espresso machine is turned off, unplugged and it had enough time to cool down!

Remove the water container.

Remove the outer casing, 4 screws at each side and 2 on the back.

Now we have access to the inside. In order to remove the centre piece that holds the water container in place, remove the top 4 screws, below the water container remove the two plastic pipes and from the bottom of the chassis the corresponding two screws.

Now we can see the top of the boiler, together with the corrosion.

Remove all wiring attached to the boiler. I like to take pictures of the cables, so I know how to reassemble.

With the cables out of the way, remove the two nuts that keep the copper piping connected to the boiler, circled in green.

Before removing the screws that close the boiler, from each bracket that holds together the casing (around the group head) and the boiler together, remove the bottom screw from each one. We do this at this point, since the screws at the brackets might be stuck and the counter force from the boiler can be helpful, which was true in my case.

Now, we can remove the 6 screws keeping the boiler together.

Time to remove the boiler. This might be a more complicated step. In my case, the boiler was stuck closed. I managed to get it to open by using a wrench to create lever with the help of the machine. This was quite hard to achieve.

When the boiler is coming off, watch out not to damage the pipe within.

Profit!

We can see the boiler is quite dirty, both in the bottom and in the inner wall. Both require a good wash and rub.

Looking at the top of the boiler, the problem is visible.

If you remove both black thermostats, mark one of the so you know which goes where. If assembled in the wrong order, steam will mean hot water and hot water, steam. It wouldn’t be the end of the world but annoying to swap them around.

DO NOT try to remove the L shape components or the component below, marked with red. If that’s not leaking from there, you’ll create more problems than solutions.

Looking closer at the L shape tubing, we can see the sealant peeling off.

06-top-outer-part-of-boiler-dirty-sealant

Having the replacements parts 1. boiler gasket (red) P2042.2 and 2. heater gasket (black) P2042.5 we can compare their state. The boiler gasket had started to deteriorate, starting to crack and being very gluey. This was not causing any leakage yet but it’s good to change since I went to the hassle of opening up the boiler. Both of the heater gaskets on the other hand had a visible crack and by the time I got them off the heating element, they were in two pieces and not circular any more. The material was very hard as well.

This was the cause of my problem!

The new heater gaskets fit snugly on the heating element.

09a-heating-element-new-seals

After messing with the components I mentioned not to if not necessary, I applied some food-grade sealant that I put on the top. Since I didn’t move the components a lot, I didn’t want to fully remove them and properly reapply the sealant. More of a patch than a fix, but given time for it to dry it was fine.

09b-boiler-with-new-sealant

Reassembling the components of the boiler, I made sure that I installed the heating element with the pins in the same direction.

The boiler is nice and shiny again.

Reassembling the components of the boiler, I made sure that I installed the heating element with the pins in the same direction.

10-top-outer-part-of-boiler-clean

The inside of the boiler is nice and clean.

11-inside-of-boiler-clean

The bottom as well, at the extend possible.

12-bottom-part-of-boiler-clean

And that’s it! Continue with rest of the steps in reverse order and it should be fine!

A couple of things to keep in mind when reassembling:

  • watch out when reassembling the boiler, to avoid damage on the fill tube
  • watch out that plastic water tubes don’t get stuck in any components
  • help the espresso machine get rid of the air in the tubes as this can damage the pump. I had a big amount of air at the short tube that goes from the water container to the pump. Running water through the brew head and moving said tube help get most of it out.
  • make sure the machine doesn’t sound different than usual. This will indicate problems that should be fixed (look at the second and third bullet points)

Note: The replacement heater gaskets are not present in the diagrams of Casa IV but are in that of Casa V.

Bonus

After seeing Alexey’s Casa IV having an insulation for the boiler, and knowing that Casa IV and Casa V are very similar models, I was thinking to buy a boiler insulation that is fitted in Casa V for the Casa IV. This was a slightly harder task to achieve, since I couldn’t find this article on any online shop. Instead I was able to find one for a Profitec Pro 300, that has the same boiler and insulation.

This worked like a charm! Cables got a little more cramped by nothing serious.

I hope this is useful for someone as the mentioned posts were useful to me.

Enjoy your coffee

— flanaras

Issue: Kensington Expert Mouse Wireless Trackball hangs after a couple of seconds

Hi there,

It’s been a long time.

Problem

This time I’m going to talk about an issue regarding a Kensington Expert Mouse Wireless Trackball that stopped working properly, from one day to another, while it had not moved or been transported. It would turn on, the cursor would be moving and clicks were registered, but it would stop after 1 – 2 s and then it wouldn’t do anything else. Switching it on and off would make it behave the same way. It was behaving the same way with other host devices, too.

Environment

  • openSUSE Tumbleweed: 20230910

Investigation

With a fast search, I didn’t find any other user with the same issue, so I contacted Kensington support.
They recommended me to:

  1. Check batteries alkaline / non rechargeable and new,
  2. Hard reset the mouse, and
  3. Bend the battery pins, in case the contact was good.

I tried all these, but they didn’t work for me, the main problem being not being able to hard reset the trackball due to it hanging very fast, for which they had not mentioned a solution.

After playing around with the mouse and batteries, I managed to get the mouse to turn on for a few minutes. I managed to do this by removing the batteries for a prolonged time, hours or days.

Solution / TL;DR

Having found a way to make the trackball turn on for longer time, I can hard reset it.

  1. remove the batteries for a long time, i.e., more than an hour,
  2. configure the switch to the 2.4 GHz with the dongle position, instead of Bluetooth,
  3. plug in the dongle on a computer nearby,
  4. insert the batteries,
  5. switch on the trackball,
  6. press all four buttons at the same time, and
  7. when the led turns on blue, release.

This should be make it work again.

I hope this helps someone out there.

Until next time,
— flanaras

References

Opera not rendering any letters

Hello again, it has been a long time.

Issue

Today’s issue is an annoying one, after a recent OS update, I had an issue with both Google Chrome and Opera, that no text was rendered in the pages, but tab titles worked fine. For Google Chrome, reinstalling the package solved the issue. This wasn’t the case with Opera.
Opera is a chromium based web browser. The reported issue seems to be an issue with chromium based web browsers in general.

Environment

The relevant parameters on my environment:

  • openSUSE Tumbleweed 20230716
  • opera 99.0.4788.31
  • AMD Ryzen 7 PRO 5850U with Radeon Graphics

Solution

The issue is resolved by cleaning up the GPUCache. For opera, this can be done by:

> rm ~/.config/opera/GPUCache/ -r

or by launching opera with

--disable-gpu-driver-bug-workarounds

flag.

Have a good day!

— flanaras

References

Send keyboard keypresses to guest VirtualBox VM via terminal

Hello all,

This time round, I wanted to automate my workflow and send keyboard keypresses to a Windows 10 VM. Specifically, I wanted to send a right-shift (down and up) action. To do this, a short investigation into keyboard scan codes is required.

Background

When we type a letter, we press a button down and then release it. When we don’t release the button, a repetition of the key appears until released.

For this, two different commands (scan codes) are sent from the keyboard. The first one represents a key press and the second one the key release.

In the very simple case, the release scan code is + 0x80 on the key down scan code.

Fortunately, some documentation on keyboard scan codes (win.tue.nl) already exists, with some examples scan codes.

Environment

  • VirtualBox: 6.1.16_SUSEr140961
  • host: openSUSE 15.2
  • guest: Windows 10

How to

To simulate a right-shift key down and up, 0x36 represents the key down and 0x36 + 0x80 = 0xb6 represents the corresponding key up code.

VBoxManage allows us to send keyboard any number of scan codes directly to the guest VM:

> VBoxManage controlvm  keyboardputscancode 36 b6 

Substitute <vm-name> with the name of your VM or its UUID.

VBoxManage list vms and VBoxManage list vms are your friends. The former returns all VMs and the latter all currently running VMs.

Scan codes

Scan codes for keys can be found either interactively or through documentation.

Interactively

Acquiring scan codes interactively is possible on Linux using:

 > showkey -s

In case you get an error of Couldn't get a file descriptor referring to the console, you can either log in to a “real” console (alt + ctrl + [1-7]) or run the command with sudo [2].

Documentation

Some scan codes are listed in the Ordinary scancodes section of documentation on keyboard scan codes (win.tue.nl).

References

  1. https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html
  2. https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/1006676

Free up C: disk space on Windows Server 2008 R2

Hello all,

This is a funny one. Dealing with Legacy / end-of-life OS.

Yes, you read right, this is about Windows Server 2008 R2.

You know something is wrong when C:/Windows uses up 111 GB, using all available space on C:/.

C: disk running out of free space
C:/Windows claiming > 110 GB

After some investigation, search and experiment there was no success. Neither cleanmgr nor dism did help.

C:/Windows/winsxs wasn’t full, C:/Windows/temp did not occupy much space, neither did C:/Windows/SoftwareDistribution.

The culprit was C:/Windows/Installer.

C:/Windows/Installer occupying ~70% space of C:/Windows

Of course Microsoft doesn’t approve of deleting files under the windows folder. From their Q&A forum:

The Windows Installer Cache, located in c:\windows\installer folder, is used to store important files for applications installed using the Windows Installer technology and should not be deleted.


The installer cache is used to maintain (remove / update) the applications and patches installed on the machine. The installer files are a record of file versions and registry dependencies involved in a particular application or application update installation. The availability of this record in the cache helps to uninstall and update applications properly.

https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/cleaning-the-windowsinstaller-folder/1942aa06-b2e2-40e1-b791-cd85ae64b3aa

I’m inlining the answer since a lot of Microsoft links don’t work any more.

Solution:

Nevertheless, there’s PatchCleaner (homedev.com.au) that does remove “orphaned” installation packages. Please read the description before using.

PatchCleaner v1.4.2.0 finding and removing 62 GB of orphaned files.

Success, there’s much more free space now!

C: after running PatchCleaner

Note: I’m using / instead of \ due to Linux influences.

References:

Remove dependency packages from zypper

Hello there,

It has been a long time. This will be a short one, I will have this here as a reference for me.

Let’s say you installed a bunch of packages that come with a lot of dependencies. The time will come that you won’t need those packages any more and you want to remove them with their dependencies.

This is an easy task!

Just type in:

 > zypper rm -u PKGS

That’s it, have a good day!

— flanaras

Resources:

Old Ocean Optics devices on new Windows versions

Hello all,

I had an Ocean Optics USB4000 (oceaninsight.com) that I wanted to use on a Windows 10 system. Following the initial instructions based on Windows XP didn’t work, the software (an old version SpectraSuite) was launching fine but the driver was not compatible with Windows 10. This might sound like a dum post but it took me a long time to realise it how to do it. The SpectraSuite is discontinued long time now, since 09/30/2011, and that is what provides the drivers for the devices.

Some proof that the device is being successfully installed in Windows 10 (image below).

Ocean Optics USB4000 fully installed under windows 10.

I was thinking that I would have no luck making the device work under the newer versions of Windows but luckily I found out that they still support older devices. Ocean Optics provides a product called OmniDrivers (oceaninsight.com) that provides drivers that are compatible with Windows 7 and later. In the download page it is shown that it requires a password that I do not have, although that is for development purposes and not for the drivers.

How to:

The way to get it working on new Windows versions is very simple. Follow the steps and it should work.

  1. Fully delete any older drivers for USB4000 (or any other device) from the device manager,
  2. Disconnect device,
  3. Install OmniDriver,
  4. Ιnstall SpectraSuite (you will need a password for this),
  5. Connect device,
  6. Success.

OmniDriver can be downloaded from Ocean Optics download page (oceaninsight.com).

SpectraSuite should be already obtained. In case this is not available any more, Ocean Insight provides free OceanART (more below).

Test environment:

Note, the specific versions used in this post are:

  • Windows 10 1809
  • OmniDriver-2.56-win64-installer
  • SpectraSuiteSetup_Windows64

Resources:

OceanART:

OceanART is an entry level software package for novice users in spectroscopy.

From OceanART downloads page (oceaninsight.com).

OceanART is compatible with Windows 7 and Windows 10 Operating Systems and the following Spectrometers

  • Ocean HDX
  • Ocean FX
  • Flame
  • HR2000+
  • HR4000
  • Maya2000 Pro
  • NIRQuest256
  • NIRQuest512
  • QE6500
  • QE Pro
  • STS
  • USB2000+
  • USB4000

From OceanART Quick Start Guide pdf (oceaninsight.com)

Hope this helps someone, somewhere.

best
— flanaras

— update [2021/05/31]: Add OceanART, update links and fix typos

Make audio Bluetooth work (openSUSE Leap)

Hello,

It has always been a pain for me to work with Bluetooth devices, both on Windows and Linux. Different problems on different platforms and window managers. On Windows sometimes I had to reinstall the driver each time I wanted to connect. On another computer I would have to pair the device each time I wanted to use it. On Linux (Gnome/Opensuse), I would have to recreate the profile each time I wanted to connect and use it as a speaker. That is from the gnome control centre.

On the other hand if I connect through the terminal with bluetoothctl it works. It works after you actually make it work for the first time which can need a lot of time to figure it out.

Nowadays I’m using bluetoothctl with i3 and works like a charm.

I don’t know if the experience I had with Linux was due to more tested (old) packages or if it hasn’t yet been properly fixed.

The system:

  • openeSUSE Leap 15.0
  • bluetooth stereo
  • bluetoothctl: 5.48
  • pulseaudio 11.1-rebootstrapped
  • Kernel: 4.12.14-lp150.12.16-default

This should work for older versions of openSUSE Leap. I had to do something similar to 41.*. As long as the Leap version works with these tools, this is how to circumvent the problem.

How to:

First of all, comment out the line that loads the module-bluetooth-discover in /etc/pulse/default.pa.

 > sudo vim /etc/pulse/default.pa

comment out:

 load-module module-bluetooth-discover

and Reboot.

Once booted up again, configure bluetoothctl as shown below

 > pactl load-module module-bluetooth-discover
 > bluetoothctl
 >> power on
 >> agent on
 >> default-agent
 >> discoverable on
 >> scan on
 >> scan off
 >> trust 11:11:11:11:11:11
 >> connect 11:11:11:11:11:11

 WIN!

 

Hint, if you want to change the speakers that each application uses, you can do that from:

 > pavucontrol

 

Note: Each time you want to connect to a bluetooth device that has an audio profile you need to run:

 > pactl load-module module-bluetooth-discover

You can execute it from a script that gets executed upon login, i.e. i3 config file.

 

Note 2: Reconnecting to the same device messes up with my computer, bluetoothctl does not fine any Bluetooth controllers. Reboot both system and Bluetooth device to resolve.

 

Enjoy your cable free music!

— flanaras

 

Resources:

Build TensorFlow on an offline computer

Hello all,

I wanted to build TensorFlow from sources on a computer that doesn’t have access to the Internet. After some research on the Internet I didn’t find anyone successfully managing that specifically with CUDA support. There is an offline helper tensorflow-offline (github.com) by @amutu but that supports TensorFlow version 1.2.1. To be fair I didn’t try if it would work for the currently latest one (1.5.0), but I need CUDA support.

TL;DR Configure application, bazel fetch and bazel build for a few seconds on an online computer using “bazel –output_user_root=`pwd`/../tf_tmp %REST_OF_COMMAND%. Package and transfer ../tf_tmp/%HASH1%/external to the remote. Identically configure application, build same as the online (it will fail), extract package to ../tf_tmp/%HASH2%/external and then build again. Voila!

The suggested solution is universal, for other bazel based applications as well.

Here it goes!

This will require to create twice the developer environment. For me this means more or less having cuda (9.1 locally and 9.0 on the server) installed, cudnn (7.0 both) and nccl (2.1.4-1), using bazel release 0.10.1.

Setup both environments identically, as seen on the build guide (tensorflow.org).

Online server

Run (check * Important in the end of the post):

 > bazel --output_user_root=`pwd`/../tf_tmp fetch --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

Until it fully succeeds, you might need to run it multiple times or delete ../tf_tmp/install folder to succeed. Then start building the application because there might be some packages that will be checked at that moment:

 > bazel --output_user_root=​pwd`/../tf_tmp build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

exit after a few seconds, when you see it has started to compile.

Navigate to ../tf_tmp/%HASH1%/ where 22b7191bf872641ec533c3a935b4af91 is my hash, i.e.

 > cd ../tf_tmp/22b7191bf872641ec533c3a935b4af91/

Create an archive with the external folder

 > tar czf external.tar.gz external

Offline server:

Execute:

 > bazel --output_user_root=​pwd`/../tf_tmp build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

This will create the folder structure in tf_tmp so we can add the external folder

Online server:

Move to the offline server:

 > scp external.tar.gz server:/path/on/remote

Offline server:

extract external.tar.gz to /path/to/tf_tmp/%HASH2%/

 > tar xzf external.tar.gz -C $HOME/tf_tmp/7d826155cbbfce6e938d5e7e034e981b/

Build TensorFlow and it will succeed.

If by any chance you change the location of the TensorFlow source path or rename the folder,  you will need to extract external.tar.gz again.

* Important: this only adds the –output_user_root parameter which should not be withing the same folder as the source code. When the bazel command is

 > bazel build

this becomes

 > bazel --output_user_root=​/some/other/path build

solution based on @truatpasteurdotfr’s (github.com) idea.

Hope this helps someone

— flanaras

— update [2018/03/16]: Add credits and bazel version

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started