TC under wine: associate/"open with" with linux ap
Moderators: Hacker, petermad, Stefan2, white
TC under wine: associate/"open with" with linux ap
Hi All
i was wondering if anyone was using TC with wine in linux and is there any way at all to associate/"open with with linux applications that is tell TC to open avi files with vlc etc
thx alot in advance
z.
i was wondering if anyone was using TC with wine in linux and is there any way at all to associate/"open with with linux applications that is tell TC to open avi files with vlc etc
thx alot in advance
z.
Re: TC under wine: associate/"open with" with linu
Hello, zeltak.
So far I have not tried to create a Total Commander internal association which launches a Linux executable file, but I have created a button which launches /usr/bin/gedit and passes "%S" to it as commandline arguments. I.e. this button passes all marked (text) files to gedit and gedit will open them.
When creating this button in its current form I learnt the following details which may also be relevant when trying to create a Total Commander association which launches VLC:
I am pretty confident that it can be done.
Maybe by that time you have been successful yourself and will tell us how to do it.
Kind regards,
Karl
So far I have not tried to create a Total Commander internal association which launches a Linux executable file, but I have created a button which launches /usr/bin/gedit and passes "%S" to it as commandline arguments. I.e. this button passes all marked (text) files to gedit and gedit will open them.
When creating this button in its current form I learnt the following details which may also be relevant when trying to create a Total Commander association which launches VLC:
- You must launch the Linux executable by prefixing the complete path. I.e. "gedit" will not work, but "/usr/bin/gedit" will work.
- The Linux executable will expect Linux pathnames in Linux notation (obviously), but Total Commander will provide Windows pathnames in Windows notation (obviously, too).
As a consequence make sure that you execute the Linux executable from the folder where the file is located which you want the Linux executable to open.
I.e. try to make sure that passing the pure filename is sufficient so that T.C. does not have to prefix the (Windows) path.
I am pretty confident that it can be done.
Maybe by that time you have been successful yourself and will tell us how to do it.
Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Hello, zeltak.
When creating a button which launches gedit and which passes the selected filenames to gedit, it is easy to prevent Total Commander from passing any pathname to gedit:
We must find a way to convert the Windows pathname which "%1" holds into a Linux pathname before passing it to Totem (any Linux executable).
More likely than not we will need a wrapper script which takes the Windows commandline and transforms it into a Linux commandline before actually launching it.
This in turn suggests that it may not be feasible or at minimum not trivial to create a Total Commander internal association which launches Totem and passes the marked AVI filename.
(The same applies to VLC. I only used Totem, because it came pre-installed on my Ubuntu system.)
I remember that such wrapper scripts were posted in the past. But I cannot remember if any of them did their jobs well.
So, at this point in time, it definitely looks as if my assumption that "it can be done" was too optimistic and that it may be wise to follow MVV's advice and consult the Wine documentation first.
Kind regards,
Karl
--
corrected: in the past, not path
When creating a button which launches gedit and which passes the selected filenames to gedit, it is easy to prevent Total Commander from passing any pathname to gedit:
- by using the variable "%S" in the "Parameter" field and
- by leaving the field "Start path" empty
- T.C. forces the user to select the executable file by using the pseudo Windows path that it sees itself, i.e. e.g. Z:\usr\bin\totem
- T.C. adds the parameter "%1" to it itself
- The corresponding entry in wincmd.ini will read
It is obvious that this is a Windows commandline.[Associations]
[...]
Filter2=>VideoFiles
Filter2_open=Z:\usr\bin\totem "%1"
Double clicking on a video file launches Totem. But Totem cannot handle the Windows pathname specification which T.C. passes to it. - Correcting the entry to read
does not help much. Double clicking on a video file launches Totem. But Totem still receives a Windows pathname specification by T.C. and cannot handle it.[Associations]
[...]
Filter2=>VideoFiles
Filter2_open=/usr/bin/totem "%1"
We must find a way to convert the Windows pathname which "%1" holds into a Linux pathname before passing it to Totem (any Linux executable).
More likely than not we will need a wrapper script which takes the Windows commandline and transforms it into a Linux commandline before actually launching it.
This in turn suggests that it may not be feasible or at minimum not trivial to create a Total Commander internal association which launches Totem and passes the marked AVI filename.
(The same applies to VLC. I only used Totem, because it came pre-installed on my Ubuntu system.)
I remember that such wrapper scripts were posted in the past. But I cannot remember if any of them did their jobs well.
So, at this point in time, it definitely looks as if my assumption that "it can be done" was too optimistic and that it may be wise to follow MVV's advice and consult the Wine documentation first.
Kind regards,
Karl
--
corrected: in the past, not path
Last edited by karlchen on 2012-01-12, 16:34 UTC, edited 1 time in total.
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Hello, zeltak.
Following MVV's advice to
Maybe the approach explained in the Wine FAQs will be helpful.
Of course, they do not use Total Commander internal file type associations, but they explain how to use Wine file type associations and make those attach to Linux file type associations. But I guess this will be all right as it gets the job done.
Kind regards,
Karl
Following MVV's advice to
took me here: 7.5. I want to associate a native program with a file type in WineRead the Wine documentation
Maybe the approach explained in the Wine FAQs will be helpful.
Of course, they do not use Total Commander internal file type associations, but they explain how to use Wine file type associations and make those attach to Linux file type associations. But I guess this will be all right as it gets the job done.
Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Hi Karl
i spend some time today (slacking off work ....) and got the association set up, was pretty easy using the link you gave me:
im a long time linux user but after trying a gazillion dual pane file manager apps (which are great..krusader, DC etc..) none are as complete and stable as TC... finally had the courage to use wine and get it runing and i really hope it can be my main File manager on nix
btw which distro are you running?
best
Z
i spend some time today (slacking off work ....) and got the association set up, was pretty easy using the link you gave me:
seems to work greatAnother option is to use a shell script to call a native application. Save it as run_linx_program under $HOME/bin:
#!/bin/sh
$1 "`wine winepath -u "$2"`"
Don't forget to run 'chmod a+x $HOME/bin/run_linx_program' to make it executable. Also make sure that $HOME/bin directory is in your $PATH. Otherwise it will not work.
To associate (say) .pdf files with the acroread Linux program save the following as "$HOME/pdf.reg" and then import it with the command 'regedit $HOME/pdf.reg':
[HKEY_CLASSES_ROOT\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\PDFfile\Shell\Open\command]
@="/bin/sh run_linx_program acroread \"%1\""
im a long time linux user but after trying a gazillion dual pane file manager apps (which are great..krusader, DC etc..) none are as complete and stable as TC... finally had the courage to use wine and get it runing and i really hope it can be my main File manager on nix
btw which distro are you running?
best
Z
- ghisler(Author)
- Site Admin
- Posts: 48523
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I'm already doing that, but some concepts like system-wide file associations don't exist like this.a little off topic but maybe ghisler would consider instead of porting TC to linux to maybe maintain a wine optimized version, wouldnt that be alot easier?
Try using internal associations instead.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
WOW..seriously? holy sh** you just made my week (maybe month) ghisler!!I'm already doing that
that's really exciting, is there a alpha/beta i could try/test?
thx alot, this is very exciting news.. (i hope i understood correctly when you say im already doing that..IE using wine to maintain a TC linux version??)
thx again from a long time TC user!!!
Z.
- ghisler(Author)
- Site Admin
- Posts: 48523
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry for the misunderstanding, I only meant that I'm regularly testing TC on Linux, and fix problems specific to that platform. Since TC is written in Delphi, I cannot link it to some Wine libraries. Bringing out a native Linux version wouldn't be very helpful either because all the plugins would have to be ported too...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
hi again ghisler
damm was excited over nothing for a few hours..lol..
i know a sh** ton of fellow linux users that are dying to see TC for linux but im sure you already know that
anyway i will continue to keep on dreaming..who knows maybe when the "linux year on the desktop" finally happens we will get some consideration..at least i have TC on my andorid phone/tablet
thx again
z.
damm was excited over nothing for a few hours..lol..
i know a sh** ton of fellow linux users that are dying to see TC for linux but im sure you already know that
a native verison without plugins would still be amazingBringing out a native Linux version wouldn't be very helpful either because all the plugins would have to be ported too...
anyway i will continue to keep on dreaming..who knows maybe when the "linux year on the desktop" finally happens we will get some consideration..at least i have TC on my andorid phone/tablet
thx again
z.
I'm sure they would be. Not all of them, of course, but many would follow. And I agree to zeltak that even without plugins TC would outmatch most (if not all) of existing Linux file managers.ghisler(Author) wrote:Bringing out a native Linux version wouldn't be very helpful either because all the plugins would have to be ported too...
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64