LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2015, 02:30 AM   #31
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875

Quote:
Originally Posted by suicidaleggroll View Post
Since when? I have never seen that, and I would be extremely shocked if that was the case with any mainstream distro.
Raspbian for example, has a default user "pi" with a default password of "raspberry". Plus ssh server installed and enabled by default. And a very exposed sudoers configuration. Plus no default firewall. It's more common than you would think.
 
Old 08-26-2015, 10:10 AM   #32
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by Shadow_7 View Post
Raspbian for example, has a default user "pi" with a default password of "raspberry". Plus ssh server installed and enabled by default. And a very exposed sudoers configuration. Plus no default firewall. It's more common than you would think.
Well sure, embedded systems almost always have default accounts, since the OS is pre-installed and you just boot it up. It's understood that the first thing you do with these systems is change the password, especially if it's going to be exposed in any way to the outside world.

I thought you were talking about normal distros that get installed on general purpose machines.
 
Old 08-26-2015, 11:01 AM   #33
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,797

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
Quote:
Originally Posted by MrUmunhum View Post
how do I add that to my Window Keyboard shortcut list?
What's a "Window Keyboard shortcut list"?
 
Old 08-26-2015, 04:07 PM   #34
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ntubski View Post
Add the following to ~/.inputrc:
Code:
# CTRL-P to get previous line, CTRL-A to move cursor to beginning
"\C-t": "\C-p\C-asudo "
That works with CTRL-t, I think CTRL-Enter can't be distinguished from Enter unless you do something special to your terminal. The above should work with any system using bash.
Thus is exactly what I wanted, thanks.

On my Ubuntu I needed to create a new .inputrc.
Code:
cat .inputrc
$include /etc/inputrc
"\C-t": "echo Yes\n"
"\C-x\C-r": re-read-init-file
"\C-e": "\C-p\C-asudo "
  • line 1 includes the system default file.
  • line 2 is a test just to see if my file was loaded.
  • line 3 enables reloading my file. This should be default but it is not.
  • line 4 uses CTRL and e too recall last line and pre-pend sudo.
I could not figure out how to configure CTRL and Enter?
Also I could use the command format to display the key-binding for a terminal window. All my googling have filed me.

Thanks for your time.
 
Old 08-26-2015, 04:23 PM   #35
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ntubski View Post
What's a "Window Keyboard shortcut list"?
There are several ways to modify your keyboard input commands.
  • Bash readline
  • Main->Settings->Keyboard->application shortcuts
  • Xorg ketboard shortcuts
It all depends on what you need and want you know or are willing to learn.
The people on this forum are very sharp and willing to help you if you ask the right question. Again, it all depends on what you want to do. In my last post, I showed one method that worked for me.

Google is your friend.
 
Old 08-26-2015, 05:03 PM   #36
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,797

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
Quote:
Originally Posted by MrUmunhum View Post
I could not figure out how to configure CTRL and Enter?
Depends on the terminal emulator. Generally, Enter sends a CR character which is encoded as Ctrl+M, so Ctrl+Enter would be Ctrl+Ctrl+M which is nonsensical (hence each terminal make some "sensible" decision about what to do in this case).
Quote:
Also I could use the command format to display the key-binding for a terminal window.
Was that a question?

Quote:
There are several ways to modify your keyboard input commands.
Indeed, and I couldn't tell which you meant.
 
Old 08-27-2015, 12:03 AM   #37
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ntubski View Post

Was that a question?
Yes, that was a question, how can I display/show the BASH keyboard binding?
 
Old 08-27-2015, 08:42 AM   #38
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,797

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
You can use the dump-functions and dump-macros functions (you'll have to bind them to something).

http://cnswww.cns.cwru.edu/php/chet/...man.html#SEC21
 
Old 08-27-2015, 02:44 PM   #39
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by ntubski View Post
You can use the dump-functions and dump-macros functions (you'll have to bind them to something).

http://cnswww.cns.cwru.edu/php/chet/...man.html#SEC21
dump-marcos() fails!
typeset -f works.

The command I needed to use is "bind -s" for user defines.

Thanks.

Last edited by MrUmunhum; 08-27-2015 at 05:28 PM. Reason: add solution
 
Old 09-01-2015, 08:18 PM   #40
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora 31and Tumbleweed) Gnome versions
Posts: 311
Blog Entries: 1

Rep: Reputation: 59
What you want to know you will find within

/usr/share/X11/xkb/symbols.

I use the ca keyboard layout so,

less ca

shows me the bindings.

For example,

less us

shows me the US keyboard bindings.

(I added EuroSign and yen to both the us and ca keyboard layouts and on logout/login, the new bindings are present

You may also want to look at wikipaedia for what is a pc104 and what is a pc105 keyboard layout.
 
  


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
[SOLVED] How do i log all commands run by a user after elevating himself as root using sudo Arvind Shivaramakrishnan Linux - Server 2 03-11-2015 04:46 AM
[SOLVED] Running Java program as Root (sudo) - Root Commands? derekpock Programming 3 07-27-2013 11:00 AM
[SOLVED] allow normal user to exec some root commands w/o sudo gujedan Linux - Newbie 12 11-10-2011 11:16 PM
Doubt concerning keeping record of all commands executed with sudo or as root: Maragato Linux - Security 2 05-14-2011 09:06 AM
[SOLVED] Sudo does not allow access to root commands psionl0 Slackware 12 02-22-2011 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:40 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