Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Persistent Terminals For a Dedicated Computing Box?

Soulskill posted more than 6 years ago | from the persistence-pays-off dept.

Unix 288

Theovon writes "I just built a high-end quad-core Linux PC dedicated to number-crunching. Its job is to sit in the corner with no keyboard, mouse, or monitor and do nothing but compute (genetic algorithms, neural nets, and other research). My issue is that I would like to have something like persistent terminal sessions. I've considered using Xvnc in a completely headless configuration (some useful documentation here, here, here, and here). However, for most of my uses, this is overkill. Total waste of memory and compute time. However, if I decided to run FPGA synthesis software under WINE, this will become necessary. Unfortunately, I can't quite figure out how to get persistent X11 session where I'm automatically logged in (or can stay logged in), while maintaining enough security that I don't mind opening the VNC port on my firewall (with a changed port number, of course). I'm also going to check out Xpra, but I've only just heard about it and have no idea how to use it. For the short term, the main need is just terminals. I'd like to be able to connect and see how something is going. One option is to just run things with nohup and then login and 'tail -f' to watch the log file. I've also heard of screen, but I'm unfamiliar with it. Have other Slashdot users encountered this situation? What did you use? What's hard, what's easy, and what works well?"

Sorry! There are no comments related to the filter you selected.

Screen works welll (5, Informative)

Miros (734652) | more than 6 years ago | (#23990391)

For your standard persistent terminals, SCREEN is really your best bet

Re:Screen works welll (1)

mrmeval (662166) | more than 6 years ago | (#23990441)

Screen works for text. Does it allow persistent and secure connections for types of programs mentioned in the article?

Re:Screen works welll (4, Informative)

Anonymous Coward | more than 6 years ago | (#23990487)

Screen is a most excellent utility for persistent terminals, but (as far as I know) it will not let you keep persistent X11 information.

Re:Screen works welll (3, Informative)

JamesTRexx (675890) | more than 6 years ago | (#23990957)

I use screen in combination with X11vnc to keep a desktop open to the media server.
If for whatever reason I lose the connection, I can start ssvnc again and get the desktop back.

Re:Screen works welll (1, Informative)

Anonymous Coward | more than 6 years ago | (#23991205)

iirc, you can use x forwarding (ssh -X) with screen. ssh in, open up the screen and you've got secure persistant x.

Re:Screen works welll (-1, Flamebait)

Anonymous Coward | more than 6 years ago | (#23990541)

From the article: For the short term, the main need is just terminals.

From the reply: For your standard persistent terminals...

Your response: Screen works for text. Does it allow persistent and secure connections for types of programs mentioned in the article?

There are wonderful programs out there which will assist with improving reading comprehension.

Long term != poor comprehension (3, Informative)

tepples (727027) | more than 6 years ago | (#23990997)

From the article: For the short term, the main need is just terminals.

(my strong emphasis)

I would guess mrmeval was looking at "However, if I decided to run FPGA synthesis software under WINE, [some system that supports graphics] will become necessary." in the article. I don't think this FPGA synthesis software can be operated completely from the command prompt.

Re:Screen works welll (5, Informative)

alta (1263) | more than 6 years ago | (#23990781)

The article seemed to mention 2 stages, first needing persistant terminals, which screen is PERFECT for... The second stage will require wine, which means X, which means VNC...

The guy has answered his own questions.

Re:Screen works welll (5, Interesting)

Anonymous Coward | more than 6 years ago | (#23990933)

Why not just run it on the console, and connect a KVM with network access to that sucker?

Re:Screen works welll (1)

Cillian (1003268) | more than 6 years ago | (#23991163)

Persistent? The point is, screen runs on the server. So whatever you run in it is persistent. Security is handled by whatever you use to connect to the server, i.e. SSH.

Re:Screen works welll (4, Informative)

Lord Apathy (584315) | more than 6 years ago | (#23990547)

Agreed. I built something like that a few years ago. It had a vt100 sitting on top of it and I used screen to keep up with the data. Screen is easy to use. The only real command that you will need is screen -R. The -R will tell it to resume the screen session in the background and if there isn't one to create it.

Re:Screen works welll (5, Informative)

ckthorp (1255134) | more than 6 years ago | (#23991043)

I prefer screen -R -D to detach any other screen connections which I might have forgotten about.

Re:Screen works welll (2, Informative)

Cillian (1003268) | more than 6 years ago | (#23991179)

I like screen -x, so I can access my stuff wherever I want it, with no hassle. It can get slightly funky with different terminal sizes, but screen handles that well.

Re:Screen works welll (5, Informative)

FMZ (1178473) | more than 6 years ago | (#23991119)

Throw this in your .bashrc: alias s="screen -RAad" . This makes multiple screen session management really easy. When I want to IRC, I just type "s irc". When I'm checking out how my torrent is going, "s tor". The beauty is, you don't have to do anything different for a new session. If you forget which sessions you have going, just type "s" and you'll be provided with a list of existing screen sessions.

Re:Screen works welll (5, Informative)

Dr. Winston O'Boogie (196360) | more than 6 years ago | (#23990783)

Nothing new to add, but did want to emphasize that if a text-only terminal is all you need, 'screen' is the way to go. It is one of the lesser known unix goodies, and a true "wonder tool": a tool you cannot live without once you use it.

The quick primer:

First time:
    ssh mymachine
    screen
    <do some work>
    CTRL-a-c <create another login session>
    <do some more work in diff dir>
    CTRL-a-1 <back to first login session>
    CRTL-a-d <disconnect>
    exit

Future times:

    ssh mymachine
    screen -r <resume screen>
    CTRL-a-2 <back to second login session>
    <do some work>
    CTRL-a-d <disconnect>
    exit

You can create many login sessions inside one screen instance or launch multiple instances of screen on the same box by giving them a name. See the man page for all the goodness.

Re:Screen works welll (0)

Anonymous Coward | more than 6 years ago | (#23990995)

You wouldn't happen to know if it's possible to have more than one connection to the same screen session at once, would you? I've been through the manual pages a few times without success.

Re:Screen works welll (1)

The_Wilschon (782534) | more than 6 years ago | (#23991181)

You want to use screen -x for that. There are some trickinesses to it, though, and I've never made it work with multiple different users connecting to one session. Different people logged in using the same username, yes. different usernames, no. But then I didn't try all that hard.

Re:Screen works welll (1)

simcop2387 (703011) | more than 6 years ago | (#23991273)

screen -xr

Re:Screen works welll (1)

Cillian (1003268) | more than 6 years ago | (#23991289)

screen -x is your friend

Re:Screen works welll (1)

daliman (626662) | more than 6 years ago | (#23991127)

Also, a trivial script to go through your open screens (useful if you run a bunch of torrents on some server somewhere...)

#!/bin/bash
for screen in $(screen -x | grep `hostname` | cut -f2); do
screen -x $screen;
done

Re:Screen works welll (0)

Anonymous Coward | more than 6 years ago | (#23991257)

what's the canonical solution to let screen's ctrl-a keybinding coexist with emacs-style keybindings?

Re:Screen works welll (2, Funny)

lostguru (987112) | more than 6 years ago | (#23991311)

vi?

Re:Screen works welll (2, Interesting)

LeafOnTheWind (1066228) | more than 6 years ago | (#23991357)

If all you are doing is establishing a persistent ssh connection, you may want to think about using dtach [sourceforge.net] . It's the equivalent of vi to emacs. Why use an operating system when all you need is a text editor?

Re:Screen works welll (1)

El_Isma (979791) | more than 6 years ago | (#23991259)

Indeed, Screen is the way to go for text.

"man screen" should get you on your way.
I've found useful the following website:
http://gentoo-wiki.com/TIP_Using_screen [gentoo-wiki.com]
Near the bottom is a "live" session example.

This one is good too:
http://www.kuro5hin.org/story/2004/3/9/16838/14935 [kuro5hin.org]

How about NX/nomachine.com? (4, Informative)

vlad_petric (94134) | more than 6 years ago | (#23990399)

Yeah, it's not free as in speech, but otherwise beats the crap out of vnc.

Captain Obviousman.

Re:How about NX/nomachine.com? (4, Informative)

agoliveira (188870) | more than 6 years ago | (#23990433)

Yeah, it's not free as in speech, but otherwise beats the crap out of vnc.


Captain Obviousman.

FreeNX is free and works to what he wants as well.

Re:How about NX/nomachine.com? (1, Interesting)

Anonymous Coward | more than 6 years ago | (#23990577)

Considering he seems to want number crunching (or at least applications that continue to work when he does not have the window open), does FreeNX's "suspend" allow the programs to continue running or are they all "paused" until you log in again (i.e. screen/vnc behavior or computer suspend/hibernate behavior)?

Re:How about NX/nomachine.com? (2, Informative)

billcopc (196330) | more than 6 years ago | (#23991123)

From my experience, everything keeps running. All the "suspend" does is leave your X-session open, so you can reconnect to it later.

"Terminate" kills any open apps and logs out of that X-session.

ssh + vnc (5, Informative)

Destrius (956) | more than 6 years ago | (#23990407)

You could use VNC, but set it up so the vnc server is only accessible via localhost, and then use ssh to create a secure tunnel back to your client. Alternatively I sometimes use vnc and ssh with X11 forwarding, i.e. the actual graphical data being sent over the network is over X11 as opposed to VNC's protocol.

screen is cool and pretty easy to use, RTFM. But its command-line only, so not applicable if you need GUI as well.

Re:ssh + vnc (2, Informative)

Curtman (556920) | more than 6 years ago | (#23990517)

Or just forward the VNC port. Should be 5900 for screen :0. It'll be faster than raw X11 forwarding.

Re:ssh + vnc (3, Informative)

Scherpbier (470856) | more than 6 years ago | (#23990587)

If you use xtightvncviewer, it has the "-via" option which sets up a tunnel (ssh is the default) for the connection. Only ssh needs to be exposed through the firewall that way.

Alternatively, set up OpenVPN (either through a dedicated firewall or on your linux box) or other VPN so you can access the VNC server as if you were local to your network.

nomachine.com (0)

Anonymous Coward | more than 6 years ago | (#23990409)

Use the free, NX server from nomachine.com. Works great, high performance and session disconnection/reconnection ability.

screen (2, Informative)

Chris Snook (872473) | more than 6 years ago | (#23990413)

Yum distro:
yum install screen
man screen

Apt distro:
apt-get install screen
man screen

Re:screen (3, Informative)

Ice Wewe (936718) | more than 6 years ago | (#23990901)

Gentoo distro:

emerge -av screen

Mac OS X:
fink install screen

Re:screen (1)

clang_jangle (975789) | more than 6 years ago | (#23991203)

Mac OS X:
fink install screen



That or:
sudo port -v install screen

Re:screen (1)

kamochan (883582) | more than 6 years ago | (#23991249)

Actually, for Mac OS X it's even simpler, as screen comes with the base OS:

mymac:~ username$ which screen
/usr/bin/screen

Re:screen (1)

jgercken (314042) | more than 6 years ago | (#23991063)

don't forget the emerge distro :)
emerge sync
emerge -p screen
emerge screen

Use screen (2, Informative)

Whatsisname (891214) | more than 6 years ago | (#23990419)

Nothing beats screen for terminals.

I use irssi + screen so I can be in some of my irc channels all the time, and connect to it from wherever I can run an ssh client.

Go with screen (2, Informative)

DigiDarkCloud (262410) | more than 6 years ago | (#23990429)

Given that it's made specifically for persistent terminals across login sessions, Screen is definitely worth learning. If your needs are text-based, it's the best way to go.

It sounds like your GUI needs are rare. In those occasions you could probably fire up a VNC or other session when you need it (from the remote screen session) and shut it down again when you're done.

screen (5, Insightful)

vengeful (734172) | more than 6 years ago | (#23990435)

The usefulness of screen cannot be overstated.

Re:screen (4, Insightful)

Lord Apathy (584315) | more than 6 years ago | (#23990569)

Screen is one of the greatest and useful commands ever envisioned.

Re:screen (3, Informative)

SuperQ (431) | more than 6 years ago | (#23991223)

And of course my favorite thing in my .screenrc:

# turn sending of screen messages to hardstatus off
hardstatus on
# Set the hardstatus prop on gui terms to set the titlebar/icon title
termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
# use this for the hard status string
hardstatus alwayslastline
#hardstatus string "%h%? users: %u%?"
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

screen is simple and lightweight (0)

Anonymous Coward | more than 6 years ago | (#23990437)

Use screen. Ocams razor approach...

Simple answers. (5, Informative)

crazyvas (853396) | more than 6 years ago | (#23990455)

Use screen for terminals. x11vnc for GUI. x11vnc can be run over encryption. Look at http://www.karlrunge.com/x11vnc/ [karlrunge.com] for more info.

stupid question (1)

Miros (734652) | more than 6 years ago | (#23990457)

This might be a stupid question, but does it really actually make sense to run big number crunching applications on top of WINE? I know WINE performance is really quite amazing considering what it is, but at the same time, if you have a job that you expect to run for a long time doing a lot of work (especially a threaded one) repeatedly you should probably re-implement it if you can natively. OpenMP is kind of fun

Yeah it makes sense (2, Informative)

Nicolas MONNET (4727) | more than 6 years ago | (#23990653)

All code except system calls runs natively, and therefore just as fast as native code.

Re:Yeah it makes sense (1)

Miros (734652) | more than 6 years ago | (#23990721)

to be honest, that's pretty sweet =)

Re:Yeah it makes sense (2, Interesting)

bucky0 (229117) | more than 6 years ago | (#23991073)

That's true, but if he's talking about graphics things, there is a LOT that is emulated. Google "DIB engine wine" for a look.

Basically, unless you're using DirectX/OpenGL, windows makes assumptions about the graphics layer that can't be directly done in X. AFAIK (it's hard to understand), many of the earlier windows libraries give the program direct shared access to where they are rendering, but X11 has the program and the actualy framebuffer divided by the X11 layer. Emulating that blows in terms of performance.

If his program is using directX, there is also an emulation layer to convert the calls to opengl.

IANAWH (wine hacker) so I could be off.

nomachine (0)

Anonymous Coward | more than 6 years ago | (#23990461)

we use nomachine for this, you can try the free edition: http://www.nomachine.com/select-package.php?os=linux&id=1

screen (0)

Anonymous Coward | more than 6 years ago | (#23990463)

If you don't *require* X11, try screen. It's simple and lightweight.

http://wiki.redbrick.dcu.ie/mw/Screen

First! (-1, Offtopic)

Anonymous Coward | more than 6 years ago | (#23990469)

ha!

freenx / nxserver (5, Informative)

mikey573 (137933) | more than 6 years ago | (#23990471)

For persistent GUI sessions, I generally use nx/nxserver/freenx:
http://freenx.berlios.de/ [berlios.de]

For console sessions, nothing beats "screen". I use the command "screen -m -R" to create and/or reconnect to an existing session.

I used to like VNC, but I got tired of how difficult it was to set up. On Windows boxes, I stick to Remote Desktop Connection.

nx* = PITA (3, Interesting)

Nicolas MONNET (4727) | more than 6 years ago | (#23990717)

You think VNC is difficult to set up? Well NX is just absurdly complicated. That one time I managed to get it working, it was indeed vastly superior to VNC, but I just can't fucking understand why they have to install their own damn SSH server and keys. Why? WHY???
How come it's not been picked up by any major distribution? Probably because installing it by following the megabyte-long HOWTOs feels like an exercise in computer masochism.

Re:nx* = PITA (0)

Anonymous Coward | more than 6 years ago | (#23990875)

I strongly second this. I tried pretty hard to get NX working. In the end
I gave up and went back to VNC. VNC was trivial to set up, and works fine for my purpose.

Re:nx* = PITA (3, Informative)

Burz (138833) | more than 6 years ago | (#23990883)

Not seperate ssh server... unless you're on Windows?

Separate key is needed because nx must do session/login management from root. Simple as that. Once I grasped that, the rest came easy (I will admit to being familiar with ssh configuration though).

FWIW, nxserver works great (2, Informative)

Burz (138833) | more than 6 years ago | (#23990865)

...I've always had more luck getting it to work right than with freenx. But the latter has a KDE session integration now so the auther may want to look into that.

The session handling and preservation of nxserver is very good.

Re:freenx / nxserver (1)

Covener (32114) | more than 6 years ago | (#23990987)

I used to like VNC, but I got tired of how difficult it was to set up. On Windows boxes, I stick to Remote Desktop Connection.

I've always found VNC dead-simple to install/configure/run, except on the cruftiest of old unix systems where the environment setup was busted.

Typically it's one-liner native package install, run 'vncserver', and change your window manager if you're picky.

Neercs (0)

Anonymous Coward | more than 6 years ago | (#23990477)

http://libcaca.zoy.org/wiki/neercs

Screen. (1)

ari{Dal} (68669) | more than 6 years ago | (#23990483)

Keep it simple - this is what screen was meant for. Install it and read the man page, it's really easy to use.

Persistent X and others (4, Informative)

mrmeval (662166) | more than 6 years ago | (#23990489)

this one (1)

corporatefucker (1104367) | more than 6 years ago | (#23990493)

vncserver :1 -name parngr -geometry 1024x768 -depth 16

Simple answer: screen (0)

Anonymous Coward | more than 6 years ago | (#23990505)

You should really check out screen, because that's exactly what you are looking for!

SSH Tunnel to protect VNC (5, Informative)

brownsteve (673529) | more than 6 years ago | (#23990511)

This is what I do every morning to get into work.

Start up a VNC server on the remote box and leave it running. No need to open holes in your firewall except for SSH, which is pretty safe to do.

To tunnel through the firewall and log in, type these commands on your local machine:

ssh -f -N -L 5901:localhost:5901 -X username@remotebox.example.com
vncviewer localhost:5901

Voila: VNC connection, secured by SSH. When you are done just

killall ssh

.
Note that 5901 means the :1 VNC session, 5902 means :2, etc.

Re:SSH Tunnel to protect VNC (1)

spydum (828400) | more than 6 years ago | (#23990687)

Mod parent up -- this is probably the best approach. Just be sure that VNC is only listening on localhost. No need to have it binding to other IP's.

Re:SSH Tunnel to protect VNC (4, Informative)

ink (4325) | more than 6 years ago | (#23990755)

You can also just end the SSH session (don't background it with '-f') to cut the tunnel. This also works with PuTTY for Windows machines. I've setup PuTTY shortcuts for some of my coworkers and they just double-click on them, enter their passoword, and they're using VNC just fine. When they want to stop using it, they just close PuTTY. Easy as pi.

Terminals mainly? (2, Interesting)

LinuxGeek (6139) | more than 6 years ago | (#23990527)

Try conspy [freshmeat.net] , very handy utility.

I wouldn't bother (0)

Anonymous Coward | more than 6 years ago | (#23990531)

If your needs for number crunching are purely that, I wouldn't add any overhead at all for this, but run a script on the client side (your main computer) to suck results back to your machine. Unless you're running real time visualized simulations, there probably isn't a necessity for what you state anyhow.

I used to work with GA based algorithms (I didn't research them, just tested them for my uses), and one thing at the time that I did was run a PowerMac G5 headless. Basically, everything that could be turned off was turned off, memory was beefed up to the max, and it just ran. Of course, at the time, a single session was something like 8 hours of straight computing, so I would usually just check in via ssh once in a while to see if it was done. I would still need to log in to see how things were doing, or stop a session mid-way to check results etc., but this was all accomplished via SSH. If I were to do it again, I would probably use the same setup. Even with today's computing power, GA and other algorithms still tend to require a huge amount of computing power for complex problems, so I would want to dedicate as much power as possible to the problem, and bear the burden of access.

Quick primer (4, Informative)

Nicodemus (19510) | more than 6 years ago | (#23990535)

Here's a quick primer. These are the commands I use all the time. There are a ton more in the man pages or online help.

"screen" to start a new shell under screen

All commands start with CTRL-A, then another key for the command itself. If you really want to send a CTRL-A to your application (Like to go to the beginning of the current line in bash for example, hit CTRL-A twice.)

CTRL-A CTRL-D Detach your current session

"screen -rd" to get back to it

CTRL-A CTRL-C create another "window"
CTRL-A CTRL-N next window
CTRL-A CTRL-P previous window
CTRL-A " see list of current windows
CTRL-A [ Copy mode... you can see the scrollback buffer with this. Esc to exit
CTRL-A ? Help for further stuff.

I run just one instance of screen with multiple "windows." Works beautifully. When you start running more than one screen process under the same user it can make it difficult to re-attach because you have to tell it which pty to attach to.

Nicodemus

Re:Quick primer (1)

ablcmx (105873) | more than 6 years ago | (#23990887)

When you start running more than one screen process under the same user it can make it difficult to re-attach because you have to tell it which pty to attach to.

Nicodemus

Or use screen -S NAME to name all of your sessions. Then you can reattach with the logical name rather than numerical pty.

Re:Quick primer (-1, Flamebait)

Anonymous Coward | more than 6 years ago | (#23990919)

Oh, yeah, that's totally intuitive and not cryptic at all!

Gee, I have no idea why Linux isn't ready for the desktop.

Re:Quick primer (4, Insightful)

bucky0 (229117) | more than 6 years ago | (#23991093)

the day that my grandmother is leaving persistent terminal sessions around is the day I pick up cross-stitching.

It's an advanced thing to do, why would it influence "linux on the desktop (tm)"

Re:Quick primer (1)

NoSpamPlease (1145157) | more than 6 years ago | (#23990975)

When you start running more than one screen process under the same user it can make it difficult to re-attach because you have to tell it which pty to attach to.

This is where the "-S sessionname" option is handy. I used to have multiple instances of long computations running, and each screen session would have multiple windows containing the code editing, compiling, and execution. Using the session name made it very easy to tell which was which.

Use the "screen -list" command to see all the different screen sessions you have started, along with their names.

fpga tools (4, Informative)

scatterbrained (144748) | more than 6 years ago | (#23990563)

The xilinx fpga tools run just fine (perhaps better) from the command line, and have native ports to linux. I believe the same is true for Altera. If you run the xilinx gui tool with the command line log file turned on, it will give you a look at what's required.

IIRC, screen has a pretty detailed man page and has been around a very long time, so should be pretty easy to find examples of setting it up.

For X, usually the real pig is the display server. If you have to run X read up on using the DISPLAY environment variable and just run the X clients on the box and run the server somewhere else - that's what it was made for ;-)

Detach screen (0)

Anonymous Coward | more than 6 years ago | (#23990565)

Read about detaching screen sessions.

Sunrays (1, Informative)

Anonymous Coward | more than 6 years ago | (#23990575)

Check out Sunrays. You can get them on ebay for cheap ( $20), and download the software from Sun. They have a linux version. Get some Sunray cards. You just stick the card into the slot, log in, and work. Remove the card, your session disappears from that terminal. Go to another terminal, put in your card, and your session appears.

screen is well worth learning (0)

Anonymous Coward | more than 6 years ago | (#23990623)

I'm a CLI bigot, so I love screen. I do much of my work over a VPN, so screen is essential so I don't lose my place when routes flap or something. I find it's much better than the 'nohup; tail -f' method.

Once catch is that CTRL-a is the default screen metakey, which collides with the bash emacs-mode start-of-line. I change that to CTRL-n in my ~/.screenrc, though CTRL-[ might also be a good choice (never tried it).

Screen is also useful for training/t-shooting, when you set up it as multi-user.

I wrote a couple of recipes about it in O'Reilly's _bash Cookbook_ if you have that laying around. (And if you don't, why not?!? :-)

-JP

screen for terminals, xvnc for gui (0)

Anonymous Coward | more than 6 years ago | (#23990629)

i'd go for 'screen' too for the persistent terminal sessions...sincerely u dont even need to read the manual

just prepend 'screen' in any command that you would normally type in a console window ... the terminal will spawn another terminal (running on top of the first - NOT in a separate tab or smth) and the command will then be executed.

you can then detach the session by pressing ctrl-A then D... and you'll be back to the previous session..

if you want now to check back the progress of your execution do 'screen -ls'
and then 'screen -r '

thats it..

i use it mostly to run rtorrent - a command line torrent client
and occasionally for some long 'wget's

note that once the execution of the program terminates.... the screen session that you have spawned will be terminated too... so remember to redirect any final output to a file too in order not to miss it :)

btw, i would hardly call the use of Xvnc 'resource hungry'.. i mean first make sure that your code uses threads to fully utilise ur 4 processors!

dtach beats screen (1)

djarum72 (122163) | more than 6 years ago | (#23990633)

dtach doesn't mess with the keys like screen. Easier to do interesting things like sharing screens without being SUID.
Man page is measured in pages not reams.

Are you sure VNC wastes CPU time and memory? (0)

Anonymous Coward | more than 6 years ago | (#23990655)

VNC probably doesn't use much memory or CPU time when it's not active. Do a benchmark.

What I read (5, Funny)

krappie (172561) | more than 6 years ago | (#23990667)

"I really want this feature. I've heard of this program that's made for exactly the feature that I want, but I'm unfamiliar with it. HELP ME SLASHDOT YOU'RE MY ONLY HOPE!!1!"

Heard of SSH? (0)

Anonymous Coward | more than 6 years ago | (#23990669)

Why on earth would you open the VNC port in your firewall? Just tunnel through SSH. The TightVNC client has that builtin, just use the -via option.

NX (2, Interesting)

Bert64 (520050) | more than 6 years ago | (#23990707)

Try NX, http://www.nomachine.com/ [nomachine.com]
It's orders of magnitude faster than VNC or native X11, and supports persistent sessions as you describe...
It also runs over SSH, so it benefits from the inherent security of SSH.

I would never even consider using VNC, entirely pointless... slower than native X11.

Re:NX (1)

Covener (32114) | more than 6 years ago | (#23990947)

I would never even consider using VNC, entirely pointless... slower than native X11.

In my experience, once you go beyond two systems on the same LAN, vnc copes with the latency much better than native X11. For some reason, swing apps seem to suffer the most (more round-trips baked into how they use X?)

There's also the issue of unreliable links/roaming/etc which are big pluses for vnc/nx.

IMO NX is only marginally better performing than vnc.

dtach - a simpler version of screen (0)

Anonymous Coward | more than 6 years ago | (#23990775)

dtach is a minimal version of screen(1). It only has one command (Ctrl-\).

    dtach -A /tmp/session1

        [ do some work and type Ctrl-\ to detach ]

    dtach -A /tmp/session1

        [ continue where you left off ]

Screen! (0)

Anonymous Coward | more than 6 years ago | (#23990813)

Screen is definitely what you want. Its always the first thing I install on my new lab machines.

screen for persistent cli terminal (0)

Anonymous Coward | more than 6 years ago | (#23990833)

I have been using screen for a couple of years now.

I use it on a daily basis to access my desktop station or computing servers at work from home (or wherever I am) through a ssh session when I want to launch jobs requiring quite a long time to complete.

This allows (among others):
1/ not to fear ssh connection drops. If the connection drops, your shell just continues to work on the distant machine. You can reconnect to it whenever the network is back on track.

2/ I can start a job while at work in a screen terminal. Then I detach it. Go back home, ssh, log back and reattach the terminal. Therefore I can keep on monitoring the task I launched.

I kept logged through the same screen session on servers for weeks without any problem so far.

Screen doesn't provide x11 session afaik, however, it is a very reliable, simple and light tool I just couldn't live without.

RTFM! (1)

jhealy (91456) | more than 6 years ago | (#23990855)

translation: can someone tell me how to use screen?

let's see, how can i write this so no one will call RTFM on me...

Sun Rays (5, Informative)

Paul Jakma (2677) | more than 6 years ago | (#23990971)

Sun make pretty neat thin-client terminals called Sun Ray [sun.com] . Can work with either Linux or Solaris servers.

NB: I'm biased, as I work for Sun.

RDP FTW (0)

Anonymous Coward | more than 6 years ago | (#23991013)

If you don't mind Microsoft, server 2008 with Hyper-V (still in beta) takes up very few resources, and RDP is the best remote protocol that I have ever delt with. ever. Low bandwidth and all you have to do when you are done is close the application and your programs continue to run.

GPU instead of CPU or FPGA? (1)

raftpeople (844215) | more than 6 years ago | (#23991023)

I know this is offtopic and you didn't ask this question, but instead of using CPU (or ultimately FPGA like it sounds you might), have you looked into running calcs on a graphics card?

I also have a genetic algorithm, neural net, artificial life project that needs lots of processing power, after looking at my options (cluster of pc's, cluster of PS3's, FPGA's, GPU's), I found that GPU's look like the best bang for the buck by far.

I've just started the process of converting my critical code to nvidia's CUDA technology.

kdm/gdm with autologin, X, xvnc, ssh and screen (1)

Simon (S2) (600188) | more than 6 years ago | (#23991035)

I use the same on my home box. I setup kdm to automatically log my default user in right after startup, and put this

s2@fresh:~$ cat .kde/Autostart/x11vnc
#!/bin/bash
(while true; do /usr/bin/x11vnc -forever -nopw; sleep 10; done) &
s2@fresh:~$

autostart file in as well, so I have a vnc server listening and sharing that desktop. The vnc port (5900) is firewalled from outside the lan, so it's relatively secure. To access it I use an ssh tunnel, so traffic is encrypted, and when I close my vncviewer window and reconnect later everything is still there and running.
For the terminal I use screen, and I usually have one window open with an irc client, one that tails some log files, one with mutt, and so on. You could run your number-crunching stuff.
It's really a nice setup, I work like this every day and I am really pleased with how good it works.

Xvfb (3, Interesting)

kreuzotter (13645) | more than 6 years ago | (#23991047)

I use Xvfb to make a virtual screen on the number cruncher (comes with xorg). I don't need to see the display, it just has to be there for wine. If something goes wrong (error box pops up) and there is no progress I take a screen dump of the vortual screen to see it. This eliminates traffic on the network too.

XRDP (1)

maz2331 (1104901) | more than 6 years ago | (#23991107)

XRDP works pretty well. It's basically an RDP "wrapper" for VNC, and should be secure "enough" for your use.

If you need a GUI for the apps, then you need a GUI for the apps. I wouldn't worry much about the overhead since WINE itself will have much more anyway. We're talking here about under 0.5% of your CPU/Memory, which is trivial.

I like it for conveninece since there's no need to install "agents" or specific client-side software. Any Windows box (Post Win2K) has an RDP client, as do most Linux distros.

SSL-Explorer (1)

D4C5CE (578304) | more than 6 years ago | (#23991155)

If you can't be sure yet what else you might need to export from this machine, in particular for access as a roadwarrior too (just terminals or also file shares to get data into and out of future projects, and possibly even forwarded access to further machines on the LAN?), 3SP's SSL-Explorer [sourceforge.net] might be a good package comprising VNC, RDP etc., console prompts, network paths, web forwards (mostly through a Java helper that runs from many browsers), all encrypted as the name implies, and even more in in its commercial Enterprise Edition [3sp.com] , which has a free trial for 2 users as well.

There had been a flurry of versions (all very usable indeed) and lively discussion up until RC19, with the project even proposed for inclusion into Ubuntu [ubuntu.com] , but just before the final release, suddenly not much has been heard from the project since May anymore, and http://www.3sp.com/forums/forums/show/18.page [3sp.com] (as well as the fact that http://www.sshtools.com/showSslExplorerCommunity.do [sshtools.com] now redirects to the commercial version) gets me a bit worried - does anyone have more recent news on this promising project?

SSH (PuTTY) + XMING (1)

Karem Lore (649920) | more than 6 years ago | (#23991209)

Just use ssh with X forwarding through to your box with an XMING (if using windows, or any linux bbox can do this) windows server running on your workstation. Advantage: no xserver running on your crunch machine, good security, simple setup.putty -http://www.chiark.greenend.org.uk/~sgtatham/putty/ Xming - http://www.straightrunning.com/XmingNotes/ [straightrunning.com]

You can use screen for your persistance...

Karem

Dont Use Xvnc as a daemon (1)

nurb432 (527695) | more than 6 years ago | (#23991231)

The easiest way to get a persistent session is to Use the regular vncserver from a SSH command line.

I do it all the time. I suggest you make sure to enable compression and don't go overboard with graphical apps if you access it from the WAN.

Joking??? (0)

Anonymous Coward | more than 6 years ago | (#23991237)

What is this for a joke!!!??? Are we going to read more of this stuff on Slashdot? I thought this used to be a news filter/aggregator + discussion site not a discussion board for dummies.

Yeah, right.... (0)

Anonymous Coward | more than 6 years ago | (#23991275)

Horse shit.

You mean your applications are sooooo performance critical that running them on a homemade x86 box is ok, but you're concerned about how many resources vnc takes up? Nice troll.

I'd love to see a "ps -ef", "lsof" and "cat /proc/meminfo" of that box.

I use.... (1)

whiskey6 (1172575) | more than 6 years ago | (#23991363)

a program called thinstuff www.thinstuff.com I have a similar setup, a server stuffed in the corner with just a couple of NICs and a power cord. I can use RDP on my handy windows lappy to get to said server and my x session is persistent. Licenses are cheap, too.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?