Re: [gentoo-user] Receiving mail from crontab

2010-05-05 Thread Alan McKinnon
On Wednesday 05 May 2010 07:45:24 Mick wrote:
> On Tuesday 04 May 2010 23:40:20 Alex Schuster wrote:
> > Mick writes:
> > > I am getting a bit confused from the messages that I receive in my
> > > gmail account sent from my crontab.
> > > 
> > > First, is related to the title which is:
> > >  Cron  test -x /usr/sbin/run-crons &&
> > > 
> > > /usr/sbin/run-crons
> > > 
> > > I am not sure what this "test -x" part represents?
> > 
> > It means: If /usr/sbin/run-crons is executable, execute it. It could also
> > be written as
> > 
> > [ -x /usr/sbin/run-crons ] && /usr/sbin/run-crons
> > 
> > or
> > 
> > f=/usr/sbin/run-crons
> > if [ -x $f ]
> > then
> > 
> > $f
> > 
> > fi
> 
> Thank you, I understand what the test does.  What I am not sure is why this
> is printed on the title of the email.  Where is what is printed on the
> email title controlled from?  Is it editable?

It's cron's default. If it sends a mail, by default it does this:

The subject is the program field in the crontab
The body is the output from the program.

You can't normally change that. What you do is edit your called script to 
intelligently mail you the information you do want, and send all output to 
devnull to suppress cron's default mailer settings

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Bill Kenworthy
Can the older dnotify do what you want? - it monitors files differently
to inotify.  There is also gammin/fam.

BillK


On Wed, 2010-05-05 at 16:24 +0930, Iain Buchanan wrote:
> Hi,
> 
> I'm looking for some kernel-based notification of changes to my file
> system.  I've been looking at inotify, but it's not exactly what I want.
> 
> Basically I want to know if _any_ write occurs anywhere.  I don't want
> to register a whole bunch of files to watch, I just want to watch an
> entire mount.  When a file is changed (ie. a write operation occurs), I
> then want to add that file or fd to a list in RAM.  That's all.
> 
> I know this may be a lot of data, considering streams and devices, but I
> can filter out /dev, /proc, etc. and just focus on "real" files.
> 
> Is there anything that can do this?
> 
> thanks :)




Re: [gentoo-user] Receiving mail from crontab

2010-05-05 Thread Neil Bothwick
On Wed, 5 May 2010 01:06:21 +0200, Alan McKinnon wrote:

> The output looks like standard banner garbage that apps often write to
> the terminal when launched. I suspect an omitted "> /dev/null" somewhere

Or maybe a --quiet option to suppress this but keep useful information.


-- 
Neil Bothwick

MIPS: Meaningless Indication of Processor Speed


signature.asc
Description: PGP signature


Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.

2010-05-05 Thread Daniel Troeder
On 05/05/2010 06:42 AM, Stefan G. Weichinger wrote:
> Am 04.05.2010 23:24, schrieb Daniel Troeder:
> 
>> I'm using sys-fs/cryptsetup-1.1.1_rc1 since 02.05.2010 and didn't have
>> any issues.
>> Please decrypt your partition from the command line, so we can see if it
>> is a cryptsetup/luks/kernel problem or a pam_mount problem.
>>
>> Cmdline should something like:
>> $ sudo cryptsetup -d /etc/security/verysekrit.key luksOpen
>> /dev/mapper/VG01-crypthome myhome
>> Which should create /dev/mapper/myhome.
> 
> My user sgw is currently not allowed to sudo this (should it be? it
> never was).
> 
> And for root it says "Kein Schlüssel mit diesem Passsatz verfügbar."
> (german) which should be "No key available with this passphrase." in
> english.
That is a message from cryptsetup. As you are using openssl to get the
key, I think the problem might be there.

I followed the guide you linked here (website is down, but google-cache
works:
http://webcache.googleusercontent.com/search?q=cache:7eaSac72CoIJ:home.coming.dk/index.php/2009/05/20/encrypted_home_partition_using_luks_pam_+encrypted_home_partition_using_luks_pam&cd=2&hl=de&ct=clnk&gl=de&client=firefox-a)
and it works for me (kernel is 2.6.33-zen2):

lvcreate -n crypttest -L 100M vg0
KEY=`tr -cd [:graph:] < /dev/urandom | head -c 79`
echo $KEY | openssl aes-256-ecb > verysekrit.key
openssl aes-256-ecb -d -in verysekrit.key
# (aha :)
openssl aes-256-ecb -d -in verysekrit.key | cryptsetup -v --cipher
aes-cbc-plain --key-size 256 luksFormat /dev/vg0/crypttest
openssl aes-256-ecb -d -in verysekrit.key | cryptsetup luksOpen
/dev/vg0/crypttest decryptedtest
cryptsetup luksClose crypttest
# (i couldn't close it... don't know why...)

The key that cryptsetup is given to decrypt the partition is created by
openssl from the file. Please check the output of
$ openssl aes-256-ecb -d -in verysekrit.key
under both kernel - it should be identical.
BTW: You'll get your error message if you run:
$ echo notmykey | cryptsetup luksOpen /dev/vg0/crypttest decryptedtes

Bye,
Daniel




-- 
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.

2010-05-05 Thread Stefan G. Weichinger
Am 05.05.2010 10:00, schrieb Daniel Troeder:

> That is a message from cryptsetup. As you are using openssl to get
> the key, I think the problem might be there.

ok 

> lvcreate -n crypttest -L 100M vg0 KEY=`tr -cd [:graph:] <
> /dev/urandom | head -c 79` echo $KEY | openssl aes-256-ecb >
> verysekrit.key openssl aes-256-ecb -d -in verysekrit.key # (aha :) 
> openssl aes-256-ecb -d -in verysekrit.key | cryptsetup -v --cipher 
> aes-cbc-plain --key-size 256 luksFormat /dev/vg0/crypttest openssl
> aes-256-ecb -d -in verysekrit.key | cryptsetup luksOpen 
> /dev/vg0/crypttest decryptedtest cryptsetup luksClose crypttest # (i
> couldn't close it... don't know why...)
> 
> The key that cryptsetup is given to decrypt the partition is created
> by openssl from the file. Please check the output of $ openssl
> aes-256-ecb -d -in verysekrit.key under both kernel - it should be
> identical. 

At first, thank you for your time and work!

Tried that. I have to admit that I don't know the decryption password
... but as far as I understand it should be the same as the
unix-password of the user sgw. pam_mount.so should read it when I log
in, correct?

With this password I get a "bad decrypt" so this explains why it fails.

Please let me repeat/point out that it is the same for 3 kernels
(2.6.32-r1, 2.6.33-r[12] ... ), so I should change the subject to stay
correct ...

> BTW: You'll get your error message if you run: $ echo
> notmykey | cryptsetup luksOpen /dev/vg0/crypttest decryptedtes

Yes, correct.

-

I really wonder what the reason is ... should I downgrade openssl?

Thanks Stefan



Re: [gentoo-user] nvidia driver: undefined symbol: _nv000008gl

2010-05-05 Thread Arnau Bria
Hi,

I moved to stable drivers and nvidia drivers works fine again.


[I] x11-drivers/nvidia-drivers
 Available versions:  [M]71.86.11!s 96.43.14!s ~96.43.16!s 173.14.20!s 
173.14.22!s ~173.14.25!s 180.60!s 185.18.36-r1!s 190.42-r3!s ~190.53!s 
~190.53-r1!s ~195.30!s ~195.36.15!s {acpi custom-cflags gtk kernel_FreeBSD 
kernel_linux multilib userland_BSD}
 Installed versions:  190.42-r3!s(06:02:27 PM 05/04/2010)(acpi gtk 
kernel_linux -custom-cflags -multilib)
 Homepage:http://www.nvidia.com/
 Description: NVIDIA X11 driver and GLX libraries

Cheers,
Arnau

-- 
Arnau Bria
http://blog.emergetux.net
Bombing for peace is like fucking for virginity



[gentoo-user] Android tether and wpa_supplicant

2010-05-05 Thread Fredrik Andersson
Hi fellow gentoo users

I'm trying to connect my laptop to my HTC Hero using wpa_supplicant,
has anyone done this?

this is what I see in wpa_cli when I do scan_result

#bssid / frequency / signal level / flags / ssid
#02:23:76:81:26:67      2412    240     [IBSS]  G1

And according to the example wpa_supplicant.conf this should allow me
to connect to a IBSS network.
network={
       ssid="G1"
       mode=1
       frequency=2412
       proto=WPA
       key_mgmt=NONE
       pairwise=NONE
       group=TKIP
       #psk="abcdefghijklm"
}

I have tried the connection in Windows and that works, so the phone is working.

Any help is greatly appreciated :)



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Stroller


On 5 May 2010, at 07:54, Iain Buchanan wrote:

...
I'm looking for some kernel-based notification of changes to my file
system.  I've been looking at inotify, but it's not exactly what I  
want.


Basically I want to know if _any_ write occurs anywhere.  I don't want
to register a whole bunch of files to watch, I just want to watch an
entire mount.


man inotify(7):
... When a directory is monitored, inotify will return events for the  
directory itself, and for files inside the directory.



Am I missing something?


This article was posted to a different froup recently:
http://www.ibm.com/developerworks/linux/library/l-inotify/index.html
It looks interesting.


Stroller.



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Helmut Jarausch
On  5 May, Iain Buchanan wrote:
> Hi,
> 
> I'm looking for some kernel-based notification of changes to my file
> system.  I've been looking at inotify, but it's not exactly what I want.
> 
> Basically I want to know if _any_ write occurs anywhere.  I don't want
> to register a whole bunch of files to watch, I just want to watch an
> entire mount.  When a file is changed (ie. a write operation occurs), I
> then want to add that file or fd to a list in RAM.  That's all.
> 
> I know this may be a lot of data, considering streams and devices, but I
> can filter out /dev, /proc, etc. and just focus on "real" files.
> 
> Is there anything that can do this?
> 

Might be I've just asked a similar question on the ZSH mailing list.
Please have a look at inotifywatch from the sys-fs/inotify-tools
package. It can watch a directory tree recursively.

I hope this helps,
Helmut.




[gentoo-user] samba vs. cifs

2010-05-05 Thread KH

Hi List,

I just ran in a problem:

net-fs/mount-cifs ("net-fs/mount-cifs" is blocking net-fs/samba-3.4.6)

Somba is pulled in by the samba use-flag. The PC only is "client" to a 
server running samba. Do I need samba for this anymore? More specific 
(don't want to hear "moo"): Will I be able to mount a samba partition 
without setting the samba use flag and after unmerging samba?


Regards
kh



Re: [gentoo-user] samba vs. cifs

2010-05-05 Thread Neil Bothwick
On Wed, 05 May 2010 18:42:09 +0200, KH wrote:

> net-fs/mount-cifs ("net-fs/mount-cifs" is blocking net-fs/samba-3.4.6)

mount.cifs is now provided by Samba.

> Somba is pulled in by the samba use-flag. The PC only is "client" to a 
> server running samba. Do I need samba for this anymore? More specific 
> (don't want to hear "moo"): Will I be able to mount a samba partition 
> without setting the samba use flag and after unmerging samba?

Samba is the server. The client tools used to be a separate package but
it now looks like you should emerge samba with USE="-server smbclient".


-- 
Neil Bothwick

Home is where you hang your @.


signature.asc
Description: PGP signature


Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Florian Philipp
Am 05.05.2010 15:34, schrieb Stroller:
> 
> On 5 May 2010, at 07:54, Iain Buchanan wrote:
>> ...
>> I'm looking for some kernel-based notification of changes to my file
>> system.  I've been looking at inotify, but it's not exactly what I want.
>>
>> Basically I want to know if _any_ write occurs anywhere.  I don't want
>> to register a whole bunch of files to watch, I just want to watch an
>> entire mount.
> 
> man inotify(7):
> ... When a directory is monitored, inotify will return events for the
> directory itself, and for files inside the directory.
> 
> 
> Am I missing something?
> 
> 
> This article was posted to a different froup recently:
> http://www.ibm.com/developerworks/linux/library/l-inotify/index.html
> It looks interesting.
> 
> 
> Stroller.
> 

To repeat my comment on Iain's original "backup to a cold-swap drive"
thread, Inotify has two drawbacks which make it hard or even impossible
to use for Iain's use case:

a) It does not work recursively which means that you have to create a
new handle for each subdirectory. Of course, this only means more work
for the programmer but there is also the problem that

b) As far as I know, Inotify does not scale very good, at least not good
enough to monitor a whole system. /proc/sys/fs/inotify/max_user_watches
is 65535 on my system.

On the other hand, I've never tried to increase that limit and just let
it run on a deep directory structure. Who knows, maybe it actually works.

Hope this helps,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


[gentoo-user] arping network profile issue

2010-05-05 Thread Zhou Rui
Hi folks,
I setup a network interface to switch in two different network with
different gateways using config_eth0=( "arping" ), and I can get gateway mac
when use arping2 command directly.
But the /etc/init.d/net.eth0 start always fails, can you help me to find the
issue out?

$ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

dns_domain="vm"
config_eth0=( "arping" )

gateways_eth0=( "192.168.1.254,,192.168.1.114 192.168.1.1,,192.168.1.114" )

#config_eth0=( "192.168.1.114/24" )
#dns_servers_eth0=( "8.8.8.8 8.8.4.4" )
#routes_192168001001=( "default via 192.168.1.1" )

config_192168001254=( "192.168.1.114/24" )
routes_192168001254=( "default via 192.168.1.254" )

dns_servers_eth0=( "8.8.8.8 8.8.4.4" )

fallback_eth0=( "dhcp" )
dhcp_eth0="nodns"

$ sudo arping2 -0 -r -c 1 -i eth0 -S 192.168.1.114 192.168.1.254
00:1d:xx:xx:xx:xx

Thanks for your help.

-- 
BR,
Zhou Rui


Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Stroller


On 5 May 2010, at 18:24, Florian Philipp wrote:

...
man inotify(7):
... When a directory is monitored, inotify will return events for the
directory itself, and for files inside the directory.
...


To repeat my comment on Iain's original "backup to a cold-swap drive"
thread ...


Sorry, I started ignoring that almost immediately it was posted. He  
rejected too quickly too many workable solutions to basically  
functional backup. Perhaps Iain is a perfectionist, but I did not wish  
to follow the thread.



... Inotify has two drawbacks which make it hard or even impossible
to use for Iain's use case:

a) It does not work recursively which means that you have to create a
new handle for each subdirectory. Of course, this only means more work
for the programmer but there is also the problem that


Pardon me. I assumed that "files inside the directory" meant that foo  
would be be changed when foo/bar changed, thus monitoring grunt would  
reflect changes in grunt/foo/bar. I overlooked that a directory is not  
a file.


Stroller.




[gentoo-user] Re: arping network profile issue

2010-05-05 Thread Zhou Rui
Sorry it's a test profile, to avoid misunderstanding, post my profile here,
and this file not working too.

$cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

dns_domain="vm"
config_eth0=( "arping" )

gateways_eth0=( "192.168.1.254,,192.168.1.114 192.168.1.1,,192.168.1.114" )

config_192168001001=( "192.168.1.114/24" )
routes_192168001001=( "default via 192.168.1.1" )

config_192168001254=( "192.168.1.114/24" )
routes_192168001254=( "default via 192.168.1.254" )

dns_servers_eth0=( "8.8.8.8 8.8.4.4" )

fallback_eth0=( "dhcp" )
dhcp_eth0="nodns"

2010/5/6 Zhou Rui 

> Hi folks,
> I setup a network interface to switch in two different network with
> different gateways using config_eth0=( "arping" ), and I can get gateway mac
> when use arping2 command directly.
> But the /etc/init.d/net.eth0 start always fails, can you help me to find
> the issue out?
>
> $ cat /etc/conf.d/net
> # This blank configuration will automatically use DHCP for any net.*
> # scripts in /etc/init.d.  To create a more complete configuration,
> # please review /etc/conf.d/net.example and save your configuration
> # in /etc/conf.d/net (this file :]!).
>
> dns_domain="vm"
> config_eth0=( "arping" )
>
> gateways_eth0=( "192.168.1.254,,192.168.1.114 192.168.1.1,,192.168.1.114" )
>
> #config_eth0=( "192.168.1.114/24" )
> #dns_servers_eth0=( "8.8.8.8 8.8.4.4" )
> #routes_192168001001=( "default via 192.168.1.1" )
>
> config_192168001254=( "192.168.1.114/24" )
> routes_192168001254=( "default via 192.168.1.254" )
>
> dns_servers_eth0=( "8.8.8.8 8.8.4.4" )
>
> fallback_eth0=( "dhcp" )
> dhcp_eth0="nodns"
>
> $ sudo arping2 -0 -r -c 1 -i eth0 -S 192.168.1.114 192.168.1.254
> 00:1d:xx:xx:xx:xx
>
> Thanks for your help.
>
> --
> BR,
> Zhou Rui
>



-- 
BR,
Zhou Rui


Re: [gentoo-user] Receiving mail from crontab

2010-05-05 Thread Mick
On Wednesday 05 May 2010 08:39:33 Neil Bothwick wrote:
> On Wed, 5 May 2010 01:06:21 +0200, Alan McKinnon wrote:
> > The output looks like standard banner garbage that apps often write to
> > the terminal when launched. I suspect an omitted "> /dev/null" somewhere
> 
> Or maybe a --quiet option to suppress this but keep useful information.

Hmm ... chkrootkit is being run as:

exec /usr/sbin/chkrootkit -q

from /etc/cron.weekly/chkrootkit so I was not sure it all this garbage was 
something that I should ignore.
-- 
Regards,
Mick


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


Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.

2010-05-05 Thread Daniel Troeder
On 05/05/2010 10:42 AM, Stefan G. Weichinger wrote:
> Am 05.05.2010 10:00, schrieb Daniel Troeder:
> 
>> That is a message from cryptsetup. As you are using openssl to get 
>> the key, I think the problem might be there.
> 
> ok 
> 
>> lvcreate -n crypttest -L 100M vg0 KEY=`tr -cd [:graph:] < 
>> /dev/urandom | head -c 79` echo $KEY | openssl aes-256-ecb > 
>> verysekrit.key openssl aes-256-ecb -d -in verysekrit.key # (aha :)
>>  openssl aes-256-ecb -d -in verysekrit.key | cryptsetup -v --cipher
>>  aes-cbc-plain --key-size 256 luksFormat /dev/vg0/crypttest
>> openssl aes-256-ecb -d -in verysekrit.key | cryptsetup luksOpen 
>> /dev/vg0/crypttest decryptedtest cryptsetup luksClose crypttest #
>> (i couldn't close it... don't know why...)
>> 
>> The key that cryptsetup is given to decrypt the partition is
>> created by openssl from the file. Please check the output of $
>> openssl aes-256-ecb -d -in verysekrit.key under both kernel - it
>> should be identical.
> 
> At first, thank you for your time and work!
> 
> Tried that. I have to admit that I don't know the decryption
> password ... but as far as I understand it should be the same as the 
> unix-password of the user sgw. pam_mount.so should read it when I
> log in, correct?
Yes. Than pam_mount man page (http://linux.die.net/man/8/pam_mount) says so.
It's actually quite verbose on the topic.

> With this password I get a "bad decrypt" so this explains why it
> fails.
If you cannot decrypt your keyfile (with openssl) then you have just
lost any way to decrypt your partition!

But there is an idea in the man page of which I didn't think: did you
maybe change your users password? If so, you need to use the old pw to
decrypt the keyfile. If you can, then you can use the new pw to encrypt
the key again (make backups of the original file).

There is also the possibility your keyfile was corrupted somehow (file
system corruption?). Do you have a backup of the keyfile (and your data:)?

BTW: a LUKS encrypted partition can have 8 keys (in so called "key
slots"), so that you can add a "fallback key" the next time, which you
store at a trusted place.

Good luck,
Daniel

> Please let me repeat/point out that it is the same for 3 kernels 
> (2.6.32-r1, 2.6.33-r[12] ... ), so I should change the subject to
> stay correct ...
> 
>> BTW: You'll get your error message if you run: $ echo notmykey |
>> cryptsetup luksOpen /dev/vg0/crypttest decryptedtes
> 
> Yes, correct.
> 
> -
> 
> I really wonder what the reason is ... should I downgrade openssl?
> 
> Thanks Stefan
> 


-- 
PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get
# gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887



signature.asc
Description: OpenPGP digital signature


[gentoo-user] How can I redirect all portage messages to syslog?

2010-05-05 Thread Jarry

Hi,
is it possible to redirect *all* portage messages to syslog?

I mean, I would like to redirect content of all these files
into /var/log/messages (if possible in standard structure):

/var/log/emerge-fetch.log
/var/log/emerge.log
/var/log/portage/elog/summary.log

Setting PORTAGE_ELOG_SYSTEM="syslog", does not help:

Content previously written to summary.log is logged by system
logger but somehow broken, some parts of text are cut-off and
some lines in /var/log/messages are missing "program[pid]".

Messages from emerge.log are not logged by syslog at all.

Concerning emerge-fetch.log, I'm not sure because I did not
fetch anything this time...


Jarry

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



Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.

2010-05-05 Thread Stefan G. Weichinger
Am 05.05.2010 21:39, schrieb Daniel Troeder:

>> With this password I get a "bad decrypt" so this explains why it 
>> fails.
> If you cannot decrypt your keyfile (with openssl) then you have just 
> lost any way to decrypt your partition!
> 
> But there is an idea in the man page of which I didn't think: did
> you maybe change your users password? If so, you need to use the old
> pw to decrypt the keyfile. If you can, then you can use the new pw to
> encrypt the key again (make backups of the original file).

user-pw not changed, no ...

> There is also the possibility your keyfile was corrupted somehow
> (file system corruption?). Do you have a backup of the keyfile (and
> your data:)?

Restored the key-file from tape, no diff, no success.
I have some images as backup, would have to look closer ...

> BTW: a LUKS encrypted partition can have 8 keys (in so called "key 
> slots"), so that you can add a "fallback key" the next time, which
> you store at a trusted place.

I am pretty sure that I used several slots, yes.

-

Remember that I said: "I am not sure which HOWTO I followed" ?

What if I didn't use aes-256-ecb?

I will try some other ciphers  ;-)

Oh my, I luv documentation :-)

S



Re: [gentoo-user] Re: Kernel upgrade and now LUKS failure.

2010-05-05 Thread Stefan G. Weichinger
Am 05.05.2010 22:17, schrieb Stefan G. Weichinger:

> Remember that I said: "I am not sure which HOWTO I followed" ?
> 
> What if I didn't use aes-256-ecb?

Yep. See pam_mount.conf.xml:
It's "aes-256-cbc" in my case.

I was now able to luksOpen and I have the decrypted device mounted.

Nice.

So:

the user-pw didn't change and the keyfile is OK.

So why is pam_mount unable to mount it?

I will now pull another backup and check/add fallback keys ;-)

Thanks so far, regards, Stefan



[gentoo-user] new user can't run X apps

2010-05-05 Thread Grant
I created a new user with useradd but I get X errors like "cannot open
display" and "cannot connect to X server" when I try to run X apps as
the new user.  I've tried restarting with the same results.  Does
anyone know why this is happening?

- Grant



Re: [gentoo-user] new user can't run X apps

2010-05-05 Thread Arttu V.
On 5/5/10, Grant  wrote:
> I created a new user with useradd but I get X errors like "cannot open
> display" and "cannot connect to X server" when I try to run X apps as
> the new user.  I've tried restarting with the same results.  Does
> anyone know why this is happening?

Is the user in the video group?

-- 
Arttu V.



Re: [gentoo-user] new user can't run X apps

2010-05-05 Thread Grant
>> I created a new user with useradd but I get X errors like "cannot open
>> display" and "cannot connect to X server" when I try to run X apps as
>> the new user.  I've tried restarting with the same results.  Does
>> anyone know why this is happening?
>
> Is the user in the video group?

Yes, I should have said that.

- Grant



Re: [gentoo-user] samba vs. cifs

2010-05-05 Thread Matt Harrison
On Wed, May 05, 2010 at 06:42:09PM +0200, KH wrote:
> Hi List,
> 
> I just ran in a problem:
> 
> net-fs/mount-cifs ("net-fs/mount-cifs" is blocking net-fs/samba-3.4.6)
> 
> Somba is pulled in by the samba use-flag. The PC only is "client" to a 
> server running samba. Do I need samba for this anymore? More specific 
> (don't want to hear "moo"): Will I be able to mount a samba partition 
> without setting the samba use flag and after unmerging samba?
> 
> Regards
> kh

I just enable cifs in the kernel and install the mount-cifs script. That lets 
me mount
remote shares with no trouble at all.

HTH

Matt


pgpqcohV21EdH.pgp
Description: PGP signature


Re: [gentoo-user] samba vs. cifs

2010-05-05 Thread David W Noon
On Wed, 05 May 2010 23:20:01 +0200, Matt Harrison wrote about Re:
[gentoo-user] samba vs. cifs:

>On Wed, May 05, 2010 at 06:42:09PM +0200, KH wrote:
[snip]
>> specific (don't want to hear "moo"): Will I be able to mount a samba
>> partition without setting the samba use flag and after unmerging
>> samba?
>> 
>> Regards
>> kh
>
>I just enable cifs in the kernel and install the mount-cifs script.
>That lets me mount remote shares with no trouble at all.

I don't even install the mount-cifs script.  I simply put the share
definition in /etc/fstab on the client, and then use the vanilla mount
command.  E.g.,

//192.168.0.2/backups/usr/local/remote_backupscifs
noauto,noexec,noatime,nodiratime,user=root,pass=eetoot  0 0

[The above should be on 1 line.]

Note that my real password for root is not "eetoot"; that is simply a
fake password I set up for Samba shares.

Whenever I need to transfer a backup archive to the server, I simply
issue:
   mount /usr/local/remote_backups
and then copy the data across.
-- 
Regards,

Dave  [RLU #314465]
==
dwn...@ntlworld.com (David W Noon)
==


signature.asc
Description: PGP signature


Re: [gentoo-user] new user can't run X apps

2010-05-05 Thread Arttu V.
On 5/6/10, Grant  wrote:
>>> I created a new user with useradd but I get X errors like "cannot open
>>> display" and "cannot connect to X server" when I try to run X apps as
>>> the new user.  I've tried restarting with the same results.  Does
>>> anyone know why this is happening?
>>
>> Is the user in the video group?
>
> Yes, I should have said that.

How have you set up the X session for the users? Is it specified,
e.g., in /etc/env.d/90xsession or in some user-specific configuration
files that only the other one would have?

Does anything exceptional appear in Xorg.log?

(As you can notice, I'm just guessing and shooting in the dark here.)

-- 
Arttu V.



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 17:02 +0200, Helmut Jarausch wrote:

> Might be I've just asked a similar question on the ZSH mailing list.
> Please have a look at inotifywatch from the sys-fs/inotify-tools
> package. It can watch a directory tree recursively.

it does look interesting, thanks.  I would still run into the directory
limit if I wanted to watch something large like /

$ sudo find  / -xdev -type d | wc -l
71168

"...The default maximum is 8192; it can be increased by writing
to /proc/sys/fs/inotify/max_user_watches."

but it's an angle to follow.  I wonder how max_user_watches would handle
being 100k or more... no doubt you just need some RAM?!

thanks,
-- 
Iain Buchanan 

 we should send him a commemorative gentoo crack pipe for all
 his contributions to this project




Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 15:12 +0800, Bill Kenworthy wrote:
> Can the older dnotify do what you want? - it monitors files differently
> to inotify.  There is also gammin/fam.

dnotify locks the files or directories you want to watch, so it would
prevent external media from being unmounted.  dnotify also uses a file
descripter per watched item, which could get interesting for large
amounts of watches!

I'm not sure about FAM, but Gamin uses inotify or dnotify anyway (in
Linux).  I think they're all designed in a similar way: you have to
register a whole bunch of files or directories to watch.

thanks,
-- 
Iain Buchanan 

He that is giddy thinks the world turns round.
-- William Shakespeare, "The Taming of the Shrew"




Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Volker Armin Hemmann
On Donnerstag 06 Mai 2010, Iain Buchanan wrote:
> On Wed, 2010-05-05 at 15:12 +0800, Bill Kenworthy wrote:
> > Can the older dnotify do what you want? - it monitors files differently
> > to inotify.  There is also gammin/fam.
> 
> dnotify locks the files or directories you want to watch, so it would
> prevent external media from being unmounted.  dnotify also uses a file
> descripter per watched item, which could get interesting for large
> amounts of watches!
> 
> I'm not sure about FAM, but Gamin uses inotify or dnotify anyway (in
> Linux).  I think they're all designed in a similar way: you have to
> register a whole bunch of files or directories to watch.
> 
> thanks,

oh god... fam... that crap caused me so much pain over the years. This bug 
ridden zombie is still around?



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 18:35 +0100, Stroller wrote:
> On 5 May 2010, at 18:24, Florian Philipp wrote:
> >> ...
> >> man inotify(7):
> >> ... When a directory is monitored, inotify will return events for the
> >> directory itself, and for files inside the directory.
> >> ...
> >
> > To repeat my comment on Iain's original "backup to a cold-swap drive"
> > thread ...
> 
> Sorry, I started ignoring that almost immediately it was posted.

ooohh, ouch! :)

>  He  
> rejected too quickly too many workable solutions to basically  
> functional backup. Perhaps Iain is a perfectionist, but I did not wish  
> to follow the thread.

Perhaps I am a bit of a perfectionist, but I think you misunderstood my
aim.  I rejected 3 options straight away (dd, gparted, and Ghost4Linux)
because they're not designed for backing up a live filesystem in a
"change only" fashion ("intelligent" is the word I used).

Beyond that I didn't reject anything else that anyone mentioned.

> > ... Inotify has two drawbacks which make it hard or even impossible
> > to use for Iain's use case:
> >
> > a) It does not work recursively which means that you have to create a
> > new handle for each subdirectory. Of course, this only means more work
> > for the programmer but there is also the problem that
> 
> Pardon me. I assumed that "files inside the directory" meant that foo  
> would be be changed when foo/bar changed, thus monitoring grunt would  
> reflect changes in grunt/foo/bar. I overlooked that a directory is not  
> a file.

isn't it?  I thought a directory was just a file containing names (or
inodes) of other files?  Which would explain why monitoring grunt
wouldn't show changes in grunt/foo/bar, since the directory/file called
grunt remains the same (ie. contains the same list of inodes) even if
grunt/foo/bar changes.

Let me tell you what I actually want to do, which I may not have made
clear originally:

I want to backup root to an external drive (or that could be rephrased
as "I want to backup any mount to any other mount), such that:
 1. My backup is an hour or so out of date (at most)
 2. I don't need to copy the entire filesystem every time

To do that, I could either:
  * Run rsync every hour over the entire filesystem (I'm doing this
now with ionice, takes about 10 minutes when there are no
changes)
  * Use some file notification monitor to tell me which file was
just changed, and only rsync that file

The problems with rsync is that during the rsync process, the filesystem
is changing, so I will end up with a slightly inconsistent backup.  If I
use some notification method that tells me a file has changed, I can
greatly reduce any inconsistency, and I reduce my hour down to seconds
or minutes, depending on how much changes at any one time.

I'm considering LVM for it's snapshot capability, but I'd still have to
rsync root.  I would prefer a file notification method as well, so I can
just rsync the file that just changed.

So far all the file monitoring tools are based on individual files (even
the recursive ones), and you eventually reach a system limit.

Thanks, and willing to listen to any ideas from anyone (except
Stroller :p )

-- 
Iain Buchanan 

Usually, when a lot of men get together, it's called a war.
-- Mel Brooks, "The Listener"




Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Thu, 2010-05-06 at 01:33 +0200, Volker Armin Hemmann wrote:

> oh god... fam... that crap caused me so much pain over the years. This bug 
> ridden zombie is still around?

thanks for the heads-up - I guess I should leave FAM to plan B?
-- 
Iain Buchanan 

I am a friend of the working man, and I would rather be his friend
than be one.
-- Clarence Darrow




Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Volker Armin Hemmann
On Donnerstag 06 Mai 2010, Iain Buchanan wrote:
> On Thu, 2010-05-06 at 01:33 +0200, Volker Armin Hemmann wrote:
> > oh god... fam... that crap caused me so much pain over the years. This
> > bug ridden zombie is still around?
> 
> thanks for the heads-up - I guess I should leave FAM to plan B?

Plan Z really.  I can't even remember how many times I had to kill that pig to 
unmount something - or because it suddenly decided to eat CPU cycles like a 
fat stoner breakfast cereals.



Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Thu, 2010-05-06 at 08:54 +0930, Iain Buchanan wrote:

> but it's an angle to follow.  I wonder how max_user_watches would handle
> being 100k or more... no doubt you just need some RAM?!
> 
> thanks,

To answer my own questions, I'm now trying this:

# echo 10 >/proc/sys/fs/inotify/max_user_watches

$ time sudo find  / -xdev -type d | sudo inotifywatch -v -t 1 -e 
modify,attrib,move,create,delete,delete_self,unmount --fromfile -
Establishing watches...
Total of 71169 watches.
Finished establishing watches, now collecting statistics.
Will listen for events for 1 seconds.
total  modify  filename
6  6   /tmp/
2  2   /dev/

real0m3.177s
user0m0.768s
sys 0m1.378s

This sets up a watch on all directories under / that aren't part of
another filesystem, and then exits after one second.  It's quite fast :)

The idea, off the top of my head, would be this:
 1. inotifywatch as above but without the time restriction
 2. wait for it to finishing "setting up"
 3. rsync the whole directory structure to the backup
 4. continuously do this loop:
 1. get list of changes from inotifywatch
 2. rsync those changes

Unfortunately inotifywatch only returns output on ctrl-c, which I don't
want to do or you loose anything changed between instances.  This could
be changed to another signal, no doubt.

How does that sound for a continuous running backup?  This is starting
to stray OT from Gentoo, but your thoughts are welcome :)
-- 
Iain Buchanan 

One cannot make an omelette without breaking eggs -- but it is amazing
how many eggs one can break without making a decent omelette.
-- Professor Charles P. Issawi