Only bind server to specific interface

9 views
Skip to first unread message

Robert Arkiletian

unread,
Sep 21, 2025, 2:53:58 AMSep 21
to TigerVNC User Discussion/Support
On Debian 12 and 13 
In the man page for xtigervnc it states the -inteface parameter

-interface IP address
              Listen on interface. By default Xtigervnc listens on all available interfaces.

I assume IP address is one argument. However, editing the systemd unit file does not work as it calls tigervncsession-start

ExecStart=/usr/libexec/tigervncsession-start %i

ExecStart=/usr/libexec/tigervncsession-start -interface 192.168.x.xxx %i 
fails

So I tried editing /etc/tigervnc/vncserver-config-defaults
adding line
$interface = "192.168.x.xxx";
which also fails 

Also tried creating a config.pl in home dir of vnc user 
.config/tigervnc/config.pl
interface=192.168.x.xxx
also fails.

Any help is much appreciated. 

Pierre Ossman

unread,
Sep 22, 2025, 1:49:21 AMSep 22
to Robert Arkiletian, TigerVNC User Discussion/Support
On 21/09/2025 08:53, Robert Arkiletian wrote:
> So I tried editing /etc/tigervnc/vncserver-config-defaults
> adding line
> $interface = "192.168.x.xxx";
> which also fails
>

This should be the right place. Are you sure it should be Perl syntax,
though, and not just "interface=192.168.x.xxx"?

It sounds like you are using Debian's TigerVNC package, which has
different configuration than ours. So I'm only guessing here.

Are you getting any errors, or is the setting just ignored?

Regards,
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Robert Arkiletian

unread,
Sep 23, 2025, 1:35:29 AMSep 23
to tigervn...@googlegroups.com


---------- Forwarded message ---------
From: Robert Arkiletian <rob...@gmail.com>
Date: Mon, Sep 22, 2025 at 10:18 PM
Subject: Re: [tigervnc-users] Only bind server to specific interface
To: Pierre Ossman <oss...@cendio.se>




On Sun, Sep 21, 2025 at 10:49 PM Pierre Ossman <oss...@cendio.se> wrote:
On 21/09/2025 08:53, Robert Arkiletian wrote:
> So I tried editing /etc/tigervnc/vncserver-config-defaults
> adding line
> $interface = "192.168.x.xxx";
> which also fails
>

This should be the right place. Are you sure it should be Perl syntax,
though, and not just "interface=192.168.x.xxx"?

It sounds like you are using Debian's TigerVNC package, which has
different configuration than ours. So I'm only guessing here.

Are you getting any errors, or is the setting just ignored?


Yes, I am using Debian TigerVNC package. Tried your suggestion. The config file just gets ignored as it now binds to localhost because one of the lines in the file is 
$localhost = "no";
Any other suggestions? 

Pierre Ossman

unread,
Sep 23, 2025, 3:29:36 AMSep 23
to Robert Arkiletian, tigervn...@googlegroups.com
On 23/09/2025 07:35, Robert Arkiletian wrote:
> Yes, I am using Debian TigerVNC package. Tried your suggestion. The config
> file just gets ignored as it now binds to localhost because one of the
> lines in the file is
> $localhost = "no";
> Any other suggestions?
>

Afraid not. I would suggest filing an issue with Debian and see what
input they have.

Regards,
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc

Robert Arkiletian

unread,
Sep 23, 2025, 12:20:10 PMSep 23
to Pierre Ossman, tigervn...@googlegroups.com
On Tue, Sep 23, 2025 at 12:29 AM Pierre Ossman <oss...@cendio.se> wrote:
On 23/09/2025 07:35, Robert Arkiletian wrote:
> Yes, I am using Debian TigerVNC package. Tried your suggestion. The config
> file just gets ignored as it now binds to localhost because one of the
> lines in the file is
> $localhost = "no";
> Any other suggestions?
>

Afraid not. I would suggest filing an issue with Debian and see what
input they have.


Finally solved the issue!
the line in /etc/tigervnc/vncserver-config

$interface = "192.168.x.xxx";

MUST come BEFORE the line

$localhost = "no"
 
I was always putting the $interface line after the $localhost line. In that case, it just binds to localhost. This was not clear in the man pages. 
 
Reply all
Reply to author
Forward
0 new messages