Page 1 of 2
Start .xinitrc from LXDM + metacity logout
Posted: Sat Apr 25, 2015 6:17 pm
by lodger
Hi,
How Can I start my "~/.xinitrc" from LXDM?
I would like to use a session with metacity+lxpanel, then I have edited my .dmrc:
Code: Select all
$ cat ~/.dmrc
[Desktop]
Session=metacity
it works, but when I login my session (default) from LXDM, there is only metacity with nothing. how can I add "lxpanel" on start?
I tryed to put "lxpanel.desktop" on" ~/.config/autostart" but it doesn't work.
Someone can help me?
Thanks.
Re: Start .xinitrc from LXDM
Posted: Sun Apr 26, 2015 10:19 am
by lodger
I SOLVED with a workaround:
Code: Select all
$ cat ~/.dmrc
[Desktop]
Session=/home/pippo/dm.sh
but now lxde-logout of lxpanel doesn't work good (when i press "logout" nothing happens).
Re: Start .xinitrc from LXDM
Posted: Thu Apr 30, 2015 8:24 pm
by drooly
lodger wrote:I SOLVED with a workaround:
Code: Select all
$ cat ~/.dmrc
[Desktop]
Session=/home/pippo/dm.sh
but now lxde-logout of lxpanel doesn't work good (when i press "logout" nothing happens).
because most of the things that are executed during login, don't get executed with your solution.
permission management in this case.
like dbus, keyring, polkit,...
Re: Start .xinitrc from LXDM
Posted: Fri May 01, 2015 12:22 pm
by lodger
what should i run? i don't want to start lxsession.
Re: Start .xinitrc from LXDM
Posted: Sat May 02, 2015 9:24 pm
by drooly
try adding
to your startup file.
Re: Start .xinitrc from LXDM
Posted: Sun May 03, 2015 10:04 am
by lodger
i have added it but it still doesnt work (when i press logout nothing happens).
Re: Start .xinitrc from LXDM
Posted: Mon May 04, 2015 5:59 pm
by drooly
sorry, i don't really know what's happening there.
what's this .dmrc?
what are the exact contents of both files now?
how do you tell lightdm to execute .dmrc?
what commands does lxpanel execute to log you out (hint: i think it's some python script called lxde-logout or sth like that)?
did you already tell us what distro you're using? did it come with lxde preinstalled, or did you install that yourself?
Re: Start .xinitrc from LXDM
Posted: Mon May 04, 2015 6:56 pm
by lodger
drooly wrote:sorry, i don't really know what's happening there.
what's this .dmrc?
https://wiki.archlinux.org/index.php/LXDM#Per_user
drooly wrote:what are the exact contents of both files now?
Code: Select all
$ cat ~/.dmrc
[Desktop]
Session=/home/pippo/dm.sh
Code: Select all
$ cat ~/dm.sh
metacity &
clipit &
pcmanfm --desktop &
lxpolkit &
lxpanel
drooly wrote:how do you tell lightdm to execute .dmrc?
i don't use lightdm, i use LXDM.
drooly wrote:what commands does lxpanel execute to log you out (hint: i think it's some python script called lxde-logout or sth like that)?
lxde-logout (it's GUI of lxsession-logout)
Code: Select all
$ cat ~/.config/lxpanel/default/config
[Command]
Logout=lxde-logout
drooly wrote:did you already tell us what distro you're using? did it come with lxde preinstalled, or did you install that yourself?
i use ArchLinux 32bit. i installed LXDE with:
Re: Start .xinitrc from LXDM
Posted: Thu May 07, 2015 8:31 pm
by drooly
like the name of the utility says, it logs you out of an lxsession.
however, you're not starting an lxsession at login.
lxsession-logout is not a script, it's binary, so there isn't much tweaking you can do with it.
but you can tell lxpanel to use something else to logout.
i'm sure you can find useful instructions on wiki.archlinux.org.
Re: Start .xinitrc from LXDM
Posted: Sat Jun 27, 2015 8:46 am
by lodger
maybe i need to edit the source of lxsession-logout:
https://github.com/lxde/lxsession/tree/ ... ion-logout
but what should i edit?
for logout to LXDM i would like to use this command:
SOLVED:
i have edited these lines of "lxsession-logout.c":
Code: Select all
/* Handler for "clicked" signal on Logout button. */
static void logout_clicked(GtkButton * button, HandlerContext * handler_context)
{
if (handler_context->lxsession_pid != 0)
{
kill(handler_context->lxsession_pid, SIGTERM);
}
else
{
/* Assume we are under openbox */
g_spawn_command_line_async("openbox --exit", NULL);
}
{
/* Assume we are under metacity or marco */
g_spawn_command_line_async("killall -u $USER", NULL);
}
gtk_main_quit();
}