• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Needs help with the Linux....

So I got no help from the Ubuntu forum - go figure. But I happen to know there are some pretty Linux savvy people around here so my original post on Ubuntu.com was:

I was thinking how cool it would be to be able to switch between my CLI environment (F1-F6) and the gnome (F7) by simply typing an alias (ex. gohome) on the command line without having to press ctrl+alt F7.
But I don't know how to write key combos or Function keys for that matter in shell scripts. I tried searching all over the web but can't find anything that explains it.

Any help would be greatly appreciated.
thanks in advance, :)
 
It's been DECADES since I even thought about doing anything like this and, frankly, *I* don't think it's worth the bother. Why type a command, like the six characters in gohome, when you could just press [ctrl][alt][fX]?

However, if you're really intent on doing this, start out by looking at the following; everything you need to know is there!
Code:
man keymaps
man dumpkeys
man termcap
man terminfo
 
Upvote 0
It's been DECADES since I even thought about doing anything like this and, frankly, *I* don't think it's worth the bother. Why type a command, like the six characters in gohome, when you could just press [ctrl][alt][fX]?

However, if you're really intent on doing this, start out by looking at the following; everything you need to know is there!
Code:
man keymaps
man dumpkeys
man termcap
man terminfo

Thanks I also discovered chvt.

I just wanted to know because I got it in my head, and then it begins to nag me until I figure it out.
 
Upvote 0
Thanks I also discovered chvt.

I just wanted to know because I got it in my head, and then it begins to nag me until I figure it out.
I know THAT feeling! That's what used to drive me when I first started programming and administering UNIX systems in the '80s. Every timed I turned around I had another, "hmmmm...I wonder if I can do THAT?" moment, and--since it's *nix--the answer was always a resounding YES! Then came figuring out how. :D
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones