Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 08-07-2012, 11:30 AM   #1
Registered: May 2011
Posts: 58

Rep: Reputation: 0
A question about twm (execute commands from within .twmrc yes/no? )

Hello, I have recently taken on twm and tried to get the best out of it - it simply has a bunch of features that other wm's just don't have - anyhow I'm working on a theming mechanism which would involve executing programs automatically on startup. I would prefer that to happen directly from within the .twmrc file - my question is is it at all possible to execute commands from .twmrc on startup?
Old 12-31-2013, 09:16 AM   #2
Registered: Oct 2003
Location: Guildford, England
Distribution: Family PC: Slackware 14.1, Laptop1: Slackware 14.1, Laptop2: Slackware64 current
Posts: 337

Rep: Reputation: 48
I know this is an old post but just in case anyone still looks in on it...

Your .twmrc will be loaded automatically on login as you say so you can do a lot of your themeing in there but for starting programs automatically it's best to use your .xinitrc

For instance, a snippet from mine goes like this:

/usr/bin/twm &
source ~/.bashrc
feh --bg-scale ~/Dropbox/openbox/images/slackgirl.png &
xclock -digital -strftime "%a %d %b, %H:%M" -render -sharp -face terminal -fg grey80 -bg grey11 -update 60 -geometry 185x30-0+0 &
stalonetray &
dropbox start &
sleep 6
xterm -g 112x47+54+0 -name python -T python &
sleep 3
xterm -g 85x38+150+70 -name Nethack -T Nethack -e nethack &
sleep 3
xterm -g 85x38+150+70 -name CVLC -T CVLC &
sleep 3
xterm -g 85x38+150+70 -name Herrie -T Herrie -e herrie &
sleep 3
xterm -g 92x48+110+30 -name Radio -T Radio &
sleep 3
xterm -g 110x38+150+70 -T Mixer -e alsamixer &
sleep 3
xterm -g 110x46+30+20 -T Lynx -e lynx &
sleep 3
xterm -g 132x50+15+2 -T ELinks -e elinks &
sleep 3
xterm -g 110x46+30+20 -T icq -e finch &
sleep 3
xterm -g 110x46+30+20 -T irc -e irssi &
sleep 3

and so on. It starts twm, loads .bashrc, sets the desktop background, formats the clock and starts a system tray before moving on to starting up a few programs. The programs are all running in xterms and are being sized, positioned and named at the same time. This is only a part of the file but hopefully it gives you the idea, substitute your own requirements obviously.

Last edited by rkfb; 12-31-2013 at 05:11 PM. Reason: spellcheck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] twm question Knightron Linux - Desktop 5 12-09-2011 07:45 PM
Execute kerberos commands in C# tritonbash Linux - Server 0 05-07-2008 04:43 PM
Execute different commands at startup lucazorzi Linux - General 7 11-02-2007 07:46 AM
Question on creating icon to execute commands satimis Programming 7 10-19-2004 11:55 AM
C -how do i execute linux commands? ocularbob Programming 7 02-29-2004 01:51 PM

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration