Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Starting different desktop enviroments from the shell

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
columbus
Posts: 1
Joined: 2005-04-12 08:40
Location: Europe

Starting different desktop enviroments from the shell

#1 Post by columbus »

Hello out there,
I have a simple question. I have installed some desktop enviroments on my system. Which of them I want to start I can choose with my display-manager. But if I switch to the shell e.g. to login as root... I cannot specify which DE I want to use.

How can I do this on the shell? startx kde or startx xfce? This doesn't work.

Gruss Christian

Demetrius
Posts: 49
Joined: 2005-09-15 17:20

#2 Post by Demetrius »

There are a couple ways to do it. The one I've always preferred is to specify your window manager or desktop using a file called '.xinitrc'.

Create a file in your home directory called .xinitrc, open it in a text editor and add the following text:

Code: Select all

#!/bin/bash
#exec enlightenment
#exec gnome-session
#exec startkde
exec startfluxbox
The above example would start Fluxbox when you issue the 'startx' command. The line that starts the window manager should be the last line of the script and should start with 'exec'. Everything after the first command that starts with 'exec' will be ignored as bash will terminate the script after the first command starting with 'exec'.

You can also start other programs in the background from this file like this:

Code: Select all

#!/bin/bash
gkrellm &
exec enlightenment
#exec gnome-session
#exec startkde
exec startfluxbox
The above example would start gkrellm in the background and load Enlghtenment as the window manager.

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#3 Post by Harold »

From the console prompt, you can start an graphical session with the environment of your choice using the following commands:
xinit /usr/bin/startkde
xinit /usr/bin/gnome-session
xinit /usr/bin/startfluxbox
xinit /usr/bin/icewm
xinit /usr/bin/wmaker

You get the idea...

The people who created Xfce anticipated users wanting to do this and they include a script. To start up Xfce from the console prompt, do startxfce4.

Post Reply