General :: Open A New Shell From A Shell And Switch Between Them?
Jan 18, 2011
I am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
Is there any way I can switch my desktop shell from unity to, say, gnome-shell? I can switch using other console shell I like (bash, csh, fish, etc.). Assume that there is a stable alternative desktop shell, I should be able to choose, too.
(For console shell, we goes to /etc/passwd. But for desktop, I can't find the way to config.)
I have a big problem here.I have 2 shell windows, ne is a root shell and the other with some user account.If I change the root password in the root shell window aspasswd rootI can change it, but when I go into the user shell window, and I do "su" I cannot switch to root. Always "incorrect password".Same happen if I try to do "su <some-other-user>"This happen ONLY in shell windowws. If I try, for example, to run some administration service, like system-config-service, the root password is accepted in the prompting window.
MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.
I can't switch to shell with ctrl+alt+F1. The screen gets completely blank and nothing happens - though I can switch back to the GUI by pushing ctrl+alt+F7 again.I really miss having this option!
I'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?
I am trying to write a .sh script that will source a file containing evnironment variables and then open a konsole terminal session that will have those settings.
Is it possible to manipulate the selection of network proxy through shell script?
to
What happens How to change the selection of "Default" to "Something" through shell script? What I am trying to say is, I have created a new location called "Something" with HTTP Proxy as proxy and port as 8080. If I am at my home, I use "Default". If I goto my college, I should change it to "something". How to do this via shell script?
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.
Code: if [ $# -eq 0 ] ; then d=`pwd` for i in * ; do if test -d $d/$i ; then echo "$i:" code....
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
Code:
>>> import subprocess >>> help(subprocess) ... [pages of stuff to read] ...
I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.
I am trying to open VNC ports(5901,5902) on my RHLinux machine using iptables. I am able to do it from GUI system-config-security. Go to the Administration > Security Level and Firewall, then select "other ports" at the bottom and enter the portNum 5901 to open and select tcp, then click OK and OK again to save your settings. From my windows m/n iam able to open vncsession using vncviewer on 5901 port.But when I am trying to do it from command line:#iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPTThis command added the entry in /etc/sysconfig/iptables and listed in iptables -L command.Then I saved and restarted the iptables.#service iptables save #service iptables restartWhen I am trying to open the VNC session from vncviewer, it is giving me error and session not opened.Is there some thing I missed here? where can I check the logs for this? I definetly need
I've created a simple script based menu. This menu will be accessed by only a certain users via ssh.When user logs in, the menu will automatically run. (configured at user's .bash_profile).How do I force the session to close when user hits Ctrl-C or Ctrl-Break ?In a nutshell, I don't want user to have access to shell.
I recently "upgraded" to the latest skype and now every time I open an interactive root shell, up pops skype. I can close skype then control-C in the terminal window to get the shell I want, but this is annoying to say the least. Maybe my google-foo is off, but all I can find is articles on how to run skype as root, which is no use. I've tried searching the startup files for "skype" (case independant), but so far all I can find is "LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ /usr/bin/skype" in the root .bashrc which shouldn't be starting the app.
I have a situation where I am in a non-interactive shell. I have tried from within my non-interative shell to spawn an interactive shell but my output still does not goto me. Isn't there a way I can somehow go into /proc or somwhere and make the output my /dev/tty1? Or some way else to remedy this?The situation arises because I drop from my restricted shell environment (a sort of CLI interface), into the actual Linux shell. I cannot change the code of the CLI environment I am just faced with being in the linux shell environment and its non-interactive. Its very annoying to have to put > /dev/tty1 after every command I type.
Not to mention it seems damn near impossible to get pagers like more and less to work properly when your in a non-interactive shell.
I am using Red Hat Linux Enterprise version 5. I've noticed people sometimes running commands with a couple of & options. For example, in the below command, there are two & signs. What is the purpose of them? Are they always used together with nohup?
I was working on a shell and got some weird exceptions in my program.Just as a reference, I want to save all that is there on my shell to a text file. I do not just want the command history but also all the results that those commands produced at the shell.Is there some built-in utility to do this? I have kept the shell open for now, so that I can take the backup. Also, I am using xterm and it does not allow selecting all the way upto the top of the shell, so the ultimate way is to take the backup one screen at a time.
I was wondering if it is somehow technologically possible for Windows to add some sort of Linux interface? I think it would win over many programmers to develop on Windows.
I've had my prompt change whenever I :sh (:shell) out of VIM, but can't for the life of me remember how?. The idea is to change the prompt to something like [SH] <your usual prompt here>, so that I know that VIM is running in the background.. I often logout of the shell, because I think VIM is open.