LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-07-2012, 11:30 AM   #1
linuxlicious
Member
 
Registered: May 2011
Posts: 87

Rep: Reputation: 6
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
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174
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 http://www.google.co.uk/ &
sleep 3
xterm -g 132x50+15+2 -T ELinks -e elinks http://www.bbc.co.uk/news/uk/ &
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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:27 PM.

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