Date: Friday, July 31, 2015 @ 16:08:41 Author: bgyorgy Revision: 137642
archrelease: copy trunk to community-i686, community-x86_64 Added: lxdm/repos/community-i686/PKGBUILD (from rev 137641, lxdm/trunk/PKGBUILD) lxdm/repos/community-i686/Xsession (from rev 137641, lxdm/trunk/Xsession) lxdm/repos/community-i686/default-config.patch (from rev 137641, lxdm/trunk/default-config.patch) lxdm/repos/community-i686/git-fixes.patch (from rev 137641, lxdm/trunk/git-fixes.patch) lxdm/repos/community-i686/lxdm.install (from rev 137641, lxdm/trunk/lxdm.install) lxdm/repos/community-i686/lxdm.pam (from rev 137641, lxdm/trunk/lxdm.pam) lxdm/repos/community-x86_64/PKGBUILD (from rev 137641, lxdm/trunk/PKGBUILD) lxdm/repos/community-x86_64/Xsession (from rev 137641, lxdm/trunk/Xsession) lxdm/repos/community-x86_64/default-config.patch (from rev 137641, lxdm/trunk/default-config.patch) lxdm/repos/community-x86_64/git-fixes.patch (from rev 137641, lxdm/trunk/git-fixes.patch) lxdm/repos/community-x86_64/lxdm.install (from rev 137641, lxdm/trunk/lxdm.install) lxdm/repos/community-x86_64/lxdm.pam (from rev 137641, lxdm/trunk/lxdm.pam) Deleted: lxdm/repos/community-i686/PKGBUILD lxdm/repos/community-i686/Xsession lxdm/repos/community-i686/default-config.patch lxdm/repos/community-i686/lxdm.install lxdm/repos/community-i686/lxdm.pam lxdm/repos/community-x86_64/PKGBUILD lxdm/repos/community-x86_64/Xsession lxdm/repos/community-x86_64/default-config.patch lxdm/repos/community-x86_64/lxdm.install lxdm/repos/community-x86_64/lxdm.pam ---------------------------------------+ /PKGBUILD | 136 ++++++++++++++++++++ /Xsession | 142 ++++++++++++++++++++ /default-config.patch | 42 ++++++ /lxdm.install | 26 +++ /lxdm.pam | 14 ++ community-i686/PKGBUILD | 71 ---------- community-i686/Xsession | 71 ---------- community-i686/default-config.patch | 21 --- community-i686/git-fixes.patch | 217 ++++++++++++++++++++++++++++++++ community-i686/lxdm.install | 13 - community-i686/lxdm.pam | 7 - community-x86_64/PKGBUILD | 71 ---------- community-x86_64/Xsession | 71 ---------- community-x86_64/default-config.patch | 21 --- community-x86_64/git-fixes.patch | 217 ++++++++++++++++++++++++++++++++ community-x86_64/lxdm.install | 13 - community-x86_64/lxdm.pam | 7 - 17 files changed, 794 insertions(+), 366 deletions(-) Deleted: community-i686/PKGBUILD =================================================================== --- community-i686/PKGBUILD 2015-07-31 14:08:27 UTC (rev 137641) +++ community-i686/PKGBUILD 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,71 +0,0 @@ -# $Id$ -# Maintainer: Balló György <ballogyor+arch at gmail dot com> -# Contributor: Bartłomiej Piotrowski <bpiotrow...@archlinux.org> -# Contributor: AndyRTR <andy...@archlinux.org> -# Contributor: kiefer <jorgelmad...@gmail.com> - -pkgname=lxdm -pkgver=0.5.1 -pkgrel=2 -pkgdesc='Lightweight X11 Display Manager' -arch=('i686' 'x86_64') -url="https://sourceforge.net/projects/lxdm/" -license=('GPL') -groups=('lxde') -depends=('gtk2' 'xorg-server') -makedepends=('intltool' 'iso-codes') -optdepends=('gtk-engines: default GTK+ theme' - 'iso-codes: show language names in language chooser' - 'librsvg: display the default background') -install=$pkgname.install -backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession' - 'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin' - 'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown') -source=(http://downloads.sourceforge.net/lxdm/$pkgname-$pkgver.tar.xz - default-config.patch - lxdm.pam - Xsession - lxdm.git-2abf1d971198d224c68b20c56862df2fe7c6a648.patch - lxdm.git-4dfe7924a220643600be58861b01f186225fe251.patch) -md5sums=('9e03ce5f6d303bc9b689732401934dc6' - 'f0ae6c072f151104c53a030fd7757821' - 'c941ef896248bc7c03901b513490425c' - '6ff73570368501a06ee7badc8e415d0a' - '54c3de1d6108f8d68dea31622dd976e1' - '2522db72aeddffc22e349bfea24ae48e') - -prepare(){ - cd "$srcdir/$pkgname-$pkgver" - - # Kill user processes on logout (fix second login with systemd >= 222) - patch -Np1 -i ../lxdm.git-2abf1d971198d224c68b20c56862df2fe7c6a648.patch - patch -Np1 -i ../lxdm.git-4dfe7924a220643600be58861b01f186225fe251.patch - - # Adjust Arch-specific settings - patch -Np1 -i ../default-config.patch - - # Use our custom pam and Xsession files - cp ../lxdm.pam pam/lxdm - cp ../Xsession data/Xsession - - # Support for pulseaudio - echo 'test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r' >>data/PostLogout.in -} - -build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib/lxdm \ - --sysconfdir=/etc --localstatedir=/var - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install - chmod 644 "$pkgdir/etc/lxdm/lxdm.conf" - - # Home directory - install -dm 755 "$pkgdir/var/lib/lxdm" - echo 'GDK_CORE_DEVICE_EVENTS=true' > "$pkgdir"/var/lib/lxdm/.pam_environment - chown -R 121:121 "$pkgdir/var/lib/lxdm" -} Copied: lxdm/repos/community-i686/PKGBUILD (from rev 137641, lxdm/trunk/PKGBUILD) =================================================================== --- community-i686/PKGBUILD (rev 0) +++ community-i686/PKGBUILD 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,68 @@ +# $Id$ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: Bartłomiej Piotrowski <bpiotrow...@archlinux.org> +# Contributor: AndyRTR <andy...@archlinux.org> +# Contributor: kiefer <jorgelmad...@gmail.com> + +pkgname=lxdm +pkgver=0.5.1 +pkgrel=3 +pkgdesc='Lightweight X11 Display Manager' +arch=('i686' 'x86_64') +url="https://sourceforge.net/projects/lxdm/" +license=('GPL') +groups=('lxde') +depends=('gtk2' 'xorg-server') +makedepends=('intltool' 'iso-codes') +optdepends=('gtk-engines: default GTK+ theme' + 'iso-codes: show language names in language chooser' + 'librsvg: display the default background') +install=$pkgname.install +backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession' + 'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin' + 'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown') +source=(http://downloads.sourceforge.net/lxdm/$pkgname-$pkgver.tar.xz + git-fixes.patch + default-config.patch + lxdm.pam + Xsession) +md5sums=('9e03ce5f6d303bc9b689732401934dc6' + '8f514a4ba8fe204c8f0db293246dba3d' + 'f0ae6c072f151104c53a030fd7757821' + 'c941ef896248bc7c03901b513490425c' + '6ff73570368501a06ee7badc8e415d0a') + +prepare(){ + cd "$srcdir/$pkgname-$pkgver" + + # Apply fixes from git + patch -Np1 -i ../git-fixes.patch + + # Adjust Arch-specific settings + patch -Np1 -i ../default-config.patch + + # Use our custom pam and Xsession files + cp ../lxdm.pam pam/lxdm + cp ../Xsession data/Xsession + + # Support for pulseaudio + echo 'test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r' >>data/PostLogout.in +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib/lxdm \ + --sysconfdir=/etc --localstatedir=/var + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + chmod 644 "$pkgdir/etc/lxdm/lxdm.conf" + + # Home directory + install -dm 755 "$pkgdir/var/lib/lxdm" + echo 'GDK_CORE_DEVICE_EVENTS=true' > "$pkgdir"/var/lib/lxdm/.pam_environment + chown -R 121:121 "$pkgdir/var/lib/lxdm" +} Deleted: community-i686/Xsession =================================================================== --- community-i686/Xsession 2015-07-31 14:08:27 UTC (rev 137641) +++ community-i686/Xsession 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,71 +0,0 @@ -#!/bin/sh -# -# LXDM wrapper to run around X sessions. - -echo "Running X session wrapper" - -if [ $# -eq 1 -a -n "$1" ]; then - LXSESSION=$1 -else -# default session - LXSESSION=/usr/bin/startlxde -fi - -# Load profile -for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do - if [ -f "$file" ]; then - echo "Loading profile from $file"; - . "$file" - fi -done - -# Load resources -for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do - if [ -f "$file" ]; then - echo "Loading resource: $file" - xrdb -merge "$file" - fi -done - -# Load keymaps -for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do - if [ -f "$file" ]; then - echo "Loading keymap: $file" - setxkbmap `cat "$file"` - XKB_IN_USE=yes - fi -done - -# Load xmodmap if not using XKB -if [ -z "$XKB_IN_USE" ]; then - for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do - if [ -f "$file" ]; then - echo "Loading modmap: $file" - xmodmap "$file" - fi - done -fi - -unset XKB_IN_USE - -# Run all system xinitrc shell scripts -xinitdir="/etc/X11/xinit/xinitrc.d" -if [ -d "$xinitdir" ]; then - for script in $xinitdir/*; do - echo "Loading xinit script $script" - if [ -x "$script" -a ! -d "$script" ]; then - . "$script" - fi - done -fi - -# Run user xsession shell script -script="$HOME/.xsession" -if [ -x "$script" -a ! -d "$script" ]; then - echo "Loading xsession script $script" - . "$script" -fi - -echo "X session wrapper complete, running session $LXSESSION" - -exec $LXSESSION Copied: lxdm/repos/community-i686/Xsession (from rev 137641, lxdm/trunk/Xsession) =================================================================== --- community-i686/Xsession (rev 0) +++ community-i686/Xsession 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,71 @@ +#!/bin/sh +# +# LXDM wrapper to run around X sessions. + +echo "Running X session wrapper" + +if [ $# -eq 1 -a -n "$1" ]; then + LXSESSION=$1 +else +# default session + LXSESSION=/usr/bin/startlxde +fi + +# Load profile +for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do + if [ -f "$file" ]; then + echo "Loading profile from $file"; + . "$file" + fi +done + +# Load resources +for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do + if [ -f "$file" ]; then + echo "Loading resource: $file" + xrdb -merge "$file" + fi +done + +# Load keymaps +for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do + if [ -f "$file" ]; then + echo "Loading keymap: $file" + setxkbmap `cat "$file"` + XKB_IN_USE=yes + fi +done + +# Load xmodmap if not using XKB +if [ -z "$XKB_IN_USE" ]; then + for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do + if [ -f "$file" ]; then + echo "Loading modmap: $file" + xmodmap "$file" + fi + done +fi + +unset XKB_IN_USE + +# Run all system xinitrc shell scripts +xinitdir="/etc/X11/xinit/xinitrc.d" +if [ -d "$xinitdir" ]; then + for script in $xinitdir/*; do + echo "Loading xinit script $script" + if [ -x "$script" -a ! -d "$script" ]; then + . "$script" + fi + done +fi + +# Run user xsession shell script +script="$HOME/.xsession" +if [ -x "$script" -a ! -d "$script" ]; then + echo "Loading xsession script $script" + . "$script" +fi + +echo "X session wrapper complete, running session $LXSESSION" + +exec $LXSESSION Deleted: community-i686/default-config.patch =================================================================== --- community-i686/default-config.patch 2015-07-31 14:08:27 UTC (rev 137641) +++ community-i686/default-config.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,21 +0,0 @@ -diff -Naur lxdm.orig/data/lxdm.conf.in lxdm/data/lxdm.conf.in ---- lxdm.orig/data/lxdm.conf.in 2013-08-30 17:56:16.097006000 +0200 -+++ lxdm/data/lxdm.conf.in 2013-09-04 01:54:12.942117085 +0200 -@@ -23,7 +23,7 @@ - - [server] - ## arg used to start xserver, not fully function --# arg=/usr/bin/X -background vt1 -+arg=/usr/bin/X -background vt1 - # uncomment this if you really want xserver listen to tcp - # tcp_listen=1 - # uncoment this if you want reset the xserver after logou -@@ -34,7 +34,7 @@ - gtk_theme=Clearlooks - - ## background of the greeter --bg=/usr/share/backgrounds/default.png -+# bg=/usr/share/backgrounds/default.png - - ## if show bottom pane - bottom_pane=1 Copied: lxdm/repos/community-i686/default-config.patch (from rev 137641, lxdm/trunk/default-config.patch) =================================================================== --- community-i686/default-config.patch (rev 0) +++ community-i686/default-config.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,21 @@ +diff -Naur lxdm.orig/data/lxdm.conf.in lxdm/data/lxdm.conf.in +--- lxdm.orig/data/lxdm.conf.in 2013-08-30 17:56:16.097006000 +0200 ++++ lxdm/data/lxdm.conf.in 2013-09-04 01:54:12.942117085 +0200 +@@ -23,7 +23,7 @@ + + [server] + ## arg used to start xserver, not fully function +-# arg=/usr/bin/X -background vt1 ++arg=/usr/bin/X -background vt1 + # uncomment this if you really want xserver listen to tcp + # tcp_listen=1 + # uncoment this if you want reset the xserver after logou +@@ -34,7 +34,7 @@ + gtk_theme=Clearlooks + + ## background of the greeter +-bg=/usr/share/backgrounds/default.png ++# bg=/usr/share/backgrounds/default.png + + ## if show bottom pane + bottom_pane=1 Copied: lxdm/repos/community-i686/git-fixes.patch (from rev 137641, lxdm/trunk/git-fixes.patch) =================================================================== --- community-i686/git-fixes.patch (rev 0) +++ community-i686/git-fixes.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,217 @@ +diff --git a/data/themes/Industrial/gtk.css b/data/themes/Industrial/gtk.css +index 7621345..179f0d6 100644 +--- a/data/themes/Industrial/gtk.css ++++ b/data/themes/Industrial/gtk.css +@@ -1,6 +1,6 @@ + #lxdm { + background-image: url("wave.svg"); +- background-size: 100%; ++ background-repeat: round; + } + + #bottom_pane { +@@ -12,10 +12,12 @@ + color: #ffffff; + } + +-#user_list, #login_entry { +- background-image: none; ++#prompt { ++ font: Sans 14; ++ color: #000000; + } + +-#prompt, #bottom_pane GtkLabel { +- color: #ffffff; ++#bottom_pane GtkLabel { ++ font: Sans 12; ++ color: #9E9D9B; + } +diff --git a/src/lxdm.c b/src/lxdm.c +index 507189d..842f4b8 100644 +--- a/src/lxdm.c ++++ b/src/lxdm.c +@@ -1269,6 +1269,9 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option) + { + if(s) lxsession_free(s); + lxsession_set_active(prev); ++ g_free(session_name); ++ g_free(session_exec); ++ g_free(session_desktop_names); + return; + } + if(!s) s=lxsession_find_idle(); +@@ -1514,7 +1517,7 @@ static void lxdm_signal_handler(void *data,int sig) + switch(sig){ + case SIGTERM: + case SIGINT: +- g_critical("QUIT BY SIGNAL\n"); ++ g_critical("QUIT BY SIGNAL %d\n",sig); + lxdm_quit_self(0); + break; + default: +@@ -1650,6 +1653,7 @@ static GString *lxdm_user_cmd(void *data,int user,int arc,char **arg) + if(p) + { + res=g_string_new_len(p,len); ++ g_free(p); + } + g_key_file_free(kf); + } +diff --git a/src/pam.c b/src/pam.c +index 43bd687..a377157 100644 +--- a/src/pam.c ++++ b/src/pam.c +@@ -42,6 +42,7 @@ + #include <errno.h> + #include <poll.h> + #include <sys/stat.h> ++#include <sys/wait.h> + + #include <pwd.h> + #include <grp.h> +@@ -300,12 +301,72 @@ int lxdm_auth_session_begin(LXDM_AUTH *a,const char *name,int tty,int display,ch + } + err = pam_open_session(a->handle, 0); /* FIXME pam session failed */ + if( err != PAM_SUCCESS ) ++ { + g_warning( "pam open session error \"%s\"\n", pam_strerror(a->handle, err)); ++ } + else ++ { + a->in_session=1; ++ } + return 0; + } + ++static int proc_filter(const struct dirent *d) ++{ ++ int c=d->d_name[0]; ++ return c>='1' && c<='9'; ++} ++ ++static int check_process_sid(int pid,const char *sid) ++{ ++ char path[128]; ++ FILE *fp; ++ gchar *env_data,*p; ++ gsize env_len; ++ int res=0; ++ ++ sprintf(path,"/proc/%d/environ",pid); ++ if(!g_file_get_contents(path,&env_data,&env_len,NULL)) ++ { ++ return 0; ++ } ++ for(p=env_data;p!=NULL && p-env_data<env_len;) ++ { ++ if(!strncmp(p,"XDG_SESSION_ID=",15)) ++ { ++ if(!strcmp(sid,p+15)) ++ res=1; ++ break; ++ } ++ p=strchr(p,'\0'); ++ if(!p) break;p++; ++ } ++ g_free(env_data); ++ ++ return res; ++} ++ ++static void kill_left_process(const char *sid) ++{ ++ int self=getpid(); ++ struct dirent **list; ++ int i,n; ++ ++ n=scandir("/proc",&list,proc_filter,0); ++ if(n<0) return; ++ for(i=0;i<n;i++) ++ { ++ int pid=atoi(list[i]->d_name); ++ if(pid==self || pid<=1) ++ continue; ++ if(check_process_sid(pid,sid)) ++ { ++ kill(pid,SIGKILL); ++ } ++ } ++ free(list); ++} ++ + int lxdm_auth_session_end(LXDM_AUTH *a) + { + int err; +@@ -313,8 +374,20 @@ int lxdm_auth_session_end(LXDM_AUTH *a) + return 0; + if(a->in_session) + { ++ char xdg_session_id[32]={0}; ++ const char *p=pam_getenv(a->handle,"XDG_SESSION_ID"); ++ if(p!=NULL) snprintf(xdg_session_id,32,"%s",p); + err = pam_close_session(a->handle, 0); ++ if( err != PAM_SUCCESS ) ++ { ++ g_warning( "pam close session error \"%s\"\n", pam_strerror(a->handle, err)); ++ } + a->in_session=0; ++ if(p!=NULL) ++ { ++ usleep(100*1000); ++ kill_left_process(xdg_session_id); ++ } + } + pam_end(a->handle, err); + a->handle = NULL; +@@ -400,8 +473,10 @@ void switch_user(struct passwd *pw, const char *run, char **env) + g_spawn_command_line_sync ("/etc/lxdm/PreLogin",NULL,NULL,NULL,NULL); + + if( !pw || initgroups(pw->pw_name, pw->pw_gid) || +- setgid(pw->pw_gid) || setuid(pw->pw_uid)/* || setsid() == -1 */) ++ setgid(pw->pw_gid) || setuid(pw->pw_uid) || setsid()==-1) ++ { + exit(EXIT_FAILURE); ++ } + chdir(pw->pw_dir); + fd=open(".xsession-errors",O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR); + if(fd!=-1) +@@ -426,7 +501,6 @@ void switch_user(struct passwd *pw, const char *run, char **env) + + void run_session(LXDM_AUTH *a,const char *run) + { +- setsid(); + a->child=fork(); + if(a->child==0) + { +@@ -505,7 +579,7 @@ int main(int arc,char *arg[]) + + setvbuf(stdout, NULL, _IOLBF, 0 ); + signal(SIGCHLD,sig_handler); +- ++ + lxdm_auth_init(&a); + while(file_get_line(cmd,sizeof(cmd),stdin)>=0) + { +diff --git a/src/xconn.c b/src/xconn.c +index 5c62d4b..df4824f 100644 +--- a/src/xconn.c ++++ b/src/xconn.c +@@ -172,7 +172,7 @@ void xconn_close(xconn_t c) + free(c); + } + +-#if 0 ++#if 1 + static xcb_window_t xconn_get_root(xconn_t c) + { + const xcb_setup_t *setup; +@@ -185,7 +185,7 @@ static xcb_window_t xconn_get_root(xconn_t c) + + void xconn_clean(xconn_t c) + { +-#if 0 ++#if 1 + xcb_query_tree_cookie_t wintree; + xcb_query_tree_reply_t *rep; + xcb_window_t *children; Deleted: community-i686/lxdm.install =================================================================== --- community-i686/lxdm.install 2015-07-31 14:08:27 UTC (rev 137641) +++ community-i686/lxdm.install 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,13 +0,0 @@ -post_install() { - getent group lxdm > /dev/null 2>&1 && \ - groupmod -g 121 lxdm > /dev/null 2>&1 || \ - groupadd -g 121 lxdm - getent passwd lxdm > /dev/null 2>&1 && \ - usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \ - useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm - passwd -l lxdm > /dev/null -} - -post_upgrade() { - post_install -} Copied: lxdm/repos/community-i686/lxdm.install (from rev 137641, lxdm/trunk/lxdm.install) =================================================================== --- community-i686/lxdm.install (rev 0) +++ community-i686/lxdm.install 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,13 @@ +post_install() { + getent group lxdm > /dev/null 2>&1 && \ + groupmod -g 121 lxdm > /dev/null 2>&1 || \ + groupadd -g 121 lxdm + getent passwd lxdm > /dev/null 2>&1 && \ + usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \ + useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm + passwd -l lxdm > /dev/null +} + +post_upgrade() { + post_install +} Deleted: community-i686/lxdm.pam =================================================================== --- community-i686/lxdm.pam 2015-07-31 14:08:27 UTC (rev 137641) +++ community-i686/lxdm.pam 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,7 +0,0 @@ -#%PAM-1.0 -auth include system-login --auth optional pam_gnome_keyring.so -account include system-login -password include system-login -session include system-login --session optional pam_gnome_keyring.so auto_start Copied: lxdm/repos/community-i686/lxdm.pam (from rev 137641, lxdm/trunk/lxdm.pam) =================================================================== --- community-i686/lxdm.pam (rev 0) +++ community-i686/lxdm.pam 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth include system-login +-auth optional pam_gnome_keyring.so +account include system-login +password include system-login +session include system-login +-session optional pam_gnome_keyring.so auto_start Deleted: community-x86_64/PKGBUILD =================================================================== --- community-x86_64/PKGBUILD 2015-07-31 14:08:27 UTC (rev 137641) +++ community-x86_64/PKGBUILD 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,71 +0,0 @@ -# $Id$ -# Maintainer: Balló György <ballogyor+arch at gmail dot com> -# Contributor: Bartłomiej Piotrowski <bpiotrow...@archlinux.org> -# Contributor: AndyRTR <andy...@archlinux.org> -# Contributor: kiefer <jorgelmad...@gmail.com> - -pkgname=lxdm -pkgver=0.5.1 -pkgrel=2 -pkgdesc='Lightweight X11 Display Manager' -arch=('i686' 'x86_64') -url="https://sourceforge.net/projects/lxdm/" -license=('GPL') -groups=('lxde') -depends=('gtk2' 'xorg-server') -makedepends=('intltool' 'iso-codes') -optdepends=('gtk-engines: default GTK+ theme' - 'iso-codes: show language names in language chooser' - 'librsvg: display the default background') -install=$pkgname.install -backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession' - 'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin' - 'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown') -source=(http://downloads.sourceforge.net/lxdm/$pkgname-$pkgver.tar.xz - default-config.patch - lxdm.pam - Xsession - lxdm.git-2abf1d971198d224c68b20c56862df2fe7c6a648.patch - lxdm.git-4dfe7924a220643600be58861b01f186225fe251.patch) -md5sums=('9e03ce5f6d303bc9b689732401934dc6' - 'f0ae6c072f151104c53a030fd7757821' - 'c941ef896248bc7c03901b513490425c' - '6ff73570368501a06ee7badc8e415d0a' - '54c3de1d6108f8d68dea31622dd976e1' - '2522db72aeddffc22e349bfea24ae48e') - -prepare(){ - cd "$srcdir/$pkgname-$pkgver" - - # Kill user processes on logout (fix second login with systemd >= 222) - patch -Np1 -i ../lxdm.git-2abf1d971198d224c68b20c56862df2fe7c6a648.patch - patch -Np1 -i ../lxdm.git-4dfe7924a220643600be58861b01f186225fe251.patch - - # Adjust Arch-specific settings - patch -Np1 -i ../default-config.patch - - # Use our custom pam and Xsession files - cp ../lxdm.pam pam/lxdm - cp ../Xsession data/Xsession - - # Support for pulseaudio - echo 'test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r' >>data/PostLogout.in -} - -build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib/lxdm \ - --sysconfdir=/etc --localstatedir=/var - make -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install - chmod 644 "$pkgdir/etc/lxdm/lxdm.conf" - - # Home directory - install -dm 755 "$pkgdir/var/lib/lxdm" - echo 'GDK_CORE_DEVICE_EVENTS=true' > "$pkgdir"/var/lib/lxdm/.pam_environment - chown -R 121:121 "$pkgdir/var/lib/lxdm" -} Copied: lxdm/repos/community-x86_64/PKGBUILD (from rev 137641, lxdm/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,68 @@ +# $Id$ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: Bartłomiej Piotrowski <bpiotrow...@archlinux.org> +# Contributor: AndyRTR <andy...@archlinux.org> +# Contributor: kiefer <jorgelmad...@gmail.com> + +pkgname=lxdm +pkgver=0.5.1 +pkgrel=3 +pkgdesc='Lightweight X11 Display Manager' +arch=('i686' 'x86_64') +url="https://sourceforge.net/projects/lxdm/" +license=('GPL') +groups=('lxde') +depends=('gtk2' 'xorg-server') +makedepends=('intltool' 'iso-codes') +optdepends=('gtk-engines: default GTK+ theme' + 'iso-codes: show language names in language chooser' + 'librsvg: display the default background') +install=$pkgname.install +backup=('etc/lxdm/lxdm.conf' 'etc/pam.d/lxdm' 'etc/lxdm/Xsession' + 'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin' + 'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown') +source=(http://downloads.sourceforge.net/lxdm/$pkgname-$pkgver.tar.xz + git-fixes.patch + default-config.patch + lxdm.pam + Xsession) +md5sums=('9e03ce5f6d303bc9b689732401934dc6' + '8f514a4ba8fe204c8f0db293246dba3d' + 'f0ae6c072f151104c53a030fd7757821' + 'c941ef896248bc7c03901b513490425c' + '6ff73570368501a06ee7badc8e415d0a') + +prepare(){ + cd "$srcdir/$pkgname-$pkgver" + + # Apply fixes from git + patch -Np1 -i ../git-fixes.patch + + # Adjust Arch-specific settings + patch -Np1 -i ../default-config.patch + + # Use our custom pam and Xsession files + cp ../lxdm.pam pam/lxdm + cp ../Xsession data/Xsession + + # Support for pulseaudio + echo 'test -x /usr/bin/pax11publish && /usr/bin/pax11publish -r' >>data/PostLogout.in +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sbindir=/usr/bin --libexecdir=/usr/lib/lxdm \ + --sysconfdir=/etc --localstatedir=/var + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + chmod 644 "$pkgdir/etc/lxdm/lxdm.conf" + + # Home directory + install -dm 755 "$pkgdir/var/lib/lxdm" + echo 'GDK_CORE_DEVICE_EVENTS=true' > "$pkgdir"/var/lib/lxdm/.pam_environment + chown -R 121:121 "$pkgdir/var/lib/lxdm" +} Deleted: community-x86_64/Xsession =================================================================== --- community-x86_64/Xsession 2015-07-31 14:08:27 UTC (rev 137641) +++ community-x86_64/Xsession 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,71 +0,0 @@ -#!/bin/sh -# -# LXDM wrapper to run around X sessions. - -echo "Running X session wrapper" - -if [ $# -eq 1 -a -n "$1" ]; then - LXSESSION=$1 -else -# default session - LXSESSION=/usr/bin/startlxde -fi - -# Load profile -for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do - if [ -f "$file" ]; then - echo "Loading profile from $file"; - . "$file" - fi -done - -# Load resources -for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do - if [ -f "$file" ]; then - echo "Loading resource: $file" - xrdb -merge "$file" - fi -done - -# Load keymaps -for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do - if [ -f "$file" ]; then - echo "Loading keymap: $file" - setxkbmap `cat "$file"` - XKB_IN_USE=yes - fi -done - -# Load xmodmap if not using XKB -if [ -z "$XKB_IN_USE" ]; then - for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do - if [ -f "$file" ]; then - echo "Loading modmap: $file" - xmodmap "$file" - fi - done -fi - -unset XKB_IN_USE - -# Run all system xinitrc shell scripts -xinitdir="/etc/X11/xinit/xinitrc.d" -if [ -d "$xinitdir" ]; then - for script in $xinitdir/*; do - echo "Loading xinit script $script" - if [ -x "$script" -a ! -d "$script" ]; then - . "$script" - fi - done -fi - -# Run user xsession shell script -script="$HOME/.xsession" -if [ -x "$script" -a ! -d "$script" ]; then - echo "Loading xsession script $script" - . "$script" -fi - -echo "X session wrapper complete, running session $LXSESSION" - -exec $LXSESSION Copied: lxdm/repos/community-x86_64/Xsession (from rev 137641, lxdm/trunk/Xsession) =================================================================== --- community-x86_64/Xsession (rev 0) +++ community-x86_64/Xsession 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,71 @@ +#!/bin/sh +# +# LXDM wrapper to run around X sessions. + +echo "Running X session wrapper" + +if [ $# -eq 1 -a -n "$1" ]; then + LXSESSION=$1 +else +# default session + LXSESSION=/usr/bin/startlxde +fi + +# Load profile +for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do + if [ -f "$file" ]; then + echo "Loading profile from $file"; + . "$file" + fi +done + +# Load resources +for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do + if [ -f "$file" ]; then + echo "Loading resource: $file" + xrdb -merge "$file" + fi +done + +# Load keymaps +for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do + if [ -f "$file" ]; then + echo "Loading keymap: $file" + setxkbmap `cat "$file"` + XKB_IN_USE=yes + fi +done + +# Load xmodmap if not using XKB +if [ -z "$XKB_IN_USE" ]; then + for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do + if [ -f "$file" ]; then + echo "Loading modmap: $file" + xmodmap "$file" + fi + done +fi + +unset XKB_IN_USE + +# Run all system xinitrc shell scripts +xinitdir="/etc/X11/xinit/xinitrc.d" +if [ -d "$xinitdir" ]; then + for script in $xinitdir/*; do + echo "Loading xinit script $script" + if [ -x "$script" -a ! -d "$script" ]; then + . "$script" + fi + done +fi + +# Run user xsession shell script +script="$HOME/.xsession" +if [ -x "$script" -a ! -d "$script" ]; then + echo "Loading xsession script $script" + . "$script" +fi + +echo "X session wrapper complete, running session $LXSESSION" + +exec $LXSESSION Deleted: community-x86_64/default-config.patch =================================================================== --- community-x86_64/default-config.patch 2015-07-31 14:08:27 UTC (rev 137641) +++ community-x86_64/default-config.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,21 +0,0 @@ -diff -Naur lxdm.orig/data/lxdm.conf.in lxdm/data/lxdm.conf.in ---- lxdm.orig/data/lxdm.conf.in 2013-08-30 17:56:16.097006000 +0200 -+++ lxdm/data/lxdm.conf.in 2013-09-04 01:54:12.942117085 +0200 -@@ -23,7 +23,7 @@ - - [server] - ## arg used to start xserver, not fully function --# arg=/usr/bin/X -background vt1 -+arg=/usr/bin/X -background vt1 - # uncomment this if you really want xserver listen to tcp - # tcp_listen=1 - # uncoment this if you want reset the xserver after logou -@@ -34,7 +34,7 @@ - gtk_theme=Clearlooks - - ## background of the greeter --bg=/usr/share/backgrounds/default.png -+# bg=/usr/share/backgrounds/default.png - - ## if show bottom pane - bottom_pane=1 Copied: lxdm/repos/community-x86_64/default-config.patch (from rev 137641, lxdm/trunk/default-config.patch) =================================================================== --- community-x86_64/default-config.patch (rev 0) +++ community-x86_64/default-config.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,21 @@ +diff -Naur lxdm.orig/data/lxdm.conf.in lxdm/data/lxdm.conf.in +--- lxdm.orig/data/lxdm.conf.in 2013-08-30 17:56:16.097006000 +0200 ++++ lxdm/data/lxdm.conf.in 2013-09-04 01:54:12.942117085 +0200 +@@ -23,7 +23,7 @@ + + [server] + ## arg used to start xserver, not fully function +-# arg=/usr/bin/X -background vt1 ++arg=/usr/bin/X -background vt1 + # uncomment this if you really want xserver listen to tcp + # tcp_listen=1 + # uncoment this if you want reset the xserver after logou +@@ -34,7 +34,7 @@ + gtk_theme=Clearlooks + + ## background of the greeter +-bg=/usr/share/backgrounds/default.png ++# bg=/usr/share/backgrounds/default.png + + ## if show bottom pane + bottom_pane=1 Copied: lxdm/repos/community-x86_64/git-fixes.patch (from rev 137641, lxdm/trunk/git-fixes.patch) =================================================================== --- community-x86_64/git-fixes.patch (rev 0) +++ community-x86_64/git-fixes.patch 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,217 @@ +diff --git a/data/themes/Industrial/gtk.css b/data/themes/Industrial/gtk.css +index 7621345..179f0d6 100644 +--- a/data/themes/Industrial/gtk.css ++++ b/data/themes/Industrial/gtk.css +@@ -1,6 +1,6 @@ + #lxdm { + background-image: url("wave.svg"); +- background-size: 100%; ++ background-repeat: round; + } + + #bottom_pane { +@@ -12,10 +12,12 @@ + color: #ffffff; + } + +-#user_list, #login_entry { +- background-image: none; ++#prompt { ++ font: Sans 14; ++ color: #000000; + } + +-#prompt, #bottom_pane GtkLabel { +- color: #ffffff; ++#bottom_pane GtkLabel { ++ font: Sans 12; ++ color: #9E9D9B; + } +diff --git a/src/lxdm.c b/src/lxdm.c +index 507189d..842f4b8 100644 +--- a/src/lxdm.c ++++ b/src/lxdm.c +@@ -1269,6 +1269,9 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option) + { + if(s) lxsession_free(s); + lxsession_set_active(prev); ++ g_free(session_name); ++ g_free(session_exec); ++ g_free(session_desktop_names); + return; + } + if(!s) s=lxsession_find_idle(); +@@ -1514,7 +1517,7 @@ static void lxdm_signal_handler(void *data,int sig) + switch(sig){ + case SIGTERM: + case SIGINT: +- g_critical("QUIT BY SIGNAL\n"); ++ g_critical("QUIT BY SIGNAL %d\n",sig); + lxdm_quit_self(0); + break; + default: +@@ -1650,6 +1653,7 @@ static GString *lxdm_user_cmd(void *data,int user,int arc,char **arg) + if(p) + { + res=g_string_new_len(p,len); ++ g_free(p); + } + g_key_file_free(kf); + } +diff --git a/src/pam.c b/src/pam.c +index 43bd687..a377157 100644 +--- a/src/pam.c ++++ b/src/pam.c +@@ -42,6 +42,7 @@ + #include <errno.h> + #include <poll.h> + #include <sys/stat.h> ++#include <sys/wait.h> + + #include <pwd.h> + #include <grp.h> +@@ -300,12 +301,72 @@ int lxdm_auth_session_begin(LXDM_AUTH *a,const char *name,int tty,int display,ch + } + err = pam_open_session(a->handle, 0); /* FIXME pam session failed */ + if( err != PAM_SUCCESS ) ++ { + g_warning( "pam open session error \"%s\"\n", pam_strerror(a->handle, err)); ++ } + else ++ { + a->in_session=1; ++ } + return 0; + } + ++static int proc_filter(const struct dirent *d) ++{ ++ int c=d->d_name[0]; ++ return c>='1' && c<='9'; ++} ++ ++static int check_process_sid(int pid,const char *sid) ++{ ++ char path[128]; ++ FILE *fp; ++ gchar *env_data,*p; ++ gsize env_len; ++ int res=0; ++ ++ sprintf(path,"/proc/%d/environ",pid); ++ if(!g_file_get_contents(path,&env_data,&env_len,NULL)) ++ { ++ return 0; ++ } ++ for(p=env_data;p!=NULL && p-env_data<env_len;) ++ { ++ if(!strncmp(p,"XDG_SESSION_ID=",15)) ++ { ++ if(!strcmp(sid,p+15)) ++ res=1; ++ break; ++ } ++ p=strchr(p,'\0'); ++ if(!p) break;p++; ++ } ++ g_free(env_data); ++ ++ return res; ++} ++ ++static void kill_left_process(const char *sid) ++{ ++ int self=getpid(); ++ struct dirent **list; ++ int i,n; ++ ++ n=scandir("/proc",&list,proc_filter,0); ++ if(n<0) return; ++ for(i=0;i<n;i++) ++ { ++ int pid=atoi(list[i]->d_name); ++ if(pid==self || pid<=1) ++ continue; ++ if(check_process_sid(pid,sid)) ++ { ++ kill(pid,SIGKILL); ++ } ++ } ++ free(list); ++} ++ + int lxdm_auth_session_end(LXDM_AUTH *a) + { + int err; +@@ -313,8 +374,20 @@ int lxdm_auth_session_end(LXDM_AUTH *a) + return 0; + if(a->in_session) + { ++ char xdg_session_id[32]={0}; ++ const char *p=pam_getenv(a->handle,"XDG_SESSION_ID"); ++ if(p!=NULL) snprintf(xdg_session_id,32,"%s",p); + err = pam_close_session(a->handle, 0); ++ if( err != PAM_SUCCESS ) ++ { ++ g_warning( "pam close session error \"%s\"\n", pam_strerror(a->handle, err)); ++ } + a->in_session=0; ++ if(p!=NULL) ++ { ++ usleep(100*1000); ++ kill_left_process(xdg_session_id); ++ } + } + pam_end(a->handle, err); + a->handle = NULL; +@@ -400,8 +473,10 @@ void switch_user(struct passwd *pw, const char *run, char **env) + g_spawn_command_line_sync ("/etc/lxdm/PreLogin",NULL,NULL,NULL,NULL); + + if( !pw || initgroups(pw->pw_name, pw->pw_gid) || +- setgid(pw->pw_gid) || setuid(pw->pw_uid)/* || setsid() == -1 */) ++ setgid(pw->pw_gid) || setuid(pw->pw_uid) || setsid()==-1) ++ { + exit(EXIT_FAILURE); ++ } + chdir(pw->pw_dir); + fd=open(".xsession-errors",O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR); + if(fd!=-1) +@@ -426,7 +501,6 @@ void switch_user(struct passwd *pw, const char *run, char **env) + + void run_session(LXDM_AUTH *a,const char *run) + { +- setsid(); + a->child=fork(); + if(a->child==0) + { +@@ -505,7 +579,7 @@ int main(int arc,char *arg[]) + + setvbuf(stdout, NULL, _IOLBF, 0 ); + signal(SIGCHLD,sig_handler); +- ++ + lxdm_auth_init(&a); + while(file_get_line(cmd,sizeof(cmd),stdin)>=0) + { +diff --git a/src/xconn.c b/src/xconn.c +index 5c62d4b..df4824f 100644 +--- a/src/xconn.c ++++ b/src/xconn.c +@@ -172,7 +172,7 @@ void xconn_close(xconn_t c) + free(c); + } + +-#if 0 ++#if 1 + static xcb_window_t xconn_get_root(xconn_t c) + { + const xcb_setup_t *setup; +@@ -185,7 +185,7 @@ static xcb_window_t xconn_get_root(xconn_t c) + + void xconn_clean(xconn_t c) + { +-#if 0 ++#if 1 + xcb_query_tree_cookie_t wintree; + xcb_query_tree_reply_t *rep; + xcb_window_t *children; Deleted: community-x86_64/lxdm.install =================================================================== --- community-x86_64/lxdm.install 2015-07-31 14:08:27 UTC (rev 137641) +++ community-x86_64/lxdm.install 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,13 +0,0 @@ -post_install() { - getent group lxdm > /dev/null 2>&1 && \ - groupmod -g 121 lxdm > /dev/null 2>&1 || \ - groupadd -g 121 lxdm - getent passwd lxdm > /dev/null 2>&1 && \ - usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \ - useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm - passwd -l lxdm > /dev/null -} - -post_upgrade() { - post_install -} Copied: lxdm/repos/community-x86_64/lxdm.install (from rev 137641, lxdm/trunk/lxdm.install) =================================================================== --- community-x86_64/lxdm.install (rev 0) +++ community-x86_64/lxdm.install 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,13 @@ +post_install() { + getent group lxdm > /dev/null 2>&1 && \ + groupmod -g 121 lxdm > /dev/null 2>&1 || \ + groupadd -g 121 lxdm + getent passwd lxdm > /dev/null 2>&1 && \ + usermod -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm > /dev/null 2>&1 || \ + useradd -c 'Lightweight X11 Display Manager' -u 121 -g 121 -d /var/lib/lxdm -s /sbin/nologin lxdm + passwd -l lxdm > /dev/null +} + +post_upgrade() { + post_install +} Deleted: community-x86_64/lxdm.pam =================================================================== --- community-x86_64/lxdm.pam 2015-07-31 14:08:27 UTC (rev 137641) +++ community-x86_64/lxdm.pam 2015-07-31 14:08:41 UTC (rev 137642) @@ -1,7 +0,0 @@ -#%PAM-1.0 -auth include system-login --auth optional pam_gnome_keyring.so -account include system-login -password include system-login -session include system-login --session optional pam_gnome_keyring.so auto_start Copied: lxdm/repos/community-x86_64/lxdm.pam (from rev 137641, lxdm/trunk/lxdm.pam) =================================================================== --- community-x86_64/lxdm.pam (rev 0) +++ community-x86_64/lxdm.pam 2015-07-31 14:08:41 UTC (rev 137642) @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth include system-login +-auth optional pam_gnome_keyring.so +account include system-login +password include system-login +session include system-login +-session optional pam_gnome_keyring.so auto_start