Let's say I'm logged on to Linux as user1
and I want to install a Flatpak to user2
's account. What is the command? These do not work.
flatpak install --user user2 flathub com.skype.Client
sudo flatpak install --user user2 flathub com.skype.Client
Do I have to log on to user2
's account and then issue the command
flatpak install --user flathub com.skype.Client
or is the proper command something else? The current documentations doesn't provide examples of the --user
argument in use so I'm left to guess.
You can do this using the common Linux command Substitute User (
su
) or the Substitute User Do (sudo
) command. Here are examples:Installing a FlatPak with su
You will be asked for the password of user2 to become that user.
Installing a FlatPak with sudo
Assuming you are an admin user or a user that has "sudoer" rights, you will be asked for your password in which case you will then become user2 to run the command.
Step-by-step
You can also combine the two by becoming root first and then becoming another user: