Using the Larswm window manager and some other good tips when using Linux.

Posted: November 19, 2012. At: 8:45 PM. This was 4 years ago. Post ID: 4871

Larswm Debian desktop.

Larswm Debian desktop.

The Larswm window manager deserves to be given a try if you want a fast and flexible window manager to use on a netbook or low specced desktop machine. This window manager is very fast and usable for any user that wants to use a desktop that is free from bloat. Using a fully featured Linux desktop like KDE or Gnome on a netbook is defeating the purpose; even though my ASUS eePC can run Gnome Shell ok; the Larswm window manager is faster and more usable and you can have a thin bar at the bottom of the screen that contains the name of the application you are running; the workspace navigator; the system information and the clock. That is a very usable and informative bar and provides all of the information you need to use the desktop properly. This below is my .larswmrc I am using on my netbook.

! .larswmrc example !

! Color scheme used with xsetroot -solid darkgray
! larswm.foreground: black
larswm.background: lightgray

! Desktop names - first monitor
larswm.0.0.dtname: Syslogs  [0---]
larswm.0.1.dtname: WWW  [-1--]
larswm.0.2.dtname: Work  [--2-]
larswm.0.3.dtname: Misc  [---3]

! Desktop names - second monitor
larswm.1.0.dtname: Comms  [0---]
larswm.1.1.dtname: IRC  [-1--]
larswm.1.2.dtname: Other  [--2-]
larswm.1.3.dtname: Misc  [---3]

! These are the windows I want tiled
larswm.dotileclass.0: XTerm~xterm
larswm.dotileclass.1: Netscape~Navigator

! Some tool windows
larswm.toolclass.0: XLoad
larswm.toolclass.1: XBiff

! Windows that should always stay above other windows
larswm.floatclass.0: XCalc~xcalc

! Assign all new Netscape windows to the WWW desktop
larswm.dtclass.0: Netscape
larswm.dtnum.0: 1

! Use a wider left track on the WWW desktop
larswm.0.1.left_track_width: 80

! Don't resize windows on the WWW desktop
larswm.0.1.tile_resize: False

! Add some mouse button apps
larswm.button1.application: sample.editor
larswm.button2.application: xcalc
larswm.button3.application: xterm

! Add a shortcut for Netscape
larswm.application.0: netscape
larswm.application_key.0: n
larswm.application_mod.0: Shift+Control

! Add a shortcut for restarting larswm
larswm.application.1: larsremote restart
larswm.application_key.1: r
larswm.application_mod.1: Shift+Control+Alt

! Add a shortcut for exiting larswm
larswm.application.2: larsremote exit
larswm.application_key.2: q
larswm.application_mod.2: Shift+Control+Alt

! Add a shortcut for redrawing the screen
larswm.application.3: xrefresh
larswm.application_key.3: l
larswm.application_mod.3: Control+Alt

! Add a shortcut for viewing manual pages
! on whatever is highlighted.
larswm.application.4: xterm -e man "$WM_SELTEXT"
larswm.application_key.4: m
larswm.application_mod.4: Shift+Control

! This starts an editor on the highlighted filename.
! Please see the file sample.editor for specifics
! on how to make it find the right directory etc.
larswm.application.5: sample.editor
larswm.application_key.5: e
larswm.application_mod.5: Shift+Control

! Add a shortcut for starting a new terminal
! This emulates the old behaviour
larswm.application.6: xterm
larswm.application_key.6: Return
larswm.application_mod.6: Shift+Control

And this is my .xinitrc file that will get this desktop working.

xterm &
larsclock &
larsmenu &
exec larswm

There is a nice ~/.larswmrc file here if you want to try another example: .

How to create an alias to shorten a command. This example is shortening the clear command to cls.

alias cls='clear'

Using the hwclock command; you may retrieve information from the hardware clock on your computer. This command requires super-user privileges.

[Mon 12/11/19 20:16 EST][pts/0][x86_64/linux-gnu/3.5.0-17-generic][5.0.0]
<[email protected]:~>
zsh 12 [70] % sudo hwclock --debug
[sudo] password for john: 
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Last drift adjustment done at 0 seconds after 1969
Last calibration done at 0 seconds after 1969
Hardware clock is on unknown time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick... clock tick
Time read from Hardware Clock: 2012/11/19 20:16:39
Hw clock time : 2012/11/19 20:16:39 = 1353356199 seconds since 1969
Tue 20 Nov 2012 07:16:39 EST  -0.060637 seconds

And using the biosdecode command; you may retrieve information about the BIOS in your computer. This command also requires super-user privileges.

[Mon 12/11/19 20:21 EST][pts/0][x86_64/linux-gnu/3.5.0-17-generic][5.0.0]
<[email protected]:~>
zsh 14 [1] % sudo biosdecode
# biosdecode 2.11
SMBIOS 2.4 present.
	Structure Table Length: 1205 bytes
	Structure Table Address: 0x000F0100
	Number Of Structures: 39
	Maximum Structure Size: 91 bytes
ACPI 1.0 present.
	OEM Identifier: GBT   
	RSD Table 32-bit Address: 0xDFBE3040
BIOS32 Service Directory present.
	Revision: 0
	Calling Interface Address: 0x000FB350
PNP BIOS 1.0 present.
	Event Notification: Not Supported
	Real Mode 16-bit Code Address: F000:BAC8
	Real Mode 16-bit Data Address: F000:0000
	16-bit Protected Mode Code Address: 0x000FBAA0
	16-bit Protected Mode Data Address: 0x000F0000

To view the current active network connections on your computer use this command.

[Mon 12/11/19 20:36 EST][pts/0][x86_64/linux-gnu/3.5.0-17-generic][5.0.0]
<[email protected]:~/Documents>
zsh 50 % lsof -i | grep ESTABLISHED
ubuntuone 2542 john   34u  IPv4  12771      0t0  TCP> (ESTABLISHED)
chromium- 4464 john   70u  IPv4  52713      0t0  TCP> (ESTABLISHED)
chromium- 4464 john   94u  IPv4  52497      0t0  TCP> (ESTABLISHED)
chromium- 4464 john   96u  IPv4  51811      0t0  TCP> (ESTABLISHED)
chromium- 4464 john   99u  IPv4  36379      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  104u  IPv4  52523      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  106u  IPv4  54283      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  107u  IPv4  51830      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  153u  IPv4  51859      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  195u  IPv4  43248      0t0  TCP> (ESTABLISHED)

And this command will view all current network connections on port 80.

[Mon 12/11/19 20:38 EST][pts/0][x86_64/linux-gnu/3.5.0-17-generic][5.0.0]
<[email protected]:~/Documents>
zsh 57 [1] % lsof -i :80  
chromium- 4464 john   70u  IPv4  52153      0t0  TCP> (ESTABLISHED)
chromium- 4464 john   94u  IPv4  52758      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  132u  IPv4  54414      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  150u  IPv4  54415      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  154u  IPv4  54416      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  156u  IPv4  54417      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  157u  IPv4  54418      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  160u  IPv4  54419      0t0  TCP> (ESTABLISHED)
chromium- 4464 john  195u  IPv4  43248      0t0  TCP> (ESTABLISHED)

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *