You are not logged in.

#1 2014-02-10 13:41:51

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

[SOLVED] LightDM different xprofile for multiple WMs

Hi everybody,

i'm quite new to archlinux. I installed xmonad alongside cinnamon as WM/DE. Most of the time, I am using xmonad but sometimes I switch to cinnamon. I use LightDM to login to the these desktops.

My Problem is, that for xmonad I start trayer using .xprofile but I don't need trayer in cinnamon so I don't want it to be started when starting cinnamon.

Is there a way to make LightDM execute different xprofile scripts based on the chosen session? Or maybe a way to get the info which session was started within the xprofile script so that I can handle it there?

Or is there any another solution?

I hope I was not just too stupid to search the right keywords....

This is my .xprofile:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

setxkbmap -layout de
nitrogen --restore &
unclutter &
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 11 --transparent true --alpha 0 --tint 0x000000 --height 18 &
udiskie --tray &
xsetroot -cursor_name left_ptr
nm-applet &

Last edited by dice (2014-02-11 11:38:16)


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#2 2014-02-10 14:00:36

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] LightDM different xprofile for multiple WMs

Hmm, excuse me but can't you just test for xmonad and then run trayer.

Somethine like (totally untested):

pgrep -x xmonad >/dev/null && trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 11 --transparent true --alpha 0 --tint 0x000000 --height 18 &

fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-02-10 15:13:04

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED] LightDM different xprofile for multiple WMs

Thank you for reply and this nice idea. Bad thing is: it doesn't work because the script is run before the WM starts. Therefore the process does not exist at this moment.


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#4 2014-02-10 16:18:47

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] LightDM different xprofile for multiple WMs

That's new for me...

I start enlightenment with lightdm, part of my env looks like this:

ronald@Charlie ~ :) $ set | grep -i enlightenment
DESKTOP=Enlightenment-0.17.0
DESKTOP_SESSION=enlightenment

I also start XFCE with startx, and part of that environment looks like this:

[gebruiker@delta ~]$ set | grep -i desktop
DESKTOP_SESSION=xfce

Could you post the output of:

set

Under *both* environments. Try to start the terminal from the .xprofile script and *not* from the window manager ofc.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#5 2014-02-10 16:21:23

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] LightDM different xprofile for multiple WMs

Why don't you spawn trayer in the main function of your xmonad.hs?

Offline

#6 2014-02-11 11:37:25

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED] LightDM different xprofile for multiple WMs

@Rexillion: I couldn't get the process with pgrep. But the environment vars are set when xprofile is executed. I could use those in xprofile to decide what to start.

But Raynman's idea is a bit simpler and works fine. (Don't know why I didn't come up with this myself roll )

Thank you for your help


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

Board footer

Powered by FluxBB