Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Linux (Lubuntu) Spotify Bluetooth earphone controls

Solved!

Linux (Lubuntu) Spotify Bluetooth earphone controls

Hi

 

I am using Spotify on Lubuntu 18.04 (just downloaded it today 10/05/2018), and I am sad to say that my Bluetooth pause button does not work.

 

To test that it is a problem with Spotify and not my Lubuntu installation, I have verified that the Bluetooth buttons work with VLC player.

 

Can this be implemented? 

 

A possible solution: Because I am using Lubuntu within VirtualBox, I am sure I can whip up a simple AutoHotkey script that RCtrl+Space could trigger sending a Space to VirtualBox, and therefore the application, as per the keyboard shortcuts found here:

 

https://support.spotify.com/uk/using_spotify/system_settings/keyboard-shortcuts/

 

Reply

Accepted Solutions
Marked as solution

Just to give some information about my set up...

 

On my computer I am running Windows 7, but because it is a work computer, Spotify fails to be installed.  Therefore I am running Spotify within a Lubuntu (lightweight Ubuntu) VirtualBox.

 

Because sometimes I need to very quickly pause Spotify (e.g. I am required to go for a meeting), I needed a quick key-combo to press which would pause/play Spotify, while I am outside of the virtual machine. 

 

I ended up writing this AutoHotkey script, that when you press RightControl+Spacebar it would Activate the virtual machine window, send space, and then reactivate the window that was currently active:

 

>^Space Up::
    DetectHiddenWindows, On

    KeyWait, RControl
    activeWindowID := WinExist("A")
    virtualBoxWindowID := WinExist("Lubuntu ahk_exe VirtualBox.exe")
    
    if (activeWindowID <> virtualBoxWindowID) {
        WinSet, Transparent, 0, ahk_id %virtualBoxWindowID%
        
        WinActivate, ahk_id %virtualBoxWindowID%
        SendInput {Space}
        
        WinHide, ahk_id %virtualBoxWindowID%      
        WinMinimize, ahk_id %virtualBoxWindowID%
        WinActivate, ahk_id %activeWindowID%
        
        WinSet, Transparent, Off, ahk_id %virtualBoxWindowID%
        
        WinShow, ahk_id %virtualBoxWindowID%      
    }
return

 

 It is pretty simple to use AutoIt to do the same if you were inside of Linux, not inside of a virtual machine.

 

View solution in original post

1 Reply
Marked as solution

Just to give some information about my set up...

 

On my computer I am running Windows 7, but because it is a work computer, Spotify fails to be installed.  Therefore I am running Spotify within a Lubuntu (lightweight Ubuntu) VirtualBox.

 

Because sometimes I need to very quickly pause Spotify (e.g. I am required to go for a meeting), I needed a quick key-combo to press which would pause/play Spotify, while I am outside of the virtual machine. 

 

I ended up writing this AutoHotkey script, that when you press RightControl+Spacebar it would Activate the virtual machine window, send space, and then reactivate the window that was currently active:

 

>^Space Up::
    DetectHiddenWindows, On

    KeyWait, RControl
    activeWindowID := WinExist("A")
    virtualBoxWindowID := WinExist("Lubuntu ahk_exe VirtualBox.exe")
    
    if (activeWindowID <> virtualBoxWindowID) {
        WinSet, Transparent, 0, ahk_id %virtualBoxWindowID%
        
        WinActivate, ahk_id %virtualBoxWindowID%
        SendInput {Space}
        
        WinHide, ahk_id %virtualBoxWindowID%      
        WinMinimize, ahk_id %virtualBoxWindowID%
        WinActivate, ahk_id %activeWindowID%
        
        WinSet, Transparent, Off, ahk_id %virtualBoxWindowID%
        
        WinShow, ahk_id %virtualBoxWindowID%      
    }
return

 

 It is pretty simple to use AutoIt to do the same if you were inside of Linux, not inside of a virtual machine.

 

Suggested posts