LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-04-2009, 09:06 AM   #1
Cyberman
Member
 
Registered: Aug 2005
Distribution: Debian Stable
Posts: 218

Rep: Reputation: 17
Designate a tty to a regular user?


I'm using Debian Lenny.

Scenario:

Sometimes I will be using gnome and executing a script. Sometimes the scripts take a while to execute because of their tasks. From time to time, gnome will halt/freeze, and my script (which would have been executed in gnome-terminal) will be caught in the crossfire.

I want to be able to have a kind of nautilus script that opens a tty for the user and executes the script there.

How do I do this?

I guess I would want tty9?
I don't want to login for the user either.
I want these kind of things to be automatic.

I want to be able do something like this while in gnome:

$ backgroundexec ./script.sh

See the gnome-terminal window close. And then hit Ctrl+Alt+F9 and see the script executing there.

Last edited by Cyberman; 07-04-2009 at 09:08 AM.
 
Old 07-04-2009, 09:13 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I would set up the job to run in batch by using the at utility.
Code:
at -f script-name.sh now
Pipe the output to a log file. This is what I do with my Folding At Home software. I can read the log file to see the progress of the application.

You may need to install the at utility. It is not installed by default on all distributions.

The at utility will run the job in a system queue so it will not be affected if Gnome or X hangs unless the cause of your window manager hangup is due to a kernel level problem.

On the other hand it might be better to diagnose and fix the cause of your Gnome/X performance problem.

Last edited by stress_junkie; 07-04-2009 at 09:18 AM.
 
Old 07-04-2009, 07:16 PM   #3
jason_m
Member
 
Registered: Jun 2009
Posts: 33

Rep: Reputation: 12
If I'm running some long script, I usually:
1. open a terminal or console
2. start up a screen session
3. start my script
4. detach my screen session

At a later point in time, from any terminal or console I can re-attach the screen session and check up on things.

The screen manual is very good. You can get to it from the last link above or probably by typing info screen at the command line once you have screen installed. It's a GNU program, so it has a great "info" manual
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can A User Space Program Create a /dev/tty? Peatmoss Programming 7 08-30-2008 04:02 AM
Can not login as any user in TTY console suhas! Linux - Newbie 12 07-05-2008 05:14 AM
alias for user to gain root tty with no passwd officecase Linux - General 2 05-11-2007 11:05 AM
shutting computer off with own user in tty jaakkop Linux - General 4 10-21-2004 07:46 AM
Can't log in as regular user Fugazi Linux - Newbie 1 12-27-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:21 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration