Bug 25436 - ck-history eat string if SeatID longer than seven characters.
Summary: ck-history eat string if SeatID longer than seven characters.
Status: NEW
Alias: None
Product: ConsoleKit
Classification: Unclassified
Component: Daemon (show other bugs)
Version: unspecified
Hardware: All All
: medium major
Assignee: william.jon.mccann
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-04 00:10 UTC by Halton Huo
Modified: 2010-01-28 18:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to show full name (2.74 KB, patch)
2009-12-04 00:10 UTC, Halton Huo
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.