rtfm-filemanager 7.3.6 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,639 @@
1
+ # RTFM Troubleshooting Guide
2
+
3
+ Solutions to common issues and problems.
4
+
5
+ ## Installation Issues
6
+
7
+ ### Gem Install Fails
8
+
9
+ **Problem:** `gem install rtfm-filemanager` fails with permission error
10
+
11
+ **Solution:**
12
+ ```bash
13
+ # Use --user-install
14
+ gem install --user-install rtfm-filemanager
15
+
16
+ # Or use sudo (system-wide)
17
+ sudo gem install rtfm-filemanager
18
+ ```
19
+
20
+ ### Missing Dependencies
21
+
22
+ **Problem:** Error about missing rcurses or termpix
23
+
24
+ **Solution:**
25
+ ```bash
26
+ gem install rcurses termpix
27
+ # Then retry
28
+ gem install rtfm-filemanager
29
+ ```
30
+
31
+ ### Ruby Version Too Old
32
+
33
+ **Problem:** RTFM requires Ruby 2.7+
34
+
35
+ **Solution:**
36
+ ```bash
37
+ # Check Ruby version
38
+ ruby --version
39
+
40
+ # Update Ruby (Ubuntu)
41
+ sudo apt install ruby-full
42
+
43
+ # Update Ruby (macOS)
44
+ brew install ruby
45
+
46
+ # Or use rbenv/rvm for version management
47
+ ```
48
+
49
+ ## Display Issues
50
+
51
+ ### Terminal Shows Garbage Characters
52
+
53
+ **Problem:** Escape sequences or weird characters
54
+
55
+ **Solution:**
56
+ 1. Press `r` to refresh
57
+ 2. Check terminal supports 256 colors: `echo $TERM`
58
+ 3. Try different terminal (urxvt, xterm, mlterm recommended)
59
+
60
+ ### Screen Doesn't Resize Properly
61
+
62
+ **Problem:** RTFM doesn't adapt to terminal resize
63
+
64
+ **Solution:**
65
+ - Press `r` to manually refresh layout
66
+ - Works automatically in most terminals
67
+ - i3-wm users: Should work automatically now (v7.1.4+)
68
+
69
+ ### Borders Look Wrong
70
+
71
+ **Problem:** Borders appear broken or as letters
72
+
73
+ **Solution:**
74
+ 1. Terminal doesn't support Unicode box drawing
75
+ 2. Press `B` to cycle border styles
76
+ 3. Press `B` until you get `0` (no borders)
77
+
78
+ ### Colors Look Wrong
79
+
80
+ **Problem:** Colors don't match terminal theme
81
+
82
+ **Solution:**
83
+ RTFM parses LS_COLORS automatically. Check your LS_COLORS:
84
+ ```bash
85
+ echo $LS_COLORS
86
+ ```
87
+
88
+ To customize, see: https://github.com/isene/LS_COLORS
89
+
90
+ ## Image Display Issues
91
+
92
+ ### Images Don't Show
93
+
94
+ **Problem:** No images displayed in terminal
95
+
96
+ **Solution:**
97
+ 1. Check if image preview is on: Press `_` to toggle
98
+ 2. Check if preview is on: Press `-` to toggle
99
+ 3. Press `v` to see detected image protocol
100
+ 4. Verify dependencies:
101
+ ```bash
102
+ which identify # ImageMagick
103
+ which w3mimgdisplay # w3m
104
+ which xdotool # For image redraw
105
+ ```
106
+ 5. Install missing dependencies:
107
+ ```bash
108
+ sudo apt install imagemagick w3m-img xdotool
109
+ ```
110
+
111
+ ### Images Flash/Flicker
112
+
113
+ **Problem:** Images appear briefly then disappear
114
+
115
+ **Terminal:** This is normal in kitty terminal (w3m protocol limitation)
116
+
117
+ **Solution:**
118
+ - Use urxvt, xterm, or mlterm for better experience
119
+ - Or accept the brief flash (images still work)
120
+
121
+ ### Images Overlap or Leave Residue
122
+
123
+ **Problem:** Old images don't clear properly
124
+
125
+ **Solution:**
126
+ 1. Press `r` to refresh
127
+ 2. Update to RTFM 7.3+ (automatic clearing)
128
+ 3. Check termpix version: Should be 0.2+
129
+
130
+ ### Images Show Rotated Incorrectly
131
+
132
+ **Problem:** Phone photos display sideways
133
+
134
+ **Solution:**
135
+ Update termpix to 0.2+ (EXIF auto-orient support):
136
+ ```bash
137
+ gem update termpix
138
+ ```
139
+
140
+ ### Images Stretched/Distorted
141
+
142
+ **Problem:** Images don't maintain aspect ratio
143
+
144
+ **Solution:**
145
+ Update to termpix 0.2.1+ (aspect ratio fixes):
146
+ ```bash
147
+ gem update termpix
148
+ ```
149
+
150
+ ## Performance Issues
151
+
152
+ ### Slow Navigation in Image Directories
153
+
154
+ **Problem:** First pass through image directory is slow
155
+
156
+ **Solution:**
157
+ - Normal behavior (creating auto-orient cache)
158
+ - Second pass is fast (uses cache)
159
+ - Turn off preview for faster navigation: Press `-`
160
+ - Turn off images: Press `_`
161
+
162
+ ### Slow with Large Files
163
+
164
+ **Problem:** Lag when navigating files over 100MB
165
+
166
+ **Solution:**
167
+ RTFM doesn't preview files over 1MB by default. If still slow:
168
+ 1. Turn off preview: Press `-`
169
+ 2. Turn off long info: Press `A`
170
+ 3. Disable image metadata: Already optimized in 7.3.6+
171
+
172
+ ### Keyboard Lag When Image Displayed
173
+
174
+ **Problem:** Keys respond slowly with large images
175
+
176
+ **Solution:**
177
+ Fixed in RTFM 7.3.3+. Update:
178
+ ```bash
179
+ gem update rtfm-filemanager
180
+ ```
181
+
182
+ Image redraw checking now only runs when idle.
183
+
184
+ ## File Operation Issues
185
+
186
+ ### Can't Delete Files
187
+
188
+ **Problem:** Delete doesn't work or shows error
189
+
190
+ **Solutions:**
191
+
192
+ **Check permissions:**
193
+ ```bash
194
+ ls -la
195
+ ```
196
+
197
+ **Trash is full:**
198
+ ```bash
199
+ # In RTFM:
200
+ D # Empty trash
201
+
202
+ # Or manually:
203
+ rm -rf ~/.rtfm/trash/*
204
+ ```
205
+
206
+ **Undefined variable 'esc' error:**
207
+ - Fixed in 7.3.4+
208
+ - Update: `gem update rtfm-filemanager`
209
+
210
+ ### Undo Doesn't Work
211
+
212
+ **Problem:** Press `U` but nothing happens
213
+
214
+ **Causes:**
215
+ 1. No undoable operations performed yet
216
+ 2. Permanent deletion (no undo)
217
+ 3. Operation failed
218
+
219
+ **Check:**
220
+ - Undo only works for successful operations
221
+ - Permanent delete (trash off) cannot be undone
222
+ - Try undo immediately after operation
223
+
224
+ ### Can't Open File in Editor
225
+
226
+ **Problem:** Press ENTER but file doesn't open
227
+
228
+ **Solutions:**
229
+
230
+ **Check file type:**
231
+ - Binary files open with xdg-open, not $EDITOR
232
+ - Try pressing `x` to force xdg-open
233
+
234
+ **Set $EDITOR:**
235
+ ```bash
236
+ export EDITOR=vim
237
+ # Add to ~/.bashrc or ~/.zshrc
238
+ ```
239
+
240
+ **UTF-16 files:**
241
+ - Update to RTFM 7.3.3+ (UTF-16 support)
242
+
243
+ ### Permission Change Doesn't Update Colors
244
+
245
+ **Problem:** Changed permissions but file color doesn't change
246
+
247
+ **Solution:**
248
+ Fixed in 7.1.3+. Update:
249
+ ```bash
250
+ gem update rtfm-filemanager
251
+ ```
252
+
253
+ ## Remote Mode Issues
254
+
255
+ ### Can't Connect to Server
256
+
257
+ **Problem:** SSH connection fails
258
+
259
+ **Solutions:**
260
+
261
+ **Test SSH directly:**
262
+ ```bash
263
+ ssh user@hostname
264
+ ```
265
+ If this fails, fix SSH first.
266
+
267
+ **Common causes:**
268
+ - Wrong username/hostname
269
+ - SSH key not set up
270
+ - Firewall blocking port 22
271
+ - Server not running SSH
272
+
273
+ **Set up SSH key:**
274
+ ```bash
275
+ ssh-keygen -t ed25519
276
+ ssh-copy-id user@hostname
277
+ ```
278
+
279
+ ### Slow Remote Browsing
280
+
281
+ **Problem:** Remote directory listing is slow
282
+
283
+ **Solution:**
284
+
285
+ Enable persistent SSH connections in `~/.ssh/config`:
286
+ ```
287
+ Host *
288
+ ControlMaster auto
289
+ ControlPath ~/.ssh/control-%r@%h:%p
290
+ ControlPersist 10m
291
+ ```
292
+
293
+ ### Upload/Download Fails
294
+
295
+ **Problem:** File transfer doesn't work
296
+
297
+ **Solutions:**
298
+
299
+ **Check disk space:**
300
+ ```bash
301
+ # On remote: Press 's' to open shell
302
+ df -h
303
+ ```
304
+
305
+ **Check permissions:**
306
+ - Remote directory must be writable
307
+ - Local directory must be readable
308
+
309
+ **Large files:**
310
+ - May timeout - use rsync for files >100MB
311
+
312
+ ### Remote Shell Won't Open
313
+
314
+ **Problem:** Press `s` but shell doesn't open
315
+
316
+ **Solutions:**
317
+ 1. Check SSH shell access: `ssh user@host`
318
+ 2. Firewall may block interactive sessions
319
+ 3. Try manual: `:§ssh user@host`
320
+
321
+ ## Configuration Issues
322
+
323
+ ### Config File Errors
324
+
325
+ **Problem:** RTFM won't start after editing config
326
+
327
+ **Solution:**
328
+
329
+ **Check syntax:**
330
+ ```bash
331
+ ruby -c ~/.rtfm/conf
332
+ ```
333
+
334
+ **Common errors:**
335
+ - Missing quotes around strings
336
+ - Unmatched brackets in arrays/hashes
337
+ - Ruby syntax errors
338
+
339
+ **Restore backup:**
340
+ ```bash
341
+ cp ~/.rtfm/conf.backup ~/.rtfm/conf
342
+ ```
343
+
344
+ **Reset to defaults:**
345
+ ```bash
346
+ mv ~/.rtfm/conf ~/.rtfm/conf.old
347
+ # Restart RTFM - creates fresh config
348
+ ```
349
+
350
+ ### Settings Don't Persist
351
+
352
+ **Problem:** Changes lost after restart
353
+
354
+ **Solution:**
355
+ Press `W` in RTFM to save settings to config file.
356
+
357
+ ### Bookmarks Lost
358
+
359
+ **Problem:** Bookmarks disappear
360
+
361
+ **Cause:** Exited with `Q` (quit without save)
362
+
363
+ **Solution:**
364
+ - Exit with `q` (lowercase) to save
365
+ - Or press `W` before quitting
366
+
367
+ ## Command Mode Issues
368
+
369
+ ### Command Hangs Terminal
370
+
371
+ **Problem:** Command freezes RTFM
372
+
373
+ **Cause:** Interactive program not whitelisted
374
+
375
+ **Solutions:**
376
+
377
+ **Whitelist program:**
378
+ 1. Press `+` in RTFM
379
+ 2. Type program name
380
+ 3. Press `W` to save
381
+
382
+ **Or prefix with §:**
383
+ ```
384
+ :§htop
385
+ :§vim file
386
+ ```
387
+
388
+ ### Command Output Not Shown
389
+
390
+ **Problem:** Ran command but no output in right pane
391
+
392
+ **Solutions:**
393
+ - Command may have no output (try `:ls -la`)
394
+ - Command may have failed (check syntax)
395
+ - Try `shellexec` method in Ruby mode:
396
+ ```ruby
397
+ @
398
+ shellexec("your-command")
399
+ ```
400
+
401
+ ## OpenAI Integration Issues
402
+
403
+ ### AI Features Don't Work
404
+
405
+ **Problem:** `I` or `Ctrl-a` do nothing
406
+
407
+ **Solutions:**
408
+
409
+ **Install ruby-openai:**
410
+ ```bash
411
+ gem install ruby-openai
412
+ ```
413
+
414
+ **Add API key to config:**
415
+ ```ruby
416
+ # ~/.rtfm/conf
417
+ @ai = "sk-your-api-key-here"
418
+ ```
419
+
420
+ **Or environment variable:**
421
+ ```bash
422
+ export OPENAI_API_KEY="sk-..."
423
+ ```
424
+
425
+ **Get API key:**
426
+ https://platform.openai.com/api-keys
427
+
428
+ ### AI Responses Slow
429
+
430
+ **Normal:** OpenAI API calls take 2-10 seconds
431
+
432
+ **If very slow:**
433
+ - Check internet connection
434
+ - API may be experiencing issues
435
+ - Try again later
436
+
437
+ ## Plugin Issues
438
+
439
+ ### Plugin Not Loading
440
+
441
+ **Problem:** Custom plugin doesn't work
442
+
443
+ **Solutions:**
444
+
445
+ **Check syntax:**
446
+ ```bash
447
+ ruby -c ~/.rtfm/plugins/keys.rb
448
+ ruby -c ~/.rtfm/plugins/preview.rb
449
+ ```
450
+
451
+ **Restart RTFM:**
452
+ Plugins load on startup only
453
+
454
+ **Test in Ruby mode:**
455
+ ```ruby
456
+ @
457
+ load '~/.rtfm/plugins/keys.rb'
458
+ ```
459
+
460
+ ### Custom Key Doesn't Work
461
+
462
+ **Problem:** Defined key binding but nothing happens
463
+
464
+ **Check:**
465
+ 1. KEYMAP assignment correct: `KEYMAP['X'] = :handler`
466
+ 2. Method defined: `def handler(_chr)`
467
+ 3. No syntax errors in method
468
+ 4. Restart RTFM
469
+
470
+ **Debug:**
471
+ ```ruby
472
+ @
473
+ puts KEYMAP['X'] # Should show :handler
474
+ puts defined?(handler) # Should show "method"
475
+ ```
476
+
477
+ ## Platform-Specific Issues
478
+
479
+ ### macOS: bat Command Not Found
480
+
481
+ **Problem:** Syntax highlighting doesn't work
482
+
483
+ **Solution:**
484
+ macOS uses `bat`, not `batcat`:
485
+ ```ruby
486
+ # ~/.rtfm/conf
487
+ @bat = "bat"
488
+ ```
489
+
490
+ Or install batcat alias:
491
+ ```bash
492
+ ln -s /usr/local/bin/bat /usr/local/bin/batcat
493
+ ```
494
+
495
+ ### Windows: Images Don't Work
496
+
497
+ **Expected:** Image display not supported on Windows
498
+
499
+ **Solution:**
500
+ - Use WSL (Windows Subsystem for Linux)
501
+ - Or accept no image preview on Windows
502
+
503
+ ### i3-wm: Terminal Resize Crashes
504
+
505
+ **Problem:** RTFM crashes when resizing in i3
506
+
507
+ **Solution:**
508
+ Fixed in 7.1.4+. Update:
509
+ ```bash
510
+ gem update rtfm-filemanager
511
+ ```
512
+
513
+ ## General Troubleshooting
514
+
515
+ ### RTFM Won't Start
516
+
517
+ **Checklist:**
518
+ 1. Ruby installed: `ruby --version`
519
+ 2. rcurses installed: `gem list rcurses`
520
+ 3. termpix installed: `gem list termpix`
521
+ 4. No config errors: `ruby -c ~/.rtfm/conf`
522
+
523
+ **Nuclear option:**
524
+ ```bash
525
+ rm -rf ~/.rtfm
526
+ # Restart RTFM - fresh install
527
+ ```
528
+
529
+ ### Strange Behavior After Update
530
+
531
+ **Problem:** Weird issues after updating RTFM
532
+
533
+ **Solution:**
534
+ 1. Update all dependencies:
535
+ ```bash
536
+ gem update rcurses termpix bootsnap ruby-openai
537
+ ```
538
+ 2. Clear bootsnap cache:
539
+ ```bash
540
+ rm -rf ~/.rtfm/bootsnap-cache
541
+ ```
542
+ 3. Restart RTFM
543
+
544
+ ### Right Pane Shows Error Messages
545
+
546
+ **Problem:** Errors displayed in right pane
547
+
548
+ **Solution:**
549
+ - Read the error message (usually helpful!)
550
+ - Check if required program is installed
551
+ - Report bug if unexpected: https://github.com/isene/RTFM/issues
552
+
553
+ ### Performance Degradation Over Time
554
+
555
+ **Problem:** RTFM gets slower the longer it runs
556
+
557
+ **Solutions:**
558
+ 1. Press `r` to refresh
559
+ 2. Clear cache: `rm -rf ~/.rtfm/bootsnap-cache`
560
+ 3. Restart RTFM
561
+ 4. Check if directory has many files (turn off preview)
562
+
563
+ ## Getting Help
564
+
565
+ ### In RTFM
566
+ - Press `?` for help
567
+ - Press `v` for version info
568
+ - Press `@` for Ruby debug mode
569
+
570
+ ### Documentation
571
+ - Man page: `man rtfm`
572
+ - Docs: https://github.com/isene/RTFM/tree/main/docs
573
+ - README: https://github.com/isene/RTFM
574
+
575
+ ### Community
576
+ - GitHub Issues: https://github.com/isene/RTFM/issues
577
+ - Author: g@isene.com
578
+
579
+ ### Debug Information
580
+
581
+ When reporting bugs, include:
582
+ ```bash
583
+ # RTFM version
584
+ rtfm --version # Or press 'v' in RTFM
585
+
586
+ # Ruby version
587
+ ruby --version
588
+
589
+ # Gem versions
590
+ gem list rcurses termpix
591
+
592
+ # Terminal type
593
+ echo $TERM
594
+
595
+ # OS
596
+ uname -a
597
+ ```
598
+
599
+ ## Known Limitations
600
+
601
+ ### By Design
602
+
603
+ 1. **No GUI** - Terminal only
604
+ 2. **Single instance** - Each RTFM runs independently
605
+ 3. **Image protocols** - Kitty graphics incompatible with curses apps
606
+ 4. **Remote safety** - No delete/move in remote mode (use SSH shell)
607
+ 5. **File size** - Large files (>1MB) skip preview
608
+
609
+ ### Workarounds
610
+
611
+ **Need to edit 100MB+ file:**
612
+ - Press `:` then `vim largefile`
613
+
614
+ **Need GUI file manager:**
615
+ - Use xdg-open on directory: `:xdg-open .`
616
+
617
+ **Kitty image flash:**
618
+ - Use mlterm or xterm for better image support
619
+ - Or accept brief flash in kitty
620
+
621
+ ## Still Having Issues?
622
+
623
+ 1. **Update everything:**
624
+ ```bash
625
+ gem update rtfm-filemanager rcurses termpix
626
+ ```
627
+
628
+ 2. **Check GitHub issues:**
629
+ https://github.com/isene/RTFM/issues
630
+
631
+ 3. **Report new bug:**
632
+ Include version info, error message, steps to reproduce
633
+
634
+ 4. **Email author:**
635
+ g@isene.com
636
+
637
+ ---
638
+
639
+ [← Plugins](plugins.md) | [Next: FAQ →](faq.md)