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


Groups > linux.debian.user > #236059

Re: Is invoking the -locker option of xautolock to run a script known? Could I be helped with an xautolock code line please?

From The Wanderer <wanderer@fastmail.fm>
Newsgroups linux.debian.user
Subject Re: Is invoking the -locker option of xautolock to run a script known? Could I be helped with an xautolock code line please?
Date 2021-06-13 15:40 +0200
Message-ID <Cpyvg-4sQ-11@gated-at.bofh.it> (permalink)
References <CpwWu-3tg-1@gated-at.bofh.it> <CpxSx-414-3@gated-at.bofh.it> <CpybT-4mz-7@gated-at.bofh.it>
Organization This space intentionally left blank.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2021-06-13 at 09:14, Greg Wooledge wrote:

> On Sun, Jun 13, 2021 at 06:10:23PM +0530, Susmita/Rajib wrote:
> 
>> But I need to run the script file with xautolock.
> 
> So, let me see if I understand you.  You rambled so much that it's 
> really not clear what you're asking.  But if I'm reading this 
> sentence right, you have a shell script that requires a terminal to
> work, because you prompt the user for input and then read input from
> the terminal.
> 
> And now you would like to run this script as a child of xautolock, 
> which I'm guessing is a pure X11 client program, and does not run 
> inside a terminal.
> 
> Well, that's just a non-starter.  Throw the shell script away, and 
> write a new program that doesn't require a terminal to do its work.

If I'm parsing your rephrasing of the problem statement correctly,
couldn't this be addressed by having the script spawn an xterm or
similar and run the needed command(s) - perhaps in the form of another
script - within that?

I have a script which launches an xterm, echos a prompt, and then runs a
command which takes input and uses that input to launch another script.
It's been working fine for more than a year.

In my case the problem could probably be addressed more elegantly by
having my script invoke something like gksudo, since the command which
takes input in my case is 'su - -c "programname and arguments"', but the
design approach seems like it would generalize well to cases which
invoke other commands instead.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

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


Thread

Is invoking the -locker option of xautolock to run a script known?  Could I be helped with an xautolock code line please? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2021-06-13 14:00 +0200
  Re: Is invoking the -locker option of xautolock to run a script  known? Could I be helped with an xautolock code line please? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2021-06-13 15:00 +0200
    Re: Is invoking the -locker option of xautolock to run a script  known? Could I be helped with an xautolock code line please? Greg Wooledge <greg@wooledge.org> - 2021-06-13 15:20 +0200
      Re: Is invoking the -locker option of xautolock to run a script known?  Could I be helped with an xautolock code line please? The Wanderer <wanderer@fastmail.fm> - 2021-06-13 15:40 +0200
        Re: Is invoking the -locker option of xautolock to run a script  known? Could I be helped with an xautolock code line please? Greg Wooledge <greg@wooledge.org> - 2021-06-13 16:40 +0200
    Re: Is invoking the -locker option of xautolock to run a script  known? Could I be helped with an xautolock code line please? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2021-06-13 16:40 +0200
  Re: Is invoking the -locker option of xautolock to run a script  known? Could I be helped with an xautolock code line please? Greg Wooledge <greg@wooledge.org> - 2021-06-13 15:20 +0200

csiph-web