Re: Complaints from mousepad.
On Sun, Jun 06, 2021 at 06:43:31AM -0700, peter@easthope.ca wrote:
> Hi,
>
> The .bashrc here defines this function.
>
> met () { case $# in
> 0) mousepad --display=:0 /home/me/a & ;;
> 1) mousepad --display=:0 $1 & ;;
> *) echo "Too many arguments." ;;
> esac
> }
OK, this shows the function definition. Yu should quote "$1" but otherwise
it seems OK.
> mousepad works as expected but messages such as this are spewed to the
> terminal.
>
> (mousepad:8747): dconf-WARNING **: 06:30:53.773: failed to commit
> changes to dco nf: Cannot autolaunch D-Bus without X11 $DISPLAY
>
> How should the shell function or mousepad notify dconf that the
> display is :0?
How and when do you actually *run* this function? Is there actually
an X session running on :0 at the time?
I also went to <https://manpages.debian.org/buster/mousepad/mousepad.1.en.html>
to verify that --display= is actually a valid option for this program.
The man page says it is, so it seems you're "doing it correctly", but the
fact that you feel you *need* to specify the DISPLAY is a red flag. It
means you're doing something weird, and you haven't said what that is yet.
Are you trying to run this function from the Linux console *before* you
do a startx? If so, it'll obviously fail in exactly the kind of way
you're showing symptoms of.
Under normal operations, I would expect that you would start your X session
first, and then run this mousepad command inside of it. Then it will
simply inherit the DISPLAY variable from the session. In this case you
wouldn't need to specify the display at all.
Reply to: