nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Command-line to TTY1 from GUI (http://www.nvnews.net/vbulletin/showthread.php?t=132034)

AwesomeTux 04-26-09 01:27 AM

Command-line to TTY1 from GUI
 
I need to know a terminal/bash/shell command for switching to TTY1 (/dev/tty1) from the graphical user interface. Like when pressing Ctrl+Alt+F1. I'm working on a script that will make it easier to update and install the latest nVidia drivers.

Is there even a way to do this?

etlamo 04-26-09 01:48 AM

Re: Command-line to TTY1 from GUI
 
Quote:

Originally Posted by AwesomeTux (Post 1991673)
Like when pressing Ctrl+Alt+F1.

chvt 1

AwesomeTux 04-26-09 01:55 AM

Re: Command-line to TTY1 from GUI
 
Quote:

Originally Posted by etlamo (Post 1991679)
chvt 1

Awesome! Thanks :captnkill:

AwesomeTux 04-26-09 01:59 AM

Re: Command-line to TTY1 from GUI
 
Now. Is there a way to run a command from the GUI on /dev/tty1?

dreame289 04-26-09 07:12 AM

Re: Command-line to TTY1 from GUI
 
Assuming you're logged on to the console from the same user as is logged in the X session this should do the trick:

Code:

DISPLAY=:0 yourcommand
Hmm, re-read your post, the above may not be what you were asking for, closest method I can think of to achieve what you want is to redirect the output of a command run in a GUI terminal to /dev/tty1.

Code:

/bin/ls > /dev/tty1
.

Failing that, you can read into the use of the "screen" program.

AwesomeTux 04-28-09 03:58 AM

Re: Command-line to TTY1 from GUI
 
Quote:

Originally Posted by dreame289 (Post 1991741)
Assuming you're logged on to the console from the same user as is logged in the X session this should do the trick:

Code:

DISPLAY=:0 yourcommand
Hmm, re-read your post, the above may not be what you were asking for, closest method I can think of to achieve what you want is to redirect the output of a command run in a GUI terminal to /dev/tty1.

Code:

/bin/ls > /dev/tty1
.

Failing that, you can read into the use of the "screen" program.

That isn't quite what I want.

Read my other post and you'll see what I'm basically trying to do.
http://www.nvnews.net/vbulletin/showthread.php?t=132039


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

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.