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

World: r3wp

[Linux] group for linux REBOL users

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
Anton
1-Apr-2008
[2096]
Good idea, I will see how nice changes things.
btiffin
1-Apr-2008
[2097]
And   priocntl  may help  too
Anton
1-Apr-2008
[2098x2]
Kaj, that is a good feature.
I'll look at priocntl too.
btiffin
1-Apr-2008
[2100]
But a user-oriented scheduler versus a server-oriented scheduler 
(as Kaj mentioned with Syllable already on the crest) will be the 
next wave in Desktop Linux, umm, I hope.
Kaj
2-Apr-2008
[2101x5]
We've been hearing that and similar claims for a decade
Improving one segment of a chain, even if it's the weakest one, only 
exposes the next-weakest
A scheduler is not much use if the rest of the system doesn't present 
meaningful pieces to schedule
Major apps like Thunderbird and REBOL effectively locking the rest 
of the system means that the system is not meaningfully handling 
apps in a concurrent way, so I would venture to say that the scheduler 
has very little if any effect on this
In fact, Syllable used to have a very primitive scheduler and was 
already as responsive as now, except for some corner cases
Anton
4-Apr-2008
[2106x3]
Does mounting a filesystem change anything on the filesystem ?

I'm on Kubuntu and I've taken a new laptop's 80GB internal disk into 
an external drive enclosure and connected it via USB to my computer.
Kubuntu detected it and automounted the filesystem.

My task was to duplicate the disk, in the pursuit of which I've used 
various combinations of dd and gzip.

However, I can't get a straight 80GB image to compare equally (using 
cmp or diff) with a compressed image.

(I decompress the compressed image on the fly and pipe it into cmp.)

After many hours, it occurs to me that having the filesystem mounted 
might be changing it slightly over time... which would make my images 
different. (This would make my mission a failure, as I wanted a pristine 
image.)
So can anyone answer the above question ?
From the depths of my memory comes a blurry message from someone 
who did this exact thing... I think I should have made sure not to 
automount it, and only mount it read-only. :-/
But the evidence collected so far does not support this theory strongly, 
actually... Hmm... It's confusing.
btiffin
4-Apr-2008
[2109]
Linux does track accesstime to files.  So, I'd wouldn't be surprised 
if mounting doesn't touch at least a few bits.
Anton
4-Apr-2008
[2110]
Yes... (damn)... this discussion of atime agrees with that
http://lwn.net/Articles/244829/
btiffin
5-Apr-2008
[2111]
I'm a little bit confused;  I didn't read the dd and gzip part until 
just now.  You want a compressed mirror?  I don't think that will 
ever cmp true to the original.   dd will include partition table 
info that is normally "invisible to the naked eye".  Including that 
in the compressed file doesn't give dd the chance to dump the invisible 
bits back into invisible places.


Or am I more than just a little bit confused?  Maybe Kaj will come 
by shortly and fill us in with the technicals instead of the voodoo. 
 :)