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

 

 

 

Set default startx's DE

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Set default startx's DE

#1 Post by Scorpion »

How can I change the default startx's DE?

I don't have the files of man startx:
$(HOME)/.startxrc
/usr/lib/x86_64-linux-gnu/sys.startxrc
$(HOME)/.xinitrc
/etc/X11/xinit/xinitrc
$(HOME)/.xsession

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 558
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: Set default startx's DE

#2 Post by wizard10000 »

Scorpion wrote: 2021-08-11 20:07How can I change the default startx's DE?
You need to change an entry in ~/.xinitrc - I run openbox but this should give you some ideas:

Code: Select all

#!/bin/bash

numlockx on

xinput disable 14

xset dpms 0 0 300 b off r rate 500 10

xbacklight -set 100

exec openbox-session
If you put anything in .xinitrc that needs to keep running you have to start it in the background [command &] otherwise your .xinitrc will never get to starting your desktop environment; everything above is run once and done so no need for a bunch of ampersands :)

The very last command in .xinitrc starts your DE session - could be "exec openbox-session" or "exec startkde" or "exec gnome-session" or "exec startxfce4" - you get the idea.

Hope this helps -
we see things not as they are, but as we are.
-- anais nin

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Set default startx's DE

#3 Post by Bulkley »

Scorpion wrote: 2021-08-11 20:07 How can I change the default startx's DE?
You don't, at least not directly. You want to change the xsession default. Try this:

Code: Select all

# update-alternatives --config x-session-manager
Appologies if I have it wrong; it's been a long time.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Set default startx's DE

#4 Post by Scorpion »

Yes I get the idea to how make a ~/.xinitrc file, thanks.
So I can start a specific session for a user.
Bulkley wrote: 2021-08-11 21:32
You don't, at least not directly. You want to change the xsession default. Try this:

Code: Select all

# update-alternatives --config x-session-manager
Appologies if I have it wrong; it's been a long time.
Nice so I can change the default startx's DE.
It works but not all session are listed:

Code: Select all

# update-alternatives --config x-session-manager
There are 5 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gnome-session            50        auto mode
  1            /usr/bin/cinnamon-session         50        manual mode
  2            /usr/bin/gnome-flashback-xmonad   15        manual mode
  3            /usr/bin/gnome-session            50        manual mode
  4            /usr/bin/openbox-session          40        manual mode
  5            /usr/bin/xmonad-session           20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Code: Select all

ls /usr/share/xsessions/*.desktop
/usr/share/xsessions/cairo-dock.desktop
/usr/share/xsessions/cinnamon2d.desktop
/usr/share/xsessions/cinnamon.desktop
/usr/share/xsessions/dwm.desktop
/usr/share/xsessions/gnome-classic.desktop
/usr/share/xsessions/gnome.desktop
/usr/share/xsessions/gnome-flashback-xmonad.desktop
/usr/share/xsessions/gnome-xorg.desktop
/usr/share/xsessions/i3.desktop
/usr/share/xsessions/i3-with-shmlog.desktop
/usr/share/xsessions/lightdm-xsession.desktop
/usr/share/xsessions/openbox.desktop
/usr/share/xsessions/openbox-gnome.desktop
/usr/share/xsessions/xmonad.desktop

Post Reply