On Thu, 3 Oct 2013 15:00:55 -0700 Joe Zeff <j...@zeff.us> wrote:

> On 10/03/2013 02:38 PM, Ranjan Maitra wrote:
> > #!/bin/bash
> > # Export the dbus session address on startup so it can be used by cron
> > touch $HOME/.Xdbus
> > chmod 600 $HOME/.Xdbus
> > env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.Xdbus
> > echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.Xdbus
> > # Export XAUTHORITY value on startup so it can be used by cron
> > env | grep XAUTHORITY >> $HOME/.Xdbus
> > echo 'export XAUTHORITY' >> $HOME/.Xdbus
> 
> The first executable line is redundant, because when you redirect the 
> output of the env to ~/.Xdbus, that will create it, meaning that the 
> chmod line can be moved down one, so that the file exists when the 
> command is executed.  I'm not saying that you have to do it this way, 
> but it just looks cleaner the other way, at least to me.  YMMV, and it's 
> your system.

I think I agree with you. So, basically, then have the following in
~/bin/export_x_info:

#!/bin/bash
# Export the dbus session address on startup so it can be used by cron
env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.Xdbus
chmod 600 $HOME/.Xdbus
echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.Xdbus
# Export XAUTHORITY value on startup so it can be used by cron
env | grep XAUTHORITY >> $HOME/.Xdbus
echo 'export XAUTHORITY' >> $HOME/.Xdbus

Thanks,
Ranjan

-- 
Important Notice: This mailbox is ignored: e-mails are set to be
deleted on receipt. Please respond to the mailing list if appropriate.
For those needing to send personal or professional e-mail, please use
appropriate addresses.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to