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

World: r3wp

[Linux] group for linux REBOL users

Robert
30-Jun-2008
[2196]
I already googled but there isn't really a lot available...
Robert
5-Jul-2008
[2197]
Any XEN or network configuration gurus here? I have setup a XEN system 
but have some problems with the network configuration.
Alan
22-Jul-2008
[2198x2]
for anybody who uses Windows and Linux on the same box, this program 
allows you to read/write to each other.You will need to have any 
other usb/external hds plugged in before installing
get it here :   http://home.comcast.net/~amiga/Ext2.exe
Louis
3-Aug-2008
[2200]
I've read many docs but can't get cron to work. I'm editing the table 
with gcrontab. The cron prossess is running. There are no error messages, 
but my rebol script simply does not run. Any clues as to why?
PeterWood
4-Aug-2008
[2201]
The two most obvious things are the shebang line in the script and 
file permissions.
Louis
4-Aug-2008
[2202]
Peter, thanks. Is the shebang line absolutely necessary? Here is 
what I had in mind for the crontab line:

0 * * * * /usr/bin/rebview -s -script /home/lat/r/dar/backup.r


When I use a shebang line a permissions request dialog pops up even 
though I have secure set to allow.
PeterWood
4-Aug-2008
[2203x2]
Probaby not if you as you are running Rebol and supplying the scriptname 
as an arg.
I don't think that you need the -script, have you tried

/usr/bin/rebview -s /home/lat/r/dar/backup.r ?
Louis
4-Aug-2008
[2205x2]
I'll try that, but there are other problems showing up now, not related 
directly to cron.
When I run the script from the command line, sudo asks for permissions. 
The script must ask me nothing so that it can run unattended.
Henrik
4-Aug-2008
[2207]
sudo will ask, if you are using sudo. that's not the script itself 
doing that.
Louis
4-Aug-2008
[2208]
Yes, I know. I forgot about that and put sudo in the script. I can 
take sudo out easy enough, but then the script won't be able to make 
directories. How can the script run as root without having to ask 
me for a password?
Henrik
4-Aug-2008
[2209]
I think you need to set that particular cron job for the root user. 
I'm not sure you can switch user level inside your current user to 
root inside a cron job.
Louis
4-Aug-2008
[2210]
How do I do that?
Henrik
4-Aug-2008
[2211]
su root and edit its crontab. you must be the user you want to edit 
the crontab for, AFAIK.
Louis
4-Aug-2008
[2212x2]
Oh, ok. I'll try that.
su root is not accepting my password. Is that bad news or what?
Henrik
4-Aug-2008
[2214]
it must be the root password
Louis
4-Aug-2008
[2215]
I'll have to think about it for awhile, but I don't remember giving 
root a different password from my own. Can I us sudo to change the 
password for root?
Henrik
4-Aug-2008
[2216]
I'm not sure you can. Sudo isn't quite the same user level as root, 
AFAIK.
Louis
4-Aug-2008
[2217]
Is there a default password?
Henrik
4-Aug-2008
[2218]
no. I think it's beyond my expertise now. :-) I have only tried this 
in debian where there is a root user available. some distributions 
are root-less.
Louis
4-Aug-2008
[2219]
Thanks anyway Henrik.  I've been painting myself into a corner alot 
lately.
Henrik
4-Aug-2008
[2220]
are you sure the task you want to do can't be done without resorting 
to root?
Louis
4-Aug-2008
[2221x4]
Pretty sure.  Otherwise I can't make directories.
But then, I quite new to Linux.  I didn't know about su root, for 
example.
I'm learning fast, but there is a lot to learn.  More than one person 
will ever know, I think.
I suppose I could start the script with sudo from the command line, 
have timers in the script, and just leave the script running all 
the time. Would that use up a lot of cpu power?
Henrik
4-Aug-2008
[2225x2]
you should be able to make directories within the same user level, 
if the place where you are trying to make directories has the right 
permissions.
I don't know bash well enough to tell you that :-) but then you will 
have to manage the script yourself, remember to run it again after 
reboot.
Louis
4-Aug-2008
[2227x2]
Thanks, Henrik, I'll try some of these suggestions. I'll let you 
know what happens. However, it may be awhile, as I've just been called 
to eat.
Typing sudo su and then my password solved the password problem.
btiffin
4-Aug-2008
[2229]
Louis; do yourself a favour.  Read up on chmod, chown and chgrp. 
 In particular chmod.  These aren't the easiest of topics at first 
(mainly due to the crap involved with the 1970's octal numbers and 
some poor choice of names).   But after the initial weirdness the 
concepts are really straight forward.  Read, Write, Execute across 
User (the owner), Group, Others (not in group) and All (world).


There is an overlay of weirdness with directories and Execute (create 
a file in the dir) and a special mode bit etc.  But again ... grunt 
through until your brain tells you that you get it.  It's important, 
imho.


Flailing around with sudo and su (and root powers in general) is 
not the safest of ways to run Linux.  Potentially lowers the security 
to the level of your average Windows box ... nearly none.  :)    
 It can seem like a pain sometimes, but it isn't, it's part and parcel 
of a secure os.  BG has tainted the world to think it is inconvenient. 
Much like a lock maker giving everyone the same key.  A stupid "convenience" 
that wouldn't fly when it came to your car or house or bank, but 
PC users have grown up with and expect for reasons I have never understood. 
 (This last part is simple ranting - sorry about that)
Louis
5-Aug-2008
[2230x2]
btiffin, thanks. I like Linux. I did a lot of experimenting when 
I first made the switch, and that helped speed up the learning process. 
There is so much to learn that I doubt that any one person could 
ever know it all, but I've already learned enough to be able to do 
more than I was able to do with windows after many years of use. 
My rant: I hate the Windows registry file!
As for my script, I decided not to use cron. Once I learned how cron 
works, I realized it was not suitable for use with this script. I 
just put a timer in the script, and everything is working great. 
 I was afraid that the timer would take a lot of cpu power, but it 
doesn't even take enough power to be noticable. This also eliminated 
the need to go to root.
btiffin
5-Aug-2008
[2232]
Cool.  As Bill Marley (if there was a Bill Marley) might have sang; 
"No windows, no cry.  Everything's gonna be all right ".


Yes, sleep timers should use next to zero CPU.  And if you need a 
task to be running across boots and crashes, checkout monit.  monit 
is a process monitor (there are others) that I like using as it alleviates 
figuring out the details of the run-levels and init scripts.
Robert
11-Aug-2008
[2233]
Wow, I finished a configuration and setup journey the last couple 
of weeks. Linux is far from being straight-forward to configure... 
but which OS is at all.


Anyway, if someone wants to get some hints about xen, exim, dovecot, 
ssmtp, assp, lighttpd, iptables let me know. I'm now quite good in 
all this... steep learning curve.
Anton
18-Aug-2008
[2234]
Yep, I just spent at least 4 weeks learning how to compile and install 
a video driver in Kubuntu. I had to do a distro upgrade because the 
graphics card I bought was too new for the OS. I became a little 
more proficient in the console over the last four weeks. :)
Anton
24-Aug-2008
[2235]
Janeks, the necessity to type './' before a filename to launch a 
command in the current directory was added for security reasons. 
(You could be tricked into running a different command than expected.) 
I don't recommend changing your path to make it easier, you could 
be bitten one day.
Louis
26-Aug-2008
[2236x6]
The script that I used to build my website un XP is not working under 
Linux. I get:
** Access Error: Cannot open /c/rebol/dayspring/txt2html.r
** Near: do %/c/rebol/dayspring/txt2html.r
I ran chmod -R 775 on that directory, but it didn't help. Any ideas 
what is wrong?
Actually, there are two more lines:
** Access Error: Cannot open /c/rebol/dayspring/txt2html.r
** Near: do %/c/rebol/dayspring/txt2html.r 
t2h %Order-PSH-Printed.txt 
do
>>
I've been using that script for 6 years without a problem, so I suspect 
that this present problem has something to do with Linux.
Anton
26-Aug-2008
[2242x2]
How are you launching your script ?
Have you disabled security using -s ?
Aha. Have you mounted /c/ ?
That was your Windows box C: drive

It could possibly be now mounted at /media/C/  or something like 
that,
otherwise it needs to be mounted manually.
Louis
26-Aug-2008
[2244x2]
Hi Anton! You have a good eye. I'll check that drive C:
I'll let you know what happens, but it will be a few hours. I'm taking 
my wife out to eat to celebrate our 41st wedding anniversary! She 
just let me know she is dressed and ready to go.