Active Topics

 



Notices


Reply
Thread Tools
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#21
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.

Originally Posted by helloct View Post
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?

Last edited by Mentalist Traceur; 2012-10-03 at 18:29.
 

The Following 3 Users Say Thank You to Mentalist Traceur For This Useful Post:
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#22
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.
__________________
information is a necessary though no sufficient condition to rationality...
 

The Following 4 Users Say Thank You to misterc For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#23
Originally Posted by misterc View Post
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.
 

The Following 5 Users Say Thank You to Mentalist Traceur For This Useful Post:
misterc's Avatar
Posts: 1,625 | Thanked: 998 times | Joined on Aug 2010
#24
never understood the furry about that sudo crap
lead to believe this is the way things are done in #buntu @#$%&ßþ

if you are so edgy on becoming root, why would you want to open a graphical file manager as such?!?
__________________
information is a necessary though no sufficient condition to rationality...
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#25
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).

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

if you are so edgy on becoming root, why would you want to open a graphical file manager as such?!?
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.
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 291 | Thanked: 435 times | Joined on Apr 2011 @ RO
#26
I was happy when i sow a new file manager ,. better than filebox.
But no searching capabilities, just like in filebox.
 

The Following User Says Thank You to SHARP66 For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#27
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
 

The Following 5 Users Say Thank You to reinob For This Useful Post:
gidzzz's Avatar
Posts: 282 | Thanked: 2,387 times | Joined on Sep 2011
#28
Originally Posted by misterc View Post
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.



Originally Posted by mhy123152 View Post
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'"


Originally Posted by Mentalist Traceur View Post
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.



Originally Posted by reinob View Post
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).
__________________
My Thumb mini-repository: http://gidzzz.mooo.com/maemo/.

Last edited by gidzzz; 2012-10-05 at 13:51.
 

The Following 11 Users Say Thank You to gidzzz For This Useful Post:
Posts: 138 | Thanked: 90 times | Joined on Mar 2012
#29
Originally Posted by gidzzz View Post
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???
 

The Following 2 Users Say Thank You to Tiran For This Useful Post:
gidzzz's Avatar
Posts: 282 | Thanked: 2,387 times | Joined on Sep 2011
#30
Sorry, I forgot to write that editing files in "/etc/sudoers.d/" requires running update-sudoers afterwards.
__________________
My Thumb mini-repository: http://gidzzz.mooo.com/maemo/.
 

The Following 6 Users Say Thank You to gidzzz For This Useful Post:
Reply

Tags
hamster filer, nokia n900


 
Forum Jump


All times are GMT. The time now is 08:15.