# Headless server: why does samba need X?



## serverhamster (Jun 1, 2011)

I'm trying to figure out why samba installed some X libraries on my server. Samba is installed from ports with the following options:

```
leto# make showconfig
===> The following configuration options are available for samba35-3.5.6_2:
     LDAP=on "With LDAP support"
     ADS=off "With Active Directory support"
     CUPS=on "With CUPS printing support"
     WINBIND=on "With WinBIND support"
     SWAT=off "With SWAT WebGUI"
     ACL_SUPPORT=off "With ACL support"
     AIO_SUPPORT=off "With Asyncronous IO support"
     FAM_SUPPORT=off "With File Alteration Monitor"
     SYSLOG=off "With Syslog support"
     QUOTAS=off "With Disk quota support"
     UTMP=off "With UTMP accounting support"
     PAM_SMBPASS=off "With PAM authentication vs passdb backends"
     DNSUPDATE=off "With dynamic DNS update(require ADS)"
     AVAHI=on "With Bonjour service discovery support"
     EXP_MODULES=off "With experimental modules"
     POPT=on "With system-wide POPT library"
     IPV6=on "With IPv6 support"
     MAX_DEBUG=off "With maximum debugging"
     SMBTORTURE=off "With smbtorture"
===> Use 'make config' to modify these settings
```
In order to prevent this from happening again, I have put *WITHOUT_X11=yes* in /etc/make.conf.

A couple of questions:

Will *WITHOUT_X11* really prevent this from happening?
How can I find out what the dependencies of samba35 are?
How can I change those dependencies and find out what packages are no longer needed because of that change?


----------



## mk (Jun 1, 2011)

`$ make run-depends-list`
or
`$ make build-depends-list`

to give you an idea what is need for building and/or running given app.
Check ports() manual.
I don't know why samba wants X11 though.


----------



## SirDice (Jun 1, 2011)

serverhamster said:
			
		

> I'm trying to figure out why samba installed some X libraries on my server.


It's because of CUPS.



> In order to prevent this from happening again, I have put *WITHOUT_X11=yes* in /etc/make.conf.
> 
> A couple of questions:
> 
> Will *WITHOUT_X11* really prevent this from happening?


Yes.



> [*]How can I find out what the dependencies of samba35 are?


`# make run-depends-list`
`# make build-depends-list`
`# make all-depends-list`




> How can I change those dependencies and find out what packages are no longer needed because of that change?


The above commands and `# make config`


----------



## serverhamster (Jun 5, 2011)

Thank you all. Samba needs X because I enabled AVAHI, which installed avahi-app. I find it curious why avahi would need X, but I don't really need it and recompiling without it erased the dependency.


----------

