LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

View Poll Results: When will you switch to Wayland in Slackware?
As soon as it works 6 2.82%
As soon as it's stable 26 12.21%
Not before it is included by the dev team 115 53.99%
No plans to switch 66 30.99%
Voters: 213. You may not vote on this poll

Reply
 
Search this Thread
Old 07-09-2013, 06:14 AM   #76
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware,OpenBSD
Posts: 54

Rep: Reputation: Disabled

Quote:
Originally Posted by qweasd View Post
Can't tell you much, only played with it for a few hours.
How do selections work? Do you still get an X style PRIMARY selection in addition to CLIPBOARD (select with left button, paste with middle with no intervening ctrl-C or whatever)? This was a concern in a thread about Wayland a couple of years ago, that we'd have to give up certain aspects of X's user interface.
 
Old 07-09-2013, 07:14 AM   #77
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
With the setup I have, which is as vanilla as it gets, the mouse copy/paste works only for X clients running on xwayland. The PRIMARY selection appears to work great: I am able to copy and paste with shortcuts between weston-terminal (no X connection) and kate (X client).

My paper-napkin speed tests do not show any difference in startup times (X versus xwayland). I timed X clients like firefox and inkscape by mashing ctrl-w as soon as the window appears.

Another awesome thing is, I am able to run X on terminal 7 and wayland on terminal 8 at the same time. Wooosh.

Last edited by qweasd; 07-09-2013 at 07:19 AM.
 
Old 07-11-2013, 11:34 AM   #78
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
I have a question related to libraries. No matter what I try, wayland seems to use the stock cairo library, which is too old as of 14.0. LD_LIBRARY_PATH and LD_PRELOAD have no effect, even though I built recent cairo, just as wayland build instructions say. I was able to sidestep this problem by pulling cairo from Slackware current and installing it systemwide.

If I can solve this little hiccup, I can post here a slackbuild for 14.0+ which will pull and build wayland+xwayland+weston.

edit: I think I found the culprit, and it's pango. I have no idea what really is going on, but it feels like the stock pango is pulling up the stock cairo, which makes things fail. This shouldn't be a problem in current, as cairo is sufficiently new, but I'll try to build pango in 14.0.

edit 2: Hehe I give up. When they say upstream it's not easy to build pango, they are not kidding: I can't seem to build it correctly, and I find myself fixing build bugs in Xft. Who knows what else I am missing.

edit 3: Holy crap, I can't build it anymore. I have it running, but when I try repeating the build process, I see a whole new error.

Last edited by qweasd; 07-13-2013 at 01:57 PM.
 
Old 07-14-2013, 11:47 AM   #79
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
wayland build script

I tried to make it as painless as possible. The first file is a build script, intended to be run as non-root. It will pull sources and install everything in the current directory. The second file is a minimal pam configuration. The script will tell you what you must do to set things up. I only tested this in Slackware 14.0 x64, and only with intel graphics. I managed also to build the ati driver, but not others.

wayland.SlackBuild

Code:
#!/bin/sh

# SlackBuild script for wayland, by melikamp.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. Compiling,
# interpreting, executing or merely reading the text of the program
# may result in lapses of consciousness and/or very being, up to and
# including the end of all existence and the Universe as we know it.
# See the GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program (most likely, a file named COPYING).  If
# not, see <http://www.gnu.org/licenses/>.

WLD_BUILD=$(pwd)
WLD=$WLD_BUILD/install
LD_LIBRARY_PATH=$WLD/lib
PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
ACLOCAL="aclocal -I $WLD/share/aclocal"

export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL

set -e

cat <<EOF
This script will pull the sources into $WLD_BUILD, then build and
install wayland, weston, and xwayland into $WLD.  It is intended to be
run as non-root (as is weston). It was tested only in Slackware 14.0
x64, and only with intel driver, so your mileage may vary.  We also
assume you have a full install of Slackware 14.0.

Before you can run wayland + weston, you must take care of configuration
and dependencies. (1) is required to build weston, as weird as it
sounds (we blame pango), and the rest are required to run, just as the
upstream documentation says. If you find a way not to bump cairo,
please drop us a line.

(1) You need to upgrade cairo before you build.  Run this to download
it, edit the slackbuild to configure with --enable-gl, then upgrade as
usual.

mkdir cairo ; cd cairo
wget http://mirrors.slackware.com/slackware/slackware64-current/source/l/cairo/cairo-1.12.14.tar.xz
wget http://mirrors.slackware.com/slackware/slackware64-current/source/l/cairo/cairo.SlackBuild
wget http://mirrors.slackware.com/slackware/slackware64-current/source/l/cairo/paredown.sh
wget http://mirrors.slackware.com/slackware/slackware64-current/source/l/cairo/slack-desc

(2) You will need Linux-PAM, which you can build with a script. Run
this to pull the source and the slackbuild, then install as usual.

wget --reject="index.html*" --level 1 -r -nH --cut-dirs 5 --no-parent \\
http://slackbuilds.org/mirror/slackware/slackware-14.0/extra/source/pam \\
http://slackbuilds.org/mirror/slackware/slackware-14.0/extra/source/pam/patches

(3) You will also probably need a config file for pam. At least, we
couldn't make it work without it, so we stole one from Debian 7. Put
the file "other" into /etc/pam.d/

(4) You will need to create a group and add yourself to it:

su -
groupadd weston-launch
usermod -a -G weston-launch YOUR_NAME_HERE

(5) You will need to add this to your .bash_profile or whatever is
your login shell start-up file (no need to re-log, and no point doing
this in a running session, as weston starts a brand-new login shell):

if test -z "\${XDG_RUNTIME_DIR}"; then
    export XDG_RUNTIME_DIR=/tmp/\${UID}-runtime-dir
    if ! test -d "\${XDG_RUNTIME_DIR}"; then
        mkdir "\${XDG_RUNTIME_DIR}"
        chmod 0700 "\${XDG_RUNTIME_DIR}"
    fi
fi

Proceed? (y/n)
EOF
read -N 1 foo ; echo
if [[ $foo != y ]] ; then exit ; fi

rm -rf $WLD || true
mkdir -p $WLD/share/aclocal

# parameters: dir name, url, [options other than --prefix]*
git_make_install() { (
	cd $WLD_BUILD
	rm -rf $1 || true
	git clone --depth 1 $2
	cd $1
	shift 2
	./autogen.sh --prefix=$WLD $@
	make
	make install
) }

# Wayland libraries
git_make_install wayland git://anongit.freedesktop.org/wayland/wayland

# Mesa
git_make_install drm git://anongit.freedesktop.org/git/mesa/drm
git_make_install mesa git://anongit.freedesktop.org/mesa/mesa \
    --enable-gles2 --disable-gallium-egl \
    --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
    --with-gallium-drivers=r300,r600,swrast,nouveau

# libxkbcommon
git_make_install libxkbcommon git://github.com/xkbcommon/libxkbcommon \
    --with-xkb-config-root=/usr/share/X11/xkb

# cairo-gl
git_make_install pixman git://anongit.freedesktop.org/pixman
git_make_install cairo git://anongit.freedesktop.org/cairo --enable-gl --enable-xcb

# libunwind
(   cd $WLD_BUILD
    rm -rf libunwind || true
    git clone --depth 1 git://git.sv.gnu.org/libunwind
    cd libunwind
    autoreconf -i
    ./configure --prefix=$WLD
    make
    make install
)

# Weston and demo applications
(   cd $WLD_BUILD
    rm -rf weston || true
    git clone --depth 1 git://anongit.freedesktop.org/wayland/weston
    cd weston
    ./autogen.sh --prefix=$WLD --enable-clients
    make
# We don't want to chown root in this install, as it will break things
# for non-root installers.
    sed -i 's/chown root/#chown root/' src/Makefile
    sed -i 's/chmod u+s/#chmod u+s/' src/Makefile
    make install
)

# X.org
git_make_install xserver "git://anongit.freedesktop.org/xorg/xserver -b xwayland-1.12"

# DDX - Any non-empty subset should be OK. We only tested intel.
git_make_install xf86-video-intel "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel -b xwayland"
git_make_install xf86-video-ati "https://github.com/RAOF/xf86-video-ati -b xwayland"
# wlshm and nouveau didn't build right away, so we gave up.
#git_make_install xf86-video-wlshm git://people.freedesktop.org/~iksaif/xf86-video-wlshm
#git_make_install xf86-video-nouveau "https://github.com/RAOF/xf86-video-nouveau -b xwayland"

# Paths
mkdir -p $WLD/share/X11/xkb/rules
ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/
ln -s /usr/bin/xkbcomp $WLD/bin/

# Ta-daa
cd $WLD_BUILD

gencfg() {
    cat > $HOME/.config/weston.ini <<EOF
[core]
modules=desktop-shell.so,xwayland.so

[shell]
background-image=/usr/share/wallpapers/Blue_Curl/contents/images/1920x1200.jpg
background-color=0xff002244
#background-type=tile
panel-color=0x500000ff
locking=true
animation=zoom
#binding-modifier=ctrl
#num-workspaces=6
cursor-theme=whiteglass
cursor-size=24

#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
#animation=fade

[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
path=$WLD/bin/weston-terminal

[screensaver]
# Uncomment path to disable[SIC] screensaver
path=$WLD/libexec/weston-screensaver
duration=600

[input-method]
path=$WLD/libexec/weston-keyboard

#[output]
#name=LVDS1
#mode=1680x1050
#transform=90
#icc_profile=/usr/share/color/icc/colord/Bluish.icc

#[output]
#name=VGA1
#mode=173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
#transform=flipped

#[output]
#name=X1
#mode=1024x768
#transform=flipped-270

EOF
}

cat <<EOF
There is one more thing we need to do.

Sample weston configuration is in $WLD_BUILD/weston/weston.ini, but it almost
certainly needs editing. Do you want us to generate and install a config file
~/.config/weston.ini? (y/n)
EOF

read -N 1 foo ; echo
if [[ $foo == y ]] ; then gencfg ; fi

cat <<EOF

Before you can start weston with

$WLD/bin/weston-launch

you need to change permissions on weston-launch:

su -
chown root $WLD/bin/weston-launch
chmod +s $WLD/bin/weston-launch

Clients are in $WLD/bin and $WLD_BUILD/weston/clients

Enjoy!
EOF
other (that's the name of the file!)

Code:
#
# /etc/pam.d/other - specify the PAM fallback behaviour
#
# Note that this file is used for any unspecified service; for example
#if /etc/pam.d/cron  specifies no session modules but cron calls
#pam_open_session, the session module out of /etc/pam.d/other is
#used.  If you really want nothing to happen then use pam_permit.so or
#pam_deny.so as appropriate.

# We fall back to the system default in /etc/pam.d/common-*
# 

#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
auth	[success=1 default=ignore]	pam_unix.so nullok_secure
# here's the fallback if no module succeeds
auth	requisite			pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config

#
# /etc/pam.d/common-account - authorization settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authorization modules that define
# the central access policy for use on the system.  The default is to
# only deny service to users whose accounts are expired in /etc/shadow.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.
#

# here are the per-package modules (the "Primary" block)
account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
# here's the fallback if no module succeeds
account	requisite			pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
account	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config

#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services to be
# used to change user passwords.  The default is pam_unix.

# Explanation of pam_unix options:
#
# The "sha512" option enables salted SHA512 passwords.  Without this option,
# the default is Unix crypt.  Prior releases used the option "md5".
#
# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
# login.defs.
#
# See the pam_unix manpage for other options.

# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
password	[success=1 default=ignore]	pam_unix.so obscure sha512
# here's the fallback if no module succeeds
password	requisite			pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
password	optional	pam_gnome_keyring.so 
# end of pam-auth-update config

#
# /etc/pam.d/common-session - session-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define tasks to be performed
# at the start and end of sessions of *any* kind (both interactive and
# non-interactive).
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
session	[default=1]			pam_permit.so
# here's the fallback if no module succeeds
session	requisite			pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
session	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
session	required	pam_unix.so 
session	optional			pam_ck_connector.so nox11
# end of pam-auth-update config

Last edited by qweasd; 07-14-2013 at 11:58 AM.
 
1 members found this post helpful.
Old 07-14-2013, 12:13 PM   #80
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 803

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Wayland requires PAM?
 
Old 07-14-2013, 12:35 PM   #81
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
Apparently.

Edit: rvdboom appears to be right: LinuxPAM is required for weston, but not wayland, at least judging by ./configure and the cursing. Should be in the build instructions, but it ain't.

Last edited by qweasd; 07-16-2013 at 12:24 PM.
 
Old 07-14-2013, 01:53 PM   #82
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 803

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Then the chances that it makes it into Slackware are suddenly very slim.
 
Old 07-14-2013, 01:59 PM   #83
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
Yeah, I am not holding my breath. None of the "real" desktop environments are working yet, and that's pretty much a must before it can be included anywhere, let alone Slackware.
 
Old 07-15-2013, 10:21 PM   #84
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0, CRUX 3.1
Posts: 3,058
Blog Entries: 15

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
I'd rather be PAM-less...
 
Old 07-16-2013, 01:13 AM   #85
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 183

Rep: Reputation: 23
It's apparently Weston, the compositor, that requires PAM, not Wayland itself.
Meaning Slackware can just install Wayland and run compositors that do not require PAM. Hopefully Kwin and Xfwm will be among them.
 
Old 07-16-2013, 03:05 AM   #86
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Will xfig and gv work with Wayland?
 
Old 07-16-2013, 07:43 AM   #87
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,579
Blog Entries: 2

Rep: Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036Reputation: 4036
Quote:
Originally Posted by guanx View Post
Will xfig and gv work with Wayland?
They will work in XWayland, a compatibility layer, which is feature complete when Xserver 1.15 is released.
 
Old 07-16-2013, 08:26 AM   #88
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by TobiSGD View Post
They will work in XWayland, a compatibility layer, which is feature complete when Xserver 1.15 is released.
Sounds good!
 
Old 07-16-2013, 10:29 AM   #89
qweasd
Member
 
Registered: May 2010
Posts: 437

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by guanx View Post
Sounds good!
It looks good too, although there are some glitches with drop-down menus and such (they sometimes appear detached, which is being fixed afaik). Not only it runs every X app, it just works(tm) for running them over ssh.
Attached Images
File Type: png wayland-screenshot.png (85.1 KB, 64 views)
 
Old 07-16-2013, 08:41 PM   #90
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0, CRUX 3.1
Posts: 3,058
Blog Entries: 15

Rep: Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769Reputation: 769
Quote:
Originally Posted by qweasd View Post
It looks good too, although there are some glitches with drop-down menus and such (they sometimes appear detached, which is being fixed afaik). Not only it runs every X app, it just works(tm) for running them over ssh.
Do any of the current desktop environments work at all with Wayland and/or XWayland?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Wayland - Beyond X LXer Syndicated Linux News 1 02-14-2012 12:59 PM
Future !X ? Wayland : X - what is wayland? serafean Linux - General 5 03-04-2011 11:09 AM
Iptables + Forwarding + Vlan + OpenVPN & L2 junk switch /L3 extreme networks switch feloniousj Linux - Networking 3 03-15-2010 09:27 PM
thread switch results in kernel stack switch superstition Linux - General 1 05-17-2005 11:48 PM
set up DSL thru SWITCH - winXp connected to SWITCH too husz Linux - Newbie 5 04-22-2004 12:08 AM


All times are GMT -5. The time now is 01:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration