You are not logged in.
I'm trying to automate the conversion of bin/cue files to chd.
I'm using the command:
terminology -e "chdman createcd -i \"%f\" -o \"`echo "%f" | sed 's/\.[^.]*$//'`.chd\""
Which works absolutely fine when ran from a terminal, but it doesn't work when called as a Thunar custom action.
What I'm trying to do is just take the input filename, remove the extension and add a .chd extension, works fine when running from a terminal or script.
When running it from a terminal I simply replace the %f with the actual filename though.
And with a script, I replace %f with $1 so I can input the filename.
Many thanks in advance.
Last edited by Sabudum (2024-11-02 21:00:46)
Offline
And what have you marked in the second tab ("conditions of appearance")?
Offline
And what have you marked in the second tab ("conditions of appearance")?
I'm sorry but, seriously? I might be slow and fairly new to Linux, but I'm not THAT dumb.
The problem I'm having is that when I click my custom action, the terminal flashes for a few miliseconds, and nothing happens.
I've created other custom actions with the terminal that work fine, such as:
terminology -e "bin2ecm %F"
And in fact if I write the following:
terminology -e "chdman createcd -i \"%f\" -o \"%f.chd\""
It works but I don't get the nice extensions manipulation, like, if the Input is Driver.cue, then the output becomes Driver.cue.chd, where what I need is Driver.chd
Which by the way, begs to differ, a nice addition to Thunar would be adding a variable that holds the filename without the extension.
Last edited by Sabudum (2024-11-03 13:19:49)
Offline
The problem I'm having is that when I click my custom action, the terminal flashes for a few miliseconds, and nothing happens.
If your distro logs to ~/.xsession-errors, have a look there for the error message.
It might be that some of the special characters aren't being processed properly. Try creating a script that does the work and pass %f into the script (which would become $1).
Edit: What version of Xfce and thunar are you using?
Edit2: Does the same problem exist if you use xfce4-terminal as the terminal client?
Last edited by ToZ (2024-11-03 13:55:35)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I'm sorry but, seriously? I might be slow and fairly new to Linux, but I'm not THAT dumb.
I don't know your knowledge but I have seen many things even stronger. I myself like anyone else have started at the time without knowing absolutely nothing and I still can't say that I know a lot...
But you are new here which makes me think that maybe you are also new to Linux, without any bad ideas.
I can see by your emotional reaction that I have touched your ego, I am sorry, it was not my intention.
Offline
The problem I'm having is that when I click my custom action, the terminal flashes for a few miliseconds, and nothing happens.
If your distro logs to ~/.xsession-errors, have a look there for the error message.
It might be that some of the special characters aren't being processed properly. Try creating a script that does the work and pass %f into the script (which would become $1).
Edit: What version of Xfce and thunar are you using?
Edit2: Does the same problem exist if you use xfce4-terminal as the terminal client?
My system does log to xsession-errors, but there are no errors there!? Funny thing... (related to thunar or chdman or anything that would suggest it)
I already tried creating the script and calling the script from the thunar action, and passing %f as the parameter, but the same problem persists, whilst calling the script from a terminal works fine.
I'm using Thunar 4.18.8, not using XFCE itself though, I'm using Moksha Desktop, so I don't really have the xfce4-terminal installed, should I install it and try it?
EDIT: I believe it's a chdman error, not really a syntax error though, as I can briefly see the error as the terminal flashes on the screen, tried using the --hold keyword but then the terminal stays empty and doesn't show anything.
EDIT 2: Just installed xfce4-terminal and it shows the error when using the --hold keyword:
chdman - MAME Compressed Hunks of Data (CHD) manager 0.270 (unknown)
Error parsing input file ('/media/thales/Data/Games/Emulation/Sony Playstation/roms/Driver.cue': No such file or directory)
Fatal error occurred: 1
File not found, although it exists.
The wierdest thing is that the error doesn't happen if the same command is called from a different environment other than the Thunar custom action
EDIT 3: Found the culprit, single quotes were being escaped into the file path, I removed my double quotes from the command, and it worked.
Thanks a lot for tHe help, wouldn't have done it without ya.
Last edited by Sabudum (2024-11-03 15:32:06)
Offline
[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 547.72 KiB (Peak: 548.56 KiB) ]