[SOLVED] openbox as DE: how to boot in directly in porteus

Non release banter
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

[SOLVED] openbox as DE: how to boot in directly in porteus

Post#1 by francois » 30 Mar 2012, 14:39

I realised that openbox is an available option from login manager as a desktop environment in porteus. How can I boot directly this desktop instead of kde or lxde? In addition, what is the display or login manager for porteus: kdm, gdm or xdm?

Thanks. :)
Last edited by francois on 01 Apr 2012, 14:15, edited 1 time in total.
Voltaire: Le mieux est l'ennemi du bien.

Tonio
Contributor
Contributor
Posts: 266
Joined: 28 Dec 2010, 16:37
Distribution: Slackware,porteus,FreeBSD,Slax
Location: 127.0.0.1

Re: openbox as desktop environment: how to boot in directly

Post#2 by Tonio » 30 Mar 2012, 16:54

Good Question. I believe there are no cheatcodes for openbox. However, I booted to it, by starting in text mode and then
$ xwmconfig
and selecting the openbox session. It OPENBOX needs more LOVE, in that case it would get more attention. But as it is it is very plain and not too much to see :(

My $0.02

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: openbox as desktop environment: how to boot in directly

Post#3 by Ahau » 30 Mar 2012, 17:41

I believe openbox is included only to serve as a window manager for lxde; that said, it does work and I've been curious about it myself...

Standard edition Porteus comes with lxdm (for launching lxde) and kdm (for launching kde); xfce edition just comes with lxdm for launching xfce.

Tonio's suggestion to enter text mode (autoexec=telinit~3) would work for logging in, and If I were going to run openbox with a direct to GUI login, I'd use lxdm for this because it's in 002-xorg.xzm, and I could then drop kde/trinity from the build. To get a direct-to GUI login, you would need to modify the lxdm config file. In my opinion, the best way to do this would be to edit /etc/rc.M (this only applies to V1.2 RC1 and later). There's a section in rc.M that edits lxdm.conf based on cheatcodes ('lxde' or 'xfce'), and one could add a section for openbox there.
Please take a look at our online documentation, here. Suggestions are welcome!

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: openbox as desktop environment: how to boot in directly

Post#4 by crashman » 30 Mar 2012, 18:36

@francois

My tiny-desktop based on openbox with Slim login manager http://porteus.org/forum/viewtopic.php?f=75&t=405

But if you would like run openbox without login manager you need .xinitrc in home directory ~/root or ~/guest and add telinit~4 to boot options.

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: openbox as desktop environment: how to boot in directly

Post#5 by francois » 31 Mar 2012, 14:37

Thanks to all for your quick answers. I will come back on these suggestions.

@crashman:
your tiny desktop seems very interesting. I will try it for sure.

@tonio, ahau:
starting in text mode (autoexec=telinit 3) and then in command line $ xwmconfig,
works very fine.

@ahau:
your precisions concerning the display or login manager, are appreciated.

Posted after 13 hours 14 minutes 30 seconds:
Finally, with save changes folder name openbox (as you know it could have been any other tag) in the menu.lst entry:
changes=openbox

1. booted in kde trinity
2. logout to get to the login manager
3. selecting session to be openbox
4. login in as root

I got in a first time.

Then login out and halting, and removing root cheatcode, the next bootup I got directly into an openbox session.

Posted after 13 minutes 11 seconds:
For the openbox environment, I would like at bootup to be able to put some scripts in some autostart folder. However, both /root/.kde3/Autostart (used for kde). Maybe it is located in the lxde autostart folder.

Would someone have a hint as to where is this latter autostart folder?

Thanks. :)
Voltaire: Le mieux est l'ennemi du bien.

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: openbox as desktop environment: how to boot in directly

Post#6 by crashman » 31 Mar 2012, 19:41

Code: Select all

[b]/root/.config/openbox/autostart.sh[/b]
if you don't see autostart.sh create it, look in to tiny-desktop for example.

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: openbox as desktop environment: how to boot in directly

Post#7 by francois » 31 Mar 2012, 22:17

In fact, it is there. However, for one reason or another it does not wort at startup, in the kind of setup that I have. I will try tonio's suggestion.

Posted after 1 hour 19 minutes 8 seconds:
Which does not make much change. I am working from root within porteus v 1.0. I have looked and try a few thing.
1) openbox-session instead of openbox alone, that is said to be necessary for the autostart to be executed. All these files being worked within the /root/.config/openbox/
2) I have tried to put the same files in /etc/xdg thus /etc/xdg/openbox/autostart

Maybe I should simply work with a regular user.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: openbox as desktop environment: how to boot in directly

Post#8 by fanthom » 01 Apr 2012, 05:18

@francois

you could use ~/.dmrc for that purpose as both kdm and lxdm respect settings from this file.
However - when you login with to kde then kdm save the session as 'Default' which lxdm is not able to recognize. next time when you try to login with lxdm then you end up at lxdm login screen.
my workaround was to delete ~/.dmrc for guest and root which was done in linuxrc (for changes=) and rc.M (for magic folders).

few weeks ago i have found the solution by simply separating .dmrc for kde and lxdm.
in porteus-1.2 lxdm will be still saving session settings in home dir while kdm in /var/lib/kdm.
this way lxdm and kdm wont be conflicting and booting scripts wont have to delete anything.

to answer your question directly:
please create ~/.dmrc file for your user(s) with following content:

Code: Select all

[Desktop]
Session=openbox-session
it's important to put this file in /porteus/rootcopy directory for pre 1.2 releases so linuxrc wont be able to delete it.
Please add [Solved] to your thread title if the solution was found.

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: openbox as desktop environment: how to boot in directly

Post#9 by francois » 01 Apr 2012, 14:14

@fanthom:
This solution of yours to bootup in the openbox DE works perfectly fine.
Your help is always appreciated.

Thank you.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: openbox as desktop environment: how to boot in directly

Post#10 by Ahau » 03 Apr 2012, 14:31

francois wrote:@ahau:
your precisions concerning the display or login manager, are appreciated.
Better late than never, I suppose...

To boot in to openbox with lxdm, while preserving the ability to boot into lxde and xfce, you must be running Porteus 1.2 RC1 or later...

first, check /etc/lxdm/lxdm.conf, to make sure the third block of text looks something like this:

Code: Select all

## default session or desktop used when no systemwide config
session=/usr/bin/startlxde
Make sure that second line (session=) does not start with a comment (#), and that there are no leading spaces before 'session=' (or else, my sed operations won't pick it up). All versions of this prior to 1.2RC1 would have a leading '#', and I believe one of the modules in the 32-bit RC1 has the comment as well...

Then, edit /etc/rc.d/rc.M to look like this: http://pastebin.com/a3Siibzk

The only sections I've edited are this, which is almost at the end of rc.M:

Code: Select all

# Let's check if user used 'lxde/xfce/openbox' cheatcode to determine display manager:
dm() { echo $1 > /mnt/live/tmp/dm; }
if egrep -qo " lxde( |\$)" /proc/cmdline; then
    if [ -x /usr/sbin/lxdm ]; then
	sed -i '/^session=/c session=/usr/bin/startlxde' /etc/lxdm/lxdm.conf 2>/dev/null
        ln -sf /etc/X11/xinit/xinitrc.lxde /etc/X11/xinit/xinitrc
        dm /usr/sbin/lxdm
    else
        dm xinitrc
    fi
elif egrep -qo " xfce( |\$)" /proc/cmdline; then
    if [ -x /usr/sbin/lxdm ]; then
	sed -i '/^session=/c session=/usr/bin/startxfce4' /etc/lxdm/lxdm.conf 2>/dev/null
        ln -sf /etc/X11/xinit/xinitrc.lxde /etc/X11/xinit/xinitrc
        dm /usr/sbin/lxdm
    else
        dm xinitrc
    fi
elif egrep -qo " openbox( |\$)" /proc/cmdline; then
    if [ -x /usr/sbin/lxdm ]; then
	sed -i '/^session=/c session=/usr/bin/openbox-session' /etc/lxdm/lxdm.conf 2>/dev/null
        ln -sf /etc/X11/xinit/xinitrc.openbox /etc/X11/xinit/xinitrc
        dm /usr/sbin/lxdm
    else
        dm xinitrc
    fi    

else
    if test -x /usr/bin/kdm; then
        ln -sf /etc/X11/xinit/xinitrc.kde /etc/X11/xinit/xinitrc
        dm /usr/bin/kdm
    else
        dm xinitrc
    fi
fi
As you can see, I've modified the sed operations so that rather than swapping 'xfce' stuff for 'lxde' and vice versa (using sed's substitute command), it picks up the cheatcode and replaces (sed 'c' command) the entire 'session=' line.

I tested it briefly before I got off the bus this morning, and was able to boot into lxde, xfce, and openbox through lxdm this way. trinity should still work too, but I didn't have enough time for that last test :)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: [SOLVED] openbox as DE: how to boot in directly in porte

Post#11 by francois » 05 Apr 2012, 15:14

@ahau:
Thanks a lot for the information. :)

This will enable me to explore the openbox desktop with some tools associated to xfce or lxde respectively. For example, thunar would be an interesting file manager, lxde panel a good subtitute to tint2 ...
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: [SOLVED] openbox as DE: how to boot in directly in porte

Post#12 by Ahau » 09 Apr 2012, 16:46

Sounds interesting, francois, let us know how this works out for you :)

After you get more of this put together, you'll need to modify more scripts in /opt/porteus-scripts (e.g. activate, deactivate and xorg/fmanager,terminal etc.) to enable support for openbox and the applications you wind up using. Let us know when you get there and we can help :)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 4942
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: [SOLVED] openbox as DE: how to boot in directly in porte

Post#13 by francois » 11 Apr 2012, 14:35

These information are not too late and appreciated. I imagine that this could give me the opportunity to work with some packages of the xfce environment like thunar.
Thanks.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: [SOLVED] openbox as DE: how to boot in directly in porte

Post#14 by Ahau » 11 Apr 2012, 16:45

yes, you should be able to use any file manager, terminal, etc., that your heart desires -- the sky is the limit (ok, and the size of your flash drive is the limit, too, depending on how many deps you want to roll in!). Thunar is rolled into the overall 'xfce-4.9' package in my release; if you would prefer to install thunar without the rest of xfce let me know and I'll take a run at compiling the latest version in a standalone fasion.
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply