[winswitch] How to disable redirecting to log file

yonatan zaken yonatan.zaken at gmail.com
Fri May 28 13:02:37 BST 2021


Thank Antoine, I will try this.
Last question on this matter, is there any way to disable gnerating the
:#.log files under /run/user/500/xpra/... ?

*Cheers,*
*Yonatan*




On Mon, 10 May 2021 at 09:41, Antoine Martin <antoine at nagafix.co.uk> wrote:

> On 10/05/2021 12:36, yonatan zaken wrote:
> > Hi Peter, thanks for the reply.
> > I actually used this notation: >&
> > For some reason I miss typed it in the quoted line.
> >
> > As I said, this works for me when running xpra start on a local machine
> > but generated the error when using it on a remote machine.
> That's because you're on an outdated 1.x version, it generates the ssh
> command line without proper quoting.
> Newer versions use the paramiko ssh backend by default which does not
> rely on escaping strings, and even the ssh backend has been re-worked to
> support nesting and quotes more correctly.
>
> If you have to stick with this outdated version, use the script approach
> I had suggested in my first reply.
> You can probably make this completely transparent by placing these
> wrapper scripts in /usr/local/bin with the same name as the real binary
> (just make sure to invoke the binary with its full path) and ensuring
> /usr/local/bin comes first in the $PATH.
>
> Cheers,
> Antoine
>
>
> > */
> > /*
> > */Cheers,/*
> > */Yonatan/*
> > *
> > *
> >
> >
> >
> > On Mon, 10 May 2021 at 03:50, Peter Swain <swine at pobox.com
> > <mailto:swine at pobox.com>> wrote:
> >
> >     Yonatan, you've mixed two different notations here
> >
> >     Use
> >       &>/dev/null
> >     or
> >       >&- 2>&-
> >
> >     On Sun, May 9, 2021, 9:02 AM yonatan zaken via shifter-users
> >     <shifter-users at lists.devloop.org.uk
> >     <mailto:shifter-users at lists.devloop.org.uk>> wrote:
> >
> >         Hi Antoine, Thanks for the response!
> >
> >         I tried the following:
> >
> >         > Why don't you just redirect the output of your noisy command?
> >         > xpra start --start="bash -c 'therealcommand &> /dev/null'"
> >
> >
> >         When trying to start a local session it works fine and stdout of
> >         the noisy
> >         command is redirected to /dev/null.
> >         But when trying to run the command on a remote machine I get the
> >         following
> >         error:
> >
> >          Ambiguous output redirect.
> >         2021-05-09 20:43:16,088 Error: SSH connection to the xpra server
> >         failed
> >         2021-05-09 20:43:16,088  check your username, hostname, display
> >         number,
> >         firewall, etc
> >         2021-05-09 20:43:16,088  for server: ssh:pci at 172.00.00.26
> >         <mailto:ssh%3Apci at 172.00.00.26>
> >         2021-05-09 20:43:16,088  the command line used was:
> >         2021-05-09 20:43:16,088  ssh -x -l pci -T 172.19.31.26 sh -c
> 'xpra
> >         initenv;~/.xpra/run-xpra _proxy_start "--start-child=bash -c
> >         'therealcommand >& /dev/null'" --exit-with-children --mmap-group
> ||
> >         $XDG_RUNTIME_DIR/xpra/run-xpra _proxy_start "--start-child=bash
> -c
> >         'therealcommand >& /dev/null'" --exit-with-children --mmap-group
> >         || xpra
> >         _proxy_start "--start-child=bash -c 'therealcommand >&
> /dev/null'"
> >         --exit-with-children --mmap-group'
> >
> >         Any idea how to overcome this ?
> >
> >         *Cheers,*
> >         *Yonatan*
> >
> >
> >
> >
> >         On Sun, 9 May 2021 at 15:28, Antoine Martin via shifter-users <
> >         shifter-users at lists.devloop.org.uk
> >         <mailto:shifter-users at lists.devloop.org.uk>> wrote:
> >
> >         > On 09/05/2021 14:56, yonatan zaken via shifter-users wrote:
> >         > > Hi All,
> >         > > My platform: Linux Kubuntu 14
> >         > > xpra version: xpra v1.0.12-r19800
> >         > >
> >         > > I am trying to find a way to disable the redirecting of the
> >         xpra server
> >         > > output to the log file.
> >         > If you run your server with "--no-daemon" then the output will
> >         just go
> >         > to stdout. You can then redirect that wherever you like:
> >         > nohup xpra start --start=noisycommand --no-daemon >& /dev/null
> &
> >         >
> >         > > The application that I run via. xpra start generates large
> >         amounts of
> >         > data
> >         > > to stdout causing the ":1.log" file to be very large. This
> >         causes me
> >         > > trouble since the /run/user is left with no space sometimes.
> >         > So the problem is not caused by the xpra server but by your
> >         unspecified
> >         > application.
> >         >
> >         > > I tried adding the following flag to the xpra.conf file:
> >         > > remote-logging=no
> >         > Remote logging has nothing to do with it.
> >         > That's for sending the client's log messages to the server.
> >         > (and in newer versions, also back the other way)
> >         >
> >         > > But i still see the applications output directed to the .log
> >         file.
> >         > >
> >         > > Any suggestions how to disable the redirecting of the
> >         applications stdout
> >         > > to the log file?
> >         > Why don't you just redirect the output of your noisy command?
> >         > xpra start --start="bash -c 'therealcommand &> /dev/null'"
> >         >
> >         > You could also create a wrapper script to do the same thing:
> >         > cat > /usr/bin/mycommand-wrapper << EOF
> >         > #!/bin/bash
> >         > mycommand $@ >& /dev/null
> >         > EOF
> >         > chmod +x /usr/bin/mycommand-wrapper
> >         >
> >         > Cheers,
> >         > Antoine
> >         >
> >         >
> >         > >
> >         > > *Cheers,*
> >         > > *Yonatan*
> >         > > _______________________________________________
> >         > > shifter-users mailing list
> >         > > shifter-users at lists.devloop.org.uk
> >         <mailto:shifter-users at lists.devloop.org.uk>
> >         > > https://lists.devloop.org.uk/mailman/listinfo/shifter-users
> >         <https://lists.devloop.org.uk/mailman/listinfo/shifter-users>
> >         > >
> >         >
> >         > _______________________________________________
> >         > shifter-users mailing list
> >         > shifter-users at lists.devloop.org.uk
> >         <mailto:shifter-users at lists.devloop.org.uk>
> >         > https://lists.devloop.org.uk/mailman/listinfo/shifter-users
> >         <https://lists.devloop.org.uk/mailman/listinfo/shifter-users>
> >         >
> >         _______________________________________________
> >         shifter-users mailing list
> >         shifter-users at lists.devloop.org.uk
> >         <mailto:shifter-users at lists.devloop.org.uk>
> >         https://lists.devloop.org.uk/mailman/listinfo/shifter-users
> >         <https://lists.devloop.org.uk/mailman/listinfo/shifter-users>
> >
>
>



More information about the shifter-users mailing list