[gentoo-user] Adding more than one static IP

2011-01-24 Thread Amar Cosic
Hello list

My mind is just locked at the moment and I am trying to figure out what am
I doing wrong here. I have 4 static IP's on server machine and I have
something like this in /etc/conf.d/net :



config_eth0=( 77.xxx.104.14/24 )
routes_eth0=( default via 77.xxx.104.1 )
config_eth0:1=( 77.xxx.104.100/24 )
routes_eth0:1=( default via 77.xxx.104.1 )
config_eth0:2=( 77.xxx.104.101/24 )
routes_eth0:2=( default via 77.xxx.104.1 )
config_eth0:3=( 77.xxx.105.100/24 )
routes_eth0:3=( default via 77.xxx.105.1 )


eth0 works just fine while other ones fail. Could you help me with this one
?


ty.

--
Amar Ćosić
amar.co...@gmail.com


Re: [gentoo-user] Adding more than one static IP

2011-01-24 Thread Alan McKinnon
Apparently, though unproven, at 17:15 on Monday 24 January 2011, Amar Cosic 
did opine thusly:

 Hello list
 
 My mind is just locked at the moment and I am trying to figure out what
 am I doing wrong here. I have 4 static IP's on server machine and I have
 something like this in /etc/conf.d/net :
 
 
 
 config_eth0=( 77.xxx.104.14/24 )
 routes_eth0=( default via 77.xxx.104.1 )
 config_eth0:1=( 77.xxx.104.100/24 )
 routes_eth0:1=( default via 77.xxx.104.1 )
 config_eth0:2=( 77.xxx.104.101/24 )
 routes_eth0:2=( default via 77.xxx.104.1 )
 config_eth0:3=( 77.xxx.105.100/24 )
 routes_eth0:3=( default via 77.xxx.105.1 )
 
 
 eth0 works just fine while other ones fail. Could you help me with this one

You have aliased three additional IPs to a NIC. You cannot add routes to those 
aliases, only individual IP addresses.

You will either have to come up with a routing scheme that routes_eth0 fully 
satisfies or pony up the cash for three NIC cards.

I'd go for option 2 - NICs are dirt cheap.


-- 
alan dot mckinnon at gmail dot com



[gentoo-user] Re: [cookbook] grub2 for idiots like me PART 2

2011-01-24 Thread walt

On 01/23/2011 02:28 PM, walt wrote:

Okay, I genuinely have grub2 installed and doing exactly what it's
supposed to do: boot your machine using only partition LABELS, not
device names/numbers...


If you got through part 1 you should have all the files you need to
install grub2 to your drive's boot block -- that's the part that is
potentially dangerous, so practice installing to a USB thumb drive
*before* you try it for real.

All of my USB thumb drives were formatted FAT16 at the factory, and
grub2 (being a bit of a pig) won't fit in a FAT16 partition table.

The answer is to reformat the drive to FAT32 or ext2, or you can use
a tool like gparted to shrink the FAT16 fs and create a new very tiny
partition for ext2.  Even 3MB is big enough to hold grub -- the size
of the file system isn't important -- it's the partition table that's
too small in FAT16.

Assume you have the ext2 partition of the thumb drive mounted on
/mnt/floppy, for example, and the thumb drive is /dev/sdc.

For the actual install you need to be root because you will be
writing to the device as well as the ext2 fs on the device.

# mkdir -p /mnt/floppy/boot/grub
# /home/walt/sbin/grub-install --boot-directory=/mnt/floppy/boot/ /dev/sdc

That second step will write the actual grub2 boot block to the thumb
drive, as well as copying lots of grub modules to /mnt/floppy/boot/grub
from /home/walt/lib/grub/i386-c.

All of those grub 'modules' contain the actually code that does things
like print the boot menu on your screen and accept keystrokes from
your keyboard, search for partition LABELs, UUIDs, display boot splash
screens, play idiotic tunes, load custom fonts and fancy colors, and
tons of other stuff you won't ever want if you're still sane.

That should be enough to let you boot into the grub2 shell from your
thumb drive, assuming you set your BIOS to allow it.

Just like legacy grub, the grub2 command shell will always show you
what you can type next if you hit the tab key -- and there is quite
a long list.

The important commands to learn are 'ls', 'search', 'probe', 'help',
and 'linux'.  That 'linux' command is what actually loads your kernel
from the /boot partition after you have located it with the search
and (possibly) the probe commands.

Use the help command and the tab key whenever you don't know what to
do next.  You'll pick it up very quickly that way -- far faster than
trying to read any of the incomplete documentation.

One very clueful tool is the brand new utility 'grub-menulst2cfg' which
you should find in your ~/bin directory.  Running that on your existing
/boot/grub/menu.lst will show you the equivalent commands for your new
/boot/grub/grub.cfg file.  Very neat, and isn't included in the current
stable grub-1.98.

Once you play with the grub2 command shell you will easily see how to
use the same commands in grub.cfg because the syntax is the same.

Next time I'll explain how to use GPT (GUID Partition Table) to let
your kernel find and mount your root partition using its UUID without
an initrd.  Very nifty!




Re: [gentoo-user] Adding more than one static IP

2011-01-24 Thread Graham Murray
Amar Cosic amar.co...@gmail.com writes:

 Hello list

 My mind is just locked at the moment and I am trying to figure out
 what am I doing wrong here. I have 4 static IP's on server machine
 and I have something like this in /etc/conf.d/net :



 config_eth0=( 77.xxx.104.14/24 )
 routes_eth0=( default via 77.xxx.104.1 )
 config_eth0:1=( 77.xxx.104.100/24 )
 routes_eth0:1=( default via 77.xxx.104.1 )
 config_eth0:2=( 77.xxx.104.101/24 )
 routes_eth0:2=( default via 77.xxx.104.1 )
 config_eth0:3=( 77.xxx.105.100/24 )
 routes_eth0:3=( default via 77.xxx.105.1 )


 eth0 works just fine while other ones fail. Could you help me with
 this one ?

Try emerging 'iproute2' (if not already installed) and then adding the
following line to /etc/iproute2/rt_tables
1   altlan


and then using the following in /etc/conf.d/net

modules-iproute2
config_eth0=( 77.xxx.104.14/24 77.xxx.104.100/32 77.xxx.104.101/32
  77.xxx.105.100/24 )
routes_eth0=( default via 77.xxx.104.1
  default via 77.xxx.105.1 table altlan
  77.xxx.105.0/24 table altlan )
rules_eth0=( from 77.xxx.105.100 table altlan )

postup() {
   # This function could be used, for example, to register with a
   # dynamic DNS service.  Another possibility would be to
   # send/receive mail once the interface is brought up.
   # Here is an example that allows the use of iproute rules
   # which have been configured using the rules_eth0 variable.
   #rules_eth0= \
   #   'from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 
100' \
   #   'from 216.113.223.51/32 to 192.168.1.0/24 table localnet 
priority 100' \
   #
   eval set -- $\rules_${IFVAR}
   if [ $# != 0 ]; then
   einfo Adding IP policy routing rules
   eindent
   # Ensure that the kernel supports policy routing
   if ! ip rule list | grep -q ^; then
   eerror You need to enable IP Policy Routing 
(CONFIG_IP_MULTIPLE_TABLES)
   eerror in your kernel to use ip rules
   else
   for x; do
   ebegin ${x}
   ip rule add ${x} dev ${IFACE}
   eend $?
   done
   fi
   eoutdent
   # Flush the cache
   ip route flush cache dev ${IFACE}
   fi
}

postdown() {
#  Automatically erase any ip rules created in the example postup above
   if interface_exists ${IFACE}; then
   # Remove any rules for this interface
   local rule
   ip rule list | grep  iif ${IFACE}[ ]* | {
   while read rule; do
   rule=${rule#*:}   
   ip rule del ${rule}
   done
   }
   # Flush the route cache
   ip route flush cache dev ${IFACE}
   fi

   # Return 0 always
   return 0
}




[gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Jarry

Hi,

I have to change rather complex iptables rules on server
and I do not want to lock me out as this server is about
50 miles away. So how should I do it?

I can back up the old rules by running:
/etc/init.d/iptables save
and it will be saved to /var/lib/iptables/rules-save
(some strange format starting with number like [536:119208])

I prepared a script with new (modified) iptables-rules,
which I will run in bash. But in case I screw something,
how could I force netfilter to load old saved rules,
if I for whatever reason do not connect to server (ssh)?

Or can I load new iptables-rules for certain time, and
then force netfilter to load back the old rules again?

Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Mark Knecht
On Mon, Jan 24, 2011 at 10:47 AM, Jarry mr.ja...@gmail.com wrote:
 Hi,

 I have to change rather complex iptables rules on server
 and I do not want to lock me out as this server is about
 50 miles away. So how should I do it?

 I can back up the old rules by running:
 /etc/init.d/iptables save
 and it will be saved to /var/lib/iptables/rules-save
 (some strange format starting with number like [536:119208])

 I prepared a script with new (modified) iptables-rules,
 which I will run in bash. But in case I screw something,
 how could I force netfilter to load old saved rules,
 if I for whatever reason do not connect to server (ssh)?

 Or can I load new iptables-rules for certain time, and
 then force netfilter to load back the old rules again?

 Jarry


Maybe a cron job that no matter what reloads the old rules 1 hour later?

- Mark



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread kashani

On 1/24/2011 10:59 AM, Mark Knecht wrote:

On Mon, Jan 24, 2011 at 10:47 AM, Jarrymr.ja...@gmail.com  wrote:

Hi,

I have to change rather complex iptables rules on server
and I do not want to lock me out as this server is about
50 miles away. So how should I do it?

I can back up the old rules by running:
/etc/init.d/iptables save
and it will be saved to /var/lib/iptables/rules-save
(some strange format starting with number like [536:119208])

I prepared a script with new (modified) iptables-rules,
which I will run in bash. But in case I screw something,
how could I force netfilter to load old saved rules,
if I for whatever reason do not connect to server (ssh)?

Or can I load new iptables-rules for certain time, and
then force netfilter to load back the old rules again?

Jarry



Maybe a cron job that no matter what reloads the old rules 1 hour later?

- Mark



Yep, that's the way I do it. I'd test that the cron works correctly 
beforehand. Nothing worse than locking yourself out *and* realizing your 
cron has a path issue.


kashani



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Mark Knecht
On Mon, Jan 24, 2011 at 11:06 AM, kashani kashani-l...@badapple.net wrote:
 On 1/24/2011 10:59 AM, Mark Knecht wrote:

 On Mon, Jan 24, 2011 at 10:47 AM, Jarrymr.ja...@gmail.com  wrote:

 Hi,

 I have to change rather complex iptables rules on server
 and I do not want to lock me out as this server is about
 50 miles away. So how should I do it?

 I can back up the old rules by running:
 /etc/init.d/iptables save
 and it will be saved to /var/lib/iptables/rules-save
 (some strange format starting with number like [536:119208])

 I prepared a script with new (modified) iptables-rules,
 which I will run in bash. But in case I screw something,
 how could I force netfilter to load old saved rules,
 if I for whatever reason do not connect to server (ssh)?

 Or can I load new iptables-rules for certain time, and
 then force netfilter to load back the old rules again?

 Jarry


 Maybe a cron job that no matter what reloads the old rules 1 hour later?

 - Mark


 Yep, that's the way I do it. I'd test that the cron works correctly
 beforehand. Nothing worse than locking yourself out *and* realizing your
 cron has a path issue.

 kashani

Maybe first add a rule that won't lock yourself out. Install the new
file, make sure the rule is there, then wait an hour. Make sure the
rule is gone. Make sure the cron logs show the work was done. Go
through a could of reboots and make sure the old rules (or new rules)
come up.

Once all that works going to the new, scary file should be lass scary.

- Mark



Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-24 Thread Bill Longman
On 01/21/2011 09:45 PM, Walter Dnes wrote:
   As soon as some textmode applications in xterm stop, their output gets
 wiped, and the xterm screen is restored to what it looked like before I
 launched the app.  Somebody thought they were being helpful; then
 again, so did the designers of Clippy.  I don't know how many updates
 ago the behaviour changed, but here's what happens...
 
   Let's say I'm having a problem with packet loss to/from a certain
 internet server.  I would run mtr which gives an ongoing enhanced
 traceroute display.  When it gets to the router that's dropping packets
 I would hit Q and mtr quits.
 
 Before the update
 =
   I would copy/paste the mtr output into an email, and send it off to
 whomever, with the output showing the packet-loss stats.
 
 After the update
 
   As soon as mtr quits, its output gets wiped, and the xterm screen is
 restored to the state it was in before mtr was launched... helpful NOT!
 
   I've discovered that I can suspend it with {CTRL-S}, but I shouldn't
 have to resort to that.  Using Google, I found references to
 man termcap, which stated that this behaviour was controlled by
 entries in /etc/termcap.  Despite the fact that I have the termcap man
 page on my system, I do *NOT* have /etc/termcap.  Does anyone have a
 sample /etc/termcap (or will ~/.termcap work?) to stop the screen
 restore after a text application quits?
 

Walter,

You can always call it back up. The other window, that is. Just
Ctrl-middle-click the xterm and choose Show alternate screen.

Presto.

It's saved my bacon more than once

Bill



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Manuel Klemenz
On Monday 24 January 2011 19:59:16 Mark Knecht wrote:
 On Mon, Jan 24, 2011 at 10:47 AM, Jarry mr.ja...@gmail.com wrote:
  Hi,
  
  I have to change rather complex iptables rules on server
  and I do not want to lock me out as this server is about
  50 miles away. So how should I do it?
  
  I can back up the old rules by running:
  /etc/init.d/iptables save
  and it will be saved to /var/lib/iptables/rules-save
  (some strange format starting with number like [536:119208])
  
  I prepared a script with new (modified) iptables-rules,
  which I will run in bash. But in case I screw something,
  how could I force netfilter to load old saved rules,
  if I for whatever reason do not connect to server (ssh)?
  
  Or can I load new iptables-rules for certain time, and
  then force netfilter to load back the old rules again?
  
  Jarry
 
 Maybe a cron job that no matter what reloads the old rules 1 hour later?
 
 - Mark

another option woud be to setup and run a knock deamon (net-misc/knock), if 
that's an option for you. You'd have the advantage not being forced to wait 
for an hour (worst case). On the other hand you must make sure, that none of 
the configured knocking ports are blocked in the infrastructure between you and 
the server. 

-- 
Cheers,
Manuel Klemenz


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread J. Roeleveld
On Monday 24 January 2011 19:47:43 Jarry wrote:
 Hi,
 
 I have to change rather complex iptables rules on server
 and I do not want to lock me out as this server is about
 50 miles away. So how should I do it?
 
 I can back up the old rules by running:
 /etc/init.d/iptables save
 and it will be saved to /var/lib/iptables/rules-save
 (some strange format starting with number like [536:119208])
 
 I prepared a script with new (modified) iptables-rules,
 which I will run in bash. But in case I screw something,
 how could I force netfilter to load old saved rules,
 if I for whatever reason do not connect to server (ssh)?
 
 Or can I load new iptables-rules for certain time, and
 then force netfilter to load back the old rules again?
 
 Jarry

You could add the necessary rule(s) to ensure existing connections stay 
active.
That way you can enable the new rules and test by openening a new SSH-
connection to the server.
If that works, you're ok.
If not, you can use the existing SSH-connection to go back to the old rules.

--
Joost



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Neil Bothwick
On Mon, 24 Jan 2011 10:59:16 -0800, Mark Knecht wrote:

 Maybe a cron job that no matter what reloads the old rules 1 hour later?

Wouldn't at make more sense? You don't want the thing to keep reloading
your old config, at will do it once, and you can remove the task from the
at queue once you successfully log back in.

echo command to reload old rules | at now + 1 hour


-- 
Neil Bothwick

Tact is the intelligence of the heart.


signature.asc
Description: PGP signature


Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Mark Knecht
On Mon, Jan 24, 2011 at 1:50 PM, Neil Bothwick n...@digimed.co.uk wrote:
 On Mon, 24 Jan 2011 10:59:16 -0800, Mark Knecht wrote:

 Maybe a cron job that no matter what reloads the old rules 1 hour later?

 Wouldn't at make more sense? You don't want the thing to keep reloading
 your old config, at will do it once, and you can remove the task from the
 at queue once you successfully log back in.

 echo command to reload old rules | at now + 1 hour


 --
 Neil Bothwick

As a one-off test absolutely.

- Mark



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Mark Knecht
On Mon, Jan 24, 2011 at 2:14 PM, Mark Knecht markkne...@gmail.com wrote:
 On Mon, Jan 24, 2011 at 1:50 PM, Neil Bothwick n...@digimed.co.uk wrote:
 On Mon, 24 Jan 2011 10:59:16 -0800, Mark Knecht wrote:

 Maybe a cron job that no matter what reloads the old rules 1 hour later?

 Wouldn't at make more sense? You don't want the thing to keep reloading
 your old config, at will do it once, and you can remove the task from the
 at queue once you successfully log back in.

 echo command to reload old rules | at now + 1 hour


 --
 Neil Bothwick

 As a one-off test absolutely.


Actually, upon 15 seconds of reflection, what happens if he's locked
out and there's a power failure before the at command executes? When
rebooted I think it won't be there anymore, will it?

- Mark



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Alex Schuster
Neil Bothwick writes:

 On Mon, 24 Jan 2011 10:59:16 -0800, Mark Knecht wrote:
 
 Maybe a cron job that no matter what reloads the old rules 1 hour later?
 
 Wouldn't at make more sense? You don't want the thing to keep reloading
 your old config, at will do it once, and you can remove the task from the
 at queue once you successfully log back in.
 
 echo command to reload old rules | at now + 1 hour

I usually do a
sleep 10m  restore the state
in a screen session. If things are okay and I can login, I re-attach the
screen and cancel the sleep with Ctrl-C. If I cannot login, I have to
wait 10 minutes.

Wonko



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Alan McKinnon
Apparently, though unproven, at 00:14 on Tuesday 25 January 2011, Mark Knecht 
did opine thusly:

 On Mon, Jan 24, 2011 at 1:50 PM, Neil Bothwick n...@digimed.co.uk wrote:
  On Mon, 24 Jan 2011 10:59:16 -0800, Mark Knecht wrote:
  Maybe a cron job that no matter what reloads the old rules 1 hour later?
  
  Wouldn't at make more sense? You don't want the thing to keep reloading
  your old config, at will do it once, and you can remove the task from the
  at queue once you successfully log back in.
  
  echo command to reload old rules | at now + 1 hour
  
  
  --
  Neil Bothwick
 
 As a one-off test absolutely.


There's no such thing as a once-off test :-)

Oh shit, it's still not working after 19 retries, 6 hours work, and extensive 
googling most definitely does exist.

Maybe I'm just paranoid, or maybe I just screwed up myself too many times, but 
I'd feel safer with cron for this. Cancelling it when done is equally easy 
whether cron or at


-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] modifying iptables: how can I prevent locking me out?

2011-01-24 Thread Alan McKinnon
Apparently, though unproven, at 23:40 on Monday 24 January 2011, J. Roeleveld 
did opine thusly:

 On Monday 24 January 2011 19:47:43 Jarry wrote:
  Hi,
  
  I have to change rather complex iptables rules on server
  and I do not want to lock me out as this server is about
  50 miles away. So how should I do it?
  
  I can back up the old rules by running:
  /etc/init.d/iptables save
  and it will be saved to /var/lib/iptables/rules-save
  (some strange format starting with number like [536:119208])
  
  I prepared a script with new (modified) iptables-rules,
  which I will run in bash. But in case I screw something,
  how could I force netfilter to load old saved rules,
  if I for whatever reason do not connect to server (ssh)?
  
  Or can I load new iptables-rules for certain time, and
  then force netfilter to load back the old rules again?
  
  Jarry
 
 You could add the necessary rule(s) to ensure existing connections stay
 active.
 That way you can enable the new rules and test by openening a new SSH-
 connection to the server.
 If that works, you're ok.
 If not, you can use the existing SSH-connection to go back to the old
 rules.

It's no help to the OP now, but around here we have a rule:

Remote servers without a DRAC do not get installed. Period.


-- 
alan dot mckinnon at gmail dot com



[gentoo-user] [OT] - Code translation tools?

2011-01-24 Thread Mark Knecht
Hello,
   I'm wondering if there are any generic sorts of code translation
tools in portage wherein I could translate from an 'uncommon' language
no one here is likely to use (EasyLanguage) into C?

   As an example I've attached a little EL function that takes
buy/sell command data an puts it away in an array for safe keeping.
What tools are out there, if any, that might allow me to describe how
EL works and then the tool does the conversion?

Thanks,
Mark


Inputs:
Array1[A1,AA1](NumericArrayRef),
EType(StringSimple),
EQty(NumericSimple),
ESPrice(NumericSimple),
ELPrice(NumericSimple),
MyDate(NumericSimple),
MyTime(NumericSimple)
;

Switch (EType)
Begin
Case Buy: Value1 = 1;
Case Sell:Value1 = 2;
Case SellShort:   Value1 = 3;
Case BuyToCover:  Value1 = 4;
End
;

If ((EQty = 1) and (ESPrice = 0) and (ELPrice = 0)) then //Implies Market order
Begin
Array1[Value1,1] = Value1-1;
Array1[Value1,2] = EQty;
Array1[Value1,7] = MyDate;
Array1[Value1,8] = MyTime;  
End
else if ((EQty = 1) and (ESPrice  0) and (ELPrice = 0)) then
//Implies Stop order
Begin
Array1[Value1,1] = Value1-1;
Array1[Value1,3] = EQty;
Array1[Value1,4] = ESPrice;
Array1[Value1,7] = MyDate;
Array1[Value1,8] = MyTime;
End
else if ((EQty = 1) and (ESPrice = 0) and (ELPrice  0)) then
//Implies Limit order
Begin
Array1[Value1,1] = Value1-1;
Array1[Value1,5] = EQty;
Array1[Value1,6] = ELPrice;
Array1[Value1,7] = MyDate;
Array1[Value1,8] = MyTime;
End 
;

MWK.ADE_SaveSysTraderTrades3_ = 0;



Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-24 Thread Mick
On Monday 24 January 2011 20:56:02 Bill Longman wrote:

 You can always call it back up. The other window, that is. Just
 Ctrl-middle-click the xterm and choose Show alternate screen.
 
 Presto.
 
 It's saved my bacon more than once
 
 Bill

Yes!  I had forgotten about that! Thanks Bill.  :-)

Excellent solution for the OP's question, but what can you do to stop the 
terminal collapsing completely, when it is launched to just run a command that 
exits after it runs?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] NX, FreeNX, Neatx, x2go?

2011-01-24 Thread Alex Schuster
Paul Hartman writes:

 On Fri, Jan 21, 2011 at 8:43 AM, Alex Schuster wo...@wonkology.org
 wrote:
  What would be the best solution? What do you prefer?
 
 I haven't tried FreeNX, x2go or NeatX or any of those, but I'm using
 nxserver-freeedition for years and using the official NX Client to
 connect from remote machines (Linux and Windows). All of the features
 work such as session suspending and resuming. I use public key login
 on my machine and there was some trick to getting it working
 initially. (I don't remember, but if you search for my name and
 nxserver in this list's archives there should be a message about it
 somewhere.)
 
 I think that the other NX clients, such as QtNX, or things based on
 libnxcl, usually only work to connect into a FreeNX server and not
 with the official NX servers. Ideally I think the nx client version
 should match the nx server version for best results.

I'm also using using nxclient from nomachine.org.

I only tried nxserver-freeedition on an Ubuntu server where I had some 
trouble running FreeNX. It worked well first, but then I started getting 
some errors about a wrong 'bsize' or something. Ususally a few retries later 
I can connect, but at the moment I can't. I did not investigate this further 
yet because there are other servers in that LAN than I can use instead.

FreeNX is now working on my new machine. First I had to emerge xterm, which 
was the custom command I wanted to execute. Stupid error, but a message that 
the command could not be found would have been nice.
And then I had to change the DISPLAY_BASE in node.conf. Looks like when 
running multiple instances of nxclient those values have to be different.

That was with Windows XP. Now I tried to connect from my Linux Desktop, and 
got an error about the display :1043. I set it back to the default of :1000, 
and it works again.
...
So it looks like when runing multiple clients, their servers need to have 
different displays. Additionally, there is a timing problem, a workaround is 
to add a sleep 4 in /usr/bin/nxnode right before the xrdb starts. I found 
this tip somewhere on the web, noone added such a patch yet, probably 
because FreeNX is dead.

 nxclient contains a whole X server, which is really not necessary if
 the client machine is already running X. Ultimately if your client has
 X and ssh already, you just need nxproxy. Connect to server and run
 nxagent and have a working session (there are shell scripts to do this
 on platforms who have X but not nxclient, such as ARM). But you won't
 get any of the special features like suspending and resuming,
 printing, sound, etc.

I never used sound or printing, although it might be nice. But 
suspending/resuming sessions is really cool. I often run nxclient from my 
Windows Notebook in the living room to run stuff on my linux desktop, and I 
can shut down the notebook in between if I like.

Thanks for your input. I will consider nxserver-freeedition for the next 
time I set up this stuff. FreeNX is dead, and I read that it is also a 
genrally a little slower than the nomachine version. x2go looks not yet 
ready, but I think I'll also try it when the next version arrives and I have 
some spare time to paly around with.

Wonko



[gentoo-user] Re: [OT] - Code translation tools?

2011-01-24 Thread walt

On 01/24/2011 02:34 PM, Mark Knecht wrote:

Hello,
I'm wondering if there are any generic sorts of code translation
tools in portage wherein I could translate from an 'uncommon' language
no one here is likely to use (EasyLanguage) into C?

As an example I've attached a little EL function...


Can't give you a real answer, but that code looks very much like Pascal.
Reminds me of a misspent youth.

Is there a definite reason for choosing C instead of something else, e.g.
python?  Just idle curiosity, nothing more.

If I knew a wee bit more about m4 I'm sure I could do it with that alone.
But I'd need to do actual work to learn m4, which is not likely to happen...




Re: [gentoo-user] Re: [OT] - Code translation tools?

2011-01-24 Thread Mark Knecht
On Mon, Jan 24, 2011 at 4:35 PM, walt w41...@gmail.com wrote:
 On 01/24/2011 02:34 PM, Mark Knecht wrote:

 Hello,
    I'm wondering if there are any generic sorts of code translation
 tools in portage wherein I could translate from an 'uncommon' language
 no one here is likely to use (EasyLanguage) into C?

    As an example I've attached a little EL function...

 Can't give you a real answer, but that code looks very much like Pascal.
 Reminds me of a misspent youth.


In 1983 I certainly wasn't a turbo user of Turbo Pascal either... ;-)

 Is there a definite reason for choosing C instead of something else, e.g.
 python?  Just idle curiosity, nothing more.


I'm interested in learning a bit about CUDA as an evaluation platform
and the tools from NVidia are based around C. (As best I understand.)

 If I knew a wee bit more about m4 I'm sure I could do it with that alone.
 But I'd need to do actual work to learn m4, which is not likely to happen...


Thanks!

- Mark



Re: [gentoo-user] Adding more than one static IP

2011-01-24 Thread Walter Dnes
On Mon, Jan 24, 2011 at 04:15:14PM +0100, Amar Cosic wrote
 Hello list
 
 My mind is just locked at the moment and I am trying to figure out what am
 I doing wrong here. I have 4 static IP's on server machine

  I have one nic on my desktop.  It sits behind an ADSL router-modem
which has address 192.168.123.254.

* My little LAN is 192.168.123.248/29.  I want that to always go via the
  router/modem, so I give that path metric 0

* I have an HDHomerun TV tuner that pops up in the 169.254.0.0/16 block.
  That path also gets gets metric 0

* Default (i.e. to the internet) is metric 2 via the router

* Because the default is metric 2, dialup (temporary ppp0) can take over
  internet access, without interfering with LAN traffic or my TV tuner.

  Here's my /etc/conf.d.net

config_eth0=(
192.168.123.249 broadcast 192.168.123.255 netmask 255.255.255.248 mtu 1454
169.254.1.3 broadcast 169.254.255.255 netmask 255.255.0.0)
routes_eth0=(
default via 192.168.123.254 metric 2
192.168.123.248/29 via 192.168.123.254 metric 0
169.254.0.0/16 via 169.254.1.3 metric 0
)

-- 
Walter Dnes waltd...@waltdnes.org



Re: [gentoo-user] Identifying missing modules...

2011-01-24 Thread James Wall
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/23/11 16:13, Mark Knecht wrote:
 On Sun, Jan 23, 2011 at 10:08 AM,  meino.cra...@gmx.de wrote:

 Hi,

 when doing as root

lspci -vk

 I get all pci devices and bus inhabitants listed.
 Additionally there are often two lines added to each
 device saying similiar things like:

Kernel driver in use: XYZ
Kernel modules: XYZ

 and there other devices do not have similiar entries.

 My question is: How can I distinguish devices/entities,
 which do not need any driver to work and those, which
 need a driver but in the current setup the driver wasn't
 compiled in/compiled as module?

 Thank you very much in advance for any help!
 Best regards,
 mcc
 
 Devices that need a driver are listed as 'Kernel driver in use:'
 whether the driver is compiled in or not.
 
 Devices that have their driver compiled in do not have the line
 'Kernel modules:'
 
 Devices that have neither line are controlled by the kernel but don't
 need anything from the driver section.
 
 I suppose there is the possibility that lspci could find a PCI device
 which hasn't had a driver selected as module or builtin and then not
 show anything. In this case I expect that the device wouldn't
 function.
 
 Hope this helps,
 Mark
 
Check out http://www.kernel-seeds.org for a walkthrough of kernel
configuration or dump the results of lspci -n into
http://kmuto.jp/debian/hcl/ for a list of modules

James Wall
- --
No trees were harmed in the sending of this message. However, a large
number of electrons were terribly inconvenienced.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNPk3zAAoJEISPTA/exVD8/WgH/114CSqMLPm0us9gOnUJmJZM
8bvpZDa1x5xWCjLcI4zn0fwqo8UZpQBGjFYDtrrGnSwXpZSbN4H0mCCZOVZDoNFZ
0szNemJwF68oMm8u71D5LFBianCZfCQmsMAf5bC0nG4SJe80YnREDPJVRt9xvl91
lBRrBDvV1ZxOzOl/gBIA3si8aiKWQ6V+WeoQi7nO1zaCWMw1p8LuyoONuPModl+U
sjt67czGRE6bnC8Y5Lu48v4zJU6jKM20zjdTaTPcrLOce0kzYNqBFRnDCWRO2TRu
jr+Se9JNcq97IQOWSiwPcCUW1Q3a9p2+WAz045FUwrKkT/08OvRKDw4S9rdSLa0=
=77yQ
-END PGP SIGNATURE-