maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Maemo 5] [Announce] Hamster Filer 0.6.4 (https://talk.maemo.org/showthread.php?t=87152)

Mentalist Traceur 2012-10-03 07:07

Re: [Announce] Hamster Filer - a new file manager
 
I too have replicated the run-as-root-causes-it-to-not-open problem.

Running it from console leads to this:
Code:

~ $ hampsterfiler
Running as root
Password:

I tried using the 'user' password, instead of the 'root' password (edit: to be clear, that's how sudo is used - it expects the password of the user calling it, not the password of the root account, obviously - using the root account password just gets failed as the wrong password), and the result was
Code:

Sorry, user user is not allowed to execute '/usr/bin/run-standalone.sh /opt/hamsterfiler/hamsterfiler' as root on Nokia-N900
Seems like a sudo/sudoers issue.

Running as root (after 'sudo gainroot') produced REALLY weird output.
Code:

Running as root
user is not in the sudoers file. This incident will be reported.

Followed immediately by the output of the busybox(-power?)-symlinked "sendmail" command, when it's executed with no parameters.

Quote:

Originally Posted by helloct (Post 1275558)
GREAT APP.
The grid view is magnifique.

But I think you should move the delete option on the pop-up menu when you click&hold on one file.
You may accidently delete a file.

It prompts you to confirm before deleting anything when you press it, though. So I think it's fine where it is.

Another bug I forgot to mention: thumbnails don't seem to work in a lot of directories, like if you go to /opt/usr/share/themes/alpha/images/. Unless that's intended behavior?

misterc 2012-10-03 20:25

Re: [Announce] Hamster Filer - a new file manager
 
not sure this helps, but...
when starting hamsterfiler from X Terminal as root i get a window with Hamsterfile (root) title
(i do use root in X Terminal to become root and i keep using mc as my root filemanager... GUIs are cute, but nothing beats cli, right?
thus Hamsterfiler is in "default" mode...)

tried sudo hamsterfile and got indeed passwd prompt which i simply CR.ed away as i never set a passwd (that i am aware of)
prompt reappears without Hamsterfiler showing up and without error message.

Mentalist Traceur 2012-10-03 21:24

Re: [Announce] Hamster Filer - a new file manager
 
Quote:

Originally Posted by misterc (Post 1276021)
tried sudo hamsterfile and got indeed passwd prompt which i simply CR.ed away as i never set a passwd (that i am aware of)
prompt reappears without Hamsterfiler showing up and without error message.

I presume "CR.ed" away, you mean you hit the enter/return key? (In which case I would say LF.ed away, since in linux that's a Line Feed char, not a Carriage Return char, no?)

But anyway, I don't think sudo (or maybe even all Linux low-level user things) accepts blank passwords. For example, on Ubuntu (and I think as of lately, Debian, if not by default then as an option) root user doesn't have a password, which prevents any and all logins as root. You can always set one with the "passwd user" command, but honestly, there's no point to do so if you never have a use for it (like SSH'ing INTO your N900).

Anyway, I think this is fairly clear - if the program uses "sudo" to execute itself as root, then sudo will simply wait indefinitely wait for a password, which prevents the program from opening from GUI, due to the lack of a password being entered. And then, due to no entry in sudoers to allow it, it won't open even if a password is provided, because the default is for sudo to not permit an action unless it's specifically configured to allow it.

misterc 2012-10-03 21:37

Re: [Announce] Hamster Filer - a new file manager
 
never understood the furry about that sudo crap
lead to believe this is the way things are done in #buntu @#$%&ßþ :eek: :rolleyes:

if you are so edgy on becoming root, why would you want to open a graphical file manager as such?!?
:eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek:

Mentalist Traceur 2012-10-04 00:03

Re: [Announce] Hamster Filer - a new file manager
 
When you remove the 'run as root' part of the config file by the way, the hampster filer opens if executed from the root account, but it doesn't load the UI elements correctly. Still works fine though for browsing (segmentation fault upon trying to open Settings in that state, though).

Quote:

Originally Posted by misterc (Post 1276043)
never understood the furry about that sudo crap
lead to believe this is the way things are done in #buntu @#$%&ßþ :eek: :rolleyes:

if you are so edgy on becoming root, why would you want to open a graphical file manager as such?!?
:eek: :eek: :eek: :eek: :eek: :eek: :eek: :eek:

Well, most desktop Linux distros actively discourage running file managers as root, precisely because you might easily destroy something (whether by delete or by move) and make the system un-bootable.

The logic for locking down the root account with no password by default, is that a hacker can no longer rely on the fact that there will always be an account with the username "root" that the machine can be logged in as, making exploits that still require logging in harder. Or something like that.

SHARP66 2012-10-04 11:08

Re: [Announce] Hamster Filer - a new file manager
 
I was happy when i sow a new file manager ,. better than filebox.:)
But no searching capabilities, just like in filebox.:(

reinob 2012-10-04 13:04

Re: [Announce] Hamster Filer - a new file manager
 
Re. sudo/root issues,

I don't know how Hamster Filer is handling this, but is seems that it tries to restart itself using sudo (don't know, haven't installed it yet :)

The "proper" way is IMHO to install the program with the setuid bit (so that it will run with the privileges of its owner, i.e. root), and then, if the option to run as root is not active, the program should just drop privileges

gidzzz 2012-10-04 17:41

Re: [Announce] Hamster Filer - a new file manager
 
Quote:

Originally Posted by misterc (Post 1275568)
PS: how many pizzas can you eat before getting sick ?!?

I was able to purchase two 16-inch pizzas thanks to people on TMO, but unfortunately for your question and fortunately for me, I did not consume them in a direct succession. ;)



Quote:

Originally Posted by mhy123152 (Post 1275653)
how can i open current path in XT by Hamster?

If "XT" is the terminal, use Open with... on any file/directory under the current path after adding to Applications something like this:
Code:

osso-xterm "sh -c 'cd """$(dirname ""%s"")"""; sh'"
...or if you want to open the selected directory instead of the directory in which it resides:
Code:

osso-xterm "sh -c 'cd ""%s""; sh'"


Quote:

Originally Posted by Mentalist Traceur (Post 1275696)
Another bug I forgot to mention: thumbnails don't seem to work in a lot of directories, like if you go to /opt/usr/share/themes/alpha/images/. Unless that's intended behavior?

Hamster does not generate thumbnails of its own, only displays those already cached (but that's most likely to change in the future). Tracker does not reach into /opt, so it did not create thumbnails for those files.



Quote:

Originally Posted by reinob (Post 1276287)
I don't know how Hamster Filer is handling this, but is seems that it tries to restart itself using sudo (don't know, haven't installed it yet :)

The "proper" way is IMHO to install the program with the setuid bit (so that it will run with the privileges of its owner, i.e. root), and then, if the option to run as root is not active, the program should just drop privileges

"/usr/bin/hamsterfiler" is a script which checks the config file and can run the binary with sudo. I like the current solution better, because a) it makes the actual program simpler, b) if root access is not needed, it is never used even for a short period and c) the solution with setuid needs some kind of launcher anyway, to prepare the environment (otherwise the skin is screwed up, for example).



To correct the problem with running as root, you have to edit "/etc/sudoers.d/hamsterfiler.sudoers" and add one more line:
Code:

user ALL = NOPASSWD: /usr/bin/run-standalone.sh /opt/hamsterfiler/hamsterfiler
Edit: Then, still being root, execute "update-sudoers" to apply the changes.

The only difference from the already existing entry is the missing asterisk (strange, I though sudo's documentation says that "*" means 0 or more characters, but it needs at least 1 for some reason).

Tiran 2012-10-05 08:19

Re: [Announce] Hamster Filer - a new file manager
 
Quote:

Originally Posted by gidzzz (Post 1276457)
To correct the problem with running as root, you have to edit "/etc/sudoers.d/hamsterfiler.sudoers" and add one more line:
Code:

user ALL = NOPASSWD: /usr/bin/run-standalone.sh /opt/hamsterfiler/hamsterfiler
The only difference from the already existing entry is the missing asterisk (strange, I though sudo's documentation says that "*" means 0 or more characters, but it needs at least 1 for some reason).

At me Hamster Filer it has ceased to be started. At attempt to start through X-Terminal writes: user is not in the sudoers file. After that in/etc/sudoers.d/hamsterfiler.sudoers has added one more line
Code:

user ALL = NOPASSWD: /usr/bin/run-standalone.sh /opt/hamsterfiler/hamsterfiler
But has changed nothing! In what a problem???

gidzzz 2012-10-05 13:53

Re: [Announce] Hamster Filer - a new file manager
 
Sorry, I forgot to write that editing files in "/etc/sudoers.d/" requires running update-sudoers afterwards.


All times are GMT. The time now is 23:48.

vBulletin® Version 3.8.8