Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nemo "open terminal" doesn't work here. #19

Closed
leigh123linux opened this issue Sep 22, 2012 · 11 comments
Closed

Nemo "open terminal" doesn't work here. #19

leigh123linux opened this issue Sep 22, 2012 · 11 comments

Comments

@leigh123linux
Copy link
Contributor

Nemo "open terminal" doesn't work here.

@clefebvre
Copy link
Member

Doesn't "work"? :)

@leigh123linux
Copy link
Contributor Author

I expect it to open a terminal window and it doesn't.

@clefebvre
Copy link
Member

It calls x-terminal-emulator

@leigh123linux
Copy link
Contributor Author

I don't think fedora uses x-terminal-emulator

$ which x-terminal-emulator
/usr/bin/which: no x-terminal-emulator in (/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/leigh/.local/bin:/home/leigh/bin)

@leigh123linux
Copy link
Contributor Author

@clefebvre Thank you for the help.

The patch below fixes the issue on fedora

--- a/src/nemo-view.c
+++ b/src/nemo-view.c
@@ -6071,7 +6071,7 @@ static void
 open_in_terminal (gchar *location)
 {  
     gchar *argv[2];
-    argv[0] = "x-terminal-emulator";
+    argv[0] = "gnome-terminal";
     argv[1] = NULL;
     g_spawn_async(location, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
 }

@clefebvre
Copy link
Member

That's not the right fix unless you want to make nemo dependent on gnome-terminal...

clem@storm:$ which x-terminal-emulator
/usr/bin/x-terminal-emulator
clem@storm:
$ more /usr/bin/x-terminal-emulator
#! /usr/bin/perl -w

my $login=0;

while ($opt = shift(@argv))
{
if ($opt eq '-display')
{
$ENV{'DISPLAY'} = shift(@argv);
}
elsif ($opt eq '-name')
{
$arg = shift(@argv);
push(@Args, "--window-with-profile=$arg");
}
elsif ($opt eq '-n')
{
# Accept but ignore
print STDERR "$0: to set an icon, please use -name and set a p
rofile icon\n"
}
elsif ($opt eq '-T' || $opt eq '-title')
{
push(@Args, '-t', shift(@argv));
}
elsif ($opt eq '-ls')
{
$login = 1;
}
elsif ($opt eq '+ls')
{
$login = 0;
}
elsif ($opt eq '-geometry')
{
$arg = shift(@argv);
push(@Args, "--geometry=$arg");
}
elsif ($opt eq '-fn')
{
$arg = shift(@argv);
push(@Args, "--font=$arg");
}
elsif ($opt eq '-fg')
{
$arg = shift(@argv);
push(@Args, "--foreground=$arg");
}
elsif ($opt eq '-bg')
{
$arg = shift(@argv);
push(@Args, "--background=$arg");
}
elsif ($opt eq '-tn')
{
$arg = shift(@argv);
push(@Args, "--termname=$arg");
}
elsif ($opt eq '-e')
{
$arg = shift(@argv);
if (@argv)
{
push(@Args, '-x', $arg, @argv);
last;
}
else
{
push(@Args, '-e', $arg);
}
last;
}
elsif ($opt eq '-h' || $opt eq '--help')
{
push(@Args, '--help');
}
}
if ($login == 1)
{
@Args = ('--login', @Args);
}
exec('gnome-terminal',@Args);

@leigh123linux
Copy link
Contributor Author

The "open terminal" feature in fedora nautilus has always been tied to gnome-terminal.

@vdcow
Copy link

vdcow commented Nov 15, 2012

Follow 2 patches(second just fixes my inaccuracy with g_free)

http://git.altlinux.org/people/cow/packages/?p=nemo.git;a=commitdiff;h=b68a87b405b4f87539a0565ecf419ff433983041
http://git.altlinux.org/people/cow/packages/?p=nemo.git;a=commitdiff;h=7150a42ff7d07d28a624bd0db0f9a3db5c5ddbd4;hp=4c1c3bae3ab221945ef795840a180baac4abdb9d

implement default terminal setting via gsetting(org.nemo.preferences.terminal param). Many distros don't use x-terminal-emulator so may be better to gsettings. If necessary I can create pull request.

@ghost
Copy link

ghost commented Jan 25, 2013

I'm wondering when will vovka-korovka's patch will be merged.

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented Oct 13, 2016

This issue still exists when running nemo in Xubuntu 16.04 LTS.

@jeromedecoster
Copy link

This issue still exists when running nemo in Xubuntu 16.10 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants