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

World: r3wp

[Linux] group for linux REBOL users

Henrik
31-Mar-2010
[3582]
If you click on the send button N times, it will submit the message 
N times. Not a great feature.
Barik
31-Mar-2010
[3583]
Yeah, I hit enter and nothing happened, so I thought it was stuck. 
Looks like it was just busy doing something in the background and 
queueing up my enters.
Henrik
31-Mar-2010
[3584x2]
I prefer enabling the little pencil. That moves sending to Ctrl-S 
and allows you to enter multiple lines of text.
About your font problem: It's been a while, but do you have the correct 
fonts installed? I'm not sure which ones are needed.
Barik
31-Mar-2010
[3586x2]
This is a stock CentOS 5.4 install running GNOME. Not sure which 
fonts are needed. However, things like h1, h2 in vid do change the 
font size of the text, but using font-size with say the text command 
does nothing.
Same simple script on Windows works just fine.
Henrik
31-Mar-2010
[3588]
do the fonts look pixellated when using large fonts?
Barik
31-Mar-2010
[3589]
Yes.
Henrik
31-Mar-2010
[3590x2]
ok, some fonts are missing, then. I think you need to install the 
default X11 fonts for it to work.
If it doesn't work, then I have no solution.
Barik
31-Mar-2010
[3592]
I have X11 fonts installed (I think):  xorg-x11-fonts-base-7.1-2.1.el5, 
xorg-x11-fonts-truetype-7.1-2.1.el5, etc..
Henrik
31-Mar-2010
[3593x2]
ok
it may help if you switch to a particular font. the X11 fonts are 
bitmapped fonts AFAIK and if there are no fonts in between in a particular 
size, it will look bad.
Barik
31-Mar-2010
[3595x2]
For example, using font-name?
Any way to see within REBOL which fonts it does see?
Henrik
31-Mar-2010
[3597x2]
if you look at face/font, you can see the specs for the font
I'm not sure. It makes a distinction between sans, serif and mono 
fonts, but beyond that it uses some built-in default names, if the 
font requested, can't be found.
Barik
31-Mar-2010
[3599x2]
Interesting. On Windows I get Arial by the default, in Linux it looks 
like it picked Helvetica.
Where is the default specified and how is it obtained?
Henrik
31-Mar-2010
[3601]
I don't know, but:

? font

and:

source set-font

look a little interesting
Izkata
31-Mar-2010
[3602x2]
? face/font
IIRC, 'face is a generic face used for creating the others in VID
Ashley
31-Mar-2010
[3604x2]
It's set in this snippet of code in %gfx-object.r

set [font-serif font-sans-serif font-fixed] any [
	select [
		1 ["CGTimes" "CGTriumvirate" "LetterGothic"]
		2 ["times" "arial" "courier new"]
		3 ["times" "arial" "courier new"]
		5 ["baskerville" "zurich" "courier10 bt"]
	] system/version/4
	["times" "helvetica" "courier"]
]
Use this to determine which [scaleable] fonts are available:

			fonts: copy []
			call/output "fc-list" s: copy ""
			s: parse/all s ":^/"
			foreach [fn style] s [
				all [
					not find fonts fn

     (size-text make face [text: "A" font: make font [name: fn size: 10]]) 
     <>

     size-text make face [text: "A" font: make font [name: fn size: 12 
     style: 'bold]]
					insert tail fonts fn
				]
			]
Barik
1-Apr-2010
[3606x2]
How does the 'browse' command in REBOL now which browser to open 
a URL in? I can't seem to get it to open any browser at the moment.
know
Graham
1-Apr-2010
[3608x2]
Windows or Linux?
Oh ... you have to define which browser for Linux
Barik
2-Apr-2010
[3610]
Yes, in Linux. How do you define the browser?
Andreas
2-Apr-2010
[3611x2]
Barik: replace browse with
browse: func [
    "Open web browser to a URL or local file"
    url [url! file!]
] [
    if file? url [url: to-local-file url]
    call join "xdg-open " probe url
]
Ahem, maybe even without the probe :):
---
browse: func [
    "Open web browser to a URL or local file"
    url [url! file!]
] [
    if file? url [url: to-local-file url]
    call join "xdg-open " url
]
---
Barik
2-Apr-2010
[3613]
I see. So basically override the native browse function with something 
else.
Gregg
2-Apr-2010
[3614]
I don't remember when, but the SET-BROWSER-PATH function was removed 
at some point.
Gabriele
3-Apr-2010
[3615]
i think that BROWSE is calling "netscape" or something like that... 
so it's also possible to create a shell script with that name.
Andreas
3-Apr-2010
[3616]
R3's BROWSE is currently calling "open" on Linux, as far as I know. 
It should probably call "xdg-open", until then, symlinking xdg-open 
to e.g. /usr/local/bin/open should also do as a workaround.
Graham
3-Apr-2010
[3617]
wasn't "SET-BROWSER-PATH function was removed at some point." that 
to stop non pro users accessing call functionality?  And if so, it 
should now be reinstated.
Andreas
3-Apr-2010
[3618]
I think that's also about the only reason why BROWSE is a native 
at all. With CALL generally available, I think BROWSE should really 
be a mezz.
Janko
18-Apr-2010
[3619]
I can't seem to make user.r or rebol.r execute on startup on Linux
BrianH
18-Apr-2010
[3620x3]
There's some kind of REBOLHOME environment variable that you need 
to set to the directory containing those files, iirc. Don't remember 
the exact spelling, it might be REBOL-HOME or something.
It would only execute on startup of /Core, /View, /Command or /Command/View 
though, not /Base, /Pro or /Face.
This is all R2 of course.
Izkata
18-Apr-2010
[3623]
I don't have any environment variable set, and my user.r is running 
fine in ~/.rebol/view/user.r (for View 2.7.6)
BrianH
18-Apr-2010
[3624x3]
Guess I don't recall correctly :(
Wait, that is the HOME directory. That is a fallback that is checked 
after looking for REBOL-HOME.
And the last fallback is the current directory (on Windows, someone 
should test this on Linux). Not very secure.
Janko
18-Apr-2010
[3627]
It seems env. variables can't have - on linux? I tried REBOLHOME 
and REBOL_HOME without lucj so far
BrianH
18-Apr-2010
[3628x2]
Unfortunately R2 only does the search for %rebol.r and %user.r once, 
not once each. This means that you can't have a %rebol.r in REBOL-HOME 
and a %user.r in HOME, so it's not very secure or multi-user friendly. 
Fixed in R3 though: %rebol.r is only loaded from the same directory 
as the executable, nowhere else, no environment variables necessary.
Apparently it's supposed to be spelled REBOL_HOME, and it needs to 
be a full path.
Janko
18-Apr-2010
[3630x2]
I can't get anything to run today as it is supposed to :/
I tried every combination I could think of

export REBOL_HOME=/usr/share/cheyenne/ (this is how I set variable, 
and without _ and without export and as string)