initial import
This commit is contained in:
106
lxdm/PKGBUILD
Normal file
106
lxdm/PKGBUILD
Normal file
@@ -0,0 +1,106 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=lxdm
|
||||
pkgname=('lxdm-gtk2' 'lxdm')
|
||||
pkgver=0.5.3
|
||||
pkgrel=2
|
||||
pkgdesc="Lightweight X11 Display Manager"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://lxde.org/'
|
||||
license=('GPL-2')
|
||||
makedepends=('intltool' 'iso-codes' 'gtk2' 'gtk' 'xenocara-server' 'gettext-tiny')
|
||||
optdepends=('iso-codes: for showing language names in language chooser')
|
||||
backup=('etc/lxdm/lxdm.conf'
|
||||
'etc/lxdm/Xsession'
|
||||
'etc/lxdm/PreLogin'
|
||||
'etc/lxdm/LoginReady'
|
||||
'etc/lxdm/PostLogin'
|
||||
'etc/lxdm/PostLogout'
|
||||
'etc/lxdm/PreReboot'
|
||||
'etc/lxdm/PreShutdown')
|
||||
source=("https://downloads.sourceforge.net/lxde/${pkgbase}-${pkgver}.tar.xz"
|
||||
"set-path.patch"
|
||||
"git-fixes.patch"
|
||||
"lxdm.initd"
|
||||
"lxdm.run")
|
||||
sha512sums=('0e3539c595a71cb850c1756dd075b8d477a4e111a4167714057cac06650e9587f338f797f14122e7b2a2f4ad35b38cd7172b83e996758abeeaf0146d65bbc26f'
|
||||
'31458f9cbf2eefa863ea7b8b26778b8738311a16ff0e41d21e431dca94165fa0dab3274679504d4d2b964ce473ce2de5a692376393abeba000e19ae675813bf8'
|
||||
'3ac6601dafe36cfe95a7895b3e138d184b2098a58b2e93fbb168e91cd51ffef5cbc55403138b326f68b85f8d4bb3c303dc734378dca808432edf5cf85e93afd5'
|
||||
'918a51293384f0aae69afb0fb1d25a1120d663cc7473b0796aaaf727a989290a1730c2415d90d04d7ad7d3691ca1d2ca77d9754ac6f5f0aa9574581841b51293'
|
||||
'35b640d1cc9d745076d0d25cf3dda0dbe1ffc7d8a0a10a98637e102bf6fe61a6d3992d406512d63e520ea45186e3e66d5ffa232fda4d41ab3a5c688de33a3c2d')
|
||||
|
||||
prepare(){
|
||||
cd $pkgbase-$pkgver
|
||||
|
||||
# don't overwrite PATH if already defined
|
||||
patch -Np1 -i $srcdir/set-path.patch
|
||||
|
||||
# apply fixes from git
|
||||
patch -Np1 -i $srcdir/git-fixes.patch
|
||||
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
build() {
|
||||
# GTK+ 2 version
|
||||
[ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2
|
||||
cd gtk2
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libexecdir=/usr/lib/lxdm \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--without-pam \
|
||||
--with-xconn=xcb
|
||||
make
|
||||
|
||||
cd "$srcdir"
|
||||
# GTK+ 3 version
|
||||
[ -d gtk3 ] || cp -r $pkgbase-$pkgver gtk3
|
||||
cd gtk3
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libexecdir=/usr/lib/lxdm \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--enable-gtk3 \
|
||||
--without-pam \
|
||||
--with-xconn=xcb
|
||||
make
|
||||
}
|
||||
|
||||
package_lxdm-gtk2() {
|
||||
depends=('gtk2' 'xenocara-server')
|
||||
optdepends+=('gnome-themes-extra: default GTK+ theme')
|
||||
conflicts=('lxdm')
|
||||
provides=('lxdm-service')
|
||||
|
||||
cd gtk2
|
||||
make DESTDIR="$pkgdir" install
|
||||
chmod 644 "$pkgdir/etc/lxdm/lxdm.conf"
|
||||
|
||||
# install services
|
||||
install -Dm755 "$srcdir/lxdm.initd" "$pkgdir/etc/init.d/lxdm"
|
||||
install -Dm755 "$srcdir/lxdm.run" "$pkgdir/etc/sv/lxdm/run"
|
||||
|
||||
# install license
|
||||
install -Dm644 gpl-2.0.txt -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lxdm() {
|
||||
pkgdesc+=' (GTK+ 3 version)'
|
||||
depends=('gtk' 'xenocara-server')
|
||||
conflicts=('lxdm-gtk2')
|
||||
provides=('lxdm-service')
|
||||
|
||||
cd gtk3
|
||||
make DESTDIR="$pkgdir" install
|
||||
chmod 644 "$pkgdir/etc/lxdm/lxdm.conf"
|
||||
|
||||
# install services
|
||||
install -Dm755 "$srcdir/lxdm.initd" "$pkgdir/etc/init.d/lxdm"
|
||||
install -Dm755 "$srcdir/lxdm.run" "$pkgdir/etc/sv/lxdm/run"
|
||||
|
||||
# install license
|
||||
install -Dm644 gpl-2.0.txt -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
93
lxdm/git-fixes.patch
Normal file
93
lxdm/git-fixes.patch
Normal file
@@ -0,0 +1,93 @@
|
||||
diff --git a/data/themes/Industrial/gtk.css b/data/themes/Industrial/gtk.css
|
||||
index 179f0d6..f8e6432 100644
|
||||
--- a/data/themes/Industrial/gtk.css
|
||||
+++ b/data/themes/Industrial/gtk.css
|
||||
@@ -17,6 +17,7 @@
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
+#bottom_pane label,
|
||||
#bottom_pane GtkLabel {
|
||||
font: Sans 12;
|
||||
color: #9E9D9B;
|
||||
diff --git a/src/greeter-gdk.c b/src/greeter-gdk.c
|
||||
index 1abbefa..ad3267a 100644
|
||||
--- a/src/greeter-gdk.c
|
||||
+++ b/src/greeter-gdk.c
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#define XLIB_ILLEGAL_ACCESS
|
||||
|
||||
+#include <gtk/gtk.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
@@ -88,12 +89,14 @@ static void on_ui_expose(void)
|
||||
}
|
||||
|
||||
cr=gdk_cairo_create(win);
|
||||
+#if GTK_CHECK_VERSION(3,0,0)
|
||||
cairo_pattern_t *pattern=gdk_window_get_background_pattern(win);
|
||||
if(pattern)
|
||||
{
|
||||
cairo_set_source(cr,pattern);
|
||||
cairo_paint(cr);
|
||||
}
|
||||
+#endif
|
||||
|
||||
gdk_cairo_set_source_color(cr, &bg);
|
||||
cairo_rectangle(cr, rc.x, rc.y, rc.width, rc.height);
|
||||
diff --git a/src/greeter.c b/src/greeter.c
|
||||
index 10b7f3f..03503b6 100644
|
||||
--- a/src/greeter.c
|
||||
+++ b/src/greeter.c
|
||||
@@ -146,7 +146,7 @@ static void switch_to_input_user(void)
|
||||
if(user_list_scrolled)
|
||||
gtk_widget_show(user_list_scrolled);
|
||||
else
|
||||
- gtk_widget_hide(user_list);
|
||||
+ gtk_widget_show(user_list);
|
||||
gtk_widget_grab_focus(user_list);
|
||||
}
|
||||
else
|
||||
diff --git a/src/lxdm.c b/src/lxdm.c
|
||||
index a37f051..722936f 100644
|
||||
--- a/src/lxdm.c
|
||||
+++ b/src/lxdm.c
|
||||
@@ -488,6 +490,9 @@ static char *lxsession_xserver_command(LXSession *s)
|
||||
{
|
||||
arg[arc++] = g_strdup("-nolisten");
|
||||
arg[arc++] = g_strdup("tcp");
|
||||
+ } else {
|
||||
+ arg[arc++] = g_strdup("-listen");
|
||||
+ arg[arc++] = g_strdup("tcp");
|
||||
}
|
||||
if(!novtswitch)
|
||||
{
|
||||
@@ -750,7 +755,13 @@ static char ** create_client_auth(struct passwd *pw,char **env)
|
||||
if(xauth_write_file(authfile,s->display,s->mcookie)==-1)
|
||||
{
|
||||
g_free(authfile);
|
||||
- authfile = g_strdup_printf("/var/run/lxdm/.Xauth%d",pw->pw_uid);
|
||||
+
|
||||
+ gchar *authdir = g_strdup_printf("/var/run/lxdm/%d", pw->pw_uid);
|
||||
+ g_mkdir_with_parents(authdir, S_IRWXU);
|
||||
+ chown(authdir, pw->pw_uid, pw->pw_gid);
|
||||
+
|
||||
+ authfile = g_strdup_printf("%s/.Xauthority", authdir);
|
||||
+ g_free(authdir);
|
||||
remove(authfile);
|
||||
xauth_write_file(authfile,s->display,s->mcookie);
|
||||
}
|
||||
@@ -956,6 +967,11 @@ static void on_xserver_stop(void *data,int pid, int status)
|
||||
s->dpy=NULL;
|
||||
ui_drop();
|
||||
lxdm_startx(s);
|
||||
+ #ifndef DISABLE_XAUTH
|
||||
+ char temp[256];
|
||||
+ sprintf(temp,"/var/run/lxdm/lxdm-:%d.auth",s->display);
|
||||
+ setenv("XAUTHORITY",temp,1);
|
||||
+ #endif
|
||||
ui_prepare();
|
||||
lxsession_set_active(s);
|
||||
}
|
||||
19
lxdm/lxdm.initd
Normal file
19
lxdm/lxdm.initd
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2025 Hyperbola Project
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Lightweight Display Manager from LXDM"
|
||||
|
||||
command="/usr/sbin/lxdm-binary"
|
||||
command_args="-d"
|
||||
pidfile="/var/run/lxdm.pid"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after bootmisc consolefont modules netmount
|
||||
after readahead-list ypbind autofs gpm lircmd
|
||||
after quota keymaps
|
||||
after acpid openvpn
|
||||
before alsasound
|
||||
use xfs
|
||||
}
|
||||
2
lxdm/lxdm.run
Normal file
2
lxdm/lxdm.run
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /usr/sbin/lxdm-binary -d
|
||||
13
lxdm/set-path.patch
Normal file
13
lxdm/set-path.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
--- a/src/lxdm.c 2015-11-23 12:15:52.000000000 +0100
|
||||
+++ b/src/lxdm.c 2025-03-26 01:20:33.915624039 +0100
|
||||
@@ -1398,8 +1398,8 @@
|
||||
path = g_key_file_get_string(config, "base", "path", 0);
|
||||
if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */
|
||||
env=g_environ_setenv(env, "PATH", path, TRUE); /* override current $PATH with config value */
|
||||
- else /* don't use the global env, they are bad for user */
|
||||
- env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */
|
||||
+ else if(!getenv("PATH")) /* if PATH is not set */
|
||||
+ env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/games:/usr/games:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */
|
||||
g_free(path);
|
||||
/* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
|
||||
if( lang && lang[0] )
|
||||
Reference in New Issue
Block a user