You are not logged in.
Hello,
I have been using obfilebrowser for about a month now. It worked great. Thank you. Today I did a system update and obfilebrowser no longer works for me. I normally used this line in my openbox menu
<menu id="obfb-home" label="Desktop" execute="obfilebrowser --no-parent --no-self ~/Desktop" />
Now since today I only get a tiny little box where I used to get a directory listing when activating the menu.
I am not sure how I can test what is wrong, but I did try to run obfilebrowser from a command line just to test the output (not sure that is a valid test method though) Anyway, I get the following by typing "obfilebrowser ~/Desktop" into terminal
Traceback (most recent call last):
File "/usr/bin/obfilebrowser", line 62, in <module>
mimeo = Mimeo.Mimeo()
File "/usr/lib/python2.7/site-packages/Mimeo.py", line 132, in __init__
self.load_mimeinfo()
File "/usr/lib/python2.7/site-packages/Mimeo.py", line 230, in load_mimeinfo
self.load_defaults(fpath)
File "/usr/lib/python2.7/site-packages/Mimeo.py", line 262, in load_defaults
mimetype, desktop = map(lambda x: x.strip(), line.split('=', 1))
ValueError: need more than 1 value to unpack
Can anyone provide any info as to what I may have done wrong?
Thanks
Offline
Hello again,
Post number 47-49 from this very thread solved my problem. I had a blank line too.
Thanks again for obfilebrowser.
Last edited by bnb2235 (2011-02-13 18:33:00)
Offline
I've updated mimeo. It should now ignore blank lines.
Last edited by Xyne (2011-02-14 02:52:26)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
It does. Thank you!
Offline
I've made some major changes to Mimeo and have completely rewritten ObFileBrowser. Read the help message and the changelog.
Given that it's a complete rewrite, I have probably introduced new bugs.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks Xyne, updated. for simple bash script file under exc it has only ? hope this will be corrected.
Edit1: the bash script files don't have any extension. If an extension for eg .txt is appended it shows the editors (leafpad/geany to open under exec). how to set these type of files in ./.local/share/applications/mimeapps.list (for eg: > file cow > Bourne-Again shell script text executable).
again, thank you, Xyne.
Last edited by kgas (2011-02-24 01:54:14)
Offline
Yes, that's what it was - I'd love to be able to execute something via obfilebrowser. I think if a file has +x, it should allow you to run it directly.
Offline
Another update:
* added "--desktop-menu" option to display Desktop Entries
@jdarnold
The launcher menu now includes an item for running executable files.
@kgas
Use mimeo to configure associations. E.g. ("test" is a Bash script):
# find Leafpad's desktop file
> mimeo --app2desk leafpad
leafpad
/usr/share/applications/leafpad.desktop
# determine "test" file's MIME-type
> mimeo -m test
test text/x-shellscript
# associate "text/x-shellscript" with Leafpad
> mimeo --add text/x-shellscript leafpad.desktop
Read "mimeo --help" for more options, such as globbing MIME-types to set multiple associations at once (e.g. "glob:text/*") and setting defaults.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I see differences in the way paths are displayed. It didn't show paths for me before, but not it does on some and others not. Reference the following screenshots. These are all symbolic links to .xls or .txt files on my system. The menu is:
<menu id="obfb-home" label="Desktop" execute="obfilebrowser --no-parent --no-self ~/Desktop" />
There are several other .xls files like the image below.
Personally, I prefer the image below. A current screenshot, but this is the way it was before too.
This is a screenshot of my Desktop folder.
Offline
@bnb2235
The path in the file launcher menu is only included for files that are executable, to fulfil jdarnold's request above of being able to run them directly.
I have changed it to make this clearer. Instead of displaying the path, it will now add a section named "Run":
Run
directly
in terminal
Note that "in terminal" will only show up when the "--term" option is used.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks Xyne,
I guess the problem was really my own then. I removed the "Run as a program" permission from the .xls files and all is well for me. I guess the question (perhaps rhetorical) is why were the .xls files on my system marked to be exectuable. (they were copied from a Windows system when I converted to Arch)
Thanks again.
Offline
That's why - often files copied from Windows are marked as executables, because there is no concept of that in Windows, so it often gets defaulted to +x
Offline
I've added optional caching (--cache). It speeds up browsing of large directories after the first view by saving the menu in an sqlite database. It should detect relevant changes and refresh the cache automatically.
There's also a "--delete-cache" option. The cache is saved in $XDG_CACHE_HOME.
uncached cached
------------------------------------------
real 0m4.905s real 0m0.066s
user 0m2.570s user 0m0.043s /var/cache/pacman/pkg
sys 0m1.807s sys 0m0.017s
------------------------------------------
real 0m13.922s real 0m0.109s
user 0m6.043s user 0m0.057s /usr/bin
sys 0m5.846s sys 0m0.043s
------------------------------------------
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Holy Mackerel!!!
Thank you Herr Xyne!
Having been an ardent Blackbox fan, and having also realized that I cannot do much with fancy fonts as far as Blackbox is concerned, I finally decided to try out Openbox alongside of it, and I stumbled upon this script of yours.
It is magnificent!!!
Somewhat reminded me of my olden days with Windows XP, when you could add a new toolbar for a folder and it would show you subfolders and files and such when clicked upon. I had totally forgotten about it - I used to use it once when I was of the opinion that I did not need a music library if the organization of my music directory was itself a library (I guess a rudimentary form of what the GoboLinux people believe?).
Only, this is MUCH better, and I have added it right to the top of my Openbox menu!
May I just ask one thing: the two uppermost menu items are the name of the parent directory and a '.' for the current directory; why not just a '..' for the parent? I mean, if someone is trying out Openbox, he just has to be geeky enough to appreciate the '..' nomenclature - but that opinion is subjective of course.
Thanks again!!!
Be formless, shapeless... like water. Now you put water into a cup, it becomes the cup; you put water into a bottle it becomes the bottle; if you put it in a teapot it becomes the teapot... Now water can flow, or it can crash... Be water my friend
Offline
I'm glad you like it.
May I just ask one thing: the two uppermost menu items are the name of the parent directory and a '.' for the current directory; why not just a '..' for the parent? I mean, if someone is trying out Openbox, he just has to be geeky enough to appreciate the '..' nomenclature - but that opinion is subjective of course.
That's a consequence of how Openbox handles menus. Each menu has a unique ID tag and Openbox will re-use a menu when it recognizes an ID tag that it has already seen.
ObFilebrowser creates consistent menu IDs to re-use menus because it's much more efficient then regenerating them each time you navigate back to a directory (e.g. descend into a child directory then follow the link to the parent directory instead of just moving back in the menu). The problem is that it also re-uses the menu labels. If I set the parent directory label to "..", then if you navigate into the grandparent directory, the parent will appear in the grandparent's listing as "..".
For example, if you start in /tmp/foo, and the link to foo is named "..", then if navigate up to "/", you'll see the following in the listing:
sbin
sys
..
usr
var
Given the choice between that and named parent directories, I choose the latter.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Sorry for a necro-bump, but I thought this was the appropriate thread. I'm still pretty new, and installed obfilebrowser and get a nice xml structure when i execute from shell.
What should my line be in menu.xml ?
Currently I have:
<menu id="browse" label="Browse">
<item label="Openbox Browser">
<action name="Execute">
<command>"/usr/bin/obfilebrowser '/'"</command>
</action>
</item>
</menu>
and then in the main menu list, I have
<menu id="browse" />
Offline
Never mind, got it to work. Just did a one liner in the root-menu portion of menu.xml
<menu execute="/usr/bin/obfilebrowser --desktop-menu ~/" id="browse" label="File Browser"/>
Offline
Sorry for a necro-bump, but I thought this was the appropriate thread.
Threads for active projects are not considered dead, so bumping them is fine.
I'm glad that you got it working.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
In case anyone is actually using this, I have just rewritten it in Python 3. I wasn't planning to but I had forgotten that it depends on Mimeo, which I recently updated to Python 3.
The good:
ObFilebrowser should benefit from improvements in Mimeo's code (hopefully better adherence to the desktop standards). The code has been simplified (caching has now been unified for example).
The bad:
Full code rewrite = new bugs. Let me know what you find.
The ugly:
My code from several years ago. I'll probably say the same thing about my current code in 5 years, but ugh.
Anyway, to any newcomers, check the project page for info and screenshots.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Added icons
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
can you tell your font name and openbox theme name on screenshots from your site please? so good looking
can you tell your font name and openbox theme name on screenshots from your site please? so good looking
The theme is MurrinaAluminium. I have no idea which font I used in those screenshots.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline