How to create a custom desktop using the .Xsession file.

Posted: February 21, 2016. At: 1:24 PM. This was 2 years ago. Post ID: 8699
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

This is an example of an .Xsession file, this will provide a custom desktop environment.

#!/bin/sh
 
# Load your X Resource defaults, if you have them...
 
if [ -f $HOME/.Xdefaults ]; then
	xrdb -merge $HOME/.Xdefaults
fi
 
xterm &
tint2 &
nm-applet &
gkrellm &
 
# Get just the first part of the machine's full hostname, I like
# this as an xload label... Note the BACKquotes used here!
 
SHORTHOST=`hostname | sed 's/\..*//'`
 
# Display a graph of the system load
 
xload -geometry 70x70-1+68 -fg SteelBlue -bg black -hl blue -fn fixed -label $SHORTHOST &
 
# Launch an xterm so we have someplace to type...
xterm -bg black -fg green -cr white -ls -geometry 80x25+0+0 &
xsetroot -solid DarkSlateGrey
 
exec startfluxbox

This is how you create a custom desktop that will suit your workflow. With the Lightdm desktop login manager, choose the Default Xsession option and this will read the .Xsession file and load your desktop. This is an age old method of creating a custom desktop layout.

Use this command to create a custom .Xsession file.

[email protected]:~$ touch ~/.Xsession

Then open the file in an editor such as VIM to add whatever you need to setup your desktop.

Find a comprehensive guide to this here: https://journalxtra.com/linux/how-to-make-a-basic-custom-xsession-script/.

No comments have been made. Use this form to start the conversation :)

Leave a Reply