I use Ubuntu 18.04 Gnome. Using the newns script approach in https://superuser.com/questions/983727/route-only-specific-traffic-through-vpn I managed to start an xterm which uses a VPN network connection, as opposed to rest of the system (which does not use the VPN) - so far, so good.

However, I'm more comfortable working in gnome-terminal. So, I tried to start gnome-terminal from that xterm - and indeed, it starts as new window; however, the newly started gnome-terminal uses the same non-VPN network configuration as the rest of the system, which can be confirmed by running ifconfig (the xterm in this case shows different network interfaces from those seen in the rest of the system).

So my question is - is it possible to start a gnome-terminal window from such an xterm, such that the bash running in it fully inherits the environment of the parent xterm, including the special (VPN) network configuration (and that is kept for all tabs opened in that gnome-terminal window) - while there are other gnome-terminal windows open in the desktop, which do have and are intended to keep, the usual system network configuration?

EDIT: Turns out, I had it installed, and if I start mate-terminal & from this xterm, it inherits the VPN network configuration - and opening further tabs in this mate-terminal window also inherit the network settings! So it is a decent workaround for now ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.