Re: emacs and gconf troubles

2010-12-13 Thread Andrea Venturoli

On 12/12/10 17:08, Ashish SHUKLA wrote:


So, what I think happening in your case is kdm isn't starting the DBus on
startup of your session, which is why it only gets activated (started) when
you start Emacs (or any other DBus consumer application).
...
And for good overall desktop experience, please make sure dbus gets started on
system startup, as well as session startup. Lots of services expect DBus to be
running.


I have:

# ps ax | grep dbus
 1002  ??  Is 0:00.03 /usr/local/bin/dbus-daemon --system
 1451  ??  I  0:00.00 dbus-launch 
--autolaunch=b3fbd8cb89ee22fd22fc29261a5f --binary-syntax --close-stderr
 1452  ??  Is 0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 6 
--print-address 8 --session


The first one is launched at system startup, the other two when I login.
So I cannot explain why emacs would complains about it...






If you're running Emacs on server and don't want DBus to be started, then
exclude DBUS using make config and reinstall the port.


So, on the two remote servers, I configured emacs to work without DBUS 
and recompiled, but nothing changed: still emacs starts dbus and still 
Konsole does not close automatically unless I kill it.

Then I removed *gconf* support too and now the problem seems to be gone.



 bye  Thanks
av.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: emacs and gconf troubles

2010-12-12 Thread Andrea Venturoli

On 12/11/10 16:18, Ashish SHUKLA wrote:

Hi Andrea,

Sorry for the late reply.


No problem!
Really, thanks for your help.




Okay, I'm able to reproduce warnings. As emacs tries to lookup DBUS session
bus in the environment, and if it doesn't find one, it starts one. And dbus
keeps running in the same TTY after you close emacs, so when you try to exit
 From the SSH session, it hangs waiting for all processes (attached to current
TTY) to exit, and therefore you've to kill the SSH session forcibly. To verify
this, you can kill the started dbus-daemon (attached to the same TTY) and you
should be able to exit from SSH session as usual.

I'm not sure if my explanation is correct for this behavior.


I think it only explains part of it.

Scenario A:
_ dbus is running on localhost;
_ I run Konsole and start Emacs from there;
_ I get the warning (but DBUS is running!!!);
_ after I exit Emacs, Konsole usually closes, but not always (!!!).

Scenario B:
_ dbus is running on localhost;
_ I run Konsole and SSH into another box;
_ on the remote box dbus is not running;
_ I run Emacs, get the warning and DBUS is started;
_ after I exit Emacs I cannot close Konsole unless I also close DBUS.


So your explanation fits the second scenario perfectly, but does not 
explain the first.
Also, I read I shouldn't run DBUS on the remote machine, but let Emacs 
connect to the one on localhost? Is this true? How do I do it?

Should I run DBUS from rc on every box?


 bye  Thanks
av.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: emacs and gconf troubles

2010-12-12 Thread Ashish SHUKLA
Andrea Venturoli writes:
 On 12/11/10 16:18, Ashish SHUKLA wrote:
 Hi Andrea,
 
 Sorry for the late reply.

 No problem!
 Really, thanks for your help.



 Okay, I'm able to reproduce warnings. As emacs tries to lookup DBUS session
 bus in the environment, and if it doesn't find one, it starts one. And dbus
 keeps running in the same TTY after you close emacs, so when you try to exit
 From the SSH session, it hangs waiting for all processes (attached to current
 TTY) to exit, and therefore you've to kill the SSH session forcibly. To 
 verify
 this, you can kill the started dbus-daemon (attached to the same TTY) and you
 should be able to exit from SSH session as usual.
 
 I'm not sure if my explanation is correct for this behavior.

 I think it only explains part of it.

 Scenario A:
 _ dbus is running on localhost;
 _ I run Konsole and start Emacs from there;
 _ I get the warning (but DBUS is running!!!);
 _ after I exit Emacs, Konsole usually closes, but not always (!!!).

Okay, DBus runs in two modes, system-mode, and session-mode. In system-mode,
it's started by rc(8) during boot and exposes itself to all system-wide
services (like HAL, Avahi, etc.), whereas in session-mode it's usually
started by the desktop environment and provides service to all applications
specific to the user session. In case, DBus wasn't found running in the
session, it's started.

So, what I think happening in your case is kdm isn't starting the DBus on
startup of your session, which is why it only gets activated (started) when
you start Emacs (or any other DBus consumer application).

I use startx(1) and following is my $HOME/.xinitrc, where I start DBus prior
to starting xmonad:

#v+
chateau.d.if!abbe:~ % cat .xinitrc
#!/bin/sh

xrdb ~/.Xdefaults
xmodmap ~/.Xmodmap
exec dbus-launch --exit-with-session ck-launch-session xmonad 21 
$HOME/.xsession-errors
#v-

 Scenario B:
 _ dbus is running on localhost;
 _ I run Konsole and SSH into another box;
 _ on the remote box dbus is not running;
 _ I run Emacs, get the warning and DBUS is started;
 _ after I exit Emacs I cannot close Konsole unless I also close DBUS.


 So your explanation fits the second scenario perfectly, but does not
 explain the first.
 Also, I read I shouldn't run DBUS on the remote machine, but let Emacs
 connect to the one on localhost? Is this true? How do I do it?
 Should I run DBUS from rc on every box?

And for good overall desktop experience, please make sure dbus gets started on
system startup, as well as session startup. Lots of services expect DBus to be
running.

If you're running Emacs on server and don't want DBus to be started, then
exclude DBUS using make config and reinstall the port.

  bye  Thanks
   av.

HTH
-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!


pgpzDR1z6MOBn.pgp
Description: PGP signature


Re: emacs and gconf troubles

2010-12-11 Thread Ashish SHUKLA
Hi Andrea,

Sorry for the late reply.

Andrea Venturoli writes:
 On 12/05/10 22:50, Ashish SHUKLA wrote:

 setup, which is 'startx' based, with following contents of $HOME/.xinitrc:
 
 #v+
 #!/bin/sh
 
 xrdb ~/.Xdefaults
 xmodmap ~/.Xmodmap
 exec dbus-launch --exit-with-session ck-launch-session xmonad 
 2$HOME/.xsession-errors
 #v-

 I've got dbus_enable=YES in /etc/rc.conf; I don't remember why.
 I probably read about it in some entry in UPDATING; that might be
 20061219: I also run hald, but not polkit...

 # ps ax|grep dbus
  1620  ??  I  0:00.00 dbus-launch
 --autolaunch=b3fbd8cb89ee22fd22fc29261a5f --binary-syntax
 --close-stderr
  1621  ??  Is 0:00.00 /usr/local/bin/dbus-daemon --fork
 --print-pid 6 --print-address 8 --session
  1697  ??  Ss 0:00.00 /usr/local/bin/dbus-daemon --system


 Anyway, I tried stopping dbus and I get the same warning.

Okay, I'm able to reproduce warnings. As emacs tries to lookup DBUS session
bus in the environment, and if it doesn't find one, it starts one. And dbus
keeps running in the same TTY after you close emacs, so when you try to exit
From the SSH session, it hangs waiting for all processes (attached to current
TTY) to exit, and therefore you've to kill the SSH session forcibly. To verify
this, you can kill the started dbus-daemon (attached to the same TTY) and you
should be able to exit from SSH session as usual.

I'm not sure if my explanation is correct for this behavior.

HTH
-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!


pgpfnIT9IZiN5.pgp
Description: PGP signature


Re: emacs and gconf troubles

2010-12-06 Thread Andrea Venturoli

On 12/05/10 22:50, Ashish SHUKLA wrote:


setup, which is 'startx' based, with following contents of $HOME/.xinitrc:

#v+
#!/bin/sh

xrdb ~/.Xdefaults
xmodmap ~/.Xmodmap
exec dbus-launch --exit-with-session ck-launch-session xmonad 
2$HOME/.xsession-errors
#v-


I've got dbus_enable=YES in /etc/rc.conf; I don't remember why.
I probably read about it in some entry in UPDATING; that might be 
20061219: I also run hald, but not polkit...


# ps ax|grep dbus
 1620  ??  I  0:00.00 dbus-launch 
--autolaunch=b3fbd8cb89ee22fd22fc29261a5f --binary-syntax --close-stderr
 1621  ??  Is 0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 
6 --print-address 8 --session

 1697  ??  Ss 0:00.00 /usr/local/bin/dbus-daemon --system


Anyway, I tried stopping dbus and I get the same warning.






Are you using X11 forwarding in ssh ?


Yes, but this also happens from the local host.






Could you please paste the output of
'export' (or whatever command your shell uses to list all environment
variables with their values) ?


%env
USER=andrea
LOGNAME=andrea
HOME=/home/andrea
MAIL=/var/mail/andrea
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/andrea/bin
TERM=xterm
FTP_PROXY=http://localhost:8080/
HTTP_PROXY=http://localhost:8080/
FTP_PASSIVE_MODE=YES
BLOCKSIZE=K
SHELL=/bin/csh
SSH_CLIENT=10.1.2.18 19420 22
SSH_CONNECTION=10.1.2.18 19420 10.1.2.13 22
SSH_TTY=/dev/pts/1
DISPLAY=localhost:11.0
HOSTTYPE=FreeBSD
VENDOR=intel
OSTYPE=FreeBSD
MACHTYPE=i386
SHLVL=1
PWD=/home/andrea
GROUP=users
HOST=soth.ventu
REMOTEHOST=alamar.ventu
EDITOR=vi
PAGER=less
SGML_ROOT=/usr/local/share/sgml
SGML_CATALOG_FILES=/usr/doc/it_IT.ISO8859-15/share/sgml/catalog:/usr/doc/en_US.ISO8859-1/share/sgml/catalog:/usr/doc/share/sgml/catalog:/usr/local/share/sgml/docbook/4.1/catalog:/usr/local/share/sgml/html/catalog:/usr/local/share/sgml/iso8879/catalog:/usr/local/share/sgml/jade/catalog
CLICOLOR=yeah





 bye  Thanks
av.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: emacs and gconf troubles

2010-12-05 Thread Ashish SHUKLA
Hi Andrea,

Andrea Venturoli writes:
 Hello.
 I'm having a small, low priority, trouble; more an annoyance in fact.

 Since a while, if I start an X11 emacs from a terminal window, after I
 close emacs, the terminal window won't close with Ctrl-D; I have to
 close the terminal windows by hand.

 With the latest upgrade, I see the following warning at emacs startup:

 (emacs:2267): GLib-WARNING **: In call to g_spawn_sync()
 exit status of a child process was requested but SIGCHLD
 action was set to SIG_IGN and ECHILD was received by
 waitpid(), so exit status can't be returned. This is a bug
 in the program calling g_spawn_sync(); either don't request
 the exit status, or don't set the SIGCHLD action.
 GConf Error: Failed to contact configuration server; some
 possible causes are that you need to enable TCP/IP networking
 for ORBit, or you have stale NFS locks due to a system crash.
 See http://projects.gnome.org/gconf/ for information.
 (Details -  1: Failed to get connection to session: Command
 line `dbus-launch --autolaunch=b3fbd8cb89ee22fd22fc29261a5f
 --binary-syntax --close-stderr' exited with non-zero exit status
 3429110: )
 
 (emacs:2267): GLib-WARNING **: In call to g_spawn_sync(), exit
 status of a child process was requested but SIGCHLD action was set
 to SIG_IGN and ECHILD was received by waitpid(), so exit status
 can't be returned. This is a bug in the program calling
 g_spawn_sync(); either don't request the exit status, or don't set the
 SIGCHLD action.

 I really don't understand what I should check...
 Any help is appreciated.

How're you starting X server ? And with which version are you seeing this
behaviour ? And are you running GNOME, KDE, or any desktop environment ?

Thanks
-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!


pgpqlcSyYTuqW.pgp
Description: PGP signature


Re: emacs and gconf troubles

2010-12-05 Thread Byung-Hee HWANG
Andrea Venturoli m...@netfence.it 쓰시길:

 Hello.
 I'm having a small, low priority, trouble; more an annoyance in fact.

 Since a while, if I start an X11 emacs from a terminal window, after I
 close emacs, the terminal window won't close with Ctrl-D; I have to
 close the terminal windows by hand.

 With the latest upgrade, I see the following warning at emacs startup:

 (emacs:2267): GLib-WARNING **: In call to g_spawn_sync()
 exit status of a child process was requested but SIGCHLD
 action was set to SIG_IGN and ECHILD was received by
 waitpid(), so exit status can't be returned. This is a bug
 in the program calling g_spawn_sync(); either don't request
 the exit status, or don't set the SIGCHLD action.
 GConf Error: Failed to contact configuration server; some
 possible causes are that you need to enable TCP/IP networking
 for ORBit, or you have stale NFS locks due to a system crash.
 See http://projects.gnome.org/gconf/ for information.
 (Details -  1: Failed to get connection to session: Command
 line `dbus-launch --autolaunch=b3fbd8cb89ee22fd22fc29261a5f
 --binary-syntax --close-stderr' exited with non-zero exit status
 3429110: )

 (emacs:2267): GLib-WARNING **: In call to g_spawn_sync(), exit
 status of a child process was requested but SIGCHLD action was set
 to SIG_IGN and ECHILD was received by waitpid(), so exit status
 can't be returned. This is a bug in the program calling
 g_spawn_sync(); either don't request the exit status, or don't set the
 SIGCHLD action.

 I really don't understand what I should check...
 Any help is appreciated.

There is no trouble if you run Emacs on GNOME desktop, IMHO.

Still you don't have GNOME, please go ahead..

# pkg_add -v -r ...

Sincerely,
 
-- 
소여물 황병희(黃炳熙) | .. 출항 15분전..

Santino, never let anyone outside the family know what you are thinking.
-- Vito Corleone, Chapter 2, page 75


pgpUH1FJRh3pN.pgp
Description: PGP signature


Re: emacs and gconf troubles

2010-12-05 Thread Andrea Venturoli

On 12/05/10 15:18, Ashish SHUKLA wrote:


How're you starting X server ?


Through KDM.




And with which version are you seeing this behaviour ?


You mean:

%pkg_info|grep emacs
emacs-23.2_4,2  GNU editing macros

?





And are you running GNOME, KDE, or any desktop environment ?


KDE.
I see this if I start emacs from xterm or if I ssh into another box and 
start emacs from there. The other box have no X server (but I think this 
does not matter).




I should also have mentioned that I mount home via NFS; statd and lockd 
are running on all machines.




 bye  Thanks
av.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: emacs and gconf troubles

2010-12-05 Thread Ashish SHUKLA
Andrea Venturoli writes:
 On 12/05/10 15:18, Ashish SHUKLA wrote:

 How're you starting X server ?

 Through KDM.

 And with which version are you seeing this behaviour ?

 You mean:

 %pkg_info|grep emacs
 emacs-23.2_4,2  GNU editing macros

 ?

I tried that version as well, but I wasn't able to reproduce the error with my
setup, which is 'startx' based, with following contents of $HOME/.xinitrc:

#v+
#!/bin/sh

xrdb ~/.Xdefaults
xmodmap ~/.Xmodmap
exec dbus-launch --exit-with-session ck-launch-session xmonad 
2$HOME/.xsession-errors
#v-

 And are you running GNOME, KDE, or any desktop environment ?

 KDE.
 I see this if I start emacs from xterm or if I ssh into another box
 and start emacs from there. The other box have no X server (but I
 think this does not matter).

Are you using X11 forwarding in ssh ? Could you please paste the output of
'export' (or whatever command your shell uses to list all environment
variables with their values) ?


 I should also have mentioned that I mount home via NFS; statd and
 lockd are running on all machines.



  bye  Thanks
   av.

Thanks
-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

Avoid Success At All Costs !!


pgpXHXz5uyQU4.pgp
Description: PGP signature