You are not logged in.
Any ranger experts out there?
I have started to use ranger more and more lately but I have some issues.
Example 1: Some file types do not open: If I hit enter on a .djvu file nothing happens. When I look into ranger.conf it looks like evince should start but it doesn't. Using Thunar .djvu opens OK.
Example 2: I would like to switch to solarised dark theme. This is added to a later version of ranger than the one in our repo so I tried to dowload it from git but that did not work at all.
Any clues appreciated.
/Martin
"Problems worthy of attack
prove their worth by hitting back."
Piet Hein
Offline
When I look into ranger.conf it looks like evince should start but it doesn't
You should probably post your full ranger.conf (and any other associated files) so that we can have a look at them.
I tried to dowload it from git but that did not work at all
Please post the exact commands that you used to achieve this along with any error messages in full.
Also, what does "did not work at all" mean, exactly?
See the link in my sig. for further guidance
Offline
What HoaS said. Anyway, rifle syntax may be tricky sometimes. Check this snippet:
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
ext docx, has docx2txt, terminal = docx2txt "$@" - | "$PAGER"
ext doc, has antiword, terminal = antiword "$@" | "$PAGER"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has localc, X, flag f = localc "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has lowriter, X, flag f = lowriter "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext e?ps, has llpp, X, flag f = llpp "$@"
ext ps, has llpp, X, flag f = llpp "$@"
ext epub|xps|cbz|cbr, has llpp, X, flag f = llpp "$@"
ext mobi|prc, has fbreader, X, flag f = fbreader -- "$@"
ext chm, has fbreader, X, flag f = fbreader -- "$@"
As you can see some programs need two dashes between the command (and options if given) and the variable ("$@" in these particular cases), some others just one and some need no dashes at all. Don't know the exact reason for this. But when a program resist to spawn, it's a good idea trying the other two possible syntaxes before driving crazy trying to fix an already working program. Many times it's just that.
Don't know about the specific syntax for evince. I've never used it and never faced a djvu file either... I don't even include that extension in my rifle.conf, Sorry
Offline
Martin wrote:When I look into ranger.conf it looks like evince should start but it doesn't
You should probably post your full ranger.conf (and any other associated files) so that we can have a look at them.
Martin wrote:I tried to dowload it from git but that did not work at all
Please post the exact commands that you used to achieve this along with any error messages in full.
Also, what does "did not work at all" mean, exactly?
See the link in my sig. for further guidance
When I wrote "ranger.conf" I meant "rifle.conf". I haven't touched it so it is in its default state.
By "did not work at all" I meant ranger did not start. This was some weeks ago so I don't remember if/what errors I saw. I am on my way to work so I can't test now and anyway I deleted the solarised theme file.
More later.
/Martin
"Problems worthy of attack
prove their worth by hitting back."
Piet Hein
Offline
So here is what happen when I try to use solarized.py from ranger's git repo.
ranger version: 1.6.1, executed with python 2.7.9
Locale: sv_SE.UTF-8
Current file: /home/martin/Android
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ranger/core/main.py", line 134, in main
fm.loop()
File "/usr/lib/python2.7/dist-packages/ranger/core/fm.py", line 310, in loop
ui.redraw()
File "/usr/lib/python2.7/dist-packages/ranger/gui/ui.py", line 262, in redraw
self.draw()
File "/usr/lib/python2.7/dist-packages/ranger/gui/ui.py", line 288, in draw
DisplayableContainer.draw(self)
File "/usr/lib/python2.7/dist-packages/ranger/gui/displayable.py", line 246, in draw
displayable.draw()
File "/usr/lib/python2.7/dist-packages/ranger/gui/widgets/titlebar.py", line 39, in draw
self._print_result(self.result)
File "/usr/lib/python2.7/dist-packages/ranger/gui/widgets/titlebar.py", line 150, in _print_result
self.color(*part.lst)
File "/usr/lib/python2.7/dist-packages/ranger/gui/curses_shortcuts.py", line 53, in color
attr = self.settings.colorscheme.get_attr(*keys)
File "/usr/lib/python2.7/dist-packages/ranger/ext/cached_function.py", line 10, in inner_cached_function
value = fnc(*args)
File "/usr/lib/python2.7/dist-packages/ranger/gui/colorscheme.py", line 67, in get_attr
return attr | color_pair(get_color(fg, bg))
File "/usr/lib/python2.7/dist-packages/ranger/gui/color.py", line 26, in get_color
curses.init_pair(size, fg, bg)
error: init_pair() returned ERR
ranger crashed. Please report this traceback at:
http://savannah.nongnu.org/bugs/?group=ranger&func=additem
/Martin
"Problems worthy of attack
prove their worth by hitting back."
Piet Hein
Offline
What HoaS said. Anyway, rifle syntax may be tricky sometimes. Check this snippet:
<snip>
As you can see some programs need two dashes between the command (and options if given) and the variable ("$@" in these particular cases), some others just one and some need no dashes at all. Don't know the exact reason for this. But when a program resist to spawn, it's a good idea trying the other two possible syntaxes before driving crazy trying to fix an already working program. Many times it's just that.
Don't know about the specific syntax for evince. I've never used it and never faced a djvu file either... I don't even include that extension in my rifle.conf, Sorry
Indeed, to open pdf with Mupdf I had to remove both dashes as per this suggestion.
After som experiementing I have come to the conclusion that there is something else at play when it comes to djvu. I think djvu files are regarded as being of mime type image (djvu is an alternative to both jpg and pdf) and in my case ranger/rifle try to use Mirage which is ignorant of djvu.
Moving the line specifying Evince as something to open djvu files with to above the section about images solved the problem. Now djvu files open in Evince.
/Martin
PS Yes, djvu is sadly overlooked. A djvu file may be ten times smaller than a jpg file of the same quality. For saving scanned documents (text + pictures) the difference is not as dramatic between pdf and djvu but always in djvu's favour.
"Problems worthy of attack
prove their worth by hitting back."
Piet Hein
Offline
Moving the line specifying Evince as something to open djvu files with to above the section about images solved the problem. Now djvu files open in Evince.
I forgot to mention that. The order is relevant in rifle. If you want to see all options available for a file press the r key instead of Enter. They will appear in a list with a number. Hit the preferred option number.
To alter the order in which they appear given you have the programs installed, otherwise they won't show, reorganize the rifle configuration lines at will.
Offline