Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppimageD Requires Sudo? #125

Closed
zicklag opened this issue Jan 25, 2021 · 22 comments · Fixed by #197
Closed

AppimageD Requires Sudo? #125

zicklag opened this issue Jan 25, 2021 · 22 comments · Fixed by #197
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@zicklag
Copy link

zicklag commented Jan 25, 2021

Hey there, is there a way to install appimaged without requiring sudo/root permissions? I don't have root permissions and I always installed the old one under my own user account with no problem.

@probonopd
Copy link
Owner

Hello zicklag, what gave you the impression that the new one does require sudo?

https://github.com/probonopd/go-appimage/tree/master/src/appimaged#installation-and-usage

@zicklag
Copy link
Author

zicklag commented Jan 25, 2021

Well, I followed those instructions, but when Launching the appimage it output:

2021/01/25 13:27:29 Desktop notification:  Not running on one of the supported Live systems This configuration is currently unsupported but may still work, please give feedback.
2021/01/25 13:27:29 main: PATH: /usr/local/bin:/opt:/home/[username]/bin:/home/[username]/.local/bin:/home/[username]/Desktop:/home/[username]/Downloads:/tmp/.mount_appima4MC6FL/usr/bin:/home/[username]/.cargo/bin:/home/[username]/.local/bin:/home/[username]/bin:/home/[username]/.cargo/bin:/home/[username]/.asdf/shims:/home/[username]/.asdf/bin:/home/[username]/.local/stow/python3.7/bin:/home/[username]/bin:/home/[username]/.local/bin:/home/[username]/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/[username]/.config/yarn/global/node_modules/.bin
This process based on /proc/self/exe: /tmp/.mount_appima4MC6FL/usr/bin/appimaged
Terminating other running processes with that name...
In the future, would send SIGTERM to 17530
In the future, would send SIGTERM to 17589
[sudo] password for [username]:

It seems that it's asking for a sudo password. If it's not supposed to I may be in a funky environment because I'm ssh-ed to anothe rmachine. I'll try it without SSH.

@probonopd
Copy link
Owner

That's probably "just" needed for setting up autolaunching via systemd. But appimaged does not need root rights.
If this is a major hassle/preventing use, then I can look deeper into it.

@zicklag
Copy link
Author

zicklag commented Jan 25, 2021

For now I just switched to using the old appimaged, so not a huge rush or anything, but it would be nice to fix. 🙂

@pepa65
Copy link

pepa65 commented Jan 30, 2021

I have the same issue, I'm not even sure what it's doing. Is there a check to see if it's doing what it is supposed to do?
Maybe I don't need this, but I have a few AppImages that I would like to get a GUI launcher for from the panel.

@pepa65
Copy link

pepa65 commented Jan 30, 2021

(What are supported Live systems, and which ones aren't supported?)

@pepa65
Copy link

pepa65 commented Jan 30, 2021

OK, it works when I copy (not symlink!) an AppImage into ~/Downloads. Where can i configure the 'watched' directories?

@probonopd
Copy link
Owner

Where can i configure the 'watched' directories?

You can't. Are the default ones not working for you?

@probonopd
Copy link
Owner

supported Live systems

Ubuntu LTS and popular derivatives.

@pepa65
Copy link

pepa65 commented Jan 30, 2021

I am on Ubuntu MATE 18.04.5 LTS, so I wonder why I get that message.
Once I know, ~/Downloads works, but it also where browsers downloads by default, so it seems a bit insecure to automatically install any AppImage that lands in there. What are the other ones?

@probonopd
Copy link
Owner

Please check cat /proc/cmdline. Do you see "casper", "live", "Live", ".iso" there?

@probonopd
Copy link
Owner

What are the other ones?

var home, _ = os.UserHomeDir()
var candidateDirectories = []string{
xdg.UserDirs.Download,
xdg.UserDirs.Desktop,
home + "/.local/bin",
home + "/bin",
home + "/Applications",
"/opt",
"/usr/local/bin",
}

@pepa65
Copy link

pepa65 commented Jan 30, 2021

Whoa, that's a lot of locations!
No, I'm not running from an iso..! This is my main install. grep -e casper -e [lL]ive -e .iso /proc/cmdline -- no output.

@probonopd
Copy link
Owner

probonopd commented Jan 30, 2021

Then you are not running one of the supported Live ISOs and it works as designed.
(That it works on non-live systems may be a by-product but I am only using Live Systems.)

@pepa65
Copy link

pepa65 commented Jan 30, 2021

OK, but it does say:

2021/01/30 20:46:15 Desktop notification:  Not running on one of the supported Live systems This configuration is currently unsupported but may still work, please give feedback.

Are people supposed to be running this on Live systems? Anyway, it's working..!

@probonopd
Copy link
Owner

Are people supposed to be running this on Live systems?

At least I am only using Live systems for everything and cannot test on anything else because I am not using anything else.

@pepa65
Copy link

pepa65 commented Jan 30, 2021

As to the original issue, yes, for some reason it asks for sudo after checking the requirements:

$ /data/Downloads/AppImages/appimaged-640-x86_64.AppImage -v

appimaged-640-x86_64.AppImage 640
2021/01/30 21:14:40 Desktop notification:  Not running on one of the supported Live systems This configuration is currently unsupported but may still work, please give feedback.
2021/01/30 21:14:41 main: PATH: /usr/local/bin:/opt:/home/pp/Applications:/home/pp/bin:/home/pp/.local/bin:/home/pp/Desktop:/home/pp/Downloads:/tmp/.mount_appimaL74UgA/usr/bin:/home/pp/.nvm/versions/node/v12.13.0/bin:/home/pp/.cargo/bin:/home/pp/.local/bin:/home/pp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/julia/bin:/home/pp/env/bin:/home/pp/.luav/bin:/home/pp/go/bin:/usr/local/go/bin:/opt/nim/bin:/home/pp/.nimble/bin:/usr/lib/dart/bin
This process based on /proc/self/exe: /tmp/.mount_appimaL74UgA/usr/bin/appimaged
Terminating other running processes with that name...
[sudo] password for pp: 
2021/01/30 21:15:51 Probably not launched by systemd (please file an issue if this is wrong)
2021/01/30 21:15:51 Manually launched, not by systemd. Check if enabled in systemd...
2021/01/30 21:15:51 /etc/systemd/user/appimaged.service does not exist
2021/01/30 21:15:51 Creating ~/.config/systemd/user/appimaged.service
2021/01/30 21:15:51 thisai.path: /data/Downloads/AppImages/appimaged-640-x86_64.AppImage
2021/01/30 21:15:51 /bin/systemctl --user status appimaged
2021/01/30 21:15:51 exit status 3
2021/01/30 21:15:51 Enabling systemd service...
2021/01/30 21:15:51 Starting systemd service...
2021/01/30 21:15:51 Exiting...

@probonopd
Copy link
Owner

I think it needs root rights to enable itself as a systemd service.

@zicklag
Copy link
Author

zicklag commented Jan 30, 2021

I would immagine that could be relatively simple to fix, because the old one just used systemd --user to do a user-local service instead of a system one?

@machitgarha
Copy link

Maybe this one requires root privileges?

@probonopd
Copy link
Owner

Indeed. Pull requests that remove all remnants of needing root would be highly welcome as long as they don't break anything.

@probonopd probonopd added bug Something isn't working help wanted Extra attention is needed labels Mar 20, 2021
@DarioTD
Copy link

DarioTD commented Apr 1, 2022

Maybe this one requires root privileges?

I can confirm that running this AppImage requires sudo privileges 🙃 (If I don't give them I can't use appimaged)
thanks to this line because the main() executes checkPrerequisites() executing exitIfBinfmtExists() and asking elevated privileges.

Why not use "cat" (or other program without sudo) and see If it returns 0 or other number to check If the file exists?

I can't fix it because I am not a programmer and I don't know If the change could break things.
I am just giving ideas how it can be solved to the programmers.

CalebQ42 added a commit to CalebQ42/go-appimage that referenced this issue Apr 17, 2022
probonopd pushed a commit that referenced this issue Apr 17, 2022
* Added SquashfsReader()

* Fixed #195 and #125

* Added more comments to SquashfsReader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants