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

World: r3wp

[Linux] group for linux REBOL users

Graham
22-Mar-2008
[2046]
cp -u /source/* /target/ 

is a lot shorter than writing it in REBOL.
Anton
27-Mar-2008
[2047x2]
Did anyone find a method to determine if a file is actually a symlink 
?
I'm trying to fix my recursive file searcher. My wine installation 
creates some symlinks which point up to a parent directory, creating 
an infinite loop.
btiffin
27-Mar-2008
[2049]
I'd start with get-modes ... 'file-modes  but I can't test from here 
on Win98
Anton
27-Mar-2008
[2050]
I'll try it.
btiffin
27-Mar-2008
[2051]
and then 'port-modes and ???
Anton
27-Mar-2008
[2052]
file-modes doesn't seem to have anything

>> print mold new-line/all/skip get-modes %Desktop get-modes %Desktop/ 
'file-modes on 2
[
    status-change-date: 26-Mar-2008/12:29:33+11:00
    modification-date: 26-Mar-2008/12:29:33+11:00
    access-date: 27-Mar-2008/13:29:25+11:00
    owner-name: "anton"
    group-name: "anton"
    owner-id: 1000
    group-id: 1000
    owner-read: true
    owner-write: true
    owner-execute: true
    group-read: true
    group-write: false
    group-execute: true
    world-read: true
    world-write: false
    world-execute: true
    set-user-id: false
    set-group-id: false

    full-path: %/home/anton/.wine/dosdevices/c:/windows/profiles/anton/Desktop
]
btiffin
27-Mar-2008
[2053]
You could look to 'copy-modes but I doubt it

Otherwise you'll need to call/info with one of the bash test commands. 
  -h I think.
Anton
27-Mar-2008
[2054x2]
That would need to be done for every file and would slow down the 
filesearch considerably.
Thanks for the ideas.
btiffin
27-Mar-2008
[2056]
in that case, I'd shell script the tests and then  call/output  it
Anton
27-Mar-2008
[2057x3]
That's an idea. But you have to admit it's messy.
It would be much nicer if rebol could find out this information directly.
I'm going to check RAMBO.
btiffin
27-Mar-2008
[2060]
Yep. yep.  Good.  :)
Anton
27-Mar-2008
[2061]
submitted a Wish
btiffin
27-Mar-2008
[2062]
Yeah if you do go bash, (I'm not sure how you get your file list) 
ls -F will append @ to links instead of looping over test -h
Anton
27-Mar-2008
[2063]
I'm not sure I want to pursue that route at the moment. It makes 
for more brittle code. But I will note it down if there is no alternative.

I've noticed that the Windows build running in Wine seems to be "immune" 
to symbolic links (which I think just makes an access error, and 
be ignored.)
Graham
29-Mar-2008
[2064]
On gnome, you have this system tray which on Ubuntu is at the top 
right.  Anyone know how to place an icon there as in windows?
Gabriele
29-Mar-2008
[2065]
i bet there's some CORBA involved ;)
Kaj
29-Mar-2008
[2066x2]
It's just a panel. Right-click on a panel and choose Add to add applets 
to them
If you mean how to write such an applet, you'll have to look up the 
documentation. It's probably done in C and there are likely some 
bindings to languages such as Python
Graham
29-Mar-2008
[2068x2]
and Rebol ?
Isn't this a little inconsistent?

dir? %/root
== true
read %/root
== ""
read %/root/
== [ %.bashrc ..... etc ]
BrianH
29-Mar-2008
[2070]
Yeah. That second example should fail.
Robert
30-Mar-2008
[2071x4]
Any SSH / OpenVPN experts here? I have a little strange problem. 
I run my SSHD on port 443, so that I can connect to it via a HTTPS 
proxy. Than I use "dynamic portforwarding" to tunnel all kind of 
applications through the SSH connect.
The setup works but from time to time the port forwarding is stalling. 
The forwarded connection is initiated (I can't check if it's made 
successfully ) but that's it. It hangs. Than after some time (a couple 
of days) it's working without any problems.
My problem is, I don't know how I can track down the problem. The 
logs don't contain anything.
BTW: The hanging happens even for connection to "localhost". But 
those connections are resolved via the machine name and a DNS lookup. 
The DNS server is operated by an external provider.
Izkata
30-Mar-2008
[2075x2]
Graham's talking about the Notification Area applet, not gnome-panel 
itself

And as far as I know, it's not doable yet.
I have some C code that creates an icon in there, but nothing more.
Graham
30-Mar-2008
[2077x2]
If I wish to upgrade/replace the binary I am currently running, and 
I am running it from a symlink, can I just overwrite the target file?
or do I need to use a shell script ?
BrianH
30-Mar-2008
[2079]
If you know what the target file is, then you can overwrite it if 
you have the permissions. Finding out what the target file is may 
need a shell command though.
Graham
30-Mar-2008
[2080x2]
I can overwrite it while I'm running it?
Windows won't allow that for encapped apps.
Anton
31-Mar-2008
[2082x2]
A test in which RM is used to delete itself.
$ which rm
/bin/rm
$ mkdir test
$ cp /bin/rm test/
$ cd test
$ ls -l
total 36
-rwxr-xr-x 1 anton anton 34600 2008-03-31 16:43 rm
$ ./rm rm
$ ls -l
total 0
So it looks quite possible for a binary to delete the file it came 
from.
I'm using Kubuntu.
Gabriele
31-Mar-2008
[2084x2]
yes, in most operating system you can unlink a file while it's being 
used. the file will disappear from the directory structure but will 
still be taking space on disk as long as it's being used. as soon 
as all the references to it go away, the disk space is freed.
of course Windows has to be an exception.
Anton
1-Apr-2008
[2086x3]
Does anyone have any methods for limiting process resource utilization 
?

I have two situations in linux where (single-core) CPU is maxxed 
out, which makes it very slow to manipulate desktop environment, 
open process manager etc.
The first case is Thunderbird, which maxxes cpu sometimes.

The second case is developing with rebol linux build. It sometimes 
goes ballistic, eating memory like there's no tomorrow. Pretty soon 
the system is paging madly and it's very difficult to analyse the 
situation and shut it down.
My first solution is to use Monit to monitor a particular process 
and automatically take action when it uses too much memory etc.
Anybody tried something else ?
Oldes
1-Apr-2008
[2089x2]
yes... I call stats quite often.. it's part of my test function which 
also counts time required to eval the script I test. If there is 
momory is expanding, I know, that something is wrong in the script 
quite soon. (but I code almost in core, in view it can be more difficult)
but maybe it's not exactly what you want:)
Kaj
1-Apr-2008
[2091x2]
Use Syllable. :-) It gives scheduling priority to the user interface
We've had bugs with some applet using 100% CPU that people didn't 
notice for a long while because it didn't affect operation :-)
Anton
1-Apr-2008
[2093x2]
stats - inside rebol. Hmm.. that could help sometime, but I'm looking 
for something that can restrict any linux app.
I just read about AppArmor being used more in Ubuntu 8.04 HardyHeron. 
I will look into that.
btiffin
1-Apr-2008
[2095]
Anton; look at   nice