LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-30-2006, 12:25 AM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
how to customize twm?


Hello all,

I am trying to get twm to load a web browser window and nothing else. In my xinitrc file I have 'twm & exec firefox' which will load the browser ok but for some reason it does not mount the window in a fixed place. When I get into X I have to click where I want to place the window.

I tried looking for information on the web about how to configure twm but I found not a single thing. I couldn't even find a home page for it. After browsing around in my system I think I found the file I am supposed to put customizations in ( /etc/X11/twm/system.twmrc ) but it was not very well documented. I tried commenting out everything but the 'color' section to see what would happen and it didn't look like it changed a thing.

I basically have 2 questions for any twm experts out there.

A. How can I set a prefixed geometry and window placement? ( I don't want the user to be able to move the window around )

B. How can I get rid of the title bar at top of the main browser window. I'm not to worried about getting rid of it persay, as long as I can disable any functionality of it (moving, resizing, etc.) and maybe getting rid of that puke blue color would be nice too.

Thank you to any one taking the time to read and respond!
...drkstr
 
Old 05-30-2006, 05:01 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Why twm? It doesn't offer much in the way of configuration, very basic you see. Something like fvwm can have all the crap compiled out of it so it'd be almost as light and you could easily set up restraints like that.
 
Old 05-30-2006, 11:13 AM   #3
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Thanks for the suggestion. I was originally wanting to use twm because of disk space issues. I only wanted to install the bare minimum to run a web browser and twm comes with a basic X11 install. After looking into fvwm I can see that there is much more documentation and support for this windows manager and have decided to give it a try. I'm still doing some more reading but I will let you know how it turn out.

thanks!
...drkstr
 
Old 05-30-2006, 10:07 PM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
OK, well I've been able to get fvwm to pretty much do everything I want except for one thing. I would like it to re run firefox (or less preferable, close out of fvwm) if it detects that the browser window was closed. I haven't really found anything that handles this kind of stuff, maybe I should look into writing some sort of bash script? Do you have any suggestions about how I should go about doing this?

thanks for the help!
...drkstr
 
Old 05-31-2006, 09:10 AM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
I'd go bash script:
Code:
# psuedo code
while /bin/true; do
  if [[ "`pidof -s firefox-bin`" ! -gt "0" ]]; then
    firefox &
  fi
done
 
Old 06-01-2006, 05:12 PM   #6
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Thanks that is exactly what I needed. I have received a lot of good advice from you sense I started posting here. Thanks to the help of people like you, I think I can now consider myself graduated from "newbie" status. I still have a ways to go before I am up to you level however.

I've gots more work to do, I'm sure this won't be the last you hear from me.

thanks cam!
...drkstr
 
Old 03-20-2011, 09:58 AM   #7
IkBenDeMan
LQ Newbie
 
Registered: Jul 2004
Posts: 9

Rep: Reputation: 0
Code:
man xinit
specifically under -geometry

xterm -geometry +1+1 will put xterm in the top left of the screen
firefox -geometry -1-1 will put firefox in the bottom right of the screen
opera -geometry -1+1 will put opera in the top right....

The -geometry argument should work with any compliant x program and it works, as shown above as
-geometry [+/-]x,[+,-]y
x being (of course, left or right
y being up or down
+(n) start program (n) number of pixels from the left or top of the screen
-(n) start program (n) pixels from the right or bottom of the screen
 
  


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
twm / blackbox vladimir-dk Linux - Newbie 5 03-10-2004 05:16 PM
Twm ! Cdzin Slackware 1 07-30-2003 01:51 PM
Uh oh, TWM? orange400 Linux - General 3 03-26-2003 08:18 PM
Help with TWM. jake Linux - General 0 01-21-2002 06:12 AM
Twm Mimician Linux - Newbie 2 12-03-2001 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:18 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