LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-17-2006, 03:27 PM   #1
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
bash script to resize gnome terminal ?


FC4
Gnome 2.10.1
GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu)

I have put together a simple bash script that only requires a small terminal window to be usable. Basically I use it to change tv channels on my windows box, so I like to have it open all the time. I made a launcher for the panel which simply calls the script and requires it to be run in a terminal window.

Now, I have customised the text colours, but the terminal is always a default size. I only need the terminal window to be 33 columns by 16 lines, but I can't find any info on the net on how to adjust this from the bash script. My best idea so far would be to call a second script (without requiring a terminal)that then calls gnome-terminal with dimensions and the name of the main script.

Anybody got any ideas ?
If you have, maybe you could tell me how to get bash to enforce a particular profile in gnome terminal and also hide the menu bar ...

Cheeky I know, but just the resize thing would be a great help.


TIA

alan
 
Old 03-17-2006, 03:32 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Original Poster
Rep: Reputation: 248Reputation: 248Reputation: 248
Ok, nearly there

I got to thinking about the 2 script idea and have got it working thus :

#!/bin/bash

gnome-terminal --geometry=33x16+370+670 --hide-menubar --window-with-profile=channel --command="/home/smoker/backups/tvchannel.sh"

It works, but I'd still be interested in making it happen programatically using bash from within the main script.

gnome-terminal --help is useful ;-)

cheers

alan

btw this is what it looks like -
http://files.headru.sh/images/channel-changer.jpg

Last edited by smoker; 03-17-2006 at 03:48 PM.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change default bash directory in gnome-terminal ming0 Linux - Software 5 10-01-2009 06:54 PM
How can a bash script findout the width of the terminal window alex.e.c Linux - Software 2 10-14-2004 11:20 AM
gnome-terminal launcher script Mur Linux - Software 0 04-26-2004 10:43 AM
gnome-terminal fails to give bash prompt wfhoney Red Hat 8 04-21-2004 03:38 PM
Bash, Gnome-Terminal and Prompt Mysteries melquiades Slackware 30 11-28-2003 06:13 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration