Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 12-11-2006, 10:32 PM   #1
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Gnu Screen Commands

Screen is once again probably going to take part in my effort to extend the battery life on my laptop by switching to a console environment. (Letting me keep my cpufreq low.) So, here's my question I know you can start Screen already running a shell command, but is there any way to have it auto-execute a number of screen-commands at startup? Specifically:

C-a S //split the screen
C-a : Resize 1 //reduce the top to height 1
C-a Tab //switch to bottom
C-a c //put a screen shell in the bottom

I would combine this with a initially running bash script (in the top) that provides me with battery charge, time, network status, and current weather information. <gloat>Yep, wrote that myself (still working on the weather)</gloat> I felt like I can easily do without most gui tools for occasional laptop use (still would love some form of CLI word processor), but that I'd miss having an always on reminder of the time, batt, etc.

Also, is there a way to not have the "hardstatus" bar separating the windows? I tried adding "hardstatus off" to my screenrc, but to no avail. Alternatively, is there a way to use it to output arbitrary text, updatably? I could try to write some app to use it as the time etc. display. Thanks for all your help.
Old 12-15-2006, 11:29 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
The following instructions at the end of your ~/.screenrc file should do it. Replace /home/user/dummy with the path & name of your script.

screen /home/user/dummy
resize 1
If you don't want to commit to using this on all invocations of screen, you can create a special configuration file that you invoke using the -c option.

I have no idea how to help you with your hardstatus problem.
Old 12-15-2006, 05:23 PM   #3
Senior Member
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Original Poster
Rep: Reputation: 48
thanks a bunch!


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
GNU screen for X xowl Linux - Software 1 10-04-2005 06:49 AM
what is GNU and what are the commands? anjum Linux - Software 9 08-03-2005 02:32 PM
GNU screen ? bouadie Linux - Software 3 06-04-2004 02:46 AM
Shell commands in GNU make MadCactus Programming 2 02-19-2004 04:36 AM
Shell commands in GNU make? MadCactus Linux - Software 0 02-17-2004 03:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

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