Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to emerge only the client side of X
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
trueriver
n00b
n00b


Joined: 03 Jan 2013
Posts: 17
Location: Manchester, England

PostPosted: Mon Jan 19, 2015 7:12 pm    Post subject: how to emerge only the client side of X Reply with quote

hi,
I am installing gentoo in a chroot on an android tablet (the original hudl, to be precise).

I have followed the handbook, except that I never leave the chroot jail, and skip gracefully over the kernel parts.

Great, I now have a working CLI gentoo linux half-system (albeit with a Tesco kernel).

I have installed an app that provides the X server, so that too is going to be a non gentoo part of the hybrid.

Now I want to install some gui programs, probably the LXDE desktop.

Question: how do I tell energe that I only want the "headless" side of X, ie that it is great for emerge to pull in the X client with LXDE, but not the X server?

Alternatively, to take this in smaller steps, how would I install a simple X program like xclock and have that bring in only the relevant half of the X software?

Many thanks in advance...
TR~~
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Mon Jan 19, 2015 8:45 pm    Post subject: Reply with quote

trueriver,

All X programs should do that - they do not depend on a X-Server to run.
Installing an X-Server is a separate package.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
trueriver
n00b
n00b


Joined: 03 Jan 2013
Posts: 17
Location: Manchester, England

PostPosted: Mon Jan 19, 2015 11:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
trueriver,

All X programs should do that - they do not depend on a X-Server to run.
Installing an X-Server is a separate package.


Thanks Neddy, that makes sense.

But the reason I'm confused is that when I've installed Gentoo on a desktop machine, I dont remember ever installing an X server as a separate step, iirr both parts of X seem to get installed when you emerge a desktop.

Or maybe i am simply remembering wrong, in fairness it was some time ago when i last did an install from scratch...

I'm going to see if i can get xclock running, then see what emerge tries to bring in with lxde... I think emerge -p is my friend here. Sadly it might be Wednesday before i get time to get back to this.... but i will let you know how i get on

trueriver~~
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jan 20, 2015 12:49 am    Post subject: Reply with quote

trueriver wrote:
But the reason I'm confused is that when I've installed Gentoo on a desktop machine, I dont remember ever installing an X server as a separate step, iirr both parts of X seem to get installed when you emerge a desktop.

trueriver ... x11-base/xorg-server and x11-base/xorg-drivers will be pulled in as dependencies. I'm not sure how successful you'll be seperating the server from the build as x11-base/xorg-server also contains headers, and libs (I count 169 headers in total) . If you wanted to exclude them you could place the packages in package.provided but you might find some builds failing.

/etc/portage/profile/package.provided
Code:
x11-base/xorg-server-1.15.2-r1
x11-base/xorg-drivers-1.15

Also, you might have issues with mesa, as whetever is shipped with the 'app' may not be in sync with the version used to build the gentoo installed components ... in short, I'm not sure it will be as simple as excluding xorg-server, etc.

EDIT: I meant to mention the 'minimal' useflag on xorg-server ... this will probably be a better option than avoiding the package entirely:

Code:
% equery -NC uses xorg-server | grep minimal
 - - minimal  : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)

HTH & best ... khay
Back to top
View user's profile Send private message
trueriver
n00b
n00b


Joined: 03 Jan 2013
Posts: 17
Location: Manchester, England

PostPosted: Tue Jan 20, 2015 11:21 am    Post subject: Reply with quote

khayyam wrote:
... x11-base/xorg-server and x11-base/xorg-drivers will be pulled in as dependencies.

Yes, that is what I am hoping to avoid

Quote:
I'm not sure how successful you'll be seperating the server from the build as x11-base/xorg-server also contains headers, and libs (I count 169 headers in total) .

My thinking here is influenced by Debian which separates X into four packages. X_common contains everything needed by both the server and the client. X_client and X_server contain the code that is specific to those roles, and both pull in X_common as a dependency. Finally X is a virtual package containing no code, but just pulls in the other three as dependencies.

This allows the creation of headless machines, which may not even have a graphics card. The GUI software runs displays on other machines over the network.

This is the same model as Sun used to run GUI with its Solaris workstations, for example. I would be surprised to find that Gentoo did not have some efficient way of building a headless central machine, without carrying unnecessary graphics software. I'm still hopeful that I'll find the magic incantation to achieve this in Gentoo, to minimise compile time and more importantly to avoid having binaries taking up my limited storage. Effectively I'm treating the chroot jail as the central machine and the android infrastructure as being a separate workstation.

Quote:

If you wanted to exclude them you could place the packages in package.provided but you might find some builds failing.

/etc/portage/profile/package.provided
Code:
x11-base/xorg-server-1.15.2-r1
x11-base/xorg-drivers-1.15

Thanks for this tip. :D

Quote:

Also, you might have issues with mesa, as whetever is shipped with the 'app' may not be in sync with the version used to build the gentoo installed components ... in short, I'm not sure it will be as simple as excluding xorg-server, etc.

The app works over a network, displaying a desktop from another Linux box, so I'm hopeful. You are right, I won't know till I try it.

It should be possible to run from with any other version of X by networking the connection through the loopback interface, so that X runs as if on separate machines, even if the implementations of X are totally different. That is how X is defined to work over a real network.

If I'm lucky I may be able to take advantage of the optimisations for running X on the same machine, but I agree with your point, that may not happen. I'm not relying on that happening, but it would be nice.

Quote:

EDIT: I meant to mention the 'minimal' useflag on xorg-server ... this will probably be a better option than avoiding the package entirely:

Code:
% equery -NC uses xorg-server | grep minimal
 - - minimal  : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)

HTH & best ... khay

again, good tip if I find I have to include the server at all. I'm still hoping to avoid it entirely.

Thanks for your thoughts Khay.
TR~~
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Jan 20, 2015 3:48 pm    Post subject: Reply with quote

It's not quite your usage case, but on one server, I simply installed with USE="X", which pulled in all of the necessary stuff to run X clients remotely. I just checked, and neither x11-server nor x11-drivers are installed. My other server does have at least x11-server installed, though I'm not sure why I did that. Actually, it looks like I installed xorg-x11, and at this point I'm not sure why I did that, either. Trying to find out, I see stuff like this:
Code:
$ equery depends xorg-server
 * These packages depend on xorg-server:
dev-lang/tk-8.5.15 (!prefix ? x11-base/xorg-server[xvfb])
dev-libs/glib-2.40.2 (!prefix ? x11-base/xorg-server[xvfb])
dev-python/pygobject-2.28.6-r55 (!prefix ? x11-base/xorg-server[xvfb])
dev-python/pygtk-2.24.0-r4 (!prefix ? x11-base/xorg-server[xvfb])
dev-util/cmake-2.8.12.2-r1 (!prefix ? x11-base/xorg-server[xvfb])
gnome-base/libglade-2.6.4-r2 (!prefix ? x11-base/xorg-server[xvfb])
sys-apps/dbus-1.8.10 (!prefix ? x11-base/xorg-server[xvfb])
x11-base/xorg-x11-7.4-r2 (x11-base/xorg-server[-minimal])
x11-drivers/xf86-input-evdev-2.8.2 (>=x11-base/xorg-server-1.12[udev])
                                   (x11-base/xorg-server[xorg])
                                   (x11-base/xorg-server)
x11-drivers/xf86-input-keyboard-1.7.0 (>=x11-base/xorg-server-1.6.3)
                                      (x11-base/xorg-server[xorg])
                                      (x11-base/xorg-server)
x11-drivers/xf86-input-mouse-1.9.0 (>=x11-base/xorg-server-1.7)
                                   (x11-base/xorg-server[xorg])
                                   (x11-base/xorg-server)
x11-drivers/xf86-video-ati-7.3.0 (x11-base/xorg-server[-minimal])
                                 (x11-base/xorg-server[xorg])
                                 (x11-base/xorg-server)
x11-drivers/xf86-video-nouveau-1.0.10 (x11-base/xorg-server[-minimal])
                                      (x11-base/xorg-server[xorg])
                                      (x11-base/xorg-server)
x11-libs/glamor-0.6.0 (>=x11-base/xorg-server-1.10)
                      (x11-base/xorg-server[-minimal])
                      (x11-base/xorg-server)
x11-libs/gtk+-2.24.25 (!prefix ? x11-base/xorg-server[xvfb])

The first seven, with that "!prefix" are the ones I wonder about, whether they really need xorg-server. The rest are pretty much "obvious consequences." Now that I write this, I believe I did it this way so I could run "mythtv-setup" locally on the box. This is my main MythTV server, and I wasn't sure about the setup code being too involved (opengl and such) to run over the network. The X server itself is usually not running.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
trueriver
n00b
n00b


Joined: 03 Jan 2013
Posts: 17
Location: Manchester, England

PostPosted: Tue Jan 20, 2015 9:16 pm    Post subject: Reply with quote

it's the last one in your list that worries me
depontius wrote:

Code:
...
x11-libs/gtk+-2.24.25 (!prefix ? x11-base/xorg-server[xvfb])


does that mean that any GTK based software will (might) try to pull in the Xserver?

TR~~
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Jan 20, 2015 10:45 pm    Post subject: Reply with quote

trueriver wrote:
it's the last one in your list that worries me
depontius wrote:

Code:
...
x11-libs/gtk+-2.24.25 (!prefix ? x11-base/xorg-server[xvfb])


does that mean that any GTK based software will (might) try to pull in the Xserver?

TR~~


I don't think so. Oddly enough, when you look at the ebuild itself, xorg-server is nowhere to be found. I suspect that that "!prefix" is some sort of of ebuild-meta-thing that I don't understand. On my server where I don't have xorg-server installed, I do have gtk+ installed, as it's needed for some X clients.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Jan 21, 2015 6:56 am    Post subject: Reply with quote

depontius wrote:
I suspect that that "!prefix" is some sort of of ebuild-meta-thing that I don't understand.

It's a USE-conditional dependency; in this case meaning if you're not on prefix (you're not, or you'd know about it.)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Jan 21, 2015 6:56 pm    Post subject: Reply with quote

The actual dependency for GTK+2 (and probably the rest at the top) is this:
Code:
test? (
    !prefix? (
        x11-base/xorg-server[xvfb]
    )
    x11-apps/xhost
)

In other words, equery is deficient here.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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