LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I display the weather info. (graphics)on a /dev/tty7 ? (no win.manager) (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-display-the-weather-info-graphics-on-a-dev-tty7-no-win-manager-591676/)

frenchn00b 10-14-2007 07:05 AM

How can I display the weather info. (graphics)on a /dev/tty7 ? (no win.manager)
 
Hi,

I have an idea, to do like boot splash, or this kind of stuffs.
I am using an old machine to play the music (sort of ipod :) ) without X.
I would like to make it show the weather with a graphic and would not want to use any startx or windows manager.

Is that possible ? (I am sure it could be)

svga; I would have idea to use some kind of zgv and refresh it every few minutes, as alternative. (with dowloading the info. links/lynx on the web weather.com)

thanks for any infos

PatrickNew 10-15-2007 12:12 AM

Well, I should say that the links2 graphical mode on svgalib or directfb is really quite good. You could just write a script that loads "links2 -g http:://weather.page.whatever" every few minutes.

frenchn00b 10-15-2007 01:08 AM

Quote:

Originally Posted by PatrickNew (Post 2924370)
Well, I should say that the links2 graphical mode on svgalib or directfb is really quite good. You could just write a script that loads "links2 -g http:://weather.page.whatever" every few minutes.

Cool idea indeed;
links2 -g http:://weather.page.whatever -driver sgvalib
cant get io permissions

I will try harder today.
Sounds good

thank you !

PatrickNew 10-15-2007 01:16 AM

Indeed, svgalib requires root permissions. You'll need to give it sufficient permissions - specifically root.

P.S. I should add that svgalib drops its root permissions after accessing the hardware, so you don't actually wind up with a web-connected browser running as root.

frenchn00b 10-15-2007 12:53 PM

Quote:

Originally Posted by PatrickNew (Post 2924414)
Indeed, svgalib requires root permissions. You'll need to give it sufficient permissions - specifically root.

P.S. I should add that svgalib drops its root permissions after accessing the hardware, so you don't actually wind up with a web-connected browser running as root.

from itself : http://www.svgalib.org/svgalib.user.faq.html

Code:

Why does a programs terminate immediatelly with "svgalib: Cannot get I/O permissions."?

svgalib programs need to be run as root. This means that either the user that runs them is root, or, if running by normal users is desirable, the program needs to be 'suid root', which means: the program must be owned by root (chown 0 program) and the suid bit needs to be set (chmod u+s program).

chmod +s is not working anymore (in 2007; taht was security problems)

Would not it be other alternative ? hmmm
of
Code:

chmod 666 /dev/ somethign ?
maybe.... (?)

frenchn00b 10-15-2007 02:09 PM

I found alternative

curl to get the page, then,
convert page.htm page.jpg

but resolution is crap and you get 10-15 jpeg files ... which one is the one, or maybe a mergign ... hmm

frenchn00b 10-15-2007 02:40 PM

That s cool !

http://www.terminally-incoherent.com...day-without-x/

shitty for twin : http://jrandomhacker.info/Twin

frenchn00b 10-15-2007 03:00 PM

Code:

Chmod 666 /dev/fb0
says not found ...

hm hm
Quote:


rm -f /dev/fb0autodetect
rm -f /dev/fb1
mknod /dev/fb1 c 29 1
chmod 666 /dev/fb1

PatrickNew 10-15-2007 03:06 PM

Well, if you use the directFB backend instead of the svgalib backend, I don't think you'll have any problems - I don't think it needs root privileges. But then you need to set up a framebuffer.

If you want to suid root, there are a couple things to check. First, do a 'ls -l' to ensure that links2 is owned by root. Suid will have it run with the permissions of its owner, but the owner ought to be root. However, are you sure you wouldn't want it run as a cron job running as root? A setuid browser is rather insecure to have laying around.

frenchn00b 10-15-2007 03:12 PM

try this sounds good, but but
Code:

apt-get install libggi-target-fbdev
Code:

rm -f /dev/fb0autodetect
rm -f /dev/fb1
mknod /dev/fb1 c 29 1
chmod 666 /dev/fb1


not working

frenchn00b 10-15-2007 03:16 PM

Update:

ZGV can write in the ttyX consoles
but not LINKS2 ...

hmmmm

working hard on it;...

frenchn00b 10-15-2007 03:19 PM

FBDEV(4)
NAME
fbdev - video driver for framebuffer device

SYNOPSIS
Section "Device"
Identifier "devname"
Driver "fbdev"
BusID "pci:bus:dev:func"
...
EndSection

DESCRIPTION
fbdev is an Xorg driver for framebuffer devices. This is a non-accel-
erated driver, the following framebuffer depths are supported: 8, 15,
16, 24. All visual types are supported for depth 8, and TrueColor
visual is supported for the other depths. Multi-head configurations
are supported.

SUPPORTED HARDWARE
The fbdev driver supports all hardware where a framebuffer driver is
available. fbdev uses the os-specific submodule fbdevhw(4) to talk to
the kernel device driver. Currently a fbdevhw module is available for
linux.

CONFIGURATION DETAILS
Please refer to xorg.conf(5) for general configuration details. This
section only covers configuration details specific to this driver.

For this driver it is not required to specify modes in the screen sec-
tion of the config file. The fbdev driver can pick up the currently
used video mode from the framebuffer driver and will use it if there
are no video modes configured.

For PCI boards you might have to add a BusID line to the Device sec-
tion. See above for a sample line. You can use " -scanpci" to figure
out the correct values.

The following driver Options are supported:

Option "fbdev" "string"
The framebuffer device to use. Default: /dev/fb0.

Option "ShadowFB" "boolean"
Enable or disable use of the shadow framebuffer layer. Default:
on.

Option "Rotate" "string"
Enable rotation of the display. The supported values are "CW"
(clockwise, 90 degrees), "UD" (upside down, 180 degrees) and
"CCW" (counter clockwise, 270 degrees). Implies use of the
shadow framebuffer layer. Default: off.

SEE ALSO
Xorg(1), xorg.conf(5), xorgconfig(1), Xserver(1), X(7), fbdevhw(4)

AUTHORS
Authors include: Gerd Knorr, Michel Dänzer, Geert Uytterhoeven



X Version 11 xf86-video-fbdev 0.3.1

frenchn00b 10-15-2007 03:22 PM

Xorg.conf to be modified??


I found this
here
Code:


Section "Device"
        Identifier        "Builtin Default fbdev Device 0"
        Driver        "ati"
EndSectionSection "Device"
        Identifier        "Builtin Default fbdev Device 0"
        Driver        "ati"
EndSectionSection "Device"
        Identifier        "Builtin Default fbdev Device 0"
        Driver        "ati"
EndSection


frenchn00b 10-15-2007 03:24 PM

Video
If you want to the hardware acceleration, who does not, please enable the following options
Code:

Character device
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
<*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver) --->


[TODO]
In Dell 700m specification, this machince can be configured as 64 MB shared video memory. Anybody knows HOW?

Framebuffer and Fbsplash
Please refer to fbsplash howto:
If you want the splash eye-candy, we need to patch the kernel manually:
Code:

$ wget http://dev.gentoo.org/~spock/project...6.12-rc3.patch ./
$ cd /usr/src/linux
$ patch -p1 --dry-run < /path/to/fbsplash-0.9.2-r3-2.6.12-rc3.patch
# if everything is OK,
$ patch -p1 < /path/to/fbsplash-0.9.2-r3-2.6.12-rc3.patch


For Dell 700m users, we can use vesafb, vesafb-tng, intelfb or i810fb as well,
UPDATE: We are going to use intelfb, since it is the developed to support 855GM chipset.
Code:

<*> VESA VGA graphics support
VESA driver type (vesafb-tng) --->
(1024x768-24@72) VESA default mode
<*> Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)[*] Support for the framebuffer splash


After you upgrade your kernel, remember to re-emerge the splashutils.
And enable them when booting:
Code:

# cat /boot/grub/grub.conf
root@getnoo bookstack # cat /boot/grub/grub.conf
splashimage=(hd0,0)/grub/gentoo.xpm.gz
# For booting GNU/Linux
title GNU/Linux
root (hd0,0)
kernel (hd0,0)/kernel-2.6.12-love1 root=/dev/hda2 video=intelfb:ywrap,mtrr 1024x768-16@70 splash=silent,fadein,theme:emergence CONSOLE=/dev/tty1 resume2=swap:/dev/hda5
initrd (hd0,0)/fbsplash-emergence-1024x768


Now, reboot the machine and enjoy the beauty of frame buffer.
If you build the links and mplayer with "directfb fbcon" enabled, you could surf the web and play video in the console mode:
Code:

# USE="fbcon directfb" emerge links mplayer
# /etc/init.d/gpm start
$ links2 -g www.google.com
$ mplayer -vo fbdev foo.avi

[TODO]
links would crash in some website, if you can figure it out, please let me know.
How to zoom the mplayer's video to full screen?

frenchn00b 10-15-2007 03:41 PM

you can note the fight :
now here : http://links.twibright.com/user_en.html


All times are GMT -5. The time now is 04:20 PM.