Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Enabling Remember Me option on my Linux desktop application even isn't able to remember any of the the previously logged emails.
My family have four accounts and it's very very very annoying to be continously retyping usernames and passwords on our living room PC to change the user to acces the playlists of each own.
(Ignore, it posted it twice for some reason)
It's probably a better idea to have multiple accounts on your OS instead.
BUT, there is a way to do it without having to log out and log in to a personal account if you're only using a main account. Start by creating a user for each person that you want to be able to have their own Spotify Login, and the follow the guide I wrote below.
(ALSO, it might make more sense to change the name of this topic (if the community allows it) to something more relevant, like: Multiple Spotify Accounts or something like that 🙂 )
If you do, you shouldn't actually have to switch over to the new user in order to that user's Spotify account. Instead, you can use the `sudo -u` or `su` commands to start up Spotify with the other user's login.
sudo -u brandon spotify
-OR-
su brandon -c spotify
This will start up Spotify for the user `brandon`. Note that this should be a user that already exists on your machine. You'll want to consult your distro for how to create a new user on the machine if it doesn't exist already.
It's not entirely intuitive to open up a terminal every time you want to open Spotify, so we can make things a little more intuitive by creating Desktop Files for each user. Personally, I use Arch Linux without a Desktop (using i3), so some distros make things a little easier by having a GUI built in to the DE to make Shortcuts/.desktop Files more easily.
But, for those who don't have that option available, we'll go through the process of doing so.
These Before starting, make sure you're logged into the main sure account!
The most sure-fire way to find your spotify.desktop file in the terminal is by using the find command:
# find / -type f -iname '*spotify*.desktop' 2>/dev/null
/usr/share/applications/spotify.desktop
We'll want to use this as our starting point, so I'm going to copy mine into my ~/.local/share/applications, which is where most applications store their .desktop files.
We'll want to name it based on the user, so that we can keep track of them more easily
cp /usr/share/applications/spotify.desktop ~/.local/share/applications/spotify-brandon.desktop
Now edit the file. You should see something like:
[Desktop Entry]
Type=Application
Name=Spotify
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=spotify --uri=%U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify
Now we'll edit the TryExec and Exec portions to include our use of `sudo -u` or `su`:
[Desktop Entry]
Type=Application
Name=Spotify (Brandon)
GenericName=Music Player
Icon=spotify-client
TryExec=su brandon -c spotify
Exec=su brandon -c spotify --uri=%U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify
Done! But... it might won't work. Why? Because, chances are, the user account `brandon` has a password associated with it. Even if it doesn't, our main user account might not be setup with sudo to allow for us to run things as the `brandon` user account. Continue to the second below if running the Spotify (Brandon) app from your Application Runner doesn't work.
Unless you're running the `spotify` command from your terminal all the time, the solution above probably won't work. And, even if you are, the user will have to type in their password every time they want to start up Spotify.
NOTE: This section enables the main user account to do and see anything the other user can. That means it can be abused to violate a user's privacy by accessing private files or change a user's password. If the user has sensitive information on their account, it might be good to either:
1. Run Spotify from the terminal by manually running the sudo command (requiring the user to enter their password)
2. Logout of your desktop and log in to that user's account
3. Create an additional user account, like `brandonspotify`, that is used exclusively for running Spotify
You have been warned!
We'll want to edit our sudoers file to make sure that the account we're using has the ability to run commands without using the secondary OS account's password.
You can do this by running the visudo command:
$ visudo
Down at the bottom of the file, you should see a section titled
##
## User privilege specification
##
In here, we'll want to create an entry for each user we've created a .desktop file for:
mainuser ALL=NOPASSWD: /bin/su – brandon
mainuser ALL=NOPASSWD: /bin/su – lucy
mainuser ALL=NOPASSWD: /bin/su – george
Save this file, and try your opening your new `Spotify (Brandon)` app in your app launcher.
Once you open Spotify (Brandon), have Brandon log in with their account. If you have any questions, or it doesn't work, feel free to ask! I'll try and remember to revisit the thread.
[Desktop Entry]
Type=Application
Name=Spotify (OTHERUSERNAME)
GenericName=Music Player
Icon=spotify-client
TryExec=su OTHERUSERNAME -c spotify
Exec=su OTHERUSERNAME -c spotify --uri=%U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify
$ visudo
Append the following to the bottom of the file:
MAINUSERNAME ALL=NOPASSWD: /bin/su – OTHERUSERNAME
Now, open `Spotify (OTHERUSERNAME)` and log in with their account.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…