Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #226791

Re: Looking for a generic drag and drop gui for custom commands

From "Christoph K." <christoph@kobenetz.de>
Newsgroups linux.debian.user
Subject Re: Looking for a generic drag and drop gui for custom commands
Date 2020-09-08 17:20 +0200
Message-ID <AMNzz-5kX-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>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Tue, 08 Sep 2020 13:40:03 +0100
schrieb Tixy <tixy@yxit.co.uk>:

> > Put the (ffmpeg) command in a script and run it with argument/s ?
> 
> And run the script from a 'desktop entry' [1] and your desktop GUI may
> let you run it with file arguments just by dropping files onto it. You
> can put these 'desktop' files on you desktop or in there own directory
> you can open when you have tasks to do.

That ssound like a good idea and close to what I want to achieve, but it
doesn't seem to work in XFCE. When I drop some a file on a desktop file
("starter") that is associated with my testdnd.sh script, the script
doesn't get any input:

----testdnd.sh----
#!/bin/bash

echo 'testdnd.sh'

echo 'First two arguments:'
echo -n '$1: '
echo $1
echo -n '$2: '
echo $2

echo 'Standard Input: '
while read line
do
  echo "$line"
done < "${VAR:-/dev/stdin}"

read
----end----

When I drag a text file on the starter / desktop file, the mouse cursor
displays a '+' Symbol, as if the starter accepts that file. But when I
drop it, I get neither parameters nor standard input (that's what I
expect).

----output----
testdnd.sh
First two arguments:
$1: 
$2: 
Standard Input: 
----end----

In contrast, when I call the script from the command line, it gives me
both, parameters and stdin:

----
$ cat test.txt | ./testdnd.sh a b
testdnd.sh
First two arguments:
$1: a
$2: b
Standard Input: 
This is
a multiline
text file
----


> The above works for me with LXDE. Though you don't get to edit
> parameters to you scripts, just pass files to them.

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.

Christoph

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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