Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   f16 error on starting emacs from root as "su -" (http://www.linux-archive.org/fedora-user/700240-f16-error-starting-emacs-root-su.html)

jackson byers 09-03-2012 07:37 PM

f16 error on starting emacs from root as "su -"
 
f16 error on starting emacs from root as "su -"

[root@f16a9 ~]# uname -a
Linux f16a9.pacbell.net 3.4.9-2.fc16.i686.PAE #1 SMP Thu Aug 23
18:41:34 UTC 2012 i686 i686 i386 GNU/Linux


[root@f16a9 ~]# emacs test.sudash &
[1] 2042
[root@f16a9 ~]#
no emacs window
evidently the emacs job is "stopped":

[root@f16a9 ~]# ps aux |grep emacs
...
root 2042 0.0 0.3 30056 6488 pts/0 T 11:57 0:00 emacs
test.sudash
root 2044 0.0 0.0 4600 816 pts/0 S+ 11:58 0:00 grep
--color=auto emacs

[1]+ Stopped emacs test.sudash
[root@f16a9 ~]#

If I go to root as "su" [no dash]
then I do get an emacs window,
although with an annoying error message:
[root@f16a9 byers]# emacs test.sunodash &
[1] 2071
[root@f16a9 byers]#
(emacs:2071): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security policy
blocked the reply, the reply timeout expired, or the network
connection was broken.
GConf Error: No D-BUS daemon running


(emacs:2071): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote
application did not send a reply, the message bus security policy
blocked the reply, the reply timeout expired, or the network
connection was broken.

[root@f16a9 byers]#

Despite error msg,
the emacs window comes up and acts normally.

any help?
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Suvayu Ali 09-03-2012 10:36 PM

f16 error on starting emacs from root as "su -"
 
On Mon, Sep 03, 2012 at 12:37:57PM -0700, jackson byers wrote:
> f16 error on starting emacs from root as "su -"
>
> [root@f16a9 ~]# emacs test.sudash &
> [1] 2042

[...]

> [1]+ Stopped emacs test.sudash
> [root@f16a9 ~]#

Disclaimer: I'm not entirely sure about what I write below.

Emacs in Fedora is compiled with D-BUS support, when started as above
the necessary environment variables are missing and Emacs tries to start
in -nw mode; however since you put it in the background, it gets
stopped. If you were to type `fg' next, you would see Emacs in -nw mode
in the terminal.

>
> If I go to root as "su" [no dash]
> then I do get an emacs window,
> although with an annoying error message:
> [root@f16a9 byers]# emacs test.sunodash &
> [1] 2071
> [root@f16a9 byers]#

When started like this, although $UID is 0, the $USER is still you.
Similarly other environment variables like the DBUS session id is
inherited which allows the Emacs gui to start up.

When working as root, I would recommend using emacs -nw. If you really
want to have a gui, you can try using sudo with tramp.

HTH

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

jackson byers 09-04-2012 04:27 PM

f16 error on starting emacs from root as "su -"
 
Suvayu responded:
>Disclaimer: I'm not entirely sure about what I write below.

>Emacs in Fedora is compiled with D-BUS support, when started as above
>the necessary environment variables are missing and Emacs tries to start
>in -nw mode; however since you put it in the background, it gets
>stopped.

>If you were to type `fg' next, you would see Emacs in -nw mode
>in the terminal.

I am embarrassed to admit that I had forgotten about use of 'fg'.
In my many years of running "emacs filename &",
I have not had to use 'fg'.
What usually happens is that a separate emacs window comes up
and leaves my terminal window (where I entered the emacs command)
still free to be used, while also working in the emacs window.
No need for 'fg' at all.
This normally works the same,
whether running as user byers
or as root(su -)
or as root(su).

>When working as root, I would recommend using emacs -nw. If you really
>want to have a gui, you can try using sudo with tramp.

My brief attempts at "emacs -nw"
show an emacs window that takes over the terminal,
which is not what I want.

But something else has since changed:
as a result of another thread re "f16....xfce"
with much help from Joe Zeff,
I now have xfce working properly,
and also no longer have to use C^alt-f2, startxfce4,
to get graphical display.
The last thing fixed required "yum install gdm".

Moreover,
now when running
"emacs filename &" as root (su -)
now works perfectly : a new emacs window,
terminal window stll free. No use of 'fg' required.

Running "emacs filename &" as root (su)
still gives that previously reported error msg,
but again still gives me a separate working emacs window.
No use of 'fg' required.

Thanks for your response

Jack
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Heinz Diehl 09-04-2012 05:29 PM

f16 error on starting emacs from root as "su -"
 
On 04.09.2012, jackson byers wrote:

> (emacs:2071): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
> Did not receive a reply. Possible causes include: the remote
> application did not send a reply, the message bus security policy
> blocked the reply, the reply timeout expired, or the network
> connection was broken.

Thus has been in Fedora since F15. Emacs works normally, so I have
been ignoring this warning ever since..

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


All times are GMT. The time now is 09:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.