r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Linux] group for linux REBOL users

BrianH
10-Mar-2011
[4064]
For R3, all graphics are done with AGG. Don't know yet about the 
font support on Linux.
MaxV
10-Mar-2011
[4065]
May you explain me why this works under Linux and no font PATH is 
requested? 
REBOL [
	title: "SW-like scroller by Cyphre"
	author: [cyphre-:-seznam-:-cz]
]

scr-size: 640x220
scrl: scr-size * 0x1
c1: scrl
c2: as-pair scr-size/x / 2.5 scr-size/y / 5
c3: as-pair scr-size/x - (scr-size/x / 2.5) c2/y

view/new layout [
	origin 0

 bx: box scr-size effect [draw [] gradcol 0x-1 sky black] with [feel: 
 none]
]

while [not empty? system/view/screen-face/pane][
	scrl/2: scrl/2 - 1

 img: to-image t-face: make face [edge: none color: black size: scr-size 
 text: system/license font: make font [size: 20 style: 'bold color: 
 white] para: make para [scroll: scrl]]
	if scrl/y < - second size-text t-face [
		scrl/y: c1/y
	]
	bx/effect/draw: [
		pen black
		fill-pen black
		box 0x0 scr-size
		image img c2 c3 scr-size c1
	]
	show bx
	wait 0
]

???????
Cyphre
10-Mar-2011
[4066x2]
To clarify the 'font issue' a bit:

In REBOL2 there are two different 'font engines':
engine1:  is used when you set face/text field
engine2:  is used when you use face/effect: [draw [text "..."]]


On Windows both engines use the same OS functions for the font handling. 
Therefore no differencies are seen at the script level. 


On Linux the Engine1 us using some X-windows api and the Engine2 
is using FreeType2 library. 

The X-windows font api doesn't support antialiasing and the font 
output in general is not so nice (depending on the distro).

The FreeType2 lib has better font quality output and also supports 
antialiasing but you have to know the full-path to the font file.


Currently noone suggested any efficient method how to get the 'font 
path' in unified way (considering the 'mess' between different Linux 
distros). 

When I tried to investigate a bit someone pointed me to the FontConfig 
lib that should take care of this problem on Linux. But:

1. I don'r know if the fontconfig is really widely supported and 
what other 'framewrorks' are possible on the rest of distros that 
don't have fontconfig...

2. I don't know how easy/hard is to get the info from fontconfig, 
havent studied it

3. as I said I'm not using Linux for desktop stuff so it is nto my 
high-priority item.


Another solution is to intorduce something like global font-path 
in the Rebol system object which would be used for the font lookup. 
This variable could be set individually by user or author of the 
rebol program. We could also provide some font-name/type->font-file 
matching table but that would take some research as well and won't 
work for all setups. But at least something.


So If anyone here from the 'Linux power users' group knows a good 
solution or even propose a prototype of the solution I believe Carl 
will be glad for your help.
MaxV: regarding the example question above: the answer is easy: in 
this example the font is rendered using the 'Engine1' (see the msg 
above) then the output is cvonverted to bitmap(image) and the image 
is rendered as texture using perspective  transformation. So in the 
end the 'Engine2' is not used in the example in any way.
MaxV
10-Mar-2011
[4068x2]
I noticed a difference between Linux and Windows:
Widndows: ?  system/view/vid/vid-styles/text/font    == "arial"

Linux: ?  system/view/vid/vid-styles/text/font    == "helvetica" 
 
Is it normal?
However Mandriva, Suse/Novell, Fedora/RedHat, Ubuntu use the followings:
/usr/X11R6/lib/X11/fonts/truetype/feefont
/usr/share/fonts/truetype/freefont
I think it could be fixed.
Cyphre
10-Mar-2011
[4070]
font differences: ofcourse Arial doesn't exist on Linux...unless 
you install MS fonts. See my note about  'matching table'...such 
stuff is definitely needed.
MaxV
10-Mar-2011
[4071x3]
Or an alert message "/usr/share/fonts/... not found!"
Even helvetica doesn't exist!
Copyright Adobe 1994-1997
Cyphre
10-Mar-2011
[4074]
MaxV: It's all about writin a proposal 'how to solve the font issues 
on Linux' then it can be discussed in some more serious way and in 
the end it can be implemented in future releases of R2. So there 
is nothing that blocks you to do the research and propose a solution.
MaxV
10-Mar-2011
[4075]
OK
Cyphre
10-Mar-2011
[4076]
But as I see from your wondering about different font names etc. 
I feel you are realizing this won't be an easy task ;) Anyway, if 
you want to be helpful, just go for it!
Andreas
10-Mar-2011
[4077x4]
http://behdad.org/text/may provide some interesting background reading
i fear you'll be hard-pressed to come up with a very general solution
fontconfig is to the best of _my_ knowledge the most wide-spread 
thing you can use
(for discovering fonts, that is)
Cyphre
10-Mar-2011
[4081]
As I said I have neither time nor personal need to become 'linux 
font master' so in fact I'm not 'pressed' by anything ;) I'll left 
this part to others.
Andreas
10-Mar-2011
[4082]
that was more directed towards massimiliano than towards you :)
Cyphre
10-Mar-2011
[4083x2]
ah...I owerlooked the name..you have almost identical 'nick color' 
! :)
so no I realized I'm talkind to you, Andreas :))
Andreas
10-Mar-2011
[4085]
:)
Robert
30-Mar-2011
[4086]
I want to use PK authentification with SSH from my client account 
but be able to use two or more different logins. So, one PK for Username-A, 
one for Username-B etc.


How do I set this up? How do I have to name my local private keys 
in that SSH will find them? How and where to store the public keys 
on the server?
MaxV
30-Mar-2011
[4087x2]
I don't think you should care about that, just use:
username-a: "my_string"
username-b: "my_other_string"
call (reform [ "ssh" username-a   mycommands etc] )

However ssh stores files in 
~/.ssh/authorized_keys
See http://support.suso.com/supki/SSH_Tutorial_for_Linux
Andreas
30-Mar-2011
[4089x4]
The public keys are stored in $HOME/.ssh/authorized_keys for the 
respective users
Key-based SSH authentication is most convenient when used in combination 
with an "ssh agent" that holds the private keys and (temporarily) 
stores their passphrase
You can then just load multiple keys into your SSH agent, and all 
of them will be tried for authentication
So, as Max says, no need to associate usernames with keys in that 
keys (besides setting up $HOME/.ssh/authorized_keys correctly)
Robert
30-Mar-2011
[4093]
Ok, thanks. So do you know a SSH agent for OSX? Or is there a standard 
SSH agent CLI tool?
Andreas
30-Mar-2011
[4094]
the osx keychain should work for you
Robert
30-Mar-2011
[4095]
Ok, giving all this a try and let you know :-)
Andreas
30-Mar-2011
[4096]
http://www.dribin.org/dave/blog/archives/2007/11/28/ssh_agent_leopard/
might help :)
Robert
9-Apr-2011
[4097x7]
When I have setup a portforwarding via SSH, how can I get rid of 
it?
And some more questions: I have a server that listens on port 44000 
in a VM. The VM is using NAT network. The VM NAT router is configured 
to forward port 44000 from the outside to the VM IP on port 44000.
When I use telnet localhost 44000 on the system the VM runs I get 
a connection but the listening server doesn't recognizses it as a 
connection.
When I use: ssh -L 44000:192.168.22.1:44000 [user-:-my_vm_server-:-com], 
from a remote machine, the SSH tunnel is setup and the login is done 
on my_vm_server.com
When I use telnet localhost 44000 from my_vm_server.com than, the 
connection is done and the listen server recognizes it.
When I use telnet localhost 44000 from the remote machine, which 
should tunnel through the SSH channel and forward to 192.168.22.1:44000 
on my_vm_server.com, I get a connection but the listen server doesn't 
recognize it...
Any idea, why the TCP/IP connections from the remote machines are 
not recognized?
Andreas
10-Apr-2011
[4104]
When I have setup a portforwarding via SSH, how can I get rid of 
it?


Close the SSH session or, if using OpenSSH, use ~C to enter the client's 
command-line and remove the (remote) forwarding with -KR<port>. You 
can't remove local forwardings this way, afaik.
Robert
10-Apr-2011
[4105]
Ok, thanks.
ddharing
15-Apr-2011
[4106]
The latest version of REBOL/View does NOT run on Ubuntu 11 Beta. 
I've tried it on two different machines. You get the old "Bad face 
in screen panel" error.


Does anyone have any ideas about what may be the problem? Ubuntu 
10.10 is fine.
Maxim
15-Apr-2011
[4107]
could it be no x11 installed ?
Izkata
15-Apr-2011
[4108]
Ubuntu is going to introduce Wayland, a replacement for X11, but 
from what I'm reading it shouldn't be default in 11.04
ddharing
15-Apr-2011
[4109]
I'm running Ubuntu Desktop. I've tried it on two laptops -- both 
with and without Unity.
GrahamC
15-Apr-2011
[4110x2]
did you check libraries?
ldd
Gabriele
16-Apr-2011
[4112]
might also just be missing bitmap fonts.
ddharing
16-Apr-2011
[4113]
I'll look into it. Thanks.