Session management

A

Antoninus Twink

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!
 
W

Walter Roberson

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.
 
K

Kenny McCormack

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:
 
M

Malcolm McLean

Kenny McCormack said:
IOW:

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

Useful clc-related links:
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.
 
A

Antoninus Twink

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!
 
K

Kenny McCormack

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:
 
S

santosh

Antoninus said:
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 <and
<hierarchies, perhaps like
<news:comp.os.linux.development.apps>
 
M

Malcolm McLean

Antoninus Twink said:
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.
 
W

Walter Roberson

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.
 
K

Kenny McCormack

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)
 
R

Richard Heathfield

Malcolm McLean said:
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.
 
K

Keith Thompson

Malcolm McLean said:
news:[email protected]... [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.
 
K

Keith Thompson

Antoninus Twink said:
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.
 
M

Malcolm McLean

Kenny McCormack said:
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?
 
R

Richard Heathfield

Malcolm McLean said:
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.
 
K

Kenny McCormack

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.
 
R

Richard

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)
 
R

Richard

Richard Heathfield said:
Malcolm McLean said:


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".
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top