Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: Arslan S. on August 03, 2012, 04:22:03 AM

Title: ConsoleKit and WM/DE integration
Post by: Arslan S. on August 03, 2012, 04:22:03 AM
Here is a sample script to start a window manager or a desktop session with ConsoleKit

start-flwm:
Code: [Select]
#!/bin/sh
#
# Start Desktop Session with ConsoleKit
#

STARTUP="flwm_topside"
CK_LAUNCH_SESSION=/usr/local/bin/ck-launch-session

if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
     STARTUP="dbus-launch --exit-with-session $STARTUP"
fi

if [ -x "$CK_LAUNCH_SESSION" -a -z "$XDG_SESSION_COOKIE" ]; then
     STARTUP="$CK_LAUNCH_SESSION $STARTUP"
fi

exec $STARTUP

copy it to somewhere in PATH
Code: [Select]
install -Dm755 start-flwm ~/.local/bin/start-flwm
adjust sysconfig/desktop
Code: [Select]
echo start-flwm > /etc/sysconfig/desktop
and backup
Code: [Select]
echo etc/sysconfig/desktop >> /opt/.filetool.lst
add ConsoleKit.tcz to onboot.lst

after you login check:
Code: [Select]
tc@box:~$ sudo ck-history --last
tc                    Session1   Seat1   tty2         :0.0                         Fri Aug  3 14:13   still logged in   

Log begins Fri Aug  3 14:13:09 2012
Title: Re: ConsoleKit and WM/DE integration
Post by: hiro on August 03, 2012, 04:33:14 AM
what is all this consoleshit, has it already spread into tinycore base?
Title: Re: ConsoleKit and WM/DE integration
Post by: curaga on August 03, 2012, 04:42:05 AM
has it already spread into tinycore base?

No and won't on my watch ;) I'm sure the others feel that way too.
Title: Re: ConsoleKit and WM/DE integration
Post by: Arslan S. on August 03, 2012, 04:46:34 AM
it is required by polkit to grant priviliges to run some applications like nm-applet
Title: Re: ConsoleKit and WM/DE integration
Post by: bmarkus on August 03, 2012, 05:08:30 AM
has it already spread into tinycore base?

No and won't on my watch ;) I'm sure the others feel that way too.

Agree, it is not needed in base.
Title: Re: ConsoleKit and WM/DE integration
Post by: tinypoodle on August 03, 2012, 05:34:40 AM
what is all this consoleshit, has it already spread into tinycore base?

After reading:
Quote
Furthermore, ConsoleKit will run ~60 threads in the background, where most of them are never used. If you mind using an unmaintained application using so much threads and you only want a convenient way to mount disks as user, have a look at udev, udiskie and polkit. Otherwise you might consider switching to systemd.
that would never occur to me...
Title: Re: ConsoleKit and WM/DE integration
Post by: jls on August 03, 2012, 11:41:47 PM
why don't include this instructions in the consolekit info file?
Title: Re: ConsoleKit and WM/DE integration
Post by: Rich on August 04, 2012, 05:50:31 AM
That's a very good idea.
Title: Re: ConsoleKit and WM/DE integration
Post by: Arslan S. on August 04, 2012, 05:52:58 AM
script is updated (dbus-launch --exit-with-session is added if DBUS_SESSION_BUS_ADDRESS is not set)

and i will update ck soon
Title: Re: ConsoleKit and WM/DE integration
Post by: hiro on August 05, 2012, 03:41:57 PM
heh. that clear message makes me happy. But what if someday udev depends on d-bus, d-bus on systemd and systemd on policykit? will you guys stop using udev?
I sadly have to admit that I'm half-serious...
Title: Re: ConsoleKit and WM/DE integration
Post by: curaga on August 06, 2012, 02:34:06 AM
We'd use the last version of udev that doesn't need those, and if/when that becomes unsensible, look for alternatives.

The current situation is a bit similar, because the udev-to-systemd integration is not yet complete, so if I were to update udev right now, I'd have to use a tarball release from before the systemd integration.

It's looking a bit bad on that front, with both Lennart and Kay only caring about the systemd-integrated udev. There are some external contributors working on making the build-separate-udev-from-the-combined tree work as well as it did before, but I believe right now building only udev from the systemd tree wouldn't work fully.
Title: Re: ConsoleKit and WM/DE integration
Post by: tinypoodle on August 20, 2012, 05:21:02 PM
Perhaps this might be of any interest?

http://connie.slackware.com/~rworkman/standalone-udev-from-systemd/
Title: Re: ConsoleKit and WM/DE integration
Post by: solorin on January 28, 2014, 12:24:46 AM
https://wiki.gentoo.org/wiki/Mdev
http://wiki.openwrt.org/doc/devel/packages/hotplug2