Skip to content

Instantly share code, notes, and snippets.

@wdehoog
wdehoog / a-help-text
Last active October 30, 2019 13:12
testing led indicator in repowerd
I hope some people can find some time to try my work on led indicator support.
Since I only test on my Oneplus One I am especially curious what happens on other phones.
Sources can be found in the add-light branch of repo https://github.com/wdehoog/repowerd
See also https://forums.ubports.com/topic/3292/support-for-led-notifications/2
How I test:
- make system writable (if you don't know how then stop here)
- edit /etc/init/repowerd.conf and comment out the line with 'respawn'
(now if you kill the original repowerd it will not be restarted)
@wdehoog
wdehoog / librespot-on-sailfish.md
Last active July 20, 2018 20:42
turn sailfish device into spotify connect player

You can turn your sailfish device into a Spotify Connect Player using Librespot. (For as long as Spotify supports the old api.)

When building LibreSpot you get an executable that can be used as a Spotify Connect Player. It shows up in the Spotify app and webbased player. With some luck it also appears in the list received with getMyDevices (web api).

Build on OBS

On OBS you can find a package to install it on Sailfish. It also installs a systemd service file but librespot is not started automatically. To start it use systemctl --user start librespot. Edit /etc/default/librespot to suit your needs. If you do want to have it start at boot see the last lines in /etc/systemd/user/librespot.service. Note that after installation pulseaudio needs to be restarted, see below.

Build it

Getting cross-compiling working with pu

@wdehoog
wdehoog / mopidy-iris-on-sailfish.md
Last active June 29, 2018 17:38
use mopidy + mopidy-iris to use Spotify on Sailfish

Mopidy on Sailfish to use Spotify

I installed mopidy on my Sailfish phone (Oneplus One with Community build 2.2.0.29). This in order to use Mopidy-Iris to be able to use Spotify.

It sort of works, haven't tested it much. Spotify can be used and the tracks are playing. But it is a lot of dirty commandline work and building and installing takes a lot of time. In the end you can start mopidy from the commandline and use Iris using a browser.

See Mopidy and Iris.

First install Mopidy and Mopidy-Iris. (as root (devel-su))

@wdehoog
wdehoog / gist:1e59908c7d7f51284e3b9f018318a4fb
Created August 15, 2017 19:00
sailfishos build problem: mic hangs
When building a sailfish os image 2.1.124 mic hangs. Consistently. After installing the packages and listing them the process just stops.
A ps auxf shows:
neil 28257 0.0 0.0 29556 3116 ? Ss 11:38 0:00 SCREEN
neil 28258 0.0 0.0 23512 5876 pts/2 Ss 11:38 0:00 \_ /bin/bash
root 28272 0.0 0.0 77968 4624 pts/2 S 11:38 0:00 \_ sudo SSH_AGENT_PID= SSH_AUTH_SOCK= /home/neil/mer/sdks/sdk/mer-sdk-chroot
root 28273 0.0 0.0 12736 3180 pts/2 S 11:38 0:00 \_ /bin/bash /home/neil/mer/sdks/sdk/mer-sdk-chroot
root 28319 0.0 0.0 6976 2704 pts/2 S 11:38 0:00 \_ /bin/su -p -s /bin/bash -l neil -- -c if [ -d "/home/neil" ]; then cd "/home/neil"; fi; SSH_AUTH_SOCK='' SSH_AGENT_PID= exec bash --init-file /mer-bash-setup -i
neil 28323 0.0 0.0 6984 3116 pts/2 S 11:38 0:00 \_ bash --init-file /mer-bash-setup -i