# Graphical file manager utilizing Miller Columns



## FloppyKing (Sep 23, 2020)

The company I work for uses a graphic design system that probably no one has ever heard of called "Mecca" created by "Amgraf".  Anyway, their software runs on FreeBSD and up until recently we've been chugging along on FreeBSD 8.2 (prior to that we were on 4.7 for many years).  Obviously this is very very outdated and it's restricted what other programs we can make use of on those computers.

Towards that end we've been looking into updating to a current FreeBSD distribution (which mecca fortunately does support), the only snag is that our users have become accustomed to the TKDesk file manager which makes use of Miller Columns but it was removed from the FreeBSD ports tree in 2013.

Any other file manager currently available in the ports that I've had them try, they say is too inefficient to use due to the lack of the Miller Columns feature.  It appears that the only other file manager currently available on FreeBSD that uses it is ranger which our users would find too complicated to use.

The only other currently developed/maintained file manager I can find that uses Miller Columns in the Unix world is "Pantheon Files", but the only portion of Pantheon that has been ported to FreeBSD thus far has been the terminal emulator.

It appears that there is a debian port of TKDesk that is still maintained and I have tried to evaluate what differences it has that allows it to still function while the latest FreeBSD port does not, but for the most part it is beyond my current knowledge.

Between the two options of getting TKDesk to work in the current FreeBSD environment or making a completely new port of Pantheon Files, it seems obvious from what research I've done that getting TKDesk working should much easier, but I haven't had much luck in my attempts.  I would appreciate some advice from someone more well versed in FreeBSD porting that might help get me on the right track towards getting something working that suits their "needs".


TLDR; I would greatly appreciate any help in getting a graphical based file manager working in current versions of FreeBSD that utilizes Miller Columns.


----------



## forquare (Sep 23, 2020)

I can't comment whether it works, but it looks like pkgsrc has a port of tkdesk: https://pkgsrc.se/sysutils/tkdesk
IIRC, pkgsrc packages should work on FreeBSD (if installed via pkgsrc), but it might be a good starting point to bring it back into the Ports collection?


----------



## acheron (Sep 23, 2020)

Try this.


----------



## olli@ (Sep 23, 2020)

Not sure if it helps, but FreeBSD also has deskutils/gworkspace. It’s the “workspace manager” from GNUstep; it supports Miller Columns.

Apparently, TKDesk development stopped in 2004. I’m not sure if it’s a good idea to try to revive such an old piece of software that probably doesn’t support modern standards. Also, such software that is not maintained tends to grow security issues. It was removed from FreeBSD’s ports collection with the comment “obsolete and unmaintained, doesn’t run” – That seems to imply that it is non-trivial to make it run again.


----------



## kpedersen (Sep 23, 2020)

anonymous9 said:


> Kind of amusing for a company that makes graphic design and electronic publishing software.



Heh, I love it in a retro kind of way. I am also definitely going to use this as an example for "what companies still use UNIX?" Move over Netflix! Amgraf is the new poster-child 

Is that "Creative UNIX Workstation" in the picture a Pentium III? I like them even more. I wonder if they are hiring? XD


----------



## acheron (Sep 23, 2020)

olli@ said:


> That seems to imply that it is non-trivial to make it run again.


It works.


----------



## kpedersen (Sep 23, 2020)

Would it be possible to set up an (Offline!) Jail for the old software?

You could even use the last "officially supported" userland within the Jail if there are any potential compatibility issues.


----------



## FloppyKing (Sep 24, 2020)

Everyone's feedback is greatly appreciated.  I first tried installing the zip supplied by acheron and it appeared to install without issue, but when running tkdesk it gives me the below message:
`application-specific initialization failed: version conflict for package "Tcl": have 8.6.8, need 8.7

The tkdesk script seems to be using an older version of tkdesksh.
Please edit the third line of this script to point to the absolute
path and file name of tkdesksh.  Both are usually located in the
same directory.

An alternative is also to modify your PATH environment variable to
list the directory where you installed Tkdesk 2.0b before
the one that contains the older tkdesksh.

The easiest method is of course to simply delete the old tkdesksh.`
I checked and I already have both tcl 8.6.8 and 8.7.a1_3 installed, so i'm not sure what to make of the first line of that message.  I also tried altering line 3 of tkdesk as the message indicates to have the absolute path of tkdesksh which appeared to have no effect.  I also tried deleting tkdesksh as indicated by the last tline by just temporarily renaming tkdesksh to tkdesksh.bkup, but then it just came up with a message about not being able to locate tkdesksh.


----------



## Beastie (Sep 24, 2020)

FloppyKing said:


> I would greatly appreciate any help in getting a graphical based file manager working in current versions of FreeBSD that utilizes Miller Columns.


How many panels do you need? x11-fm/xfe is super light and fast and supports up to two independent panels or a tree-panel combo with a second panel. And the panels can be set vertically or horizontally.


----------



## FloppyKing (Sep 24, 2020)

Beastie said:


> How many panels do you need? x11-fm/xfe is super light and fast and supports up to two independent panels or a tree-panel combo with a second panel. And the panels can be set vertically or horizontally.


Thank you for the suggestion, unfortunately I had them trying Nemo file manager, which has similar features, but they specifically want the miller columns where you can actively interact with each branch of the file structure simultaneously.  The file structure they work with makes them usually have it set to 6 columns.  TKDesk would also let them set a different file mask filter for each column separately which they liked.  TKDesk was never very pretty, but i have to admit it was feature rich with lots of options for customization.  It's a shame it went out of development.


----------



## jmos (Sep 25, 2020)

FloppyKing said:


> `application-specific initialization failed: version conflict for package "Tcl": have 8.6.8, need 8.7`
> I checked and I already have both tcl 8.6.8 and 8.7.a1_3 installed



8.7 is still a alpha version (!). Uninstall it - it seems that TkDesk cannot handle more than one Tcl interpreter, and without further efforts that won't be solved easily. And as long 8.7 shouldn't be needed by any software the easiest is to remove it. The "ZIP-port" itself works fine (however acheron solved the netscape-bug…).


----------



## FloppyKing (Sep 25, 2020)

jmos said:


> 8.7 is still a alpha version (!). Uninstall it - it seems that TkDesk cannot handle more than one Tcl interpreter, and without further efforts that won't be solved easily. And as long 8.7 shouldn't be needed by any software the easiest is to remove it. The "ZIP-port" itself works fine (however acheron solved the netscape-bug…).



Thank you all for your replies, especially jmos and acheron .  It's working now.  Had to take a break from my happy dance to make this reply.

*Following is just in case anyone else finds this thread and makes the same mistake I did:*
I removed tcl 8.7 as suggested.  At first i didn't think this solved the problem, but in the end realized it was because i didn't do what i should have.  pkg delete said it needed to remove tkdesk and itcl as well which I incorrectly thought was unnecessary since I still had tcl 8.6.8 so I did delete on tcl with the -f flag.  I also removed tk87 since it was also an alpha version and I also had tk86 already installed.  Once those two were removed i tried tkdesk again and it ran into the exact same error message, so i thought "OK, maybe when tkdesk installed it compiled stuff to reference the tcl87 that was installed at the time, so i must need to uninstall tkdesk and reinstall it to make it work", but doing that resulted in the same issue.  I then thought to restart the system, which didn't help either.  It then dawned on me that itcl (the other one that pkg wanted to remove) was the one still referencing the wrong tcl version so I went back to where i started by re-installing tcl87 and tk87 then uninstalling them and this time letting it remove the extra stuff it wanted to remove, then I re-installed itcl (which didn't need to reinstall any new dependencies since i already had tcl86) and then re-installed tkdesk and that solved the problem.  I probably could have just removed itcl and re-installed it, but i couldn't remember for sure which things it listed previously that i said no to.


----------



## FloppyKing (Sep 25, 2020)

When trying to change the number of listboxes to 6, it does not actually change the number of listboxes.  Initially thought this was due to an issue with compatibility on current FreeBSD, but then I vaguely remembered fixing that before.  Dug through my email history and sure enough this was a problem I already fixed back in 2011 when we upgraded from FreeBSD 4.7 to FreeBSD 8.2.  I'll have to dig back through it to re-figure out exactly what I had to change to fix it previously, but I know from my notes that it at least involved changes in /usr/local/lib/TkDesk/Common.tcl, Viewer.tcl, and config.tcl .  Once i get it figured back out i'll post back on this thread with the corrected files.  Hopefully that will in some small way pay forward the assistance I have received.


----------



## Minbari (Sep 25, 2020)

Most "modern" file managers deprecated Miller columns because: "been used by only very few people but was tricky and time consuming to maintain." - KDE Team. Your only option is to use either a terminal based file manager like sysutils/py-ranger, which is very intuitive after spending some time using it or you can use a surrogate which can be used as a file manager/browser to, despite the fact that he is a workspace manager. The best part about the last one is that he is on FreeBSD ports: deskutils/gworkspace. If the program suits your needs feel free to adopt and maintain it.


----------



## T-Daemon (Sep 25, 2020)

FloppyKing said:


> I checked and I already have both *tcl 8.6.8* and 8.7.a1_3 installed,



Is the tcl version number a typo? tkdesk port requires 8.6.10.

```
# pkg info -d tkdesk
tkdesk-2.0.2:
             tk86-8.6.10_1
             blt-2.5.3_5
             tcl86-8.6.10
             itcl-3.4.1_1,1
```
*acheron*'s port on 12.1-RELEASE:


----------



## FloppyKing (Sep 25, 2020)

T-Daemon said:


> Is the tcl version number a typo? tkdesk port requires 8.6.10.



No, it's not a typo.  I could very likely be mistaken but I think the -d option just shows which packages you have installed that it depends on, not necessarily which versions of those packages that it requires.

The test box I'm currently working off of is on FreeBSD 10.3 so 8.6.8 is the version of tcl that is installed.  I've been trying to get them to update to a current version of FreeBSD for a few years now and set test box up when starting that process so that's why it's on a not as new version.

One of the older computers finally succumbed to its age and had a hardware failure so we were finally forced to move forward with updating them.  I was getting ready to setup the new computers with current 12.1 FreeBSD and that's when they brought up the lack of TkDesk on the test computer as being a show stopper issue whereas before it was noted as a minor inconvenience.


----------



## FloppyKing (Oct 30, 2020)

I did solve the six column issue, but my current solution is way hacky and I haven't had time to look into it further yet.  After looking back at my previous notes from last time i had to resolve it my answer was to just find the column variable in the scripts and statically set it to 6 which doesn't really let you change number of columns anymore, but at least it doesn't crash when trying to open it after actively using 6 columns in the previous session.  It also presents a new problem on newer FreeBSD that wasn't present when i fixed it last time on FreeBSD8.2 where when set at a fixed 6 columns files can no longer be drug between columns.  It looks like it'll let you drag them, but then the dialog box that's supposed to open after dragging just doesn't open, so it's definitely not a "good" solution "yet".  I still plan to share the solution when I figure out a good one, which i'll have to eventually, just bigger fish to fry at the moment with another unrelated program also not working right.


----------



## T-Daemon (Oct 30, 2020)

FloppyKing said:


> Without kde5 available in pkg is the only way to install kde currently to do a make install from /usr/ports/x11/kde5?


That wouldn't do any good. The package build cluster servers are using the same ports tree. Trying to build from ports won't get you a successful build. To resolve the situation the build of www/qt5-webengine has to be resolved first.



FloppyKing said:


> but at least it doesn't crash when trying to open it after actively using 6 columns in the previous session.


On my system (12.1-RELEASE) it doesn't crash, after first time executing I can set 6 columns, but after the automatic creation of the configuration file I can't set anymore. Deleting the configuration file permits to set again.


----------



## FloppyKing (Oct 30, 2020)

T-Daemon said:


> On my system (12.1-RELEASE) it doesn't crash, after first time executing I can set 6 columns, but after the automatic creation of the configuration file I can't set anymore. Deleting the configuration file permits to set again.


Yes that's the same behavior I noticed.  I guess "crash" wasn't a good choice of words.  Definitely something funky in the auto generated user config file or at least the reading of it.  My statically setting it to 6 in the scripts basically makes it ignore the column setting in the user config file.  Our users always use it at 6 columns, so previously that was a workable solution until it broke file dragging on newer FreeBSD.

Also it seems that the auto created user config file doesn't cause problems until you try setting the 6 columns.  If you leave it at the default 3 it doesn't seem to have any issues.


----------



## T-Daemon (Oct 30, 2020)

I checked now, tkdesk lets you choose a five column setting, then after I can set 6, but neither of the settings persist. Setting the the number of listboxes on 2 or 1 results in an error message:


```
Error: invalid command name ".fv0-top.lb3"

errorCode: TCL LOOKUP COMMAND .fv0-top.lb3
...
```
Are you familiar with this error?


----------



## FloppyKing (Nov 1, 2020)

T-Daemon said:


> I checked now, tkdesk lets you choose a five column setting, then after I can set 6, but neither of the settings persist. Setting the the number of listboxes on 2 or 1 results in an error message:
> 
> 
> ```
> ...


Unfortunately no, i'm not, but it does give me somewhere to start when looking into a proper fix if i get to it before someone else, so thank you.


----------



## FloppyKing (Nov 5, 2020)

T-Daemon

I've found the two settings in the user file that seem to be the source of the problem.  Likely not the actual cause, but gives me more insight into the issue that really only presents itself once the user configuration files have been created after the first run of tkdesk.

in the *~/.tkdesk/System* file there is the below line where the value doesn't change with the current setting and if you change it to something other than 3 it doesn't seem to have an effect and 3 listboxes will still be used in a new window

```
### Default number of file listboxes in file browser windows:
set tkdesk(num_lbs) 3
```
The "fix" I had done in the past which allows it to open and function with 6 boxes was to just set the num_lbs value to be statically 6 in the below files wherever it was used.  It's not a proper fix obviously though since you can no longer change it to anything other than 6, and it more recently broke the drag/drop behavior between columns, but it at least made it workable for us in the years past.
*/usr/local/lib/TkDesk/
./Common.tcl
./Viewer.tcl
./config.tcl*

looking at it now though i realize that it's also used in */usr/local/lib/TkDesk/action.tcl*

The other relevant value in the user's configuration files is in the *~/.tkdesk/_layout* file where it stores the previous sessions number of listboxes.  If the last parameter is anything other than 3 is when you see problems arise.  It will still start a window with 3 listboxes regardless of the value, but when it's not 3 is when you start getting the errors with number of listboxes not changing like it should.

```
dsk_FileViewer {/mecca/0lo/pdf/} 136x43+37+41 normal 3
```

To build upon the error code you had posted here's one of the error messages i received while playing with the dsk_FileViewer value in ~/.tkdesk/_layout.  So it would seem the handling of dsk_FileViewer in the tcl scripts is where all the problems are coming from.


```
Error: invalid command name ".fv0-top.lb6"

errorCode: TCL LOOKUP COMMAND .fv0-top.lb6

errorInfo: invalid command name ".fv0-top.lb6"
    while executing
"$top.lb$i getFrame"
    (object "::.fv0" method "::dsk_FileViewer::_set_first_lb" body line 64)
    invoked from within
"$this _set_first_lb 0"
    (object "::.fv0" method "::dsk_FileViewer::_resize" body line 22)
    invoked from within
"::.fv0 _resize"
    invoked from within
".fv0-top.fMenu.mbOpts.menu.map.numlbs invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .fv0-top.fMenu.mbOpts.menu.map.numlbs 1"
    (command bound to event)
```
All that said, still not sure what to do to fix it, just figured I'd throw what I know, or what I _think _I know out there in case anyone else is trying to investigate that has more time on their hands than I do.


----------



## grahamperrin@ (Dec 29, 2020)

Miller columns · Issue #23 · helloSystem/Filer


----------



## grahamperrin@ (Oct 17, 2021)

Miller Columns · Issue #465 · lxqt/pcmanfm-qt


----------

