Auf Kommentar antworten
How to create your own XSession
Eingestellt von blizzz am So, 09/06/2009 - 20:43My use case is that i use my other computer primarily for watching TV (my notebook overpowers it and i use it with dual screen at home). So, usually i don't need a full blown KDE, but only kdetv as i have an older analog TV card plugged in. Thus, best is to generate a kdetv-only session.
Therefore you need basically two files. The first is .desktop file that populates your session, the second is the script which is being started if you log into it. Let's take a closer look:
/usr/share/xsessions/kdetv.desktop [Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/local/bin/xkdetv
TryExec=/usr/local/bin/xkdetv
Name=KDE TV
Comment=KDETV only session
As you see we set the type as "XSession" and set the command which is to be executed with Exec. Well, why there's TryExec? Dunno, i copied it from the original kde.desktop file. The name is what appears on the session menu.
So, what's in the script?
/usr/local/bin/startxkdetv#!/bin/bash
if test "x$DISPLAY" = "x" then
prog=xinit
else
prog=/bin/sh
fi
exec $prog /usr/bin/kdetv $* -- :0
Here we have a little bit of overkillity, as we check wether X is running or not. If we know we will always start from within a login manager, we can reduce this to shebang and the last line, replacing $prog with /bin/sh. However, discriminating it we are able to start our session from tty and any login manager shut down via xinit. Well, it's obvious that we start kdetv then.
So, if you make up those files, now, and restart your login manager, you should be able to select the "KDE TV" session. Eventually it should start up in full screen.
The only problem I have is that the screen seems to be turned off by power management features every 15min, which is quite bad when you're only watching. Someone any idea how to turn disable it?
Btw: this time the post is posted with Bilbo Blogger.



Neueste Kommentare
vor 11 Wochen 20 Stunden
vor 14 Wochen 3 Tagen
vor 14 Wochen 3 Tagen
vor 14 Wochen 3 Tagen
vor 24 Wochen 3 Tagen
vor 24 Wochen 3 Tagen
vor 24 Wochen 3 Tagen
vor 24 Wochen 3 Tagen
vor 24 Wochen 3 Tagen
vor 24 Wochen 3 Tagen