Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-26-09, 12:27 AM   #1
AwesomeTux
Registered User
 
Join Date: Dec 2008
Posts: 55
Question 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?
AwesomeTux is offline   Reply With Quote
Old 04-26-09, 12:48 AM   #2
etlamo
Registered User
 
Join Date: Nov 2008
Posts: 7
Default Re: Command-line to TTY1 from GUI

Quote:
Originally Posted by AwesomeTux View Post
Like when pressing Ctrl+Alt+F1.
chvt 1
etlamo is offline   Reply With Quote
Old 04-26-09, 12:55 AM   #3
AwesomeTux
Registered User
 
Join Date: Dec 2008
Posts: 55
Default Re: Command-line to TTY1 from GUI

Quote:
Originally Posted by etlamo View Post
chvt 1
Awesome! Thanks
AwesomeTux is offline   Reply With Quote
Old 04-26-09, 12:59 AM   #4
AwesomeTux
Registered User
 
Join Date: Dec 2008
Posts: 55
Question Re: Command-line to TTY1 from GUI

Now. Is there a way to run a command from the GUI on /dev/tty1?
AwesomeTux is offline   Reply With Quote
Old 04-26-09, 06:12 AM   #5
dreame289
Registered User
 
Join Date: Apr 2009
Posts: 1
Default 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.
dreame289 is offline   Reply With Quote
Old 04-28-09, 02:58 AM   #6
AwesomeTux
Registered User
 
Join Date: Dec 2008
Posts: 55
Default Re: Command-line to TTY1 from GUI

Quote:
Originally Posted by dreame289 View Post
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
AwesomeTux is offline   Reply With Quote
Reply


Thread Tools

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


All times are GMT -5. The time now is 12:29 AM.


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