Bug 25436

Summary: ck-history eat string if SeatID longer than seven characters.
Product: ConsoleKit Reporter: Halton Huo <halton.huo>
Component: DaemonAssignee: william.jon.mccann
Status: NEW --- QA Contact:
Severity: major    
Priority: medium CC: brian.cameron
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch to show full name

Description Halton Huo 2009-12-04 00:10:34 UTC
Created attachment 31728 [details] [review]
patch to show full name

With multi-seat work, the SeatID are no longer short, it will looks like StaticSeat1, SunraySeat11. This will cause our gdmdynamic[1] fail to get incorrect SeatID when creating new SunRay seat.

$ck-history --last
gdm       LoginWindow SessionSta StaticS console      :0                           Mon Nov 30 23:06   still logged in   
gtest1                Session3   StaticS vt/4         :2                           Mon Nov 30 19:59   still logged in   
gdm       LoginWindow SessionSta StaticS vt/4         :2                           Mon Nov 30 19:59   still logged in   
gtest1                Session2   StaticS vt/3         :1                           Mon Nov 30 19:57   still logged in   
[...]

With attached patch 
$ck-history --last
gdm     LoginWindow     Session1        SunraySeat11    dtlocal :11     Fri Dec  4 15:49        - 15:52  (00:02)
gdm     LoginWindow     SessionStaticSeat1Local StaticSeat1     console :0      Fri Dec  4 15:53          still logged in
[...]

[1] http://src.opensolaris.org/source/xref/jds/spec-files/trunk/ext-sources/gdmdynamic
Comment 1 william.jon.mccann 2010-01-28 15:16:58 UTC
Comment on attachment 31728 [details] [review]
patch to show full name

The point is to align the columns.  This patch removes the alignment.  I don't think that is desirable.
Comment 2 Halton Huo 2010-01-28 18:56:49 UTC
(In reply to comment #1)
> (From update of attachment 31728 [details] [review])
> The point is to align the columns.  This patch removes the alignment.  I don't
> think that is desirable.

The length session_id and seat_id are variable, they could be longer than 10 and 7 characters. Return the exact session_id and seat_id is required for script like gdmdynamic (http://src.opensolaris.org/source/xref/jds/spec-files/trunk/ext-sources/gdmdynamic)

Using "\t" fix this problem, but yes, it sometimes break the alignment when the length of session_id or seat_id are varied too much.

To keep the alignment, a possible idea is to to check maximum length of session_id and seat_id, use more "\t" if the max_length is bigger than 8. The number_tab=max_length/8.

Does it make sense?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.