A seemingly simple project...

A seemingly simple project...

Post by Michael Larte » Fri, 07 Mar 2003 10:15:26



Warning: I'm a Windows C/C++ programmer venturing into the Linux world for
the very first time.  I cannot be held responsible for the goofy questions
I'm inclined to ask.  <grin>

OK, here's what I'm trying to build...very simple really.  A program which
a) cycles through a series of graphic images (from my digital camera),
stored in some pre-defined format (JPEG or GIF); b) connects to my home
server via a LAN connection (and preferably via HTTP or FTP) and downloads
the latest photos on a pre-scheduled basis (every night, for example).  This
will be for mutliple units, by the way.  Pretty simple sounding stuff!

Here's what I've tried thus far:
1) Installed Mandrake Linux on an old(er) machine (Pentium-class).
2) Wrote a program using Qt on my Windows box (an environment I'm still
comfortable in)
3) Copied that onto the Linux box...no joy.  Something to do with an
XServer.  Wasn't quite sure how to start XServer w/o starting the whole GUI
(which I DON'T want).  I just want the whole screen to be the images like a
photograph.
4) Downloaded Embedded/Qt and compiled it...w/all their examples.  This is
supposed to bypass the XServer stuff and write directly to a 'framebuffer'
(I finally figured out what that was yesterday). When I ran the examples
from the linux prompt, got the message(s) "unable to open framebuffer".
Can't recompile the Linux kernal because there's no source code on the hard
disk.  Thinking, maybe Mandrake isn't what I want/need.

Here's what I'd like to know...
1) What Linux distrubution is simplest to setup/use for a project such as
this?  Mandrake seems like overkill.
2) How should I write to the screen?  Qt?  Qt Embedded? Others?
3) I read a couple of projects where a browser/server were setup and used on
the same machine...that sounded like an interesting approach...  Would that
be easier?  Browser (Dillo)?  Server (???) ?  How do you 'control' the
browser so it'll cycle through the photos?

Thanks for tolerating me!
Michael

 
 
 

A seemingly simple project...

Post by Oliver Fel » Fri, 07 Mar 2003 17:21:15



> Warning: I'm a Windows C/C++ programmer venturing into the Linux world for
> the very first time.  I cannot be held responsible for the goofy questions
> I'm inclined to ask.  <grin>

Having read this it is not goof at all.

Quote:> Here's what I've tried thus far:
> 3) Copied that onto the Linux box...no joy.  Something to do with an
> XServer.  Wasn't quite sure how to start XServer w/o starting the whole
> GUI
> (which I DON'T want).  I just want the whole screen to be the images like
> a photograph.

Oh well- I believe you did compile and link it again on Linux and you only
copied the sources ? (Stupid question, I know, but who knows people have
sometimes interesting expectations :-)

The Qt library requires X11 (XF86) as the basic system to be set up and
running somewhere. Another approach could be to have it running on a
different machine and just export the display if this is possible- which I
doubt according to your descriptions.

The next step here is much better- using qt/e

Quote:> 4) Downloaded Embedded/Qt and compiled it...w/all their examples.  This is
> supposed to bypass the XServer stuff and write directly to a 'framebuffer'
> (I finally figured out what that was yesterday). When I ran the examples
> from the linux prompt, got the message(s) "unable to open framebuffer".
> Can't recompile the Linux kernal because there's no source code on the
> hard disk.  Thinking, maybe Mandrake isn't what I want/need.

Theoretically the step was well thought. Qt/Embedded is the version which
does not run under X but directly writes into the framebuffer.
Unfortunately for you and your task, most desktop distributions (like
propably Mandrake, RedHat, etc.) are relying on X as graphical environment-
the reason is clear, a desktop system needs a graphical environment (mostly
KDE and Gnome, fvwm, and others) which are not supposed to be run directly
on the framebuffer.
So kernel support is often disabled for resource reasons.
There is another problem coming with this approach- input/output has to be
handled. There is nothing like a mouse pointer to press on some buttons,
keyboard typematic handlers coping with keyboard layouts, etc.
Fortunately, Qt/E takes some of those tasks but they have to be coped with.

Quote:> Here's what I'd like to know...
> 1) What Linux distrubution is simplest to setup/use for a project such as
> this?  Mandrake seems like overkill.

I believe linuxdevices.com has somepointers to various embedded
distributions which might be useful.
Also, freshmeat.net might be your friend here.

Quote:> 2) How should I write to the screen?  Qt?  Qt Embedded? Others?

In this case you need an embedded framework and Qt/E seems to be appropriate
as you already have the knowledge.
Beware, using it for commercial purposes requires a license. IIRC the
Windows version definitely requires a license no matter what the purpose
is.

Quote:> 3) I read a couple of projects where a browser/server were setup and used
> on the same machine...that sounded like an interesting approach...  Would
> that be easier?  Browser (Dillo)?  Server (???) ?  How do you 'control'
> the browser so it'll cycle through the photos?

For the browser, you still need a graphical putput on the computer which
brings us back to problem a) ;-)

Quote:> Thanks for tolerating me!

No problem- we could have ignored you instead of tolerating, but what is
that good for ? ;-)

Oliver
--
_____________________________________________
Oliver Fels
Feed manager/Coordination
Project OPIE- the Open Palmtop Integrated Environment
http://opie.handhelds.org | http://www.opie.info (german)
IRC: irc.freenode.net #opie #opie.de

 
 
 

A seemingly simple project...

Post by Michael Larte » Sat, 08 Mar 2003 01:32:14


How about just writing to the framebuffer directly myself?  Is that an
option?  Is there some documenation somewhere about doing that?

Thanks, Oliver!

Mike



> > Warning: I'm a Windows C/C++ programmer venturing into the Linux world
for
> > the very first time.  I cannot be held responsible for the goofy
questions
> > I'm inclined to ask.  <grin>

> Having read this it is not goof at all.

> > Here's what I've tried thus far:

> > 3) Copied that onto the Linux box...no joy.  Something to do with an
> > XServer.  Wasn't quite sure how to start XServer w/o starting the whole
> > GUI
> > (which I DON'T want).  I just want the whole screen to be the images
like
> > a photograph.

> Oh well- I believe you did compile and link it again on Linux and you only
> copied the sources ? (Stupid question, I know, but who knows people have
> sometimes interesting expectations :-)

> The Qt library requires X11 (XF86) as the basic system to be set up and
> running somewhere. Another approach could be to have it running on a
> different machine and just export the display if this is possible- which I
> doubt according to your descriptions.

> The next step here is much better- using qt/e

> > 4) Downloaded Embedded/Qt and compiled it...w/all their examples.  This
is
> > supposed to bypass the XServer stuff and write directly to a
'framebuffer'
> > (I finally figured out what that was yesterday). When I ran the examples
> > from the linux prompt, got the message(s) "unable to open framebuffer".
> > Can't recompile the Linux kernal because there's no source code on the
> > hard disk.  Thinking, maybe Mandrake isn't what I want/need.

> Theoretically the step was well thought. Qt/Embedded is the version which
> does not run under X but directly writes into the framebuffer.
> Unfortunately for you and your task, most desktop distributions (like
> propably Mandrake, RedHat, etc.) are relying on X as graphical
environment-
> the reason is clear, a desktop system needs a graphical environment
(mostly
> KDE and Gnome, fvwm, and others) which are not supposed to be run directly
> on the framebuffer.
> So kernel support is often disabled for resource reasons.
> There is another problem coming with this approach- input/output has to be
> handled. There is nothing like a mouse pointer to press on some buttons,
> keyboard typematic handlers coping with keyboard layouts, etc.
> Fortunately, Qt/E takes some of those tasks but they have to be coped
with.

> > Here's what I'd like to know...
> > 1) What Linux distrubution is simplest to setup/use for a project such
as
> > this?  Mandrake seems like overkill.

> I believe linuxdevices.com has somepointers to various embedded
> distributions which might be useful.
> Also, freshmeat.net might be your friend here.

> > 2) How should I write to the screen?  Qt?  Qt Embedded? Others?

> In this case you need an embedded framework and Qt/E seems to be
appropriate
> as you already have the knowledge.
> Beware, using it for commercial purposes requires a license. IIRC the
> Windows version definitely requires a license no matter what the purpose
> is.

> > 3) I read a couple of projects where a browser/server were setup and
used
> > on the same machine...that sounded like an interesting approach...
Would
> > that be easier?  Browser (Dillo)?  Server (???) ?  How do you 'control'
> > the browser so it'll cycle through the photos?

> For the browser, you still need a graphical putput on the computer which
> brings us back to problem a) ;-)

> > Thanks for tolerating me!

> No problem- we could have ignored you instead of tolerating, but what is
> that good for ? ;-)

> Oliver
> --
> _____________________________________________
> Oliver Fels
> Feed manager/Coordination
> Project OPIE- the Open Palmtop Integrated Environment
> http://opie.handhelds.org | http://www.opie.info (german)
> IRC: irc.freenode.net #opie #opie.de

 
 
 

A seemingly simple project...

Post by Lewin A.R.W. Edwar » Sat, 08 Mar 2003 02:26:27


Quote:> OK, here's what I'm trying to build...very simple really.  A program which
> a) cycles through a series of graphic images (from my digital camera),
> stored in some pre-defined format (JPEG or GIF); b) connects to my home
> server via a LAN connection (and preferably via HTTP or FTP) and downloads

LOL... You could just buy one from us <http://www.digi-frame.com/>.

Quote:> 3) Copied that onto the Linux box...no joy.  Something to do with an
> XServer.  Wasn't quite sure how to start XServer w/o starting the whole GUI
> (which I DON'T want).  I just want the whole screen to be the images like a
> photograph.

If you just want to run your program, then xinit path/myprogram.

Quote:> (I finally figured out what that was yesterday). When I ran the examples
> from the linux prompt, got the message(s) "unable to open framebuffer".

Sounds like this program requires the console framebuffer device.

Quote:> Can't recompile the Linux kernal because there's no source code on the hard
> disk.  Thinking, maybe Mandrake isn't what I want/need.

I'm not familiar with Mandrake but if you want kernel sources visit
www.kernel.org.

Quote:> 1) What Linux distrubution is simplest to setup/use for a project such as
> this?  Mandrake seems like overkill.

Any desktop distribution is overkill, but on the other hand an
embedded distribution will require more detailed understanding of
Linux than you seem to have right now (not meant to be offensive, just
pointing this out...).

I think your best bet is to take a consummately user-friendly
distribution and just not worry about all the extra stuff it dumped on
your hard drive. Try Red Hat 8.0.

Quote:> 2) How should I write to the screen?  Qt?  Qt Embedded? Others?

Whatever you find easier to program. Your application doesn't appear
to require any great performance or small memory footprint or other
serious constraint.

Quote:> 3) I read a couple of projects where a browser/server were setup and used on
> the same machine...that sounded like an interesting approach...  Would that

You can set up an HTML-based slideshow with a JavaScript or Java
program in the homepage, or even with the low-tech http-equiv refresh
tag. Actually you can probably pull source for a Javascript slideshow
right off the web. Maybe that's the easiest route for you.
 
 
 

A seemingly simple project...

Post by Roger Larsso » Sat, 08 Mar 2003 06:43:18



> How about just writing to the framebuffer directly myself?  Is that an
> option?  Is there some documenation somewhere about doing that?

> Thanks, Oliver!

> Mike

No you can't if you do not have a framebuffer driver module in kernel.
Check if there are a installable package for frame buffer.
What graphics card do you have? All cards do not have frame buffers.

You did compile the program on the Mandrake computer, didn't you?

The tip from Lewin A.R.W. Edwards should be concidered (the frames are
cool!)
$ xinit /path/myprogram
(myprogram compiled for X)

/RogerL

--
Roger Larsson
Skellefte?
Sweden

 
 
 

1. Something Seemingly Simple.

I just tried a simple trig thing on my Linux box but the gcc compiler gave me
some error, despite having math.h added as the libraries. More bizarre, my
UNIX ISP had exactly the same problem with the same seemingly simple proggie.

I'm fully sure it's a stupid=shit problem on my part. Here's the code:


float angle, hypoteneuse, output;
main()
{
printf("input the angle");
scanf("%f", &angle);
printf("input the hypoteneuse");
scanf("%f", &hypoteneuse);
output = cos(angle);
printf("%f\n", output);
---end code---

When I try to compile it, the gcc compiler gives out wierd errors, not, say
syntax errors or the like. What's wrong? Is it my not making the cos thing
right or what? Trig has some significant uses is real life, not just for a
case of a school going ape-shit over math. With trig use, it is possible with
needed equipment to reverse engineer glasses prescriptions, ballistics, etc.

For clues, here are the wierd errors:
---begin---
/tmp/cca262191.o: In function 'main':
/tmp/cca252191.o(.text+0x51): undefined reference to 'cos'
---end error---

I'm runnin' Slackware 3.0 with the 2.0.0 kernel, which is awful ancient by
now. I have a Slackware 7.2 album ready to use, so if I have to upgeade I
can.  I would like to see a solution in this case so I can carry it onto the
upgrade. Trig has become "strategic" and I want my computer to do it.

I'm fully sure that it is misconfigured as of now and my discovery awaited
my need for trig use.

--
FOOD FOR THOUGHT: 100 calories are used up in the course of a mile run.
The USDA guidelines for dietary fibre is equal to one ounce of sawdust.
The liver makes the vast majority of the cholesterol in your bloodstream.

2. Remove file system

3. seemingly simple problem, FRUSTRATION!

4. 3COM 3C574 PCMCIA Problems

5. Simple End User Linux Project

6. Program to mimick a Logbook

7. Announce: Simple End-User Linux (SEUL) Project

8. Printing PS or DVI on dot-matrix...

9. Simple End User Linux Project

10. beowulf project simple newbie question

11. Wanted: project tracking software (simple will do)

12. Project Management Software for *nix similar to MS Project?

13. Secure Linux Project/ Exokernel Project???