0

In Debian Stretch, I added Ctrl+Alt+T as a shortcut to gnome-terminal, including "175x25-0-0" as the geometry (a wide window, at the bottom-right of the screen).

I want the same behavior when the terminal is opened from Nautilus' Open in Terminal command, but all I could change (via profile preferences) was the size, not the position.

I tried changing the Custom command (also in profile preferences), to include the geometry, but I ended up with a recursive and useless terminal (recovered via this answer).

I also tried changing /usr/bin/gnome-terminal.wrapper, including

push(@args,"--geometry=175x25-0-0");

right before the final exec, but didn't work either.

How can I set the position of the terminal, when called from Nautilus?

Rodrigo
  • 1,732
  • 2
  • 16
  • 29
  • Have you tried this?: https://ubuntuforums.org/showthread.php?t=1474500 – J. Taylor Apr 01 '18 at 05:55
  • @J.Taylor Yes, I've come across that post. If you look at it, you'll notice that /usr/share/vte/termcap/xterm has only options for size, not position. Also, Debian doesn't seem to have a System/Preferences/Preferred Applications. – Rodrigo Apr 01 '18 at 11:53
  • Afiak the code responsible for launching that terminal is part of `gnome-terminal`, you'll have to patch the source code to change the geometry - see [`src/terminal-nautilus.c`](https://git.gnome.org/browse/gnome-terminal/tree/src/terminal-nautilus.c#n328). It might be more convenient to write your own nautilus-python extension (there's plenty of them on the web, pick one that works on your setup and adapt it to your needs)... – don_crissti Apr 01 '18 at 14:34
  • @don_crissti Change the Nautilus source code to make it point somewhere else (a bash script?) wouldn't be easier, or at least equally complex? – Rodrigo Apr 01 '18 at 21:40
  • I don't think you read my post above... This isn't `nautilus` code, it's `gnome-terminal` code... As I said, you can always write your own extension - that's the easiest way. – don_crissti Apr 01 '18 at 21:45
  • @don_crissti I read, but I kind of didn't believe that the code to launch a software from Nautilus wouldn't be inside Nautilus... That's strange... I'll take a look at it, thank you! – Rodrigo Apr 01 '18 at 22:26
  • It's not strange. That's how all (C and Python) `nautilus` extensions work. If you take a peak at `gnome-terminal` source code (check the `makefile`...) you'll see that this is accomplished via a library (on my archlinux install it's `/usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so`...) – don_crissti Apr 01 '18 at 22:30
  • @don_crissti Right, thank you for explaining that. – Rodrigo Apr 01 '18 at 23:47

0 Answers0