First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 158469
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Daniel Gryniewicz <dang@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Travis Hansen <travisghansen@yahoo.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 158469 depends on: Show dependency tree
Bug 158469 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-18 09:20 0000
If you install gksu, you will get a "Root Terminal" menu item inside of
Accessories.  It attempts to use gksu to launch a terminal, but the executable
it tries to launch is `x-terminal-emulator`.  It looks like debian creates some
symlinks or something for this.  It might be good to patch it to use
gnome-terminal?

------- Comment #1 From Daniel Gryniewicz 2006-12-20 13:03:19 0000 -------
Just an update on this bug:

I tried to do this, and discovered that arm has no keywords for any
gnome-terminal.  This makes it a bit hard to depend on it...

My current thought is that I'll stop installing that misleading desktop file. 
I'm open to alternative suggestions.

------- Comment #2 From Travis Hansen 2006-12-20 13:09:51 0000 -------
yeah, this kinda a tough one, the only way I can think of is kinda a
headache...creating some sort of eselect module for it.  Or maybe just change
the default to xterm and let people change it manually if they want.

------- Comment #3 From subs@j79zlr.com 2006-12-20 19:05:16 0000 -------
Why doesn't it respect the gnome preferred application's terminal as discussed
here:

http://forums.gentoo.org/viewtopic-t-524578.html

------- Comment #4 From Travis Hansen 2006-12-21 07:16:17 0000 -------
Yeah, I was just thinking about this.  One idea, is to change the Exec line of
the .desktop file and remove the gksu.  Then create an x-terminal-emulator
shell script that reads the gconf keys for the user and launches that with the
gksu command.


TERMINAL_APP=$(gconftool-2 --get "/desktop/gnome/applications/terminal/exec")

$(gksu ${TERMINAL_APP})

Seems fairly simple, and we already dep on gconf.  But there could be other
issues that haven't crossed my mind.

------- Comment #5 From Daniel Gryniewicz 2007-01-03 19:38:50 0000 -------
It's possible.  I'll look into what debian does, when I get a chance.  The
issue is what to do if that is set to gnome-terminal, but it's not installed,
for example.  There's no reason why the program in that setting should be
installed, unless we've depped on it.

------- Comment #6 From Daniel Gryniewicz 2007-01-30 18:51:46 0000 -------
*** Bug 164451 has been marked as a duplicate of this bug. ***

------- Comment #7 From Daniel Gryniewicz 2007-01-30 20:14:20 0000 -------
Okay, so Debian has some complex system for terminal emulators to register
themselves at various priorities.  That's not something I want to maintain.  At
this point, I see only a couple of possiblities: add a dep on gnome-terminal
under the gnome USE flag, and arm and sh have to deal; Remove the desktop file
entirely (I don't like this option, it's a useful thing to have); Move the
desktop file to some other package that deps on gksu, say gnome-terminal.

Anyone else come up with any possibilites?  Keep in mind, and program we run
*must* be depped on.

------- Comment #8 From Travis Hansen 2007-01-30 20:44:21 0000 -------
I've created a script file

'''
#!/bin/bash

TERMINAL_APP=$(gconftool-2 --get "/desktop/gnome/applications/terminal/exec")

TERMINAL_APP_EXEC_ARG=$(gconftool-2 --get
"/desktop/gnome/applications/terminal/exec_arg")

$(gksu ${TERMINAL_APP})

exit 0

'''

and saved this bad boy in /usr/sbin/<whatever you want>


Then I changed the .desktop file to launch the script (without gksu cause it
gets called in the script) and I'm happy.

------- Comment #9 From Daniel Gryniewicz 2007-01-30 21:22:37 0000 -------
That's no good.  We have to know what that script is calling, and ensure it's
installed via a dep.

------- Comment #10 From Gilles Dartiguelongue 2008-03-29 12:26:19 0000 -------
(In reply to comment #9)
> That's no good.  We have to know what that script is calling, and ensure it's
> installed via a dep.
> 

well it doesn't work at all currently and if we do that, then the user might
just be pointed to how to change the setting in gconf like what evolution
ebuild does for non-gnome users. @herd, what do you think ?

------- Comment #11 From Otávio Cipriani 2008-05-23 18:35:26 0000 -------
(In reply to comment #0)
> If you install gksu, you will get a "Root Terminal" menu item inside of
> Accessories.  It attempts to use gksu to launch a terminal, but the executable
> it tries to launch is `x-terminal-emulator`.  It looks like debian creates some
> symlinks or something for this.  It might be good to patch it to use
> gnome-terminal?
> 

Easy workaround "ln -s /usr/bin/gnome-terminal /usr/bin/x-terminal-emulator"

------- Comment #12 From Arun Raghavan 2008-05-23 21:25:58 0000 -------
(In reply to comment #10)
> (In reply to comment #9)
> > That's no good.  We have to know what that script is calling, and ensure it's
> > installed via a dep.
> > 
> 
> well it doesn't work at all currently and if we do that, then the user might
> just be pointed to how to change the setting in gconf like what evolution
> ebuild does for non-gnome users. @herd, what do you think ?

The message idea sounds good. In addition to this, how about:

x-terminal-emulator can be a little package that does the gconf magic, and if
that program doesn't exist, fires up gnome-terminal. If gnome-terminal doesn't
exist, it displays a message like the one in the ebuild (it can also use zenity
to throw the popup up if it's present).

I can hack up this x-terminal-emulator if it sounds okay. Also,
x-terminal-emultaor is probably wrong nomenclature if we want to use
gconf/gnome-terminal as the default. g-terminal-emulator or something like that
probably makes more sense. :)

------- Comment #13 From Gilles Dartiguelongue 2008-05-23 23:10:29 0000 -------
*** Bug 223251 has been marked as a duplicate of this bug. ***

------- Comment #14 From Daniel Gryniewicz 2008-05-24 16:20:11 0000 -------
Okay, I've just taken the simple out for this.  If USE gnome, then the .desktop
will refer to gnome-terminal, and there's a dep.  If ! USE gnome, then the
.desktop isn't installed at all.  If someone is willing to knock up a good
script to do this (preferably with eselect) I'm more than willing to take it.

------- Comment #15 From Otávio Cipriani 2008-05-24 17:36:50 0000 -------
(In reply to comment #14)
> Okay, I've just taken the simple out for this.  If USE gnome, then the .desktop
> will refer to gnome-terminal, and there's a dep.  If ! USE gnome, then the
> .desktop isn't installed at all.  If someone is willing to knock up a good
> script to do this (preferably with eselect) I'm more than willing to take it.

May I suggest that the Icon in the ".desktop" be changed to "gnome-terminal"?
It is much better looking than the default one.

------- Comment #16 From Daniel Gryniewicz 2008-05-25 03:04:33 0000 -------
I agree it looks better, but it's probably a good thing that the root terminal
icon looks different, so I'll leave it for now.

------- Comment #17 From Louis Frayser 2008-10-03 01:02:23 0000 -------
gksu-2.0.0-r1:

Gnome-terminal's default profile (for root) determines what it does when gksu
opens it.  On my system this default profile starts a shell as an unprivilaged
user, thus defeating the whole purpose of gksu.  

Not knowing what root's default profile would do, it's possibly incorrect for
gksu to invoke gnome-terminal--unless there's some way of disabling the profile
mechanism. I wish gnome-terminal had a "--no-default-profile" option, but
couldn't find anything like that.

gksu "/usr/bin/gnome-terminal -e su - " gives the desired result; but that's so
redundant.

------- Comment #18 From Rémi Cardona 2009-01-08 16:48:17 0000 -------
*** Bug 254213 has been marked as a duplicate of this bug. ***

------- Comment #19 From denis 2009-01-08 20:18:12 0000 -------
(In reply to comment #17)
> gksu-2.0.0-r1:
> 
> Gnome-terminal's default profile (for root) determines what it does when gksu
> opens it.  On my system this default profile starts a shell as an unprivilaged
> user, thus defeating the whole purpose of gksu.  
> 
> Not knowing what root's default profile would do, it's possibly incorrect for
> gksu to invoke gnome-terminal--unless there's some way of disabling the profile
> mechanism. I wish gnome-terminal had a "--no-default-profile" option, but
> couldn't find anything like that.
> 
> gksu "/usr/bin/gnome-terminal -e su - " gives the desired result; but that's so
> redundant.
> 

This (gksu "/usr/bin/gnome-terminal -e su - ") does NOT give me the desired /
expected result. 

$ gksu "/usr/bin/gnome-terminal -e su - "
Xlib:  extension "RANDR" missing on display "127.0.0.1:2.0".
Xlib: connection to "127.0.0.1:2.0" refused by server
Xlib: Client is not authorized to connect to Server
Cannot open display: 
Run '/usr/bin/gnome-terminal --help' to see a full list of available command
line options.

------- Comment #20 From Louis Frayser 2009-01-10 08:03:57 0000 -------
> (In reply to comment #17)
> > gksu-2.0.0-r1:
> > 
> $ gksu "/usr/bin/gnome-terminal -e su - "
> Xlib:  extension "RANDR" missing on display "127.0.0.1:2.0".
> Xlib: connection to "127.0.0.1:2.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Cannot open display: 

The display tried was ":2.0" and there was an authorization problem connecting
to it.  

Is this is a case of logging in to a remote system from X running on another
system?  The display is usually ":0.0" when running locally?  If this is a
remote session, then some combination of the xhost command and use of the
DISPLAY environment variable should help.  Something similar may arise from
having multiple X servers on the local host.

Also, running  gksu "/usr/bin/gnome-terminal -e su" without the final hyphen,
avoiding a new session and preserving the DISPLAY variable, might help; the
resulting environment (PATH, etc.) in gnome-terminal would be mostly the user's
instead of root's.

------- Comment #21 From denis 2009-01-11 13:57:23 0000 -------
(In reply to comment #20)
> > (In reply to comment #17)
> > > gksu-2.0.0-r1:
> > > 
> > $ gksu "/usr/bin/gnome-terminal -e su - "
> > Xlib:  extension "RANDR" missing on display "127.0.0.1:2.0".
> > Xlib: connection to "127.0.0.1:2.0" refused by server
> > Xlib: Client is not authorized to connect to Server
> > Cannot open display: 
> 
> The display tried was ":2.0" and there was an authorization problem connecting
> to it.  
> 
> Is this is a case of logging in to a remote system from X running on another
> system?  The display is usually ":0.0" when running locally?  If this is a
> remote session, then some combination of the xhost command and use of the
> DISPLAY environment variable should help.  Something similar may arise from
> having multiple X servers on the local host.
> 
> Also, running  gksu "/usr/bin/gnome-terminal -e su" without the final hyphen,
> avoiding a new session and preserving the DISPLAY variable, might help; the
> resulting environment (PATH, etc.) in gnome-terminal would be mostly the user's
> instead of root's.
> 

The display number is correct: my client connects to Xvnc server session
running on remote server.

Running command gksu "/usr/bin/gnome-terminal -e su" without the final hyphen
as you suggested does bring up the terminal, as wanted.
There are warning messages, but they don't mattter to me as long as I get
result.
Thank you.

$ gksu "/usr/bin/gnome-terminal -e su"
Xlib:  extension "RANDR" missing on display "127.0.0.1:2.0".
Xlib:  extension "RANDR" missing on display "127.0.0.1:2.0".

(gnome-terminal:31256): GnomeUI-WARNING **: While connecting to session
manager:
Authentication Rejected, reason : None of the authentication protocols
specified are supported and host-based authentication failed.

First Last Prev Next    No search results available      Search page      Enter new bug