Bug 5153 - tl-notify -u no longer works
Summary: tl-notify -u no longer works
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.3.0
Assignee: Henrik Andersson
URL:
Keywords: astrand_tester, prosaic
Depends on:
Blocks:
 
Reported: 2014-05-20 16:34 CEST by Peter Åstrand
Modified: 2014-10-07 09:19 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2014-05-20 16:34:01 CEST
When I'm trying tl-notify -u on eudemo I get:

tl-notify -u astrand "Test"
error: user 'astrand' has no sessions

But I have a session:

astrand  thinlinc/3   2014-05-20 16:33 (:3)
Comment 1 Henrik Andersson cendio 2014-05-28 14:46:48 CEST
tl-notify is crawling /proc/x/cmdline searching for matching tl-run-profile to get the display. This has been changed when tl-run-profile become a python script which uses execv.

We should change this into something more proper way to enum local session of an agent.
Comment 2 Henrik Andersson cendio 2014-06-11 15:32:58 CEST
For now there is no way to get the DBUS_SESSION_BUS_ADDRESS for a session, before we had a known process which we harvested the environment from. We need to handle this and the appropriated way seems to store the session bus address in thinlinc user session directory when xstartup.d dbus launch script executes.
Comment 3 Henrik Andersson cendio 2014-06-13 12:54:32 CEST
The approach i used; xmlrpc function get_sessions() is not usable due to it requires a privileged query and each agent needs to be explicitly defined in /vsm/allowed_clients to be used within a cluster. It does work on a single setup master/agent.
Comment 4 Henrik Andersson cendio 2014-06-13 14:12:50 CEST
tl-notify rewritten in vommit 29061 and tl-dbus-launch.sh in commit 29062.
Comment 5 Henrik Andersson cendio 2014-06-16 11:23:45 CEST
The approach should slightly be changed:

- Dump full environment to $(TLSESSIONDATA)/xstartup.env due to there are
  others who needs environment information and not only the dbus session
  address.

- Make tl-notify read DBUS_SESSION_BUS_ADDRESS from env. file dump
Comment 6 Henrik Andersson cendio 2014-06-16 11:26:23 CEST
(In reply to comment #5)
> - Dump full environment to $(TLSESSIONDATA)/xstartup.env due to there are
>   others who needs environment information and not only the dbus session
>   address.

Commit 29072.
Comment 7 Henrik Andersson cendio 2014-06-16 12:28:10 CEST
(In reply to comment #5)
> The approach should slightly be changed:
> 
> - Dump full environment to $(TLSESSIONDATA)/xstartup.env due to there are
>   others who needs environment information and not only the dbus session
>   address.
> 
> - Make tl-notify read DBUS_SESSION_BUS_ADDRESS from env. file dump

Commit 29073 reverts commit 29062.

Commit 29074 makes tl-notify to read the new environment file.
Comment 8 Henrik Andersson cendio 2014-06-16 12:52:06 CEST
(In reply to comment #7)
> (In reply to comment #5)
> > The approach should slightly be changed:
> > 
> > - Dump full environment to $(TLSESSIONDATA)/xstartup.env due to there are
> >   others who needs environment information and not only the dbus session
> >   address.
> > 
> > - Make tl-notify read DBUS_SESSION_BUS_ADDRESS from env. file dump
> 
> Commit 29073 reverts commit 29062.
> 
> Commit 29074 makes tl-notify to read the new environment file.

Commit 29075 fixes a bug and cleanups env. key/value parsing.
Comment 9 Peter Åstrand cendio 2014-09-29 11:21:28 CEST
From https://www.cendio.com/bugzilla/show_bug.cgi?id=5265#c3:

However tl-notify have double meaning error reporting when xstartup.env is
removed from session directory;

/opt/thinlinc/sbin/tl-notify hello
error: failed to read xstartup.env ([Errno 2] No such file or directory:
'/var/opt/thinlinc/sessions/cendio/1/xstartup.env')
Message sent to 1 sessions on this agent.
Comment 10 Henrik Andersson cendio 2014-09-29 13:30:30 CEST
(In reply to comment #9)
> From https://www.cendio.com/bugzilla/show_bug.cgi?id=5265#c3:
> 
> However tl-notify have double meaning error reporting when xstartup.env is
> removed from session directory;
> 
> /opt/thinlinc/sbin/tl-notify hello
> error: failed to read xstartup.env ([Errno 2] No such file or directory:
> '/var/opt/thinlinc/sessions/cendio/1/xstartup.env')
> Message sent to 1 sessions on this agent.

Fixed in commit 29427.
Comment 11 Peter Åstrand cendio 2014-10-07 09:19:28 CEST
Build 4515 works fine on SLED11.

Note You need to log in before you can comment on or make changes to this bug.