10
What is wrong with my script?
(lemdro.id)
Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.
Do you run flatpak update with or without sudo in your terminal?
Without.
EDIT: Just tested
sudo flatpak updateand it returned the same results as the script (duh!). Thanks for the help!There's something valueable to learn here. Seems like flatpak installs packages per user, meaning when you do
$sudo flatpak update
it runs as the root user, which probably doesn't have any packages installed.
Kind of a weird concept if you used Windows for a long time before switching to linux, where running as admin still used the same user account just with elevated privileges iirc
Edit: According to flathub running flatpak as root installs packages systemwide, otherwise they're installed on a per user basis. You should still keep the multi user thing I mentioned in your mind if you're used to windows
I didn’t think of it like that but it makes total sense!
Then you should do the same in the script. Remove the sudo in front of
flatpak update -y.