You are not logged in.

#1 2012-07-17 15:00:43

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

[solved] use openbox rather than openbox-session

Hi,

I'd like my desktop environment be neat and completely customizable.

in .xinitrc I can use something like

exec ck-launch-session dbus-launch openbox-session or
exec ck-launch-session dbus-launch gnome-session

but I do not want to start unwanted stuff. If I use

exec ck-launch-session dbus-launch openbox

This will not work because openbox is not a "session" and will exit after exec.
And I do not want to use extra file "startOpenbox" to contain something like

openbox &
pid=$!
...something else...
wait $pid

and "exec ck-launch-session dbus-launch startOpenbox"
any idea?
thanks

Last edited by comicosmos (2012-08-07 13:29:39)

Offline

#2 2012-07-17 15:06:34

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: [solved] use openbox rather than openbox-session

What unwanted stuff are you talking about? You can add or remove items from Openbox's autostart.

Offline

#3 2012-07-17 15:19:13

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

Re: [solved] use openbox rather than openbox-session

I mean

in /usr/bin/openbox-session, there's "/usr/lib/openbox/openbox-autostart" ->
"/usr/lib/openbox/openbox-xdg-autostart" ->
run "*.desktop"

this is what I do not want.
And that's why I'd prefer openbox, rather than openbox-session

Last edited by comicosmos (2012-07-17 15:19:55)

Offline

#4 2012-07-17 15:27:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,367
Website

Re: [solved] use openbox rather than openbox-session

This works fine here

exec dbus-launch --exit-with-session openbox

I don't know why that wouldn't work for you.  There is no "session", openbox-session is just a script.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2012-07-23 12:48:46

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

Re: [solved] use openbox rather than openbox-session

Trilby wrote:

This works fine here

exec dbus-launch --exit-with-session openbox

I don't know why that wouldn't work for you.  There is no "session", openbox-session is just a script.

Hi Trilby
It did work. But I cannot start some other apps with openbox, such as nm-applet, lxpanel, trayfreq...

If I want to start apps with openbox, but do not use openbox-session, I can do this:

                openbox & wmpid=$!
                 #ck-launch-session dbus-launch openbox
                 lxpanel &
                 nm-applet &
                 trayfreq &
                 wait $wmpid

But I do not know how to launch it with ck-launch-session dbus-launch...

Sorry that I did not describe my purpose good enough.

Offline

#6 2012-07-23 13:00:06

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 2,843

Re: [solved] use openbox rather than openbox-session

"Starting some other apps" is exactly what openbox-session and openbox-autostart are for (as Trilby says, openbox-session is just a script that runs other scripts -- have you looked at the openbox-autostart script?).

If you insist, you can put the other stuff in .xinitrc and just start openbox at the end:

                 lxpanel &
                 nm-applet &
                 trayfreq &
                 exec ck-launch-session dbus-launch openbox

Or you can put the other stuff where it belongs (in $HOME/.config/openbox/autostart) and run that script from .xinitrc before you start openbox, but that's exactly what openbox-session does, so it really makes more sense to use openbox-session if you want autostart.

Last edited by 2ManyDogs (2012-07-23 13:10:23)

Offline

#7 2012-07-25 13:14:00

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

Re: [solved] use openbox rather than openbox-session

Thanks 2ManyDogs.

I knew what openbox-session & openbox-autostart script does.
I just do not want to see some .desktop been executed automatically. And even I remove those .desktop items, a package update would bring everything back.

That's why I'd prefer openbox. I like the idea that everything's under control.

Thanks for your advice.

Last edited by comicosmos (2012-07-25 13:14:35)

Offline

#8 2012-07-25 13:20:34

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 2,843

Re: [solved] use openbox rather than openbox-session

You're welcome. If you have what you need now, please mark the thread [solved] (edit the title of your first post).

Offline

#9 2012-07-25 13:38:27

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] use openbox rather than openbox-session

Why do you think openbox-session will execute some *.desktop automatically? You have complete control over the apps that will be autostarted, using ~/.config/openbox/autostart.

Offline

#10 2012-07-26 09:24:14

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 356
Website

Re: [solved] use openbox rather than openbox-session

I agree, here is an example: http://pastie.org/4335453


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#11 2012-08-07 13:28:36

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

Re: [solved] use openbox rather than openbox-session

tomk wrote:

Why do you think openbox-session will execute some *.desktop automatically? You have complete control over the apps that will be autostarted, using ~/.config/openbox/autostart.

I did not dig that deep. But I am sure openbox-session does something I do not want.
Anyway I am happy with the solution now.
I will mark the title as resolved.
Thanks all for your advices.

Offline

#12 2012-08-07 20:56:58

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] use openbox rather than openbox-session

Glad you're happy, but I have to ask:
How can you be sure it does something you do not want if you didn't bother digging that deep, as you put it?

Offline

#13 2012-08-08 14:33:34

comicosmos
Member
From: suzhou, China mainland
Registered: 2011-04-16
Posts: 45

Re: [solved] use openbox rather than openbox-session

Well, to answer your question:

Once upon a time, I remembered that,
If launch openbox, trayfreq, nm-applet, lxpanel, everything goes fine.
If launch openbox-session, I got two trayfreqs and two nm-applets. One instance is run by ./config/openbox/autostart, which is expected. And the second instance is invoked by the "session", definitely. I googled, went to /etc/X11/foo and ~/bar (sorry I cannot remember the right directory), deleted the file, and the second instance disappeared.
But I did not try to find which script does that. And that's what "did not dig deep" means.

edit:
The directory is "/etc/xdg/autostart"
the archlinux openbox wiki updated then:

Autostart directory
Openbox also starts any *.desktop files in /etc/xdg/autostart - this happens regardless of whether a user startup script is present. nm-applet, for example, installs a file at this location, and may cause it to run twice for users with the usual (sleep 3 && /usr/bin/nm-applet --sm-disable) & in their startup script. There is a discussion on managing the effects of this at [2].

Last edited by comicosmos (2012-08-08 14:43:21)

Offline

Board footer

Powered by FluxBB