Xfce Forum

Sub domains
 

You are not logged in.

#1 2007-03-29 19:45:54

npc
Member
From: Brazil
Registered: 2007-03-29
Posts: 5

Is it possible to pass args to startxfce4?

Hey guys.

1. I have three different xorg SeverLayouts: tv-only, lfp-only and tv-lfp;

2. I use SLiM as my login manager, it works fine, and calls "exec /bin/bash -login ~/.xinitrc %session" after a successful login;

3. %session is defined in slim.conf and represents each ServerLayout names (lpf-only -> xfce4, tv-only -> xfce4-tv, tv-lfp -> xfce4-tv-lfp), it is passed as an arg to .xinitrc (SLiM cycles between the possible entries when i hit F1);

4. I cant start xorg with any server layout from the console with "startx -- -layout layout_name", it works like a charm;

5. I want to be able to call each of those ServerLayout with SLiM's %session entries using .xinitrc.

6. I've got to this setup:

~/.xinitrc

DEFAULT_SESSION='startxfce4'
case $1 in
xfce4)
        exec <code_here>
        ;;
xfce4-tv)
        exec <code_here>
        ;;
xfce4-tv-lfp)
        exec <code_here>
        ;;
*)
        exec $DEFAULT_SESSION
        ;;
esac

However:
"startxfce4 -- -layout layout_name" and "startx -- -layout layout_name" don't work.

Help!

NPC.


Shalom!
NPC.

Offline

#2 2007-03-30 06:44:58

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Is it possible to pass args to startxfce4?

Running a line like this should work:

xinit /opt/xfce4/etc/xdg/xfce4/xinitrc -- -layout "bla" -quiet

Replace the /opt/xfce4 with your prefix.

Offline

#3 2007-03-31 11:11:21

npc
Member
From: Brazil
Registered: 2007-03-29
Posts: 5

Re: Is it possible to pass args to startxfce4?

Thanks, that works! big_smile
Does that line have the same functionality as starting the session with startxfce4 or will it cripple anything?

NPC.


Shalom!
NPC.

Offline

#4 2007-03-31 11:50:04

npc
Member
From: Brazil
Registered: 2007-03-29
Posts: 5

Re: Is it possible to pass args to startxfce4?

That did work great from the console, but SLiM wont run it from .xinitrc.
I've got some info from the log, it's seems whenever i tell SLiM to call anything but startxfce4 this happens and xorg won't startup:

/usr/bin/xauth:  creating new authority file /home/npc/.Xauthority
xauth:  creating new authority file /home/npc/.serverauth.6974

Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.


Couldnt get a file descriptor referring to the console

slim: waiting for X server to shut down

That happens with any startx line too.

Thanks.


Shalom!
NPC.

Offline

#5 2007-04-01 15:30:44

npc
Member
From: Brazil
Registered: 2007-03-29
Posts: 5

Re: Is it possible to pass args to startxfce4?

Found a solution! Partial at least.

I was hacking around the startxfce4 script, and i've found this $SERVERRC variable... hum...
So i tried the following from the console:
SERVERRC="-layout lfp-tv $SERVERRC" startxfce4

And guess what? It works! big_smile Xorg sees my other layout and loads it accordingly.

So, the .xinitrc, to allow slim to load xfce4 using one of the layout options passed by the %session variable.

# the following variable defines the session which is started if the user
# doesn't explicitely select a session
DEFAULT_SESSION='startxfce4'

case $1 in
xfce4)
        export SERVERRC="-layout lfp $SERVERRC"
        ;;
xfce4-tv)
        export SERVERRC="-layout lfp-tv $SERVERRC"
        ;;
xfce4-vga)
        export SERVERRC="-layout lfp-vga $SERVERRC"
        ;;
*)
        exec $DEFAULT_SESSION
        ;;
esac
exec $DEFAULT_SESSION

And guess what? It DOESN'T work.
Xfce loads fine, but xorg seems not to care about the $SERVERRC variable set on .xinitrc, it only loads the default serverlayout. On a term, echo $SERVERRC returns the exact value set in .xinitrc.
What the heck is going on???

Thanks again.

NPC


Shalom!
NPC.

Offline

#6 2007-04-26 01:56:31

npc
Member
From: Brazil
Registered: 2007-03-29
Posts: 5

Re: Is it possible to pass args to startxfce4?

The problem lies on slim, as it has been stated by its devs themselves. Slim fires up a xorg server and passes server arguments on startup, so, after running slim once i cant change such arguments. It's useless to try to change the server layout without restarting xorg as a whole, both server and client, which means quitting slim and manualy starting it from the console.

So it's a missing feature or it's just not possible.

Thanks.


Shalom!
NPC.

Offline

Board footer

Powered by FluxBB