Cannot exit fullscreen on Spotify

I had Spotify running in fullscreen mode on a second monitor when I closed it and unplugged my laptop. Now Spotify starts in fullscreen mode and I am unable to exit it. Using F11 just skips the current song.

4

6 Answers

Minimally invasive fix without dependencies for simple copy & paste - 2022

Regular installation (RPM / DEB)

  1. Close Spotify
  2. Run sed -i "/\b\(app.window.position\)\b/d" -- $HOME/.config/spotify/prefs
  3. Run Spotify

Flatpak installation

  1. Close Spotify
  2. Run sed -i "/\b\(app.window.position\)\b/d" -- $HOME/.var/app/
  3. Run Spotify

Snap installation

  1. Close Spotify
  2. Run sed -i "/\b\(app.window.position\)\b/d" -- $HOME/snap/spotify/current/.config/spotify/prefs
  3. Run Spotify

(Thanks to @MrFuppes for the Snap instructions)

Source for sed command: How to remove lines from the text file containing specific words through terminal?

Btw: This is not Ubuntu-Specific, I'm on Fedora Linux.

2

I've had this issue for a while now, and @Sadaharu Wakisaka commented that for someone, it's already resolved by deleting $HOME/.config/spotify, but for me, with the snap version, I had to delete $HOME/snap/spotify/current/.config/spotify while Spotify was not running, and then sign in again

3

I pulled out a simple script that can toggle fullscreen on Spotify. It uses wmctrl, but since the other answer uses window title to specify the window and it didn't work out in my system, I used xwininfo to manually resolve a window ID of Spotify.

It's a one-liner, which is following:

xwininfo -root -tree | grep '("spotify" "Spotify")' | grep -oE '(0x[0-9a-z]{7,8})' | xargs -I % wmctrl -i -r % -b toggle,fullscreen

It grabs info of every window on system, grab spotify's window ID using couple grep commands, and shoves it into wmctrl command.

It should work regardless of distro as long as you have xwininfo installed, I use this on Fedora Cinnamon spin.

Please follow the steps below to exit Full Screen on Spotify:

Open a Terminal window and install wmctrl:

sudo apt install wmctrl

While Spotify is running, pause the music and run the following command:

wmctrl -r spotify -b toggle,fullscreen

It should go back to windowed mode and you may keep playing your music ;)

1

It depends if you have installed spotify through snap. In my case, I had installed spotify in snap. In this case:

  1. Goto spotify in snap folder. Notice the number 42 may change so use ls to know what number is in your case.

    cd snap/spotify/42/.config/spotify
  2. Then edit the preferences file:

    gedit prefs
  3. Set the number for app.window.position.width to a different value. It worked for me the value as reported in this thread Full-screen-under-Ubuntu-18-04 which is 1320.

    app.window.position.width=1320
  4. Save changes and start spotify. It should not be in full screen.

3

I just went into my files, showed hidden files, went into the Spotify folder, opened prefs under .config/spotify and changed app.window.position.saved=true to app.window.position.saved=false after the other things didn't helpt. idk but it seems to have worked

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like