LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell prompts and keymaps (https://www.linuxquestions.org/questions/linux-newbie-8/shell-prompts-and-keymaps-218866/)

amnesty_puppy 08-17-2004 02:16 PM

Shell prompts and keymaps
 
Slack 10 + Xfce

= Using the bash shell, is there a way to change the prompt text, like DOS where you can add current path and other things.

= How do I change the keymap - is there a text file containing all the current bindings? Alternatively how would I load the keymap for a UK keyboard? The default US map has the " and @ swapped, among other things.

Thanks.

Tinkster 08-17-2004 02:33 PM

Hi, and welcome to LQ!

There sure is .... it's an environment variable called
PS1 ... man bash for details.

And number two: there's the loadkeys command
if you're in the shell .. for X you want to edit the
XF86Config, find us and replace it with uk

If you mention your distro you can get more help,
btw, many things depend on the distro!


Cheers,
Tink

amnesty_puppy 08-17-2004 03:02 PM

Thanks, just trawled through the bash man pages. My distros at the top of my original post (Slackware 10 with Xfce).

Another question: Is there a way to "su" in x?

scuzzman 08-17-2004 03:09 PM

Quote:

Another question: Is there a way to "su" in x?
Yes & No...
You can login as root and 'startx' if you'd like, but it is firmly not recoomended. What you'll want to do, is su, then, as root, start eny programs you need thru the command line.

amnesty_puppy 08-17-2004 03:13 PM

whoa, don't run X as root? I've been doing that for a lot of things, is there some major security problem?

Tinkster 08-17-2004 03:16 PM

Quote:

Originally posted by amnesty_puppy
Thanks, just trawled through the bash man pages. My distros at the top of my original post (Slackware 10 with Xfce).
doh :}
tired is all I can say ;)

Quote:

Another question: Is there a way to "su" in x?
Ummm ... running an X app as root within the
normal users X-session?

Several ways ...
http://www.linuxquestions.org/questi...hreadid=202463



Cheers,
Tink

amnesty_puppy 08-17-2004 03:26 PM

Cheers chaps.

Read somewhere to edit bashrc file but I can't seem to find it, no /etc/bashrc /etc/profile and no help from find either.

Tinkster 08-17-2004 05:02 PM

Slack is minimalist ... it doesn't give you a pre-fabbed
~/.bashrc
Create one :)


Cheers,
Tink

comprookie2000 08-17-2004 06:52 PM

With some text editors is is hidden /.bashrc if you use xedit or mc it is not hidden.If you do a cd then ls you won't see it but if you do cd then ls -a you will.I had a heck of a time finding it!
also here is a nice script for a cool prompt and some nice colors for ls http://www.pablotron.org/software/bash_tweaks/ Do not do it as root and use a dark background and you can edit it or remove it if you don't like it,I use it because I'm to lazy to write it all out.:scratch:


All times are GMT -5. The time now is 03:26 PM.