Total Commander under Wine: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
# '''have a decent wine version installed'''<br>i just tested tc v7.0.1 under wine v0.9.45<br>i haven't found any serious flaws<br>
# '''have a decent wine version installed'''<br>i just tested tc v7.0.1 under wine v0.9.45<br>i haven't found any serious flaws<br>
# '''have msttcorefonts installed'''<br>you will have much more fun on comparing two files by content if you have this package installed, trust me! ;)<br>on a debian based system try: ''sudo apt-get install msttcorefonts''<br>
# '''have msttcorefonts installed'''<br>you will have much more fun on comparing two files by content if you have this package installed, trust me! ;)<br>on a debian based system try: ''sudo apt-get install msttcorefonts''<br>
# '''have filetypes associated and a fitting wrapper installed'''<br>integration of total commander in the linux system will be much better, if you can start all those files right away<br>there is a nice PERL tool for this purpose: [http://www.ghisler.ch/board/viewtopic.php?p=134602 wine_wrapper]<br>this will adjust the file associations, so you can start files out of your wine with the according native linux apps<br>( you might also want to have a look at [http://www.ghisler.ch/board/viewtopic.php?t=16226 this] for a different tool in php )
# '''have filetypes associated and a fitting wrapper installed'''<br>integration of total commander in the linux system will be much better, if you can start all those files right away<br>
## there is a nice PERL tool for this purpose: [http://www.ghisler.ch/board/viewtopic.php?p=134602 wine_wrapper]<br>this will adjust the file associations, so you can start files out of your wine with the according native linux apps<br>( you might also want to have a look at [http://www.ghisler.ch/board/viewtopic.php?t=16226 this] for a different tool in php )
## there is also another way to get the same behavior (IMHO a better way): [http://community.linuxmint.com/tutorial/view/222 http://community.linuxmint.com/tutorial/view/222]
 
== Further tips & tricks ==
 
=== Call native applications from Button bar ===
 
You can easily call native applications for a selected file by using either the script that is linked here [http://community.linuxmint.com/tutorial/view/222 http://community.linuxmint.com/tutorial/view/222] or by using the following script:
 
#!/bin/sh
$1 `wine winepath -u "$2"` $3 $4;
 
Save the file as linuxcaller.sh, and make it executable by typing chmod +x linuxcaller.sh
 
Now you can create buttons generically by using the script as command. As parameters you can pass the actual native linux command that you want to execute and the %P%N parameters and maybe some more in case you need it.
 
You can copy and paste this predefined button, you must adjust the paths. This example calls Pinta (Image viewer) with the selected file.
 
TOTALCMD#BAR#DATA
Z:\home\sebastian\scripts\nixcaller3.sh
pinta %P%N
%COMMANDER_PATH%\WCMICONS.DLL,26
Open with Pinta
%P
-1
 
 
(Works for me under Mint 17.1 and XFCE)
 
===Copy Filepaths to Clipboard===
 
Here is a small script that enables you to copy a valid Linux path of selected file(s) in Total Commander
 
(Works under Mint 17.1 with XFCE with one or multiple selected files)
 
#!/bin/sh<br>
outputp=""<br>
for var in "$@"
do
currentpath=`wine winepath -u "$var"`;
outputp=$outputp$currentpath'\n';
done
echo $outputp |  xclip -selection clipboard;
 
To use this script
*save the script in a file named e.g. clip.sh and put it into e.g. /home/user/scripts
*make script executable, i.e. chmod +x clip.sh
*create Button in TC and use
command: Path to script
parameter: %P%N
 
* Important: make sure you have xclip installed. It might not be included in your distro. Usually "sudo apt-get install xclip" should do it.
 
or copy the text below and paste it onto TC Button bar and then adjust paths.
 
 
TOTALCMD#BAR#DATA
Z:\home\sebastian\scripts\clip.sh
%P%S
%COMMANDER_PATH%\WCMICONS.DLL,59
Copy Fullname As LinuxPath
-1
 
 
==== Troubleshooting ====
 
While porting the scripts from one computer to another i found it helpful to simply run the scripts from a terminal and see whether they are working or throw an error message which you will not see when calling them via TC buttonbar!
 
Furthermore:
* make sure scripts are executable: chmod +x filename.sh
* make sure path is correct
* make sure tools are installed (like xclip)
 
 
=== Make more use of the Drive-Bar ===
 
By default Wine only configures the C: drive for the "simulated" Windows System drive and the Z: drive for the actual root file system. This makes the Total Commander Drive bar quite empty.
 
To add more "virtual drives" to the drive bar you can simply create symbolic links to anywhere.
 
To create a new Drive that is actually your home folder, open a terminal and type:
 
cd ~/.wine/dosdevices
ln -s /home/sebastian/ s:
 
Which will create a drive with letter S in wine that is your homepath.

Revision as of 19:11, 21 April 2015

How to have a lot of fun with your favourite tool in linux / under wine?!

  1. have the systems keyboard shortcuts disabled
    in ubuntu v7.0.4, i had to disable for example ALT+F1, ALT+F2, ALT+F5 and ALT+F6
    those are essential to my life with total commander
    the last one was a bit tricky, cause its not to be switched off in the easy to reach tools of gnome
    i had to start gconf-editor via shell and search for '<Alt>F6' to get rid of that :-)
  2. have a decent wine version installed
    i just tested tc v7.0.1 under wine v0.9.45
    i haven't found any serious flaws
  3. have msttcorefonts installed
    you will have much more fun on comparing two files by content if you have this package installed, trust me! ;)
    on a debian based system try: sudo apt-get install msttcorefonts
  4. have filetypes associated and a fitting wrapper installed
    integration of total commander in the linux system will be much better, if you can start all those files right away
    1. there is a nice PERL tool for this purpose: wine_wrapper
      this will adjust the file associations, so you can start files out of your wine with the according native linux apps
      ( you might also want to have a look at this for a different tool in php )
    2. there is also another way to get the same behavior (IMHO a better way): http://community.linuxmint.com/tutorial/view/222

Further tips & tricks

Call native applications from Button bar

You can easily call native applications for a selected file by using either the script that is linked here http://community.linuxmint.com/tutorial/view/222 or by using the following script:

#!/bin/sh
$1 `wine winepath -u "$2"` $3 $4;

Save the file as linuxcaller.sh, and make it executable by typing chmod +x linuxcaller.sh

Now you can create buttons generically by using the script as command. As parameters you can pass the actual native linux command that you want to execute and the %P%N parameters and maybe some more in case you need it.

You can copy and paste this predefined button, you must adjust the paths. This example calls Pinta (Image viewer) with the selected file.

TOTALCMD#BAR#DATA
Z:\home\sebastian\scripts\nixcaller3.sh
pinta %P%N
%COMMANDER_PATH%\WCMICONS.DLL,26
Open with Pinta
%P

-1


(Works for me under Mint 17.1 and XFCE)

Copy Filepaths to Clipboard

Here is a small script that enables you to copy a valid Linux path of selected file(s) in Total Commander

(Works under Mint 17.1 with XFCE with one or multiple selected files)

#!/bin/sh
outputp=""
for var in "$@" do currentpath=`wine winepath -u "$var"`; outputp=$outputp$currentpath'\n'; done echo $outputp | xclip -selection clipboard;

To use this script

  • save the script in a file named e.g. clip.sh and put it into e.g. /home/user/scripts
  • make script executable, i.e. chmod +x clip.sh
  • create Button in TC and use

command: Path to script parameter: %P%N

  • Important: make sure you have xclip installed. It might not be included in your distro. Usually "sudo apt-get install xclip" should do it.

or copy the text below and paste it onto TC Button bar and then adjust paths.


TOTALCMD#BAR#DATA
Z:\home\sebastian\scripts\clip.sh
%P%S
%COMMANDER_PATH%\WCMICONS.DLL,59
Copy Fullname As LinuxPath


-1


Troubleshooting

While porting the scripts from one computer to another i found it helpful to simply run the scripts from a terminal and see whether they are working or throw an error message which you will not see when calling them via TC buttonbar!

Furthermore:

  • make sure scripts are executable: chmod +x filename.sh
  • make sure path is correct
  • make sure tools are installed (like xclip)


Make more use of the Drive-Bar

By default Wine only configures the C: drive for the "simulated" Windows System drive and the Z: drive for the actual root file system. This makes the Total Commander Drive bar quite empty.

To add more "virtual drives" to the drive bar you can simply create symbolic links to anywhere.

To create a new Drive that is actually your home folder, open a terminal and type:

cd ~/.wine/dosdevices
ln -s /home/sebastian/ s:

Which will create a drive with letter S in wine that is your homepath.