Does this Windows program running under Wine not recognize the absolute pathname to its argument?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I am using PDFXCview.exe in Ubuntu 16.04 under wine-3.1.
When I specify a pdf file as an argument to PDFXCview.exe
, absolute pathname to the pdf file doesn't make PDFXCview.exe
find the pdf file, while relative pathname to the pdf file does.
For example:
wine /path/to/PDFXCView.exe my.pdf
will open my.pdf
in PDFXCView.exe
, while
wine /path/to/PDFXCView.exe "$PWD"/my.pdf
doesn't.
The absolute path argument is used by
PDFXCView.exe
only, not bywine
, so converting the absolute path to a wine recognizable path
doesn't help. For example,wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
doesn't makePDFXCview.exe
find and open the
pdf file, where .the wine-recognizable path is:$ echo wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
wine /tmp/test/PDFXCview.exe /home/t/.wine/dosdevices/z:/tmp/test/O.pdf- On the contrary, when I specify a text file as an argument to
notepad.exe
, I can specify either the absolute pathname or a
relative pathname to the text file, andnotepad.exe
can find the
text file to open. For example, bothwine notepad "$PWD"/note
andwine notepad note
can make notepad find and open the text filenote
.
Is the above also the case to other people?
What is the reason that PDFXCview.exe
doesn't recognize the absolute pathname to its argument, but only a relative pathname?
I was wondering if the above problem with PDFXCview.exe
is because of the program itself or wine?
I don't have Windows to test, and also wonder if PDFXCview.exe
behaves in Windows in the same way as in Wine.
Thanks.
Screenshot of Drive tag of winecfg
wine pdf
 |Â
show 3 more comments
up vote
0
down vote
favorite
I am using PDFXCview.exe in Ubuntu 16.04 under wine-3.1.
When I specify a pdf file as an argument to PDFXCview.exe
, absolute pathname to the pdf file doesn't make PDFXCview.exe
find the pdf file, while relative pathname to the pdf file does.
For example:
wine /path/to/PDFXCView.exe my.pdf
will open my.pdf
in PDFXCView.exe
, while
wine /path/to/PDFXCView.exe "$PWD"/my.pdf
doesn't.
The absolute path argument is used by
PDFXCView.exe
only, not bywine
, so converting the absolute path to a wine recognizable path
doesn't help. For example,wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
doesn't makePDFXCview.exe
find and open the
pdf file, where .the wine-recognizable path is:$ echo wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
wine /tmp/test/PDFXCview.exe /home/t/.wine/dosdevices/z:/tmp/test/O.pdf- On the contrary, when I specify a text file as an argument to
notepad.exe
, I can specify either the absolute pathname or a
relative pathname to the text file, andnotepad.exe
can find the
text file to open. For example, bothwine notepad "$PWD"/note
andwine notepad note
can make notepad find and open the text filenote
.
Is the above also the case to other people?
What is the reason that PDFXCview.exe
doesn't recognize the absolute pathname to its argument, but only a relative pathname?
I was wondering if the above problem with PDFXCview.exe
is because of the program itself or wine?
I don't have Windows to test, and also wonder if PDFXCview.exe
behaves in Windows in the same way as in Wine.
Thanks.
Screenshot of Drive tag of winecfg
wine pdf
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings inwinecfg
)
â Thomas Wardâ¦
Mar 21 at 22:12
Thanks.notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference betweennotepad.exe
andPDFXCview.exe
?
â Tim
Mar 21 at 22:16
I also tried to convert the absolute pathname argument into a path recognizable bywine
, but it doesn't work. See my update.
â Tim
Mar 21 at 22:25
No... you're still giving it a Linux path. Open upwinecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I betPDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...
â Thomas Wardâ¦
Mar 22 at 13:40
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43
 |Â
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using PDFXCview.exe in Ubuntu 16.04 under wine-3.1.
When I specify a pdf file as an argument to PDFXCview.exe
, absolute pathname to the pdf file doesn't make PDFXCview.exe
find the pdf file, while relative pathname to the pdf file does.
For example:
wine /path/to/PDFXCView.exe my.pdf
will open my.pdf
in PDFXCView.exe
, while
wine /path/to/PDFXCView.exe "$PWD"/my.pdf
doesn't.
The absolute path argument is used by
PDFXCView.exe
only, not bywine
, so converting the absolute path to a wine recognizable path
doesn't help. For example,wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
doesn't makePDFXCview.exe
find and open the
pdf file, where .the wine-recognizable path is:$ echo wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
wine /tmp/test/PDFXCview.exe /home/t/.wine/dosdevices/z:/tmp/test/O.pdf- On the contrary, when I specify a text file as an argument to
notepad.exe
, I can specify either the absolute pathname or a
relative pathname to the text file, andnotepad.exe
can find the
text file to open. For example, bothwine notepad "$PWD"/note
andwine notepad note
can make notepad find and open the text filenote
.
Is the above also the case to other people?
What is the reason that PDFXCview.exe
doesn't recognize the absolute pathname to its argument, but only a relative pathname?
I was wondering if the above problem with PDFXCview.exe
is because of the program itself or wine?
I don't have Windows to test, and also wonder if PDFXCview.exe
behaves in Windows in the same way as in Wine.
Thanks.
Screenshot of Drive tag of winecfg
wine pdf
I am using PDFXCview.exe in Ubuntu 16.04 under wine-3.1.
When I specify a pdf file as an argument to PDFXCview.exe
, absolute pathname to the pdf file doesn't make PDFXCview.exe
find the pdf file, while relative pathname to the pdf file does.
For example:
wine /path/to/PDFXCView.exe my.pdf
will open my.pdf
in PDFXCView.exe
, while
wine /path/to/PDFXCView.exe "$PWD"/my.pdf
doesn't.
The absolute path argument is used by
PDFXCView.exe
only, not bywine
, so converting the absolute path to a wine recognizable path
doesn't help. For example,wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
doesn't makePDFXCview.exe
find and open the
pdf file, where .the wine-recognizable path is:$ echo wine /path/to/PDFXCview.exe "$(winepath /tmp/test/O.pdf)"
wine /tmp/test/PDFXCview.exe /home/t/.wine/dosdevices/z:/tmp/test/O.pdf- On the contrary, when I specify a text file as an argument to
notepad.exe
, I can specify either the absolute pathname or a
relative pathname to the text file, andnotepad.exe
can find the
text file to open. For example, bothwine notepad "$PWD"/note
andwine notepad note
can make notepad find and open the text filenote
.
Is the above also the case to other people?
What is the reason that PDFXCview.exe
doesn't recognize the absolute pathname to its argument, but only a relative pathname?
I was wondering if the above problem with PDFXCview.exe
is because of the program itself or wine?
I don't have Windows to test, and also wonder if PDFXCview.exe
behaves in Windows in the same way as in Wine.
Thanks.
Screenshot of Drive tag of winecfg
wine pdf
wine pdf
edited Mar 22 at 13:43
asked Mar 21 at 22:05
Tim
7,65842100167
7,65842100167
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings inwinecfg
)
â Thomas Wardâ¦
Mar 21 at 22:12
Thanks.notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference betweennotepad.exe
andPDFXCview.exe
?
â Tim
Mar 21 at 22:16
I also tried to convert the absolute pathname argument into a path recognizable bywine
, but it doesn't work. See my update.
â Tim
Mar 21 at 22:25
No... you're still giving it a Linux path. Open upwinecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I betPDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...
â Thomas Wardâ¦
Mar 22 at 13:40
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43
 |Â
show 3 more comments
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings inwinecfg
)
â Thomas Wardâ¦
Mar 21 at 22:12
Thanks.notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference betweennotepad.exe
andPDFXCview.exe
?
â Tim
Mar 21 at 22:16
I also tried to convert the absolute pathname argument into a path recognizable bywine
, but it doesn't work. See my update.
â Tim
Mar 21 at 22:25
No... you're still giving it a Linux path. Open upwinecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I betPDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...
â Thomas Wardâ¦
Mar 22 at 13:40
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings in
winecfg
)â Thomas Wardâ¦
Mar 21 at 22:12
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings in
winecfg
)â Thomas Wardâ¦
Mar 21 at 22:12
Thanks.
notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference between notepad.exe
and PDFXCview.exe
?â Tim
Mar 21 at 22:16
Thanks.
notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference between notepad.exe
and PDFXCview.exe
?â Tim
Mar 21 at 22:16
I also tried to convert the absolute pathname argument into a path recognizable by
wine
, but it doesn't work. See my update.â Tim
Mar 21 at 22:25
I also tried to convert the absolute pathname argument into a path recognizable by
wine
, but it doesn't work. See my update.â Tim
Mar 21 at 22:25
No... you're still giving it a Linux path. Open up
winecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I bet PDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...â Thomas Wardâ¦
Mar 22 at 13:40
No... you're still giving it a Linux path. Open up
winecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I bet PDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...â Thomas Wardâ¦
Mar 22 at 13:40
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43
 |Â
show 3 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You're providing an absolute Linux-style path to a Windows executable that is being executed by Wine, not giving that path argument to Wine itself. Therefore, you have to treat every argument after the path to the .exe
as a Windows-style argument (i.e. wine /home/$USER/.wine/drive_c/path/to/Windows/executable.exe [Windows Style Arguments]
).
The full Linux style paths work for notepad.exe
, but consider that notepad.exe
is likely not the pure Windows version of Notepad, it's included with the Wine setup, and is probably tweaked to accept Linux paths (like /tmp/test/O.pdf
).
Most of the applications that wine
can execute, however, do not have those tweaks, and therefore only accept Windows-style paths. So, you need to give those apps a Windows-style path, in the format like C:WindowsSystem32...
but with regards to the actual location of the files, and with respect to the drive mappings in Wine, while taking into account Bash / Linux console style interpretations* of paths.
First, find the drive mappings and to where they 'exist' in the Linux file infrastructure. To do this, load up winecfg
, and in the Wine configuration window, go to the "Drives" tab. It'll look something like this:
As you can see, I have C:
which is mapped to the Wine drive_c
directory which in this instance is in /home/teward/.wine
. I also have a drive M:
mapped to my /mnt/
directory, which is relevant because I have things referenced by M:
in the Wine apps.
What's most relevant is the Z:
mapping, which maps to the root /
partition on my Linux environment. This usually is a default mapping, but isn't necessarily going to be in your environment (so make sure it is). Whichever Wine drive is mapped to /
, you'll need to use. And if one doesn't exist, you'll need to add a drive mapping that matches either /
or the actual directory your data is actually in that you're opening with the Windows application. Technically, you could have T:
mapped to /tmp/
and then do T:.pdf
, but I'm not assuming that for my answer.
So, for the purposes of this answer, I'm going to assume that Z:
is actually mapped to /
and use that from this point forward in my answer.
You need to take the Linux path and convert it to Windows-style from the Z:
drive root. So, for /tmp/test/0.pdf
in Linux, you'll actually give it 'Z:tmptest.pdf'
(including the single '
quotes so the shell doesn't mess up with interpretation* of the path). This way, the Windows-style application is getting a path it can read and understand, not a path that it can't.
Very few Wine applications are actually capable of understanding the /foo/bar/baz
style paths of Linux, and most of the ones that do were tweaked and installed as part of setting up Wine to begin with. Therefore, it's best to give Windows-style paths to Windows applications running inside Wine, rather than Linux style paths.
* When I refer to 'interpretation', I don't refer to the :
, but the that's in the paths. And though your path doesn't contain spaces, I also refer to spaces. In Bash syntax, the
is used as part of an escape character. Further, in the command line, arguments are space-delimited, so it doesn't know how to process spaces in the paths, and as such you would have to escape them with backslashes. So for what would be
C:Program FilesFoobar.exe
, you'd actually have to put C:\Program Files\Foo\bar.exe
for the path. However, with the default Bash shell, you can negate this misinterpretation of slashes and spaces by wrapping the path with single quotes ('
) which treats it as a literal argument being passed, in its entirety, so you could do 'C:Program FilesFoobar.exe'
without having to deal with escaping backslashes or spaces.
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You're providing an absolute Linux-style path to a Windows executable that is being executed by Wine, not giving that path argument to Wine itself. Therefore, you have to treat every argument after the path to the .exe
as a Windows-style argument (i.e. wine /home/$USER/.wine/drive_c/path/to/Windows/executable.exe [Windows Style Arguments]
).
The full Linux style paths work for notepad.exe
, but consider that notepad.exe
is likely not the pure Windows version of Notepad, it's included with the Wine setup, and is probably tweaked to accept Linux paths (like /tmp/test/O.pdf
).
Most of the applications that wine
can execute, however, do not have those tweaks, and therefore only accept Windows-style paths. So, you need to give those apps a Windows-style path, in the format like C:WindowsSystem32...
but with regards to the actual location of the files, and with respect to the drive mappings in Wine, while taking into account Bash / Linux console style interpretations* of paths.
First, find the drive mappings and to where they 'exist' in the Linux file infrastructure. To do this, load up winecfg
, and in the Wine configuration window, go to the "Drives" tab. It'll look something like this:
As you can see, I have C:
which is mapped to the Wine drive_c
directory which in this instance is in /home/teward/.wine
. I also have a drive M:
mapped to my /mnt/
directory, which is relevant because I have things referenced by M:
in the Wine apps.
What's most relevant is the Z:
mapping, which maps to the root /
partition on my Linux environment. This usually is a default mapping, but isn't necessarily going to be in your environment (so make sure it is). Whichever Wine drive is mapped to /
, you'll need to use. And if one doesn't exist, you'll need to add a drive mapping that matches either /
or the actual directory your data is actually in that you're opening with the Windows application. Technically, you could have T:
mapped to /tmp/
and then do T:.pdf
, but I'm not assuming that for my answer.
So, for the purposes of this answer, I'm going to assume that Z:
is actually mapped to /
and use that from this point forward in my answer.
You need to take the Linux path and convert it to Windows-style from the Z:
drive root. So, for /tmp/test/0.pdf
in Linux, you'll actually give it 'Z:tmptest.pdf'
(including the single '
quotes so the shell doesn't mess up with interpretation* of the path). This way, the Windows-style application is getting a path it can read and understand, not a path that it can't.
Very few Wine applications are actually capable of understanding the /foo/bar/baz
style paths of Linux, and most of the ones that do were tweaked and installed as part of setting up Wine to begin with. Therefore, it's best to give Windows-style paths to Windows applications running inside Wine, rather than Linux style paths.
* When I refer to 'interpretation', I don't refer to the :
, but the that's in the paths. And though your path doesn't contain spaces, I also refer to spaces. In Bash syntax, the
is used as part of an escape character. Further, in the command line, arguments are space-delimited, so it doesn't know how to process spaces in the paths, and as such you would have to escape them with backslashes. So for what would be
C:Program FilesFoobar.exe
, you'd actually have to put C:\Program Files\Foo\bar.exe
for the path. However, with the default Bash shell, you can negate this misinterpretation of slashes and spaces by wrapping the path with single quotes ('
) which treats it as a literal argument being passed, in its entirety, so you could do 'C:Program FilesFoobar.exe'
without having to deal with escaping backslashes or spaces.
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
add a comment |Â
up vote
1
down vote
accepted
You're providing an absolute Linux-style path to a Windows executable that is being executed by Wine, not giving that path argument to Wine itself. Therefore, you have to treat every argument after the path to the .exe
as a Windows-style argument (i.e. wine /home/$USER/.wine/drive_c/path/to/Windows/executable.exe [Windows Style Arguments]
).
The full Linux style paths work for notepad.exe
, but consider that notepad.exe
is likely not the pure Windows version of Notepad, it's included with the Wine setup, and is probably tweaked to accept Linux paths (like /tmp/test/O.pdf
).
Most of the applications that wine
can execute, however, do not have those tweaks, and therefore only accept Windows-style paths. So, you need to give those apps a Windows-style path, in the format like C:WindowsSystem32...
but with regards to the actual location of the files, and with respect to the drive mappings in Wine, while taking into account Bash / Linux console style interpretations* of paths.
First, find the drive mappings and to where they 'exist' in the Linux file infrastructure. To do this, load up winecfg
, and in the Wine configuration window, go to the "Drives" tab. It'll look something like this:
As you can see, I have C:
which is mapped to the Wine drive_c
directory which in this instance is in /home/teward/.wine
. I also have a drive M:
mapped to my /mnt/
directory, which is relevant because I have things referenced by M:
in the Wine apps.
What's most relevant is the Z:
mapping, which maps to the root /
partition on my Linux environment. This usually is a default mapping, but isn't necessarily going to be in your environment (so make sure it is). Whichever Wine drive is mapped to /
, you'll need to use. And if one doesn't exist, you'll need to add a drive mapping that matches either /
or the actual directory your data is actually in that you're opening with the Windows application. Technically, you could have T:
mapped to /tmp/
and then do T:.pdf
, but I'm not assuming that for my answer.
So, for the purposes of this answer, I'm going to assume that Z:
is actually mapped to /
and use that from this point forward in my answer.
You need to take the Linux path and convert it to Windows-style from the Z:
drive root. So, for /tmp/test/0.pdf
in Linux, you'll actually give it 'Z:tmptest.pdf'
(including the single '
quotes so the shell doesn't mess up with interpretation* of the path). This way, the Windows-style application is getting a path it can read and understand, not a path that it can't.
Very few Wine applications are actually capable of understanding the /foo/bar/baz
style paths of Linux, and most of the ones that do were tweaked and installed as part of setting up Wine to begin with. Therefore, it's best to give Windows-style paths to Windows applications running inside Wine, rather than Linux style paths.
* When I refer to 'interpretation', I don't refer to the :
, but the that's in the paths. And though your path doesn't contain spaces, I also refer to spaces. In Bash syntax, the
is used as part of an escape character. Further, in the command line, arguments are space-delimited, so it doesn't know how to process spaces in the paths, and as such you would have to escape them with backslashes. So for what would be
C:Program FilesFoobar.exe
, you'd actually have to put C:\Program Files\Foo\bar.exe
for the path. However, with the default Bash shell, you can negate this misinterpretation of slashes and spaces by wrapping the path with single quotes ('
) which treats it as a literal argument being passed, in its entirety, so you could do 'C:Program FilesFoobar.exe'
without having to deal with escaping backslashes or spaces.
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You're providing an absolute Linux-style path to a Windows executable that is being executed by Wine, not giving that path argument to Wine itself. Therefore, you have to treat every argument after the path to the .exe
as a Windows-style argument (i.e. wine /home/$USER/.wine/drive_c/path/to/Windows/executable.exe [Windows Style Arguments]
).
The full Linux style paths work for notepad.exe
, but consider that notepad.exe
is likely not the pure Windows version of Notepad, it's included with the Wine setup, and is probably tweaked to accept Linux paths (like /tmp/test/O.pdf
).
Most of the applications that wine
can execute, however, do not have those tweaks, and therefore only accept Windows-style paths. So, you need to give those apps a Windows-style path, in the format like C:WindowsSystem32...
but with regards to the actual location of the files, and with respect to the drive mappings in Wine, while taking into account Bash / Linux console style interpretations* of paths.
First, find the drive mappings and to where they 'exist' in the Linux file infrastructure. To do this, load up winecfg
, and in the Wine configuration window, go to the "Drives" tab. It'll look something like this:
As you can see, I have C:
which is mapped to the Wine drive_c
directory which in this instance is in /home/teward/.wine
. I also have a drive M:
mapped to my /mnt/
directory, which is relevant because I have things referenced by M:
in the Wine apps.
What's most relevant is the Z:
mapping, which maps to the root /
partition on my Linux environment. This usually is a default mapping, but isn't necessarily going to be in your environment (so make sure it is). Whichever Wine drive is mapped to /
, you'll need to use. And if one doesn't exist, you'll need to add a drive mapping that matches either /
or the actual directory your data is actually in that you're opening with the Windows application. Technically, you could have T:
mapped to /tmp/
and then do T:.pdf
, but I'm not assuming that for my answer.
So, for the purposes of this answer, I'm going to assume that Z:
is actually mapped to /
and use that from this point forward in my answer.
You need to take the Linux path and convert it to Windows-style from the Z:
drive root. So, for /tmp/test/0.pdf
in Linux, you'll actually give it 'Z:tmptest.pdf'
(including the single '
quotes so the shell doesn't mess up with interpretation* of the path). This way, the Windows-style application is getting a path it can read and understand, not a path that it can't.
Very few Wine applications are actually capable of understanding the /foo/bar/baz
style paths of Linux, and most of the ones that do were tweaked and installed as part of setting up Wine to begin with. Therefore, it's best to give Windows-style paths to Windows applications running inside Wine, rather than Linux style paths.
* When I refer to 'interpretation', I don't refer to the :
, but the that's in the paths. And though your path doesn't contain spaces, I also refer to spaces. In Bash syntax, the
is used as part of an escape character. Further, in the command line, arguments are space-delimited, so it doesn't know how to process spaces in the paths, and as such you would have to escape them with backslashes. So for what would be
C:Program FilesFoobar.exe
, you'd actually have to put C:\Program Files\Foo\bar.exe
for the path. However, with the default Bash shell, you can negate this misinterpretation of slashes and spaces by wrapping the path with single quotes ('
) which treats it as a literal argument being passed, in its entirety, so you could do 'C:Program FilesFoobar.exe'
without having to deal with escaping backslashes or spaces.
You're providing an absolute Linux-style path to a Windows executable that is being executed by Wine, not giving that path argument to Wine itself. Therefore, you have to treat every argument after the path to the .exe
as a Windows-style argument (i.e. wine /home/$USER/.wine/drive_c/path/to/Windows/executable.exe [Windows Style Arguments]
).
The full Linux style paths work for notepad.exe
, but consider that notepad.exe
is likely not the pure Windows version of Notepad, it's included with the Wine setup, and is probably tweaked to accept Linux paths (like /tmp/test/O.pdf
).
Most of the applications that wine
can execute, however, do not have those tweaks, and therefore only accept Windows-style paths. So, you need to give those apps a Windows-style path, in the format like C:WindowsSystem32...
but with regards to the actual location of the files, and with respect to the drive mappings in Wine, while taking into account Bash / Linux console style interpretations* of paths.
First, find the drive mappings and to where they 'exist' in the Linux file infrastructure. To do this, load up winecfg
, and in the Wine configuration window, go to the "Drives" tab. It'll look something like this:
As you can see, I have C:
which is mapped to the Wine drive_c
directory which in this instance is in /home/teward/.wine
. I also have a drive M:
mapped to my /mnt/
directory, which is relevant because I have things referenced by M:
in the Wine apps.
What's most relevant is the Z:
mapping, which maps to the root /
partition on my Linux environment. This usually is a default mapping, but isn't necessarily going to be in your environment (so make sure it is). Whichever Wine drive is mapped to /
, you'll need to use. And if one doesn't exist, you'll need to add a drive mapping that matches either /
or the actual directory your data is actually in that you're opening with the Windows application. Technically, you could have T:
mapped to /tmp/
and then do T:.pdf
, but I'm not assuming that for my answer.
So, for the purposes of this answer, I'm going to assume that Z:
is actually mapped to /
and use that from this point forward in my answer.
You need to take the Linux path and convert it to Windows-style from the Z:
drive root. So, for /tmp/test/0.pdf
in Linux, you'll actually give it 'Z:tmptest.pdf'
(including the single '
quotes so the shell doesn't mess up with interpretation* of the path). This way, the Windows-style application is getting a path it can read and understand, not a path that it can't.
Very few Wine applications are actually capable of understanding the /foo/bar/baz
style paths of Linux, and most of the ones that do were tweaked and installed as part of setting up Wine to begin with. Therefore, it's best to give Windows-style paths to Windows applications running inside Wine, rather than Linux style paths.
* When I refer to 'interpretation', I don't refer to the :
, but the that's in the paths. And though your path doesn't contain spaces, I also refer to spaces. In Bash syntax, the
is used as part of an escape character. Further, in the command line, arguments are space-delimited, so it doesn't know how to process spaces in the paths, and as such you would have to escape them with backslashes. So for what would be
C:Program FilesFoobar.exe
, you'd actually have to put C:\Program Files\Foo\bar.exe
for the path. However, with the default Bash shell, you can negate this misinterpretation of slashes and spaces by wrapping the path with single quotes ('
) which treats it as a literal argument being passed, in its entirety, so you could do 'C:Program FilesFoobar.exe'
without having to deal with escaping backslashes or spaces.
edited Mar 22 at 14:20
answered Mar 22 at 14:11
![](https://i.stack.imgur.com/jLgkr.jpg?s=32&g=1)
![](https://i.stack.imgur.com/jLgkr.jpg?s=32&g=1)
Thomas Wardâ¦
41.5k23112166
41.5k23112166
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
add a comment |Â
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
Thanks. So we have used pure Linux paths and pure Windows paths in the discussion. Is a wine-based Linux path ever useful in some cases? see askubuntu.com/q/1018400/1471
â Tim
Mar 23 at 0:11
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
@Tim I've answered, but I don't think it's the answer you're really looking for directly...
â Thomas Wardâ¦
Mar 23 at 0:37
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018078%2fdoes-this-windows-program-running-under-wine-not-recognize-the-absolute-pathname%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
you're passing a Linux style path into a Windows application, which won't work well. You need to know how the Windows system is laid out with regards to Wine and your 'drive mounts' for how to traverse from Wine into the Linux filesystem, and give it the corresponding "Windows" file path (with respect to the drive mappings in
winecfg
)â Thomas Wardâ¦
Mar 21 at 22:12
Thanks.
notepad.exe
however can find a text file whether its absolute path or relative path is given. Why is the difference betweennotepad.exe
andPDFXCview.exe
?â Tim
Mar 21 at 22:16
I also tried to convert the absolute pathname argument into a path recognizable by
wine
, but it doesn't work. See my update.â Tim
Mar 21 at 22:25
No... you're still giving it a Linux path. Open up
winecfg
, and screenshot the 'Drives' tab and add it here. You need to give it a Windows path, not a full Linux path, and you need to start by understanding how Wine translates paths. It doesn't translate Linux paths for arguments to Windows programs, and I betPDFXCview.exe
is expecting a Windows file path. Or, the program is 'weird' and doesn't want to work properly. Note that the WINE test results for PDF XChange suggest that there's problems with it, that it doesn't save files and doesn't like opening them...â Thomas Wardâ¦
Mar 22 at 13:40
@ThomasWard Screenshot added. Appreciated
â Tim
Mar 22 at 13:43