View Single Post

   
  #4 (permalink)  
Old 02-16-2008, 06:24 AM
Bas Keur
 
Posts: n/a
Default Re: Remotely run a program, display on console

> And who says OpenBSD needs apt-get?

A little voice in my head says it misses `the upgrade` function
from rpm/apt etc. Then again, we all know what kind of
problems THAT will/can/shall cause

> Seriously, thanks, I was just trying
> to figure out a way to simplify fetching packages from my favorite
> mirror. I can use this to create a function in my profile.


Well, in this case you might even like my 'Lazy Bum' script
http://www.dmrt.net/viper/code/scrip...age_install.sh
1: Like you said, plz use a local mirror in it.
2: Have ncftp installed to use it.

[viper@aspav viper]$ sh package_install.sh
[viper@aspav viper]$ grep wget package_install.html
pkg_add -v ftp://ftp.nluug.nl/pub/OpenBSD/3.6/p...wget-1.8.2.tgz

I gave up on Windows servers a long time ago,
but i kept the mouse as well as the copy/paste habbit =]

>> $ screen -r

>
> Nice tip. I use screen a lot, but it won't work for me in this instance.
> It needs to be a passive experience for user b, who has very fat fingers.
> Imagine user b is watching TV, but I have the remote.


(How cruel
May the user `interact` with the tool ?
Or is it some sort of monitor/stats idea ?
Is there any reason why an X server doesn't do the job ?
Just give him a windows box and install something like
exceed or reflection (Win32 X servers) so you can
export a display/terminal running the req. program to his
windows machine. You can specify some nice policies as
well, so he can't ctrl+z a shell etc. (A friendly warning while
holding a lead pipe works pretty fine as well.)

> top > /dev/console
> This does exactly want I want it to do.
> But it requires someone to be logged in at the console.


Not when running it with screen noh ?

> So I created a user with a restricted shell. :P


Wich one, just curious.

> While it's possible to direct output to the console when nobody is logged
> in, it's sometimes unreadable. For example, ntop works great (as long as
> nobody touches the keyboard), but top doesn't.


Hmmm, i'm pretty sure ntop comes ncurses.
curses(3) - CRT screen handling and optimization package
This is the reason why i guess.

Try some different terminals

# grep console /etc/ttys
console "/usr/libexec/getty Pc" vt220 off secure

Maybe you can replace the vt220 term with ansi or xterm-color
*never tried it though*

>> Hope this helps.

>
> It did. Thanks. screen will come in handy when I want to output something
> to the console but leave it running for a while. I can simply detach from
> the session and attach to it later.


Handy with torrent clients & irc as well


] Bas Keur
] `Energizer Bunny arrested, charged with battery`


Reply With Quote