You are not logged in.

#1 2008-04-03 18:34:07

okar
Member
Registered: 2008-03-01
Posts: 12

general questions: bash(copy&paste) and about screen resolution

imagine the following situation:
you got no Gnome/X11 installed, und just want to use bash.
now you type in some fancy commands and get some information back, e.g. you use ifconfig.
now you want to use some parts of what the programm wrote to stdout.
e.g. you want to use the your IP adress  somewhere.

in other words, how can I copy&paste without having a GUI/mouse etc. ?

Another question:
same situation as above, so no X11. Can I somehow adjust my screen resolution?

Offline

#2 2008-04-03 18:57:10

_nalle
Member
From: Stockholm/Sweden
Registered: 2006-01-11
Posts: 70
Website

Re: general questions: bash(copy&paste) and about screen resolution

Adjusting resolution in console is done via a framebuffer. http://tldp.org/HOWTO/Framebuffer-HOWTO.html

Copying and pasteing is not really native to bash in console without a mouse. There are some solutions however.

1) Usage of gnu-utils applications. awk, cut, grep, sed and so on.
2) It's ugly but it works, the application screen can copy and paste in it's buffer and between windows in the same screen.

There are probably alot more really smart ways of doing this, as my examples are just the tip of the iceberg.


Swedish Archlinux Mirror Administrator - ftp.gigabit.nu

Offline

#3 2008-04-03 19:28:32

okar
Member
Registered: 2008-03-01
Posts: 12

Re: general questions: bash(copy&paste) and about screen resolution

ok ty!
another question:
when beeing idle some time, I get some kind of screensaver->my sreen turns black(but its not turned off)

how can I disable this feature?

Offline

#4 2008-04-03 20:03:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: general questions: bash(copy&paste) and about screen resolution

$ grep -B1 setterm /etc/rc.sysinit
# Screen blanks after 15 minutes idle time
/usr/bin/setterm -blank 15

So run setterm in /etc/rc.local if you'd like to change it wink

Offline

#5 2008-04-03 22:54:25

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: general questions: bash(copy&paste) and about screen resolution

If you are willing to use screen, then copy/paste in terminal becomes a breeze.

EDIT: Darn, now I noticed _nalle has already suggested this... I don't consider screen ugly thought. You can make it as nice as you want. One of the most useful apps I've seen when it comes to console.

Last edited by bender02 (2008-04-03 22:55:45)

Offline

Board footer

Powered by FluxBB