Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #226794
| Path | csiph.com!4.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news.in-chemnitz.de!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Tixy <tixy@yxit.co.uk> |
| Newsgroups | linux.debian.user |
| Subject | Re: Looking for a generic drag and drop gui for custom commands |
| Date | Tue, 08 Sep 2020 18:50:02 +0200 |
| Message-ID | <AMOYF-681-3@gated-at.bofh.it> (permalink) |
| References | <AMwfn-2fw-7@gated-at.bofh.it> <AMKBI-3wD-13@gated-at.bofh.it> <AMLep-3Jv-1@gated-at.bofh.it> <AMNzz-5kX-3@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-user-request@lists.debian.org Tue Sep 8 16:42:11 2020 |
| Old-Return-Path | <tixy@yxit.co.uk> |
| X-Amavis-Spam-Status | No, score=-6.063 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, SARE_MSGID_LONG40=0.637] autolearn=ham autolearn_force=no |
| Content-Type | text/plain; charset="UTF-8" |
| User-Agent | Evolution 3.30.5-1.1 |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| X-Originating-Smarthost03b-IP | [82.69.122.217] |
| Feedback-ID | 82.69.122.217 |
| X-Mailing-List | <debian-user@lists.debian.org> archive/latest/767147 |
| List-ID | <debian-user.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-user/> |
| List-Archive | https://lists.debian.org/msgid-search/f85506b002e4754966a6611954ff4b2422d44e1a.camel@yxit.co.uk |
| Approved | robomod@news.nic.it |
| Lines | 76 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Tue, 08 Sep 2020 17:41:55 +0100 |
| X-Original-Message-ID | <f85506b002e4754966a6611954ff4b2422d44e1a.camel@yxit.co.uk> |
| X-Original-References | <20200907224337.ce68b69e55c7883e5bebd4a4@kobenetz.de> <0bca86156d3fe86ea598cb47240fee08@gmail.com> <c3d8172ef52fffeba3e704f7499f71dc87fc8b4e.camel@yxit.co.uk> <20200908171520.31327fb14b1f4222d68d606b@kobenetz.de> |
| Xref | csiph.com linux.debian.user:226794 |
Show key headers only | View raw
On Tue, 2020-09-08 at 17:15 +0200, Christoph K. wrote:
[...]
> It doesn't work for me. Am I doing something wrong?
>
> Anyway, this wouldn't be an optimal solution. In some cases I need to
> pass multiple arguments in a specific order. For example an audio and
> video file that should be combined into a single .mp4 file.
It works for me, though I found that multiple files launches multiple
copies of the script, one for each file. To get around that you can use
and explicit %F in the desktop file's Exec command, see [1].
This is what I did to test, including some code to distinguish audio
files from extension. (The 'file' command would probably be best for
testing file type properly, never used this though.)
#------------------------------------------------
~$ cat Desktop/test.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
Exec=/home/tixy/test.sh %F
Name=Test launcher
Icon=/home/tixy/test.svg
#------------------------------------------------
~$ cat test.sh
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo Expected two files
sleep 2
exit 1
fi
audiofile=$1
videofile=$2
if [ "${videofile##*.}" = "mp3" ]
then
# files in wrong order, swap them
audiofile=$2
videofile=$1
fi
echo Audio=$audiofile Video=$videofile
sleep 2
#------------------------------------------------
~$ touch audio.mp3
~$ touch video.avi
~$ ./test.sh video.avi audio.mp3
Audio=audio.mp3 Video=video.avi
#------------------------------------------------
If using the GUI file manager I highlight the audio.mp3 and video.avi
files and drag them onto "Test launcher" then I get a terminal window
open up with the same output as I got above using the commandline.
You don't have to rely on the GUIs default terminal. If you set
"Terminal=false" in the .desktop file you can launch your script how
you want, e.g. I've used something...
Exec=lxterminal --geometry=80x30 -e "sh -c /my/script"
To have my preferred terminal at a preferred size,
[1] https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
--
Tixy
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Looking for a generic drag and drop gui for custom commands "Christoph K." <christoph@kobenetz.de> - 2020-09-07 22:50 +0200
Re: Looking for a generic drag and drop gui for custom commands David Christensen <dpchrist@holgerdanske.com> - 2020-09-08 12:00 +0200
Re: Looking for a generic drag and drop gui for custom commands "Christoph K." <christoph@kobenetz.de> - 2020-09-08 14:20 +0200
Re: Looking for a generic drag and drop gui for custom commands David Christensen <dpchrist@holgerdanske.com> - 2020-09-09 00:40 +0200
Re: Looking for a generic drag and drop gui for custom commands mick crane <mick.crane@gmail.com> - 2020-09-08 14:10 +0200
Re: Looking for a generic drag and drop gui for custom commands Tixy <tixy@yxit.co.uk> - 2020-09-08 14:50 +0200
Re: Looking for a generic drag and drop gui for custom commands Tixy <tixy@yxit.co.uk> - 2020-09-08 15:20 +0200
Re: Looking for a generic drag and drop gui for custom commands "Christoph K." <christoph@kobenetz.de> - 2020-09-08 17:20 +0200
Re: Looking for a generic drag and drop gui for custom commands Tixy <tixy@yxit.co.uk> - 2020-09-08 18:50 +0200
Re: Looking for a generic drag and drop gui for custom commands Tixy <tixy@yxit.co.uk> - 2020-09-08 19:00 +0200
Re: Looking for a generic drag and drop gui for custom commands "Christoph K." <christoph@kobenetz.de> - 2020-10-13 14:20 +0200
Re: Looking for a generic drag and drop gui for custom commands Charles Curley <charlescurley@charlescurley.com> - 2020-09-08 20:00 +0200
csiph-web