Change Wallpaper In Linux Using Java

Discussion in 'Java' started by Stewart Berman, Jun 3, 2008.

  1. Warning: Newbie

    I am trying to get familiar with Java as a desktop application
    development tool. I wrote a small application that allows the user to
    select a set of images (bitmaps and jpegs), order them, set the
    display time interval for each and have them rotate through as Windows
    wallpaper. This started as a port from Visual Basic 6 and then I
    decided that it was better to start over and separate the GUI from the
    Code.

    It works fine under Windows using a JNI dll.

    Now, what do I need to do to make it work under Linux? Is there
    support for Linux dependent code in Java or do I need to create the
    equivalent of the Windows JNI dll but for Linux? If so, is there a
    how to or at least a sample of interface between Java and native
    Linux?
     
    Stewart Berman, Jun 3, 2008
    #1
    1. Advertising

  2. Stewart Berman

    Daniel Pitts Guest

    Stewart Berman wrote:
    > Warning: Newbie
    >
    > I am trying to get familiar with Java as a desktop application
    > development tool. I wrote a small application that allows the user to
    > select a set of images (bitmaps and jpegs), order them, set the
    > display time interval for each and have them rotate through as Windows
    > wallpaper. This started as a port from Visual Basic 6 and then I
    > decided that it was better to start over and separate the GUI from the
    > Code.
    >
    > It works fine under Windows using a JNI dll.
    >
    > Now, what do I need to do to make it work under Linux? Is there
    > support for Linux dependent code in Java or do I need to create the
    > equivalent of the Windows JNI dll but for Linux? If so, is there a
    > how to or at least a sample of interface between Java and native
    > Linux?


    Please be patient. This isn't some simple forum where you need to
    "boost" your message after some time. Many people read this newsgroup
    from many different timezones. Most of the regular readers *will*
    eventually see your message. The few regular readers that know the
    answer will be more likely to give you the answer (or a lead) if you
    don't "spam" the group.

    Good luck,
    Daniel.
    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Jun 3, 2008
    #2
    1. Advertising

  3. On Jun 3, 2:13 pm, Daniel Pitts
    <> wrote:
    ...
    > Please be patient.  


    That is good advice, but I suspect the OP
    reposted the question due to an unfortunate
    'spellchecker incident'. There is one word
    different between the two posts - and it had
    me shaking my head in bemusement.

    --
    Andrew T.
    PhySci.org
     
    Andrew Thompson, Jun 3, 2008
    #3
  4. I discovered an amusing misspelling in my post and sent a cancel
    followed by a reposting of the message with the correct spelling. It
    appears that this news group ignores the cancel request.

    In any advent, can you please answer the question?

    Daniel Pitts <> wrote:

    >Stewart Berman wrote:
    >> Warning: Newbie
    >>
    >> I am trying to get familiar with Java as a desktop application
    >> development tool. I wrote a small application that allows the user to
    >> select a set of images (bitmaps and jpegs), order them, set the
    >> display time interval for each and have them rotate through as Windows
    >> wallpaper. This started as a port from Visual Basic 6 and then I
    >> decided that it was better to start over and separate the GUI from the
    >> Code.
    >>
    >> It works fine under Windows using a JNI dll.
    >>
    >> Now, what do I need to do to make it work under Linux? Is there
    >> support for Linux dependent code in Java or do I need to create the
    >> equivalent of the Windows JNI dll but for Linux? If so, is there a
    >> how to or at least a sample of interface between Java and native
    >> Linux?

    >
    >Please be patient. This isn't some simple forum where you need to
    >"boost" your message after some time. Many people read this newsgroup
    >from many different timezones. Most of the regular readers *will*
    >eventually see your message. The few regular readers that know the
    >answer will be more likely to give you the answer (or a lead) if you
    >don't "spam" the group.
    >
    >Good luck,
    >Daniel.
     
    Stewart Berman, Jun 4, 2008
    #4
  5. Stewart Berman

    Daniel Pitts Guest

    Stewart Berman wrote:
    > I discovered an amusing misspelling in my post and sent a cancel
    > followed by a reposting of the message with the correct spelling. It
    > appears that this news group ignores the cancel request.
    >
    > In any advent, can you please answer the question?

    Please don't top-post. Hard to follow makes the conversation says Yoda.

    Also, no, I can't answer the question, because I don't know the answer.
    Chances are that it depends greatly on the environment used, wither it
    be Gnome, KDE, or some other windowing system. I suggest checking on a
    Linux newsgroup on how to do it programatically in general, and then try
    to figure out how to apply that in Java.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Jun 6, 2008
    #5
  6. The reason I top post is that Agent opens posts at the top not the
    bottom. So people that do not need to see the entire email chain can
    view only the most recent additions.

    Does your use group reader open the post at the bottom?

    Daniel Pitts <> wrote:

    >Stewart Berman wrote:
    >> I discovered an amusing misspelling in my post and sent a cancel
    >> followed by a reposting of the message with the correct spelling. It
    >> appears that this news group ignores the cancel request.
    >>
    >> In any advent, can you please answer the question?

    >Please don't top-post. Hard to follow makes the conversation says Yoda.
    >
    >Also, no, I can't answer the question, because I don't know the answer.
    > Chances are that it depends greatly on the environment used, wither it
    >be Gnome, KDE, or some other windowing system. I suggest checking on a
    >Linux newsgroup on how to do it programatically in general, and then try
    >to figure out how to apply that in Java.
     
    Stewart Berman, Jun 16, 2008
    #6
  7. Stewart Berman

    Arne Vajhøj Guest

    Stewart Berman wrote:
    > The reason I top post is that Agent opens posts at the top not the
    > bottom. So people that do not need to see the entire email chain can
    > view only the most recent additions.
    >
    > Does your use group reader open the post at the bottom?


    No.

    But usenet convention is still oldest content at top and
    newest content at bottom, so that reading down is
    chronological.

    Arne
     
    Arne Vajhøj, Jun 16, 2008
    #7
  8. Stewart Berman <Stewart[RemoveToUse]> writes:

    > The reason I top post is that Agent opens posts at the top not the
    > bottom.


    My reader puts my cursor at the top too, but that's in the message
    header, so I don't write there.
    Don't be a slave to your software. Be a slave to convention!

    > So people that do not need to see the entire email chain can
    > view only the most recent additions.


    It's not email (it's Usenet messages), and you shouldn't include the
    entire chain of messages, but only enough to give context to your
    reply.

    Top posting and full-quoting are two separate netiquette sins, but
    they often support each other.

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jun 16, 2008
    #8
  9. Stewart Berman

    Daniel Pitts Guest

    Stewart Berman wrote:
    > The reason I top post is that Agent opens posts at the top not the
    > bottom. So people that do not need to see the entire email chain can
    > view only the most recent additions.
    >
    > Does your use group reader open the post at the bottom?

    It opens it at the top, but I would rather press space or page-down a
    couple of times to see the context, if I haven't been following a
    thread, than to read a thread backwards.

    Also, it is the preferred and common practice in, at least this
    particular newsgroup, to reply inline, or at least bottom.

    This is not an email chain, this is a newsgroup. Often times, replies
    *only* make sense if you know the immediate predecessor.

    Thanks for explaining your reason. It makes sense to some degree, but
    not here.

    Thanks,
    Daniel.
    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Jun 16, 2008
    #9
  10. "Stewart Berman" <Stewart[RemoveToUse]> wrote in message
    news:...
    > The reason I top post is that Agent opens posts at the top not the
    > bottom. So people that do not need to see the entire email chain can
    > view only the most recent additions.


    Yes, and that's email, where it makes good sense.

    > Does your use group reader open the post at the bottom?


    Mine don't. Even if it's a dedicated newsreader, there is no default cursor
    start location that works most of the time, let alone all of the time. Where
    you actually start quoting - at the bottom, interspersed and near the top,
    interspersed and in the middle, etc. - combined with the snipping you ought
    to be doing to make the message more intelligible, means that a default
    cursor right at the start makes as much sense as anything else. For me it is
    more useful than opening at the bottom.

    Point being, having the reply draft open at the top doesn't mean I start
    typing there.

    [ SNIP ]

    AHS
     
    Arved Sandstrom, Jun 16, 2008
    #10
  11. Arne Vajhøj <> wrote:

    >Stewart Berman wrote:
    >> The reason I top post is that Agent opens posts at the top not the
    >> bottom. So people that do not need to see the entire email chain can
    >> view only the most recent additions.
    >>
    >> Does your use group reader open the post at the bottom?

    >
    >No.
    >
    >But usenet convention is still oldest content at top and
    >newest content at bottom, so that reading down is
    >chronological.
    >
    >Arne


    The convention is due to the type of equipment originally used.

    There is an experiment that goes like this:

    Put eight monkeys in a room with a table. Tie a bunch of bananas
    above the table. Whenever a monkey jumps on the table to get to the
    bananas hose all of them down with ice water. After a while none of
    the monkeys will jump on the table. Replace a monkey. As soon as the
    new monkey starts to climb the table the others with stop it -- by
    force if necessary. Keep replacing the monkeys. Eventually none of
    the monkeys in the room will ever have been sprayed with ice water but
    they will stop a new monkey from climbing onto the table. Why --
    because they have always done it that way.

    If I read a news group every day and have already read the thirty
    messages in the thread I don't need to page down to the bottom to see
    the last one.

    Do you really re-read the thirty prior quotes posted in a long
    message? No. You scroll to the bottom and then up to find the first
    one you haven't read.

    It is easier if the new information is at the top. But "we've always
    done it this way" stops people from doing it better. I am a little
    surprised to find java programmers in that category but I guess it has
    been around long enough for several groups of monkeys to have passed
    through.

    I guess being new to this -- having only started when the bug in a
    relay was real -- I am not constrained as much by meaningless
    conventions. But I will try and remember it for the older readers in
    this news group.

    BTW, no one has actually provided any useful information. The
    discussion has only been about form -- not substance. I guess that
    must also be a java news group tradition.
     
    Stewart Berman, Jun 18, 2008
    #11
  12. Lew <> wrote:

    >Stewart Berman wrote:
    > > Long diatribe justifying why he won't be polite enough to avoid top-posting.

    >
    >When in Rome, ...
    >
    >You have been asked courteously to follow the courtesy conventions of this
    >group. You have tried to justify your refusal. Those from whom you seek
    >advice will not need to justify why they won't answer; you can just recall
    >your refusal to be nice.


    I didn't refuse to be nice. I even bottom posted my last response.

    I merely pointed out the fact that all of the responses I received
    (which are now up to ten) were only concerned with the format of my
    replies and not with providing any response to my original request for
    information. They appeared to be designed to stop anyone from
    climbing up on the table with information.

    I thought my original request was phrased reasonably.

    I apologize for wasting this much bandwidth and will seek the
    information I need elsewhere.

    There is no need to reply unless you wish to discuss this amongst
    yourselves. The signal to noise ratio of this thread is zero and I do
    not expect it to improve.
     
    Stewart Berman, Jun 18, 2008
    #12
  13. On Jun 18, 2:41 pm, Stewart Berman
    <Stewart[RemoveToUse]> wrote:
    > Lew <> wrote:

    ...
    > >You have been asked courteously to follow the courtesy conventions of this
    > >group.  

    ...
    > I didn't refuse to be nice.  I even bottom posted my last response.


    While the subject seems to have come up.
    'Bottom posting' is the same in a lot of ways,
    but (ironically) worse* than top-posting.

    How about 'in-line with trim' - take out
    every part of earlier messages no longer
    immediately relevant, then put the reply
    directly below it?

    > I merely pointed out the fact that all of the responses I received
    > (which are now up to ten) were only concerned with the format of my
    > replies ...(snip)


    "First things first" is (I think) the principal
    you are observing here. People will decide if
    they can help on the technical matter the very
    moment this matter of posting is sorted to their
    satisfaction.

    I can agree with that principal, and have applied
    it many times myself. Occasionally it led to a
    poster drifting off before we got to the details
    of the interesting tech. problem, but so be it.
    If they cannot manage to communicate effectively,
    I have better things to do.

    * See this page for more details
    <http://pscode.org/javafaq.html#toppost>

    --
    Andrew Thompson
    http://pscode.org/
     
    Andrew Thompson, Jun 18, 2008
    #13
  14. Stewart Berman <Stewart[RemoveToUse]> writes:

    [setting the system wallpaper from Java]
    > It works fine under Windows using a JNI dll.


    No doubt, anything that can be done by a windows application can
    also be done by a windows application run from Java.

    > Now, what do I need to do to make it work under Linux? Is there
    > support for Linux dependent code in Java or do I need to create the
    > equivalent of the Windows JNI dll but for Linux?


    To use JNI on Linux, you need a loadable library. Probably a .so file.
    Check the documentation of Runtime.load:
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#load(java.lang.String)

    I'd consider using a command line program through Runtime.exec instead.

    > If so, is there a how to or at least a sample of interface between
    > Java and native Linux?


    JNI on Linux (or any other platform) works just like windows JNI. It
    just uses that platforms linkable library format.

    /L
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jun 18, 2008
    #14
  15. Stewart Berman

    Arne Vajhøj Guest

    Stewart Berman wrote:
    > Arne Vajhøj <> wrote:
    >> Stewart Berman wrote:
    >>> The reason I top post is that Agent opens posts at the top not the
    >>> bottom. So people that do not need to see the entire email chain can
    >>> view only the most recent additions.
    >>>
    >>> Does your use group reader open the post at the bottom?

    >> No.
    >>
    >> But usenet convention is still oldest content at top and
    >> newest content at bottom, so that reading down is
    >> chronological.

    >
    > The convention is due to the type of equipment originally used.


    Actually not.

    There are no technical difference in reading usenet now and
    20 years ago that justifies a change.

    > If I read a news group every day and have already read the thirty
    > messages in the thread I don't need to page down to the bottom to see
    > the last one.


    I think that is the core of the problem.

    You know that you have read all messages, so you you do not see
    it as a problem.

    And **** all the other readers that may not have read all
    the messages - you do not care.

    That egocentric attitude is not the "usenet way".

    > It is easier if the new information is at the top. But "we've always
    > done it this way" stops people from doing it better. I am a little
    > surprised to find java programmers in that category but I guess it has
    > been around long enough for several groups of monkeys to have passed
    > through.
    >
    > I guess being new to this -- having only started when the bug in a
    > relay was real -- I am not constrained as much by meaningless
    > conventions. But I will try and remember it for the older readers in
    > this news group.
    >
    > BTW, no one has actually provided any useful information. The
    > discussion has only been about form -- not substance. I guess that
    > must also be a java news group tradition.


    You need to be rather stupid to expect that you can compare people
    with monkeys and still expect them to spend time trying to help
    you.

    Arne
     
    Arne Vajhøj, Jun 19, 2008
    #15
    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. Replies:
    5
    Views:
    1,099
  2. Nikos 'paranic' Parastatidis

    Change Wallpaper Application

    Nikos 'paranic' Parastatidis, Jun 11, 2004, in forum: C++
    Replies:
    3
    Views:
    4,917
    John Carson
    Jun 13, 2004
  3. Terrance N. Phillip

    System Independent Wallpaper Changer

    Terrance N. Phillip, Jul 6, 2005, in forum: Python
    Replies:
    4
    Views:
    488
    Terrance N. Phillip
    Jul 6, 2005
  4. Stewart Berman

    Change Wallpaper In Linux Using Java

    Stewart Berman, Jun 3, 2008, in forum: Java
    Replies:
    0
    Views:
    597
    Stewart Berman
    Jun 3, 2008
  5. Andrew Valkenburg

    wallpaper

    Andrew Valkenburg, Jan 11, 2004, in forum: Javascript
    Replies:
    2
    Views:
    91
Loading...

Share This Page