Programming :: Bash Script To Start Gnome Terminal?

Apr 8, 2010

I want to write a bash script which can open a new gnome-terminal window.
In that gnome-terminal window, it should goto a specific directory and edit a file using Vi Editor.

How is it possible to do that?

View 7 Replies


ADVERTISEMENT

Ubuntu :: Bash Broken, Lost Functionality In Terminal (gnome-terminal)?

Dec 10, 2010

Linux-goers. I did some research on this, but I am still fairly new to Linux. In Ubuntu 10.10 (Maverick), I accidentally overwrote my "/bin/bash" file. Dude, using "sudo" with a small typo can work disasters. Bash is now broken in the Terminal (gnome-terminal). Terminal itself still works fine, technically, but bash is still hosed/broken. Here is what I did to try to fix it: Booted from Ubuntu 10.10 live CD. Mounted my Ubuntu partition and manually copied the good/fresh "bash" file onto my hard drive. Verified copy was successful. Didn't help, as you see. Reinstalled "gnome-terminal" using synaptic package manager. Tried to reinstall bash via synaptic, it failed with error, "E: /var/cache/apt/archives/bash_4.1-2ubuntu4_i386.deb: subprocess new pre-removal script returned error exit status 2"

In Terminal, all basic commands work as far as I can tell. ("ls", "pwd", navigation, etc.) Here are some problems:My "username@computername" does not display in the prompt; only the $ sign. Bash keyboard shortcuts such as uparrow and tab do not work. Instead, each inserts a key code. I can't even move the cursor left/right. Aliases (a function of bash and .bashrc) are broken, of course. My sanity level decreases when I use Terminal now. For what it's worth, even with "sudo" I get a "permission denied" error when trying to run Google Chrome! I read something about a ".bashrc" file being a possible problem, but I don't know how to make it work, or the file's proper locations in Ubuntu 10.10. Is there something I can do with a "make" or "apt-get install" command or something?? Could this simply be a permissions problem? Is the link to "/bin/bash", "/bin/sh", or a ".bashrc" file broken? Guide me, oh Linux gurus.

P.S. I always wondered what exactly bash was and how it was different from the basic terminal. LoL, this is an excellent way to demonstrate the difference, and I WANT IT BACK!

View 9 Replies View Related

OpenSUSE :: Gnome Terminal: How To Get The Bash Shell

Mar 17, 2010

i've finally got a NIX environment...yipee! Installed opensuse 11.2 in a dual boot with windoze with no problem whatsoever. unfortunately, my NIX skills are sadly dated or maybe things have changed or both. in any case, i have a rather trivial problem that i have not been able to figure out.

i go to gnome terminal to get to the bash shell, no problem except when i do things like cat, less and so on. the commands do what they do then when done the last line output is "some text" and "(END)" - at the completion of the command it does not return to the bash shell. i've tried ctrl-everything, enter, escape, actually all keystrokes i can think of to get back to the bash shell...no luck. man and docs have not been helpful or i simply missed the answer (i'm a little saturated at this point).the only thing i've been able to do to solve my dilema is close the terminal an start a new instance, not elegant but works.

View 8 Replies View Related

Ubuntu :: Creating A Text File To Start Up Sudo Bash Without Going To The Terminal?

Feb 26, 2011

I just set up apache on my PC and I cant change the permissions by right clicking because "I'm not the owner" and instead of using the chmod command on every file that I would like to edit I would just like to write a script on a text file, save it to my desktop so all I have to do is double click on it and boom I can edit all my files, etc.

View 2 Replies View Related

OpenSUSE :: Gnome Terminal At Kde Start?

Apr 26, 2011

I installed gnome 3.0 through the one installer, and now every time I start kde I get a gnome terminal that says
Code:

** (orca:4321): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'
** (orca:4321): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'
** (orca:4321): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'

It keeps shrinking everytime I try to expand it a bit, I had to edit > select all and copy to be able to read it. And it sounds like it's trying to play a sound that sounds like welcome, but it gets cut off, it also makes a sound when closing it. I'm assuming this was supposed to be a first time run thing for gnome but it keeps showing up in kde.

View 4 Replies View Related

General :: Gnome-terminal/bash - Cancel Inserted Commands That Will Be Executed Later?

Mar 13, 2011

$ execute_some_long_command <command is executing> <Accidently press middle button that inserts bunch of garbage (including, for example, `rm -Rf ~/*`) into console>

How to let execute_some_long_command finish, but not execute inserted things?

View 1 Replies View Related

OpenSUSE :: Start A Gnome-terminal From Firefox Url?

Aug 14, 2011

Does anyone knows how to start a gnome-terminal from firefox url? With a protocol or something? Is this possible? Or any other command line.

View 4 Replies View Related

Software :: How To Start GNOME Terminal As Root

Sep 17, 2009

How can I start the GNOME terminal logged in directly as root? I would be interested in a panel launcher, or a launcher in the applications menu.
My distribution is Fedora 11 x86_64.

View 12 Replies View Related

Fedora Networking :: Cannot Start GNS3 Gnome-terminal In F13

Nov 18, 2010

I've tried to access the console in vain. Every time I try to, I get this message

Quote:

Cannot start gnome-terminal -t R1 -e 'telnet 127.0.0.1 2000' > /dev/nul/2>&1 &:No such file or directory

Then i decided to use the xterm client instead. But still didn't work

Quote:

Cannot start xterm -T R1 -e 'telnet 127.0.0.1 2000' >/dev/null 2>&1 &: No such file or directory

The last option I had was using Kconsole (linux kde) but still it doesn't work. And i get the same error message

Quote:

Cannot start /usr/lib/kde4/bin/konsole --new-tab -p tabtitle=R1 -e telnet 127.0.0.1 2000 >/dev/null 2>&1 &: No such file or directory

View 2 Replies View Related

General :: Start Server With GUI (kde/gnome) To Terminal By Default?

Jun 13, 2011

I've set up home server, which doesn't have to be as powerful as other servers, so I decided to install GUI because of applications that are alternatives to classical GUI applications in headless version requires more skill/knowledge. However, I don't want server to run GUI always at start (which gnome-desktop package does). I need some configuration in KDE/gnome/xfce (haven't decided) that doesn't start GUI after each start (e.g is required to type startx or equivalent command to start GUI)(off topic: can you also recommend good remote-administration with GUI transport ?)

View 1 Replies View Related

Ubuntu :: Keybinding To Fokus Gnome-terminal Or Start A New One?

Jun 14, 2010

I was just wondering if this was possible without using guake or yakuake or the like: I have a shortcut (alt+shift+c) to open a gnome-terminal window. (done via compiz keyboard commands)However, what if I wanted it to fokus a gnome-terminal (specific?) if one(it) exists and only start a new terminal, if it isn't already running? I looked up and down the compiz settings, not seeing anything to help me focus a specific window.

View 1 Replies View Related

Ubuntu :: Gnome-terminal Require Password At Start?

Jul 9, 2010

I'm usingg Ubuntu 10.04. When i start gnome-terminal (from terminal or gui) at the first i see invite to enter sudo pass: Terminal window is opening and i see the string:

[sudo] password for tenhi:

Yesterday i changed .bashrc file and some settings in User and Groups management.

View 3 Replies View Related

General :: Start Up Gnome Desktop From Remote Terminal?

Jul 27, 2009

I looked around for threads addressing this issue and some have come close to answering it, but I have yet to see a definitive yes or no. Anyway - Here's my issue:

Background:
I can SSH into my home computer (Ubuntu 9.04 running Gnome) from work (Win XP Pro) using RealVNC via Putty tunnels. This has been working flawlessly for me for awhile now. I was messing around in the terminal window and accidentally rebooted the linux box (home computer) while I was at work. No big deal I thought. So I re-start the Putty connection, and it is back up in no time. Then I try to start the VNC connection, and no go, connection refused. I remember seeing that in order for the VNC connection to work, I had to be logged into the Gnome desktop already on the Ubuntu box.

Question:
Is it possible to log in and start up a Gnome desktop session from the terminal command line in Putty so I can get the VNC connection back?

View 8 Replies View Related

CentOS 5 :: Can't Find The Start Command For Gnome From Terminal

Jan 11, 2010

I can't find the start command for Gnome from Terminal.

I tried:

start gnome
startx
start gne

Nothin is matching. In the Documenation is no help from console.

View 7 Replies View Related

General :: Start Gnome-disk-utility From A Terminal (as Root)?

Feb 8, 2010

I have a real newbie question. I want to edit my disk partition table. Mount some drives etc. I like gui tools and gnome's disk utility seems to be able to do everything I want to. My problem: When I want to create a new filesystem on an empty space, I'm not allowed to. I guess I need root access, but I can't login as root to my gnome session and I know no way to start the disk utility from a terminal where I'm the root user, so my question is: How do I do this?

View 3 Replies View Related

Programming :: Write A Bash Script To Call From A Terminal?

May 24, 2010

I am trying to write a bash script to call from a terminal that will change the terminal title. I am using ubuntu 10.04. The script is meant to be used in the gnome-terminal.

Here is what I have:

Code: #! bin/bash
echo "New title: c"
read title
echo "33]0;$titl07c" -e

[Code]....

it doesn't work

I think the problem has to do with modifying PS1 inside the bash so i tried this:

Code: echo `export PS1="[e]1;u@h:wa]${debian_chroot:+($debian_chroot)}u@h:w$ "` and it still didn't work.

View 1 Replies View Related

Programming :: Run A Command On A Separate Terminal In A Bash Script?

Apr 6, 2011

I'm trying to do something here:: I'm writing a bash script, I want to [open a new terminal and run a bash command in it] inside the script. I tried to use this, but apparently I get syntax errors.

Quote:

#! /bin/bash
echo "echo Something" > ~/Second.sh
chmod +x ~/Second.sh
xterm -e sh -c ./Second.sh

View 14 Replies View Related

Programming :: Referring To The Current Terminal In A Bash Script?

Dec 22, 2010

I've got some bash scripts that I'm testing which operate on different screen sessions under different usernames. In order to check the status of them, however, I have to attach the screen sessions to my current terminal.

I run into problems, though; I only allow SSH to my machine from one username; the others shouldn't need SSH access. So, I log in as one user, and su into whichever user I need. Without performing a chmod o+rw on the terminal before I su into a different user, screen complains that it can't reattach to my terminal, because the user trying to make it attach doesn't have the permissions to do so.

Seeing as I forget to do this a lot, I wanted to make a script that I'd run on log-in to do this for me. Unfortunately, I don't know if there's a bash variable that refers to the current terminal - I can't always guarantee that I'll be logging in to /dev/pts/0, especially if my internet connection gets cut and I leave a hanging terminal...

Is there a variable for that or a way to refer to it in a script? If not, how do I work around that?

View 4 Replies View Related

Ubuntu :: Gnome-terminal In Startup Programs Doesn't Start At Login?

Mar 16, 2010

Every time I start Ubuntu, I set up an ssh session to a server. In order to automate this I made an entry in startup programs like this:/usr/bin/gnome-terminal -e '/usr/bin/ssh name@server.com'Nothing happens when I log in, and I've checked that the command works.

View 2 Replies View Related

General :: Gnome-terminal Is Starting Up In - Konsole And Xterm Start Up In ~ As Desired

Aug 2, 2010

For some reason my gnome-terminal is starting in / when it should be ~ I have checked /etc/profile, ~/.bashrc and /etc/passwd and everything seems fine as far as i can tell Konsole and xterm are starting up with the working dir to my home dir (as set by /etc/passwd) But im at a loss to see where gnome-terminal is starting in / if i enter cd with no argumants in gnome-terminal it is switching to ~ fine, so i dont think its mistaking my home dir for /

View 2 Replies View Related

Installation :: Ubuntu Boots To Terminal Type Prompt / Command To Start Gnome From That?

May 26, 2010

Since upgrading ubuntu boots to a prompt rather than logging into gnome. has anyone run into this? what can I do to fix this?
I recently upgraded from Ubuntu 9.10 to Ubuntu 10.4.
does anyone know the command to start gnome from the prompt?

View 4 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):

#!/bin/sh

clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

Ubuntu :: Bash Script - Start A Process Then Close Terminal With In The Script?

Jan 1, 2010

I have got a bash script i have been playing with I need to start a process then close terminal with in the script but leave program running ?

Code:
#!/bin/bash
sudo ifconfig eth0 down
sleep 5
sudo ifconfig eth0 up
firefox & exit

View 9 Replies View Related

Programming :: Invoke Java From Bash Terminal Via Shell Script Fails Under Mint Debian / Fix It?

Feb 16, 2011

I am running a Java application on the command line bash terminal under Mint Debian. I have JDK1.6.0_22 installed 64-bit, and the OS is 64-bit too. I have a few JAR files in the directory and a few native LWJGL libraries. When I run the application using the command line, all works fine.
Lets assume my directory where the files are is called /home/riz/MyGame. I change to that directory and this is the command I use code...

View 3 Replies View Related

Programming :: Make A Bash Script Start Automaticly When System Restart?

Apr 4, 2009

ia have this script
#!/bin/bash
if [ -e /tmp/mysql.pipe ]; then

[code]...

View 3 Replies View Related

Programming :: Get Name(s) Of File(s) Selected In Window Manager (gnome 2.32) In Bash Script?

Mar 12, 2011

Is there any way to get the name(s) of the file(s) selected in the window manager (gnome 2.32) in a bash script?

View 7 Replies View Related

Programming :: Launching Interactive Gnome-terminal With A Command (and Not Exiting)

Oct 13, 2010

I want to have a script (tcsh/bash/python) that launches a bunch of gnome-terminals (or 1 with multiple tabs). And I want it to execute a command, but keep the shell interactive. Currently, if you type gnome-terminal then it launches a new interactive shell, but if you give it the execute flag, then it executes the command and quits (or stays open, but non-interactive depending on the users gnome-terminal settings).

I have this command which I want to run automatically before I start working. What the command does is dynamic and different for each shell. It takes arguments. So it's not something I can take care of in a .cshrc type file.

View 3 Replies View Related

Programming :: Open Gnome Terminal (pass Commands ) On Clicking Glade Button

Dec 18, 2010

I am working on a small project for making a small configuration tool for ubuntu 9.10 for new linux users, that make their system working easily without knowledge of the linux commands.I created a gui in glade and loaded the gui with my python program to show up, now i wish to have some python codes that can launch a gnome terminal (and also pass some linux commands to it) on the click of a button contained in the glade file.

View 1 Replies View Related

Debian :: Change Dragora Bash Terminal To Default Jessie Terminal

Feb 29, 2016

I mainly use debian jessie , recently i have installed daragora as my second os to get a feel of gnu/linux . the problem is that dragora uses bash , and it's commands are different from debian jessie terminal is there a way that i can use the same commands here in dragora?

View 4 Replies View Related

Ubuntu :: Terminal Bash / -bash: Ls: Command Not Found

Jun 5, 2011

I got a problem with terminal, since i'm really a noob with terminal i don't know how to fix it.Everytime i type in a command it shows for example:

-bash: ls: command not found

Even the basic commands don't work... just cd <directory> and those things works

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved