Session management

Discussion in 'C Programming' started by Antoninus Twink, Jul 28, 2007.

  1. I am writing a program using GTK+ 2. I'd like to register it with KDE's
    session manager, ksmserver, so that it will start up once KDE is
    restarted. How should I do that?

    Thanks!
    Antoninus Twink, Jul 28, 2007
    #1
    1. Advertising

  2. In article <>,
    Antoninus Twink <> wrote:
    >I am writing a program using GTK+ 2. I'd like to register it with KDE's
    >session manager, ksmserver, so that it will start up once KDE is
    >restarted. How should I do that?


    We don't know. If there is a KDE newsgroup or mailing list or web site,
    they would probably know there. GTK and KDE and session managers
    are not part of the C language, so we don't discuss them here.
    --
    Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson
    Walter Roberson, Jul 28, 2007
    #2
    1. Advertising

  3. In article <f8fn1i$s1j$>,
    Walter Roberson <-cnrc.gc.ca> wrote:
    >In article <>,
    >Antoninus Twink <> wrote:
    >>I am writing a program using GTK+ 2. I'd like to register it with KDE's
    >>session manager, ksmserver, so that it will start up once KDE is
    >>restarted. How should I do that?

    >
    >We don't know. If there is a KDE newsgroup or mailing list or web site,
    >they would probably know there. GTK and KDE and session managers
    >are not part of the C language, so we don't discuss them here.


    IOW:

    Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

    Useful clc-related links:
    --
    http://en.wikipedia.org/wiki/Aspergers
    http://en.wikipedia.org/wiki/Clique
    http://en.wikipedia.org/wiki/C_programming_language
    Kenny McCormack, Jul 28, 2007
    #3
  4. "Kenny McCormack" <> wrote in message
    news:f8fofj$tbu$...
    > In article <f8fn1i$s1j$>,
    > Walter Roberson <-cnrc.gc.ca> wrote:
    >>In article <>,
    >>Antoninus Twink <> wrote:
    >>>I am writing a program using GTK+ 2. I'd like to register it with KDE's
    >>>session manager, ksmserver, so that it will start up once KDE is
    >>>restarted. How should I do that?

    >>
    >>We don't know. If there is a KDE newsgroup or mailing list or web site,
    >>they would probably know there. GTK and KDE and session managers
    >>are not part of the C language, so we don't discuss them here.

    >
    > IOW:
    >
    > Off topic. Not portable. Cant discuss it here. Blah, blah, blah.
    >
    > Useful clc-related links:
    > --
    > http://en.wikipedia.org/wiki/Aspergers
    > http://en.wikipedia.org/wiki/Clique
    > http://en.wikipedia.org/wiki/C_programming_language
    >

    Obvious the Knome start-up sequence has got to be off-topic. It doesn't
    matter what language you write your programs in, the method for launching
    them at startup will be the same. And appropriate to discuss in a Linux
    group.

    GTK+ - well this needs to be off-topic as well. The reason is that there are
    simply too many C libraries for GUIs, signals processing, graphics, etc to
    reasonable handle them. If C were a little niche language matters would be
    different.

    Please don't post this cookie-cutter with Asperger's links to reasonable
    off-topic redirections. Just let the thread die or, if you don't like the
    tone of the redirection and really must, say you don't like the tone.

    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
    Malcolm McLean, Jul 28, 2007
    #4
  5. To give more detail: a KDE/QT program when it starts would somehow
    communicate with the session manager to arrange for it's state to be
    saved and it would be restarted if the session was closed then reopened.

    For a GTK+ 2 program, what is the right API to communicate with the
    session manager?

    In other words, how to turn this psuedocode into actual code?

    if(running_under_kde == True) // communicate with session manager
    {
    provide_sm_with_save_state_callback(ss); // ss is a fnuction pointer
    provide_sm_with_load_state_callback(ls); // ls is a fnuction pointer
    }

    Thanks!



    On 28 Jul 2007 at 15:23, Walter Roberson wrote:
    > Antoninus Twink <> wrote:
    >>I am writing a program using GTK+ 2. I'd like to register it with KDE's
    >>session manager, ksmserver, so that it will start up once KDE is
    >>restarted. How should I do that?

    >
    > We don't know. If there is a KDE newsgroup or mailing list or web site,
    > they would probably know there. GTK and KDE and session managers
    > are not part of the C language, so we don't discuss them here.
    Antoninus Twink, Jul 28, 2007
    #5
  6. In article <>,
    Antoninus Twink <> wrote:
    >To give more detail: a KDE/QT program when it starts would somehow
    >communicate with the session manager to arrange for it's state to be
    >saved and it would be restarted if the session was closed then reopened.
    >
    >For a GTK+ 2 program, what is the right API to communicate with the
    >session manager?
    >
    >In other words, how to turn this psuedocode into actual code?
    >
    >if(running_under_kde == True) // communicate with session manager
    >{
    > provide_sm_with_save_state_callback(ss); // ss is a fnuction pointer
    > provide_sm_with_load_state_callback(ls); // ls is a fnuction pointer
    >}


    It's still (and let me be the first of many to point this out):

    Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

    Useful clc-related links:
    --
    http://en.wikipedia.org/wiki/Aspergers
    http://en.wikipedia.org/wiki/Clique
    http://en.wikipedia.org/wiki/C_programming_language
    Kenny McCormack, Jul 28, 2007
    #6
  7. Look, what the hell is your problem? I don't have Asberger's, OK.

    On 28 Jul 2007 at 18:16, Kenny McCormack wrote:
    > In article <>,
    > Antoninus Twink <> wrote:
    >>To give more detail: a KDE/QT program when it starts would somehow
    >>communicate with the session manager to arrange for it's state to be
    >>saved and it would be restarted if the session was closed then reopened.
    >>
    >>For a GTK+ 2 program, what is the right API to communicate with the
    >>session manager?
    >>
    >>In other words, how to turn this psuedocode into actual code?
    >>
    >>if(running_under_kde == True) // communicate with session manager
    >>{
    >> provide_sm_with_save_state_callback(ss); // ss is a fnuction pointer
    >> provide_sm_with_load_state_callback(ls); // ls is a fnuction pointer
    >>}

    >
    > It's still (and let me be the first of many to point this out):
    >
    > Off topic. Not portable. Cant discuss it here. Blah, blah, blah.
    >
    > Useful clc-related links:
    Antoninus Twink, Jul 28, 2007
    #7
  8. Antoninus Twink

    santosh Guest

    Antoninus Twink wrote:

    > I am writing a program using GTK+ 2. I'd like to register it with KDE's
    > session manager, ksmserver, so that it will start up once KDE is
    > restarted. How should I do that?


    We can't directly help you since this question is not topical. However try
    the following links.

    <http://www.linuxheadquarters.com/howto/programming/gtk_examples/index.shtml>
    <http://www.yolinux.com/TUTORIALS/GTK+ProgrammingTips.html>
    <http://developer.gnome.org/doc/tutorials/gnome-libs/gtk-programming.html>
    <http://developer.gnome.org/doc/API/>
    <http://linux.omnipotent.net/article.php?article_id=12482&page=2>
    <http://www.ibm.com/developerworks/views/opensource/libraryview.jsp?search_by
    =gtk+fundamentals>

    Also try these mailing lists:

    <http://www.kde.org/mailinglists/>
    <http://www.gtk.org/mailinglists.html>

    You should also try the groups under <news:comp.os.unix.*> and
    <news:comp.os.linux.*> hierarchies, perhaps like
    <news:comp.os.linux.development.apps>
    santosh, Jul 28, 2007
    #8
  9. "Antoninus Twink" <> wrote in message
    news:...
    > Look, what the hell is your problem? I don't have Asberger's, OK.
    >

    No. Kenny thinks that everyone who tries to enforce topicality has some sort
    of personality problem. Apart from that little fobile basically he's a
    constructive poster.

    Unfortunately he's wrong. Personally I don't know (gnow?) anything about the
    Knome GUI, but I'm sure there are some Linux buffs here who do. The problem
    is that the newsgroup then becomes comp.everythingrelatedtoprogramming, and
    there will be too many posts to read or maintain any sort of community. So
    we redirect people to Linux groups. Your question has nothing to do with the
    C language as such, and really precious little to do with the fact that your
    program is written in C, though there might just be a C API that is a little
    different from the facilities offered in other languages. clc isn't the
    place for discussing this.

    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
    Malcolm McLean, Jul 28, 2007
    #9
  10. In article <>,
    Antoninus Twink <> wrote:
    >Look, what the hell is your problem? I don't have Asberger's, OK.


    Kenny is referring to the rest of us, the ones who are steadily
    pointing out that your question is Not Relevant to comp.lang.c
    and that you need to ask your question somewhere else.

    comp.lang.c discusses the C programming language -- that is, the
    language defined by the ANSI/ISO standards and ammending Technical
    Reports. That language has no facilities for graphics or session
    management or multiple processes or networking or any of a number
    of other useful things: all of those facilities are considered
    system-specific extensions.

    This is not a newsgroup for programming "whatever can be programmed
    in C, assuming implementation extensions to the language and
    assuming various system-specific third-party libraries": this is
    a newsgroup about the C language -without- system-specific extensions.
    If you can't pick up your program and recompile it on (say) IBM MVS
    then chances are that the program would not be considered topical here.


    I've never used GTK or KDE; they aren't something that is part of C and
    they would be of little relevance to my work. But less than two minutes
    googling on the keywords of your question found
    http://developer.kde.org/documentation/standards/
    which says that KDE uses the X11R6.4 Session Management Protocol (SM)
    and points you to documentation on ftp.x.org . That link doesn't
    actually work, but you should be able to find the needed information
    on ftp.x.org somewhere.
    --
    All is vanity. -- Ecclesiastes
    Walter Roberson, Jul 28, 2007
    #10
  11. In article <>,
    Antoninus Twink <> wrote:
    >Look, what the hell is your problem? I don't have Asberger's, OK.


    I never said you did.

    Here's the deal. Although you have posted a perfectly reasonable C-related
    question to a newsgroup called (gasp!) comp.lang.c, you will find out
    very soon that nobody here ever discusses anything interesting relating
    to C programming. About 75% of the traffic is endless meta-discussion
    (such as this post); about 20% is nominally on-topic but trivial
    (example: the thread about call-by-value, which is basic, basic C that
    any textbook would cover) and about 5% language lawyering (which is
    technically both on-topic and non-trivial, but, alas, only interesting
    to about 6 people in the world).

    So, everytime somebody posts something interesting (which, in the
    terminology of the regulars here is pronounced "off topic"), it sets off
    a feeding frenzy of the hardcores calling your post "off topic". As a
    form of satire, I like to do my part, and try especially hard to be the
    first in.

    Finally, the wiki URLs are, IMHO, required reading for understanding the
    whacky culture of this ng. Through the years, many have commented on
    the amazing similarity between the observed psyches of the hardcores in
    the NG and the symptoms described in the Asbergers article. We are, of
    course, not psychiatrists, nor do we even claim to play them on the net,
    but the similarity is nonetheless there. This does not, of course,
    constitute a diagnosis.

    Finally, let me advise you that you will find that the makeup of this
    group can be summarized as:
    1) About 6 (or so) hardcores
    2) Another 6 (or so) HC sycophants
    3) About 3 or 4 contrarians (also known as "trolls") - of which
    I count myself a member.
    4) An endless supply of newbies (presumably, the category in
    which you fall)
    Kenny McCormack, Jul 28, 2007
    #11
  12. Malcolm McLean said:

    >
    > "Antoninus Twink" <> wrote in message
    > news:...
    >> Look, what the hell is your problem? I don't have Asberger's, OK.
    >>

    > No. Kenny thinks that everyone who tries to enforce topicality has
    > some sort of personality problem. Apart from that little fobile
    > basically he's a constructive poster.


    Really? You could have fooled me.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
    Richard Heathfield, Jul 28, 2007
    #12
  13. "Malcolm McLean" <> writes:
    > "Kenny McCormack" <> wrote in message
    > news:f8fofj$tbu$...

    [the usual crud]
    > Please don't post this cookie-cutter with Asperger's links to
    > reasonable off-topic redirections. Just let the thread die or, if you
    > don't like the tone of the redirection and really must, say you don't
    > like the tone.


    Please don't feed the troll. I suggest simply ignoring him, using a
    killfile if necessary. KM is obviously determined to continue
    publicliy humiliating himself; helping him to do so is in poor taste.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Jul 28, 2007
    #13
  14. Antoninus Twink <> writes:
    > Look, what the hell is your problem? I don't have Asberger's, OK.

    [...]

    Kenny McCormack is one of our resident trolls. Please ignore him.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Jul 28, 2007
    #14
  15. In article <>,
    Richard Heathfield <> wrote:
    >Malcolm McLean said:
    >
    >>
    >> "Antoninus Twink" <> wrote in message
    >> news:...
    >>> Look, what the hell is your problem? I don't have Asberger's, OK.
    >>>

    >> No. Kenny thinks that everyone who tries to enforce topicality has
    >> some sort of personality problem. Apart from that little fobile
    >> basically he's a constructive poster.

    >
    >Really? You could have fooled me.


    That's not hard.
    Kenny McCormack, Jul 28, 2007
    #15
  16. "Kenny McCormack" <> wrote in message
    news:f8g52n$cp$...
    > Finally, let me advise you that you will find that the makeup of this
    > group can be summarized as:
    > 1) About 6 (or so) hardcores
    > 2) Another 6 (or so) HC sycophants
    > 3) About 3 or 4 contrarians (also known as "trolls") - of which
    > I count myself a member.
    > 4) An endless supply of newbies (presumably, the category in
    > which you fall)
    >

    Well I give up. I'm clearly not a 4, but which of 1, 2, 3 do I go in?

    --
    Free games and programming goodies.
    http://www.personal.leeds.ac.uk/~bgy1mm
    Malcolm McLean, Jul 28, 2007
    #16
  17. Malcolm McLean said:

    >
    > "Kenny McCormack" <> wrote in message
    > news:f8g52n$cp$...
    >> Finally, let me advise you that you will find that the makeup of this
    >> group can be summarized as:
    >> 1) About 6 (or so) hardcores
    >> 2) Another 6 (or so) HC sycophants
    >> 3) About 3 or 4 contrarians (also known as "trolls") - of which
    >> I count myself a member.
    >> 4) An endless supply of newbies (presumably, the category in
    >> which you fall)
    >>

    > Well I give up. I'm clearly not a 4, but which of 1, 2, 3 do I go in?


    None of the above. Mr McCormack's summary, like most of what he posts,
    is incorrect.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
    Richard Heathfield, Jul 28, 2007
    #17
  18. In article <>,
    Malcolm McLean <> wrote:
    >
    >"Kenny McCormack" <> wrote in message
    >news:f8g52n$cp$...
    >> Finally, let me advise you that you will find that the makeup of this
    >> group can be summarized as:
    >> 1) About 6 (or so) hardcores
    >> 2) Another 6 (or so) HC sycophants
    >> 3) About 3 or 4 contrarians (also known as "trolls") - of which
    >> I count myself a member.
    >> 4) An endless supply of newbies (presumably, the category in
    >> which you fall)
    >>

    >Well I give up. I'm clearly not a 4, but which of 1, 2, 3 do I go in?


    Agreed that you're not a 4.
    Assuming that you don't subscribe to the lunacy of the hardcores (groups
    1 and 2), I think we can accept you as a provisional member of our
    group. Welcome aboard!

    Based on your postings so far, this looks like a good placement.
    Kenny McCormack, Jul 28, 2007
    #18
  19. Antoninus Twink

    Richard Guest

    (Kenny McCormack) writes:

    > In article <>,
    > Antoninus Twink <> wrote:
    >>Look, what the hell is your problem? I don't have Asberger's, OK.

    >
    > I never said you did.
    >
    > Here's the deal. Although you have posted a perfectly reasonable C-related
    > question to a newsgroup called (gasp!) comp.lang.c, you will find out
    > very soon that nobody here ever discusses anything interesting relating
    > to C programming. About 75% of the traffic is endless meta-discussion
    > (such as this post); about 20% is nominally on-topic but trivial
    > (example: the thread about call-by-value, which is basic, basic C that
    > any textbook would cover) and about 5% language lawyering (which is
    > technically both on-topic and non-trivial, but, alas, only interesting
    > to about 6 people in the world).
    >
    > So, everytime somebody posts something interesting (which, in the
    > terminology of the regulars here is pronounced "off topic"), it sets off
    > a feeding frenzy of the hardcores calling your post "off topic". As a
    > form of satire, I like to do my part, and try especially hard to be the
    > first in.
    >
    > Finally, the wiki URLs are, IMHO, required reading for understanding the
    > whacky culture of this ng. Through the years, many have commented on
    > the amazing similarity between the observed psyches of the hardcores in
    > the NG and the symptoms described in the Asbergers article. We are, of
    > course, not psychiatrists, nor do we even claim to play them on the net,
    > but the similarity is nonetheless there. This does not, of course,
    > constitute a diagnosis.
    >
    > Finally, let me advise you that you will find that the makeup of this
    > group can be summarized as:
    > 1) About 6 (or so) hardcores
    > 2) Another 6 (or so) HC sycophants
    > 3) About 3 or 4 contrarians (also known as "trolls") - of which
    > I count myself a member.


    members=members++?

    > 4) An endless supply of newbies (presumably, the category in
    > which you fall)
    >
    Richard, Jul 29, 2007
    #19
  20. Antoninus Twink

    Richard Guest

    Richard Heathfield <> writes:

    > Malcolm McLean said:
    >
    >>
    >> "Kenny McCormack" <> wrote in message
    >> news:f8g52n$cp$...
    >>> Finally, let me advise you that you will find that the makeup of this
    >>> group can be summarized as:
    >>> 1) About 6 (or so) hardcores
    >>> 2) Another 6 (or so) HC sycophants
    >>> 3) About 3 or 4 contrarians (also known as "trolls") - of which
    >>> I count myself a member.
    >>> 4) An endless supply of newbies (presumably, the category in
    >>> which you fall)
    >>>

    >> Well I give up. I'm clearly not a 4, but which of 1, 2, 3 do I go in?

    >
    > None of the above. Mr McCormack's summary, like most of what he posts,
    > is incorrect.


    Which part? It seemed like a reasonable assessment of this NG from where
    I am sitting.

    ps, Using a "debugger" which, I read in this NG , is unnecessary
    "for any competent C programmer".
    Richard, Jul 29, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Smythe
    Replies:
    3
    Views:
    1,225
    Jeff Smythe
    Jan 2, 2004
  2. Floris van Haaster

    Project management / bug management

    Floris van Haaster, Sep 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,229
    Jon Paal
    Sep 23, 2005
  3. pouet
    Replies:
    2
    Views:
    737
    Will Hartung
    Jul 30, 2004
  4. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,250
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  5. Jazzis
    Replies:
    2
    Views:
    232
    Jazzis
    Sep 23, 2003
Loading...

Share This Page