Switching To Tty1 From Desktop


lomaxx

Active Member
Joined
Sep 22, 2008
Messages
747
Today i found a way to switch to tty from desktop: "sudo chvt 1"
This might work without 'sudo' depending on your configuration.

You can simply switch back to the desktop by pressing alt+cursor(dpad) left or right. This would normally switch through all ttys, but since there is only one tty and the desktop, you instantly get back.
Another way is to log in (as user) and type "chvt 7" (or "sudo chvt 7"). This will also get you back.

I configured a shortkey to run "sudo chvt 1".
 
^ Absolutely brilliant. I've just added it to the Tweaks Thread, if you don't mind. :)
 
Not perfect, but really nice. Too bad we can't just hit alt+ctrl+Fn to switch virtual terminals. This will do in a pinch when something hangs to get control back though.
 
A little update: Once you switched to tty1, you can simply switch back to desktop by pressing alt+cursor(dpad) left or right. This would normally switch through all ttys, but since there is only one tty and the desktop, you instantly get back.
 
mindlord said:
Good deal because adding .bash_profile broke things on my system... for example insmod could not be found anymore.

What? That is the reason? I do not understand why this affects it, but thanks for the hint, because i have been experiencing some similar issue. I will try if it is gone after removing ".bash_profile".
 
Last edited by a moderator:
I think it is enough for now if i edit the above thread and add a warning to the .bash_profile-part. I will do so now.
 
It's because you're overriding the default profile which contains the PATH environment variable. if you were to first
Code:
cp /etc/profile ~/.bash_profile
then add your bit to the end of the file things won't be broken.
 
or even better, in case the default profile ever changes, add
Code:
. /etc/profile
as the first line of your .bash_profile file.
 
I did edit the first thread again to implement the improvements. Could someone please check precisely if the .bash_profile is like it should be?
 
I don't get what's going on with /etc/profile. Unless bash is somehow broken on the Pandora, it's meant to read and process /etc/profile if it exists, then do the same for ~/.bash_profile. The latter definitely shouldn't be overriding the former and including one in the other shouldn't be necessary.
 
I do not want to get off-topic, but i experienced many strange issues during the last days:

- http://bugs.openpandora.org/index.php?do=details&task_id=190
- my /etc/sudoers and the files in /etc/sudoers.d/ existed but have been completely empty
- some commands were not found when executing scripts
- bootmessages/dmesg sometimes shows a whole bunch of strange various outputs.

Unfortunately i have no idea what is causing this. I have some knowledge about the linux-system and bash-stuff, but it's rather scattered, incomplete and not exactly firm. I did some modifications during the early past while experimenting with bashscripts for a emulator-launcher and investigating into bugs/issues that resulted out of it. The first point in the list might be caused - i have no clue if - by a quick-hacked ".xinitrc",the third point because of the .bash_profile issue, but i have no idea how and why the sudoers-configurations were blanked. Together with the dmesg-outputs i sometimes have the feeling that there is some basic problem with the kernel or the filesystem or whatever. Or it's just me in the end.

Well this is not the right thread to discuss the mentioned issues. I probably will open a thread sooner or later to ask some more questions about them.
 
I removed the part with the .bash_profile again, because i once more had issues after adding it. I am not really sure if it has been caused by this file, but IMHO it's too risky to add it.
 
How exactly do you configure a hotkey to run sudo without asking for the password? This looks really handy to have if an app freezes. The ext3 FS on my boot SD is full of errors because I keep having to press pandora+power all the time when mupen64plus freezes.
 
Jdbye said:
How exactly do you configure a hotkey to run sudo without asking for the password?
run the "visudoers"
add or modify your user/command settings and add "NOPASSWD" to it.
 
Last edited by a moderator:
Back
Top