Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I dont want Xorg on my server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
b4nsh33
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2004
Posts: 85

PostPosted: Thu Jul 07, 2005 4:36 pm    Post subject: I dont want Xorg on my server Reply with quote

Hi, is there a way to get rid of X from my server, im very disapointed that the portage mainteiners insist on dictate USE flags that enable xorg, i use gentoo mostly on serves, why on earth would i want X?,
this is a web dedicated server (apache+php+mysql), look at this:

fw apache2 # emerge --pretend --verbose mysql

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild R ] dev-db/mysql-4.0.24 +berkdb -debug -innodb +perl +readline (-selinux) +ssl -static +tcpd 0 kB

fw apache2 # emerge --pretend --verbose apache

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild N ] net-www/apache-2.0.54-r7 +berkdb -doc +gdbm +ipv6 -ldap +ssl -static -threads 0 kB

So far so good, but...

fw apache2 # emerge --pretend --verbose mod_php

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild N ] app-text/sablotron-1.0 -doc +perl 472 kB
[ebuild N ] x11-base/opengl-update-2.2.1 38 kB
[ebuild N ] media-libs/fontconfig-2.2.3 732 kB
[ebuild N ] x11-misc/ttmkfdir-3.0.9-r3 19 kB
[ebuild N ] x11-base/xorg-x11-6.8.2-r1 -3dfx -3dnow +bitmap-fonts -cjk -debug -dlloader -dmx -doc -font-server -hardened -insecure-drivers +ipv6 -minimal -mmx +nls +opengl +pam -sdk -sse -static +truetype-fonts +type1-fonts (-uclibc) -xprint +xv 45,094 kB
[ebuild N ] app-arch/rpm2targz-9.0-r2 2 kB
[ebuild N ] sys-apps/utempter-0.5.5.5-r1 20 kB
[ebuild N ] x11-terms/xterm-200-r3 -Xaw3d -toolbar +truetype -unicode 681 kB
[ebuild N ] media-libs/lcms-1.13-r1 +jpeg +python -tiff +zlib 572 kB
[ebuild N ] media-libs/libmng-1.0.8-r1 497 kB
[ebuild N ] media-libs/tiff-3.7.2 1,231 kB
[ebuild N ] net-print/cups-1.1.23-r1 +nls +pam -samba -slp +ssl 8,501 kB
[ebuild N ] x11-libs/qt-3.3.4-r3 +cups -debug -doc -examples -firebird +gif -immqt -immqt-bc +ipv6 +mysql -nas -odbc +opengl -postgres -sqlite -xinerama +zlib 14,101 kB
[ebuild N ] app-crypt/mhash-0.9.2 833 kB
[ebuild N ] dev-libs/libmcrypt-2.5.7 511 kB
[ebuild N ] dev-libs/libxml2-2.6.19 +ipv6 +python +readline 3,100 kB
[ebuild N ] dev-libs/libgpg-error-1.0-r1 +nls 316 kB
[ebuild N ] dev-libs/libgcrypt-1.2.1 +nls 938 kB
[ebuild N ] dev-libs/libxslt-1.1.12 +crypt +python 1,736 kB
[ebuild N ] media-libs/pdflib-5.0.4_p1-r1 -java +perl +python -tcltk 2,759 kB
[ebuild N ] app-text/aspell-0.50.5-r4 +gpm 992 kB
[ebuild N ] net-www/apache-2.0.54-r7 +berkdb -doc +gdbm +ipv6 -ldap +ssl -static -threads 0 kB
[ebuild N ] net-libs/libwww-5.4.0-r3 +mysql +ssl 1,110 kB
[ebuild NS ] sys-libs/db-1.85-r2 279 kB
[ebuild NS ] media-libs/freetype-1.3.1-r4 +nls -tetex 1,919 kB
[ebuild N ] media-libs/t1lib-5.0.2 +X -doc 1,657 kB
[ebuild N ] dev-php/mod_php-4.3.11 +X -apache2 +berkdb +crypt +curl -debug -doc -fdftk -firebird -flash -freetds +gd -gd-external +gdbm -gmp -hardenedphp -imap -informix +ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png -postgres +qt -snmp +spell +ssl -tiff +truetype +xml2 -yaz 3,919 kB
[ebuild N ] dev-php/php-4.3.11 +X +berkdb +crypt +curl -debug -doc -fdftk -firebird -flash -freetds +gd -gd-external +gdbm -gmp -hardenedphp -imap -informix +ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +ncurses +nls -oci8 -odbc +pam +pdflib +png -postgres +qt +readline -snmp +spell +ssl -tiff +truetype +xml2 -yaz 0 kB

*************************************************

WTF!!!, why there are a lot of x11-xxxxxxx libs !!!!!!!, i want only mod_php !!!

the same is for squid, etc, etc

****************************************************


when installing every package, the USE="-X" trick didnt work all the times (certainly not in this specific example).

what flags do i have to set on make.conf, on USE="" or wherever for totally get rid of X, ever ...

thanks and forgive me if am i missing something, but if i would want all that crack , i should be better using mandrake, do you agree?
Back to top
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Thu Jul 07, 2005 4:55 pm    Post subject: Reply with quote

You could try with:

USE="-X -gtk -gtk2 -gnome -qt -kde"

8)
_________________
Google, really.
Back to top
View user's profile Send private message
c4
Guru
Guru


Joined: 21 Feb 2004
Posts: 312
Location: Sweden

PostPosted: Thu Jul 07, 2005 5:44 pm    Post subject: Reply with quote

also add this to /etc/portage/package.mask
Code:
x11-base/xorg-x11


Even with -gtk -gtk2 -qt -X -kde -gnome etc etc as use-flags in make.conf I still had X as a world dependency... masking it made it disappear though.
_________________
AMD64 Gentoo Hardened server
AMD64 Xubuntu Desktop
X86 Dreamlinux Vaio laptop
Back to top
View user's profile Send private message
Nil_Spaar
Apprentice
Apprentice


Joined: 10 Jul 2004
Posts: 179
Location: Berlin, Germany

PostPosted: Thu Jul 07, 2005 5:45 pm    Post subject: Reply with quote

First of all do not use 'USE="..." emerge *'. You will only get an umaintanable system that way.
Useflags you want to globally set for all packages are set in /etc/make.conf and those you want to only set for a specific package in /etc/portage/package.use. And if you don't want X on your box then of course you should put "-X" in make.conf. That's the very purpose of use flags! That you can choose what stuff you want and what not. You just have to tell that to your system since it can hardly guess what you want to do. Maybe you should actually read the handbook and other documentation. Without that you won't get very far on Gentoo, this isn't Suse after all.
Set the flags n3mo recommended in your make.conf and try it out. If xorg still gets pulled in you can try the --tree option to see exactly which packages are depending on xorg and then look at the useflags they have set and figure out which might be responsible. euse from the gentoolkit package might help you with that, only problem is the current stable one is broken so use the latest unstable or search the forums for the (trivial) fix.
Back to top
View user's profile Send private message
b4nsh33
Tux's lil' helper
Tux's lil' helper


Joined: 29 Oct 2004
Posts: 85

PostPosted: Thu Jul 07, 2005 7:37 pm    Post subject: Reply with quote

Hey, the
USE="-X -gtk -gtk2 -gnome -qt -kde" on /etc/make.conf did the trick. thanks n3mo,
i am very new to gentoo, but i read the handbook and it suggests the USE=-X" flag that didnt work for me, thanks anyway

---
Back to top
View user's profile Send private message
bigfunkymo
Apprentice
Apprentice


Joined: 23 Jan 2004
Posts: 237

PostPosted: Thu Jul 07, 2005 11:01 pm    Post subject: Reply with quote

doesn't look like anyone's touched your first question:
Quote:
i use gentoo mostly on serves, why on earth would i want X?

and to which I would answer: For lots of reasons... remote desktop and running x apps remotely and having them displayed on your local X server, for running graphical apps from the console that can give you an at-a-glance summary of the server.

Now for the serious bit... Don't assume that because its a "server" that it cannot have graphical apps or a reason to have xorg installed. You sorta come off narrow-minded to the reader with that attitude. Also, the code button works wonders for readability when you include console output in a post. ;)
_________________
[No package... Grabbing a set.]
Back to top
View user's profile Send private message
stickboy2642
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jan 2004
Posts: 129
Location: MT, USA

PostPosted: Wed Jul 13, 2005 5:27 pm    Post subject: Reply with quote

I would recommend emerging ufed. It is an ncurses based editor for use flags. It allows you to scroll through all of the available flags and check off what you want and what you don't want. Very handy tool.
_________________
<?PHP
if ($desireToSolveProblem > 0){
solve($problem);
}else{
drink($beer);
} ?>
Back to top
View user's profile Send private message
d_m
Guru
Guru


Joined: 12 Jun 2003
Posts: 570
Location: Philadelphia, PA, USA

PostPosted: Wed Jul 13, 2005 5:37 pm    Post subject: Reply with quote

bigfunkymo wrote:
doesn't look like anyone's touched your first question:
Quote:
i use gentoo mostly on serves, why on earth would i want X?

and to which I would answer: For lots of reasons... remote desktop and running x apps remotely and having them displayed on your local X server, for running graphical apps from the console that can give you an at-a-glance summary of the server.


I think what he is really asking is why would he want X to get installed by mod_php.

bigfunkymo wrote:
Now for the serious bit... Don't assume that because its a "server" that it cannot have graphical apps or a reason to have xorg installed. You sorta come off narrow-minded to the reader with that attitude. Also, the code button works wonders for readability when you include console output in a post. ;)


He wasn't talking about someone else... this is his own system! You come across as condescending. His biggest gripe is that he doesn't want X, took the recommended steps to disable it, and it still was getting installed for packages that obviously don't require it (like mod_php or squid). As a system adminstrator I agree with him (I don't find X useful at all on servers I administer), and I don't see why you're jumping all over him about it.
_________________
The name that can be named is not the eternal name.
Back to top
View user's profile Send private message
JeffBlair
Apprentice
Apprentice


Joined: 23 May 2003
Posts: 175
Location: USA, Lone star state

PostPosted: Wed Jul 13, 2005 8:49 pm    Post subject: Reply with quote

I hate to jump on the band wagon, but I don't like X on my server as well. Normaly all I have hooked up to it is a power cord, and a network cord. If I want to do anything other then thru the command line, I will use Webmin. But, to each there own. :)
Back to top
View user's profile Send private message
rex123
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 272

PostPosted: Thu Jul 14, 2005 9:38 am    Post subject: Reply with quote

There are reasons for wanting X libraries on a server, even if you don't want any X clients. For example, you might want to run a web application that creates images... in which case you might use php, and you might want to include some of its graphical capabilities... which have X library dependencies.

Let's have a look at some of the USE flags:

X: in the php ebuild, this enables the libXpm library.
qt: in the php ebuild, this enables QtDOM support.

There are php functions that require these libraries. Which is why Gentoo makes them optional dependencies.

I had to install X libraries on a server because a java web application using awt (even with the headless option on) requires them. So it's not as simple as just saying "it's a server - I don't need X". Unfortunately, Gentoo hasn't got its java dependencies quite as well sorted as its php dependencies (but I blame Sun).
Back to top
View user's profile Send private message
bitwise
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2005
Posts: 104
Location: seattle

PostPosted: Thu Jul 14, 2005 12:06 pm    Post subject: Reply with quote

rex123 wrote:
I had to install X libraries on a server because a java web application using awt (even with the headless option on) requires them. So it's not as simple as just saying "it's a server - I don't need X". Unfortunately, Gentoo hasn't got its java dependencies quite as well sorted as its php dependencies (but I blame Sun).
This is true, but that doesn't necessarily mean you have to run X. I don't think very many people know about things like Xvfb that let a lot of the type of apps you are talking about think they have an X server, without really having an X server. Plus, for java, there is at least one package that I know of that simulates all of the awt etc stuff in pure java (http://www.eteks.com/pja/en/ I believe). Unfortunately, that doesn't work under java 1.5 it would seem.
Back to top
View user's profile Send private message
rex123
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 272

PostPosted: Thu Jul 14, 2005 12:20 pm    Post subject: Reply with quote

Saburo wrote:
rex123 wrote:
I had to install X libraries on a server because a java web application using awt (even with the headless option on) requires them. So it's not as simple as just saying "it's a server - I don't need X". Unfortunately, Gentoo hasn't got its java dependencies quite as well sorted as its php dependencies (but I blame Sun).
This is true, but that doesn't necessarily mean you have to run X. I don't think very many people know about things like Xvfb that let a lot of the type of apps you are talking about think they have an X server, without really having an X server. Plus, for java, there is at least one package that I know of that simulates all of the awt etc stuff in pure java (http://www.eteks.com/pja/en/ I believe). Unfortunately, that doesn't work under java 1.5 it would seem.


The apps I'm talking about don't need an X server. They don't even need an X client. They just need X libraries. They certainly don't need to run X. So I don't think Xvfb would help much. There isn't an ebuild that lets you pick and choose X libraries, so you end up with the whole of x11-base/xorg-x11. Not the end of the world, but a bit more than you might want.

By the way, it looks like the awt libraries in java 1.5 are finally free of X library dependencies, which is nice (but don't quote me).
Back to top
View user's profile Send private message
bigfunkymo
Apprentice
Apprentice


Joined: 23 Jan 2004
Posts: 237

PostPosted: Thu Jul 14, 2005 3:00 pm    Post subject: Reply with quote

Quote:
You come across as condescending.


I am prepared to be judged an asshole :wink:
_________________
[No package... Grabbing a set.]
Back to top
View user's profile Send private message
d_m
Guru
Guru


Joined: 12 Jun 2003
Posts: 570
Location: Philadelphia, PA, USA

PostPosted: Thu Jul 14, 2005 3:37 pm    Post subject: Reply with quote

bigfunkymo wrote:
I am prepared to be judged an asshole :wink:


Well said. ;)

Sorry about the flames, was kind of stressed.
_________________
The name that can be named is not the eternal name.
Back to top
View user's profile Send private message
bitwise
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2005
Posts: 104
Location: seattle

PostPosted: Thu Jul 14, 2005 8:57 pm    Post subject: Reply with quote

rex123 wrote:
The apps I'm talking about don't need an X server. They don't even need an X client. They just need X libraries. They certainly don't need to run X. So I don't think Xvfb would help much. There isn't an ebuild that lets you pick and choose X libraries, so you end up with the whole of x11-base/xorg-x11. Not the end of the world, but a bit more than you might want.

By the way, it looks like the awt libraries in java 1.5 are finally free of X library dependencies, which is nice (but don't quote me).
I just meant in general that if you do need a X session available, Xvfb is usually what people would want.

And in regards to java and 1.5, it might be the case that more things don't need X libraries any more, but recently I was working with the Java Media Framework, using it to generate movies from still images, and it most certainly dies a horrible death if it can't find the X server. Definately annoying.
Back to top
View user's profile Send private message
Rydian
n00b
n00b


Joined: 02 Nov 2004
Posts: 2

PostPosted: Thu Jul 14, 2005 11:12 pm    Post subject: Reply with quote

Try adding "-truetype" to your USE flags, that will get rid of the dependancy of X for PHP.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum