You are not logged in.
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
What unwanted stuff are you talking about? You can add or remove items from Openbox's autostart.
Offline
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
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
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
"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)
How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.
Offline
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
You're welcome. If you have what you need now, please mark the thread [solved] (edit the title of your first post).
How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.
Offline
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
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
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
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
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