You are not logged in.

#1 2011-10-31 09:31:46

ArchVortex
Retired
From: Ts’elxweyeqw, Canada
Registered: 2011-04-01
Posts: 1,464

Adding a Second Desktop

This tutorial is for those who wish to add a second desktop to your existing Openbox. Some of you may be missing your old desktop that you're used to or maybe you just want to test a different window manager like awesome or ratpoison.

We'll use LXDE for our example second desktop. First you need to add LXDE. Open a terminal and as root enter:

# pacman -S gamin lxde

Then add lxdm to /etc/inittab and uncomment it and comment out SLiM:

# nano /etc/inittab
# Example lines for starting a login manager
  #x:5:respawn:/bin/su yourusername -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"
  #x:5:respawn:/usr/sbin/gdm -nodaemon
  #x:5:respawn:/usr/bin/kdm -nodaemon
  #x:5:respawn:/usr/bin/slim >& /dev/null
  x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1

Then add lxdm to the DAEMON line in /etc/rc.conf:

# nano /etc/rc.conf
DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng lxdm @alsa)

And then add lxde to your .xinitrc and comment out openbox:

$ leafpad ~/.xinitrc
 #!/bin/bash
  #exec ck-launch-session dbus-launch openbox-session
  exec ck-launch-session startlxde

Reboot and login with the LXDM and you're using LXDE with ArchBang. 


Disclaimer: If you follow the above instructions and your computer blows up, your system breaks, you grow a third nipple, Barney the Dinosaur comes for a visit or Culture Club starts blaring out of your speakers, I am not responsible. Use at your own risk!!


You have the capacity to learn from mistakes. You'll learn a lot today.
FP:E5F8 7DBA 8128 9ACB 75F7 7279 BE34 AB66 76D9 16DE
KEY ID:76D916DE
Currently running ArchBang / LFS / OpenSUSE Tumbleweed

Offline

#2 2011-10-31 10:01:47

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,778

Re: Adding a Second Desktop

Could you edit your title to include the word LXDE smile


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#3 2011-10-31 10:13:52

ArchVortex
Retired
From: Ts’elxweyeqw, Canada
Registered: 2011-04-01
Posts: 1,464

Re: Adding a Second Desktop

It's just an example so not really needed. I can do one for all the desktops if you like tongue


You have the capacity to learn from mistakes. You'll learn a lot today.
FP:E5F8 7DBA 8128 9ACB 75F7 7279 BE34 AB66 76D9 16DE
KEY ID:76D916DE
Currently running ArchBang / LFS / OpenSUSE Tumbleweed

Offline

#4 2011-10-31 10:20:43

willxtreme
The Cook
From: Longueuil, Quebec, Canada
Registered: 2010-10-06
Posts: 275

Re: Adding a Second Desktop

ArchVortex wrote:

Disclaimer: If you follow the above instructions and your computer blows up, your system breaks, you grow a third nipple, Barney the Dinosaur comes for a visit or Culture Club starts blaring out of your speakers, I am not responsible. Use at your own risk!!

lol!

Offline

#5 2011-10-31 10:22:28

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,778

Re: Adding a Second Desktop

Figured post was LXDE based so....

You must give warnings if you are going to post LXDE threads smile


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#6 2011-10-31 14:14:03

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,612
Website

Re: Adding a Second Desktop

This seems a nice way to be able to choose at grub level  which DE you want to load.

At startup

You can also have a choice of window managers and desktop environments at startup, using just ~/.xinitrc and GRUB and no display manager. The idea is to take advantage of the fact that Arch doesn't make any particular use of the runlevel system. The following ~/.xinitrc tests for the current runlevel and will start Openbox and GNOME on runlevels 5 and 4 respectively:

rl=$(runlevel | grep -o [0-6])

case $rl in
    4) exec gnome-session;;
    5) exec openbox-session;;
esac

Choosing between different runlevels is simply a matter of cloning a GRUB entry and adding the desired runlevel to the kernel arguments. Inserting the runlevel at the end of the 'kernel' line indicates that the inittab default of runlevel 5 should be overridden and replaced with the desired runlevel, 4 in this instance:

title  Arch Linux GNOME
root   (hd0,2)
kernel /boot/vmlinuz-linux root=/dev/sda1 ro 4
initrd /boot/initramfs-linux.img

Finally, you will need to ensure that the ~/.xinitrc file is actually run at the chosen runlevel. Using the tip from Start X at boot#/etc/inittab, you can edit the inittab to simply run startx on the desired runlevel which will in turn use your ~/.xinitrc script:

x:45:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1"

Notice that "45" means that this will happen on both runlevels 4 and 5. The final differentiation between 4 and 5 will then come in ~/.xinitrc as described above. This is preferable to attempt differentiating in the inittab file as we stick pretty close to using the various configuration files as they were intended.

source: https://wiki.archlinux.org/index.php/Xinitrc


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#7 2011-10-31 18:54:55

ArchVortex
Retired
From: Ts’elxweyeqw, Canada
Registered: 2011-04-01
Posts: 1,464

Re: Adding a Second Desktop

Here is KDE for this example second desktop. First you need to add KDE. You'll need to decide which version of KDE you want (see https://wiki.archlinux.org/index.php/KDE_Packages). Just make sure that you have kdm after installing KDE.

Open a terminal and as root enter:

# pacman -S kde-meta

Then uncomment kdm in /etc/inittab and comment out SLiM:

# nano /etc/inittab
# Example lines for starting a login manager
  #x:5:respawn:/bin/su yourusername -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"
  #x:5:respawn:/usr/sbin/gdm -nodaemon
  x:5:respawn:/usr/bin/kdm -nodaemon
  #x:5:respawn:/usr/bin/slim >& /dev/null

 
Then add kdm to the DAEMON line in /etc/rc.conf:

# nano /etc/rc.conf
DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng kdm @alsa)

And then add kde to your .xinitrc and comment out openbox:

$ leafpad ~/.xinitrc
 #!/bin/bash
  #exec ck-launch-session dbus-launch openbox-session
  exec ck-launch-session startkde

Reboot and login with the KDM and you're using KDE with ArchBang. 

And again:

Disclaimer: If you follow the above instructions and your computer blows up, your system breaks, you grow a third nipple, Barney the Dinosaur comes for a visit or Culture Club starts blaring out of your speakers, I am not responsible. Use at your own risk!!


You have the capacity to learn from mistakes. You'll learn a lot today.
FP:E5F8 7DBA 8128 9ACB 75F7 7279 BE34 AB66 76D9 16DE
KEY ID:76D916DE
Currently running ArchBang / LFS / OpenSUSE Tumbleweed

Offline

#8 2011-10-31 20:00:43

oliver
Administrator
Registered: 2010-11-04
Posts: 2,209

Re: Adding a Second Desktop

pablokal wrote:

This seems a nice way to be able to choose at grub level  which DE you want to load.

Interesting post... it could probably be modified to allow various network profiles too... i.e home network versus work network

Offline

#9 2011-11-01 03:37:12

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,612
Website

Re: Adding a Second Desktop

it could probably be modified to allow various network profiles too... i.e home network versus work network

Yeah, it was new for me too, I thought I should share it.
Let me know if you're going to modify it or expand it.


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#10 2012-01-12 22:20:36

francois.e
Member
From: Montréal, Québec
Registered: 2012-01-12
Posts: 67

Re: Adding a Second Desktop

What about the xfce 4.8  desktop environment?

Thanks.


Le mieux est l'ennemi du bien (Voltaire).

Offline

#11 2012-01-19 17:27:00

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,612
Website

Re: Adding a Second Desktop

Sorry, missed last post before:

rl=$(runlevel | grep -o [0-6])

case $rl in
    4) exec startxfce4;;
    5) exec openbox-session;;
esac

Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#12 2012-03-20 03:41:47

ortanste
Member
Registered: 2012-03-19
Posts: 7

Re: Adding a Second Desktop

Hey, this is really interesting tutorial. I also want to add second desktop to my existing openbox.  Please anyone here can provide me computer tips to add second desktop. Thanks.

Last edited by ortanste (2012-03-20 05:28:50)

Offline

#13 2012-03-20 04:01:43

pablokal
Administrator
From: Nijmegen, Holland
Registered: 2010-10-12
Posts: 3,612
Website

Re: Adding a Second Desktop

In rc.xml in /home/user/.config/openbox
Edit:

<desktops>
    <!-- this stuff is only used at startup, pagers allow you to change them
       during a session

       these are default values to use when other ones are not already set
       by other applications, or saved in your session

       use obconf if you want to change these without having to log out
       and back in -->
    <number>2</number>

As this is default in AB and the bland nature of your other posts I am wondering if you're not a spammer, advertising for the site mentioned above.
Providing three links for the same site in the above post is also a bad sign (I reduced it to one). Consider yourself warned!!


Getting your questions answered here at ArchBang Forums
Please! Always give hardware info, if there is a chance that 's relevant: #lspci -vnn
On Arch(bang) and Openbox: http://stillstup.blogspot.com/

Offline

#14 2012-07-11 19:38:59

chris2kari
Member
Registered: 2012-07-10
Posts: 31

Re: Adding a Second Desktop

francois.e wrote:

What about the xfce 4.8  desktop environment?

Thanks.

I'm a fan of Xfce also!
Warning : I'm a complete newbie but this worked for me...

1) Install xfce + lxde display manager (btw what is gamin & do I need it???)

$ pacman -S gamin xfdesktop lxdm


2) As Xfce does not have a display manager go ahead & add lxdm instead to /etc/inittab and uncomment it and comment out SLiM:

$ nano /etc/inittab

# Example lines for starting a login manager
  #x:5:respawn:/bin/su yourusername -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"
  #x:5:respawn:/usr/sbin/gdm -nodaemon
  #x:5:respawn:/usr/bin/kdm -nodaemon
  #x:5:respawn:/usr/bin/slim >& /dev/null
  x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1


3) add lxdm to the DAEMON line in /etc/rc.conf:

$ nano /etc/rc.conf

DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng lxdm @alsa)


4) add xfce to your .xinitrc and comment out openbox:

$ leafpad ~/.xinitrc

#!/bin/bash
  #exec ck-launch-session dbus-launch openbox-session
  exec ck-launch-session startxfce4


5) Reboot, at the LXDM login screen choose Xfce and you're using Xfce 4.10 with ArchBang


Thanks very much to the original poster smile
Chris

p.s. I have no idea what all that bash stuff is quoted in the replies so that is something I will have to learn...

Last edited by chris2kari (2012-07-11 19:54:45)

Offline

#15 2013-11-18 00:40:50

throne777
Member
From: UK
Registered: 2013-10-08
Posts: 11

Re: Adding a Second Desktop

What's the best way of adding Gnome as my second desktop environment?
Many thanks :-)


'All we ever were, just zeroes and ones'

Offline

#16 2014-04-27 12:17:12

gychang
Member
Registered: 2011-12-14
Posts: 14

Re: Adding a Second Desktop

ArchVortex wrote:

This tutorial is for those who wish to add a second desktop to your existing Openbox. Some of you may be missing your old desktop that you're used to or maybe you just want to test a different window manager like awesome or ratpoison.

We'll use LXDE for our example second desktop. First you need to add LXDE. Open a terminal and as root enter:

# pacman -S gamin lxde

Then add lxdm to /etc/inittab and uncomment it and comment out SLiM:

# nano /etc/inittab
# Example lines for starting a login manager
  #x:5:respawn:/bin/su yourusername -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"
  #x:5:respawn:/usr/sbin/gdm -nodaemon
  #x:5:respawn:/usr/bin/kdm -nodaemon
  #x:5:respawn:/usr/bin/slim >& /dev/null
  x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1

Then add lxdm to the DAEMON line in /etc/rc.conf:

# nano /etc/rc.conf
DAEMONS=(dbus networkmanager !network !dhcdbd syslog-ng lxdm @alsa)

And then add lxde to your .xinitrc and comment out openbox:

$ leafpad ~/.xinitrc
 #!/bin/bash
  #exec ck-launch-session dbus-launch openbox-session
  exec ck-launch-session startlxde

Reboot and login with the LXDM and you're using LXDE with ArchBang.

I am having some difficulty following this.  I have archbang with openbox.  I have added i3 and like it and want to learn little more before deciding.

I like to have a choice of which desktop to log into.  I have slim with autologin enabled and I have setup ~/.xinitrc to get into i3 but would like an option of openbox/i3.

my present ~/.xinitrc looks like this:

#!/bin/bash

export DE=openbox
export DE=i3

# Dbus fix
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    eval "$(dbus-launch --sh-syntax --exit-with-session)"
fi

/usr/bin/xdg-user-dirs-update

# start openbox
#/usr/bin/openbox-session > ~/.openbox_startup.log 2>&1
exec i3

Last edited by gychang (2014-04-27 12:21:05)

Offline

#17 2014-04-27 12:35:38

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,778

Re: Adding a Second Desktop

Might be easier to set up slim and chose desktop from there .....


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#18 2014-04-27 14:44:11

gychang
Member
Registered: 2011-12-14
Posts: 14

Re: Adding a Second Desktop

Mr Green wrote:

Might be easier to set up slim and chose desktop from there .....

definitely, was exploring to see if I can choose either OB or i3 from .xinitrc but unlikely it seems.

Offline

Board footer

Powered by FluxBB