Re: [systemd-devel] Small tool to spawn programs in graphical sessions from non-graphical ones
D-BUS. XAUTHORITY. Other session variables (including KIO / GPG password manager / et cetera). You get the use of none of these things in your cron-started programs... unless you use my program. Some programs even flat out refuse to start, actually. Thus, why I wrote my program. On 08/31/2013 05:28 AM, killermoehre wrote: Am 31.08.2013 11:09, schrieb Manuel Amador (Rudd-O): Based on systemd's related sibling loginctl, I managed to accomplish the holy grail of the 90's: get Amarok to play music on my desktop sessiom from a crontab (motivated by the missus' desire to have an alarm in the home theater that requires her to walk downstairs, to adapt to her polyphasic sleep): https://github.com/Rudd-O/run-in-gui Pull requests to, well, there. Flames to my personal email. I'm sure it's buggy as fuck since it's been working only for the last half an hour or so, but we pulled it off together in the space of 2 hours. Enjoy! Doesn't Amarok starts if you prefix it with the right DISPLAY variable? Like »DISPLAY=:0 amarok«. This should work from cron, too. Regards ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Small tool to spawn programs in graphical sessions from non-graphical ones
On 1 September 2013 01:16, Mantas Mikulėnas graw...@gmail.com wrote: On Sat, Aug 31, 2013 at 4:35 PM, Jan Engelhardt jeng...@inai.de wrote: On Saturday 2013-08-31 14:28, killermoehre wrote: Doesn't Amarok starts if you prefix it with the right DISPLAY variable? Like »DISPLAY=:0 amarok«. This should work from cron, too. Normally, you also need to set XAUTHORITY= to the right path -- since you do not want just anybody to be able to connect to your :0. And then there are sessions /not/ on :0. Like when the display manager's login screen is on :0 (although this mostly happens in weird situations like startx'ing when a DM is running), or when Xorg crashes and doesn't delete the lockfile for :0 so the next session gets :1, or – what heresy – when there's a second user logged in, with /their/ session on :0. ...sometimes I think Xorg should start at :1 instead, and reserve :0 for annoying cronjobs and services that have DISPLAY=:0 hardcoded, to remind everyone that they're using a multi-user OS. [..] Welcome to Windows circa 2006 ;P http://blogs.msdn.com/b/oldnewthing/archive/2007/05/08/2470754.aspx -- James ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Small tool to spawn programs in graphical sessions from non-graphical ones
On Saturday 2013-08-31 14:28, killermoehre wrote: Am 31.08.2013 11:09, schrieb Manuel Amador (Rudd-O): Based on systemd's related sibling loginctl, I managed to accomplish the holy grail of the 90's: get Amarok to play music on my desktop sessiom from a crontab (motivated by the missus' desire to have an alarm in the home theater that requires her to walk downstairs, to adapt to her polyphasic sleep): https://github.com/Rudd-O/run-in-gui Pull requests to, well, there. Flames to my personal email. I'm sure it's buggy as fuck since it's been working only for the last half an hour or so, but we pulled it off together in the space of 2 hours. Enjoy! Doesn't Amarok starts if you prefix it with the right DISPLAY variable? Like »DISPLAY=:0 amarok«. This should work from cron, too. Normally, you also need to set XAUTHORITY= to the right path -- since you do not want just anybody to be able to connect to your :0. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Small tool to spawn programs in graphical sessions from non-graphical ones
On Sat, Aug 31, 2013 at 4:35 PM, Jan Engelhardt jeng...@inai.de wrote: On Saturday 2013-08-31 14:28, killermoehre wrote: Doesn't Amarok starts if you prefix it with the right DISPLAY variable? Like »DISPLAY=:0 amarok«. This should work from cron, too. Normally, you also need to set XAUTHORITY= to the right path -- since you do not want just anybody to be able to connect to your :0. And then there are sessions /not/ on :0. Like when the display manager's login screen is on :0 (although this mostly happens in weird situations like startx'ing when a DM is running), or when Xorg crashes and doesn't delete the lockfile for :0 so the next session gets :1, or – what heresy – when there's a second user logged in, with /their/ session on :0. ...sometimes I think Xorg should start at :1 instead, and reserve :0 for annoying cronjobs and services that have DISPLAY=:0 hardcoded, to remind everyone that they're using a multi-user OS. Then there are minor things like $DBUS_SESSION_BUS_ADDRESS, $SSH_AUTH_SOCK, $SESSION_MANAGER, $GPG_AGENT_INFO... -- Mantas Mikulėnas graw...@gmail.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Small tool to spawn programs in graphical sessions from non-graphical ones
A somewhat more informative reply... On Sat, Aug 31, 2013 at 4:35 PM, Jan Engelhardt jeng...@inai.de wrote: On Saturday 2013-08-31 14:28, killermoehre wrote: Doesn't Amarok starts if you prefix it with the right DISPLAY variable? Like »DISPLAY=:0 amarok«. This should work from cron, too. Normally, you also need to set XAUTHORITY= to the right path -- since you do not want just anybody to be able to connect to your :0. Xorg also allows giving access by UID, using `xhost SI:localuser:$UID`, which removes the requirement to have access to Xauthority data. -- Mantas Mikulėnas graw...@gmail.com ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel