This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to setup default desktop at system start?

Tags: None
(comma "," separated)
rsupremo
Registered Member
Posts
51
Karma
0
OS
I have 3 desktops and when I start the system the desktop no. 2 is always shown. I would like to have the desktop 1 to be the "default" one. How do I do this?


openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7
luebking
Karma
0
You can't. The virtual desktop isn't stored in particular, but "only" the entire session.
You can either
- restore the last session
- restore a specific (previously saved) session
- start w/ a blank session

run "kcmshell4 smserver" for configuration.

I assume you're restoring the last session and the last active window was on desktop #2 when you exited?

Anyway, if you install "wmctrl" you can set up an autostart action that calls "sleep 5; wmctrl -s 0"

snip -- ~/.kde/share/autostart/setvd1.desktop (maybe ~/.kde4/...)

Code: Select all
[Desktop Entry]
Exec=sleep 5; wmctrl -s 0
X-DBUS-StartupType=wait
Name=Set VD #1
Type=Service
X-KDE-StartupNotify=false
OnlyShowIn=KDE;
X-KDE-autostart-phase=1
rsupremo
Registered Member
Posts
51
Karma
0
OS
This also happens when I have nothing in desktop 2 :/
I tried your suggestion and logged off and logged back but still the second desktop is shown.
Btw can you please explain in more detail what setvd1.desktop and "wmctrl -s 0" is about?


openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7
luebking
Karma
0
rsupremo wrote:This also happens when I have nothing in desktop 2 :/

That's pretty weird. Could be some application. DropBox and Firefox have a record in this regard.

rsupremo wrote:Btw can you please explain in more detail what setvd1.desktop and "wmctrl -s 0" is about?

wmctrl is a CLI tool that talks to the window manager. "wmctrl -s" sets the desktop, "0" being the first one.

The idea is to have an autostarting service that waits a short time after login (5s) and the sets the virtual desktop to "0"
rsupremo
Registered Member
Posts
51
Karma
0
OS
This issue remained even after setting to start with empty session at KDE start. I was able to fix this with the approach mentioned here: viewtopic.php?f=111&t=119987


openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7
User avatar
hermantowawan
Registered Member
Posts
70
Karma
0
You should be able to set this up by editing your
Code: Select all
$HOME/.dmrc
file. The sessions available to your display manager (whichever one you use) are .desktop files normally located in
Code: Select all
/usr/share/xsessions
. In my case, this directory contains:

Code: Select all
$ ls /usr/share/xsessions
cinnamon2d.desktop  gnome-fallback.desktop  openbox-gnome.desktop  xfce.desktop
cinnamon.desktop    mate.desktop            openbox-kde.desktop
gnome.desktop       openbox.desktop         ssh.desktop


Any of those files is a possible session that my display manager can choose. Which one is controlled by the
Code: Select all
$HOME/.dmrc
file. So, to make KDE the default, you would have to edit that file and make it look like this:

Code: Select all
[Desktop]
Session=kde-plasma


That assumes that you have a
Code: Select all
kde.desktop
file in the xsessions directory, I don't use KDE so I can't check but it works for me using cinnamon or xfce. Once you have made that change, you should be logged in to KDE by default every time.


I Am Still Learning About KDE
rsupremo
Registered Member
Posts
51
Karma
0
OS
@hermantowawan thanks for the answer. But I was referring to the virtual desktops in KDE not to desktop session:)


openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]