gnome-terminal

Prevent Gnome Terminal From Exiting After Execution [duplicate]

梦想的初衷 提交于 2019-12-17 07:39:31
问题 This question already has answers here : Avoid gnome-terminal close after script execution? (7 answers) Closed 4 years ago . How do you prevent gnome-terminal from exiting after its given command has exited? I'm calling gnome-terminal from a cronjob, in order to create a terminal accessible to the user. The terminal is initially given a specific program to run. e.g. gnome-terminal --tab -e "/usr/bin/myprog" This works fine, except that when "myprog" exits, so does the gnome-terminal. How do I

How to prevent inputs being flushed into output?

♀尐吖头ヾ 提交于 2019-12-14 00:32:14
问题 I'm on Ubuntu. When I run ghci on Terminal and do this: Prelude Control.Monad System.IO> forever $ getChar >>= print The result is something like this: a'a' b'b' C'C' %'%' \'\\' 1'1' ''\'' "'"' ^X'\CAN' ^?'\DEL' ^CInterrupted. That is, the characters I type in my keyboard are being flushed into output. How can I prevent this and have only print as the writer? 回答1: To prevent input being flushed into the output (or "echoed"), use hSetEcho stdin False. Prelude> import System.IO Prelude System

How to execute a Nautilus script written in Python inside a gnome-terminal window that stays open?

百般思念 提交于 2019-12-13 03:14:49
问题 Lets say I want to execute a simple Python script from Nautilus , the default file manager of GNOME : #!/usr/bin/python3 print("Hello") Of course the aim is to interact with selected files in Nautilus , but I want to keep it simple. I save the script to the folder ~/.local/share/nautilus/scripts/ and then I can execute it from the right click context menu: How can I execute this nautilus script inside gnome-terminal and keep the terminal opened at the end of the script? 回答1: I have found that

Open gnome terminal programmatically and execute commands after bashrc was executed

可紊 提交于 2019-12-12 07:12:15
问题 I try to build a little script to start my development environment. For that task I try to open a gnome terminal with several tabs where automatically the rails server and autotest is started. But gnome-terminal --tab -e "rails server" --tab --tab does not work ("error creating the child process"). Also gnome-terminal --tab -e "bash -c \"rails server\"" --tab --tab` does not work. Any suggestions how to solve that problem? 回答1: Here is a nice trick we worked out at Superuser Add a eval "$BASH

How to change VIM cursor shape while in different modes in Gnome Terminal

帅比萌擦擦* 提交于 2019-12-09 03:29:19
问题 I would like to change VIM's (not gVIM's) cursor depending on what mode I am currently in. I would like: Normal & Visual modes = block cursor Insert & Command modes = I beam cursor I tried adding the following code to .vimrc but it did not work. if has("autocmd") au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam" au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default

gnome-terminal new tab with alias as command to execute

末鹿安然 提交于 2019-12-07 08:10:53
问题 I've created an alias in .bashrc file as follows alias myproject = 'cd ~/Desktop/myproject' After saving the file when I restart my terminal, typing in myproject takes me to the project directory but when I try to use the alias as a command argument to a new gnome-terminal tab it throws an error, gnome-terminal --tab -e "myproject" throws the error There was an error creating the child process for this terminal Failed to execute child process "myproject" (No such file or directory) What is

zsh tab completion bug on ubuntu

与世无争的帅哥 提交于 2019-12-07 00:18:07
问题 I'm getting a really annoying bug here: % git s<TAB> becomes % git sgit s send-email -- send collection of patches as emails send-pack -- push objects over git protocol to another repository ... It just duplicates the command. If I resize the screen, it goes back to normal: git s How do I fix this? 回答1: I got it! Darn. It's my prompt instead of: PS1=$'%B%F{$fg[green]%}${PWD/#$HOME/~}%{$reset_color%} git-prompt ${VIMODE} ' I should just do PS1=$'%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color

How can I open Google Chrome from the terminal with the URL “localhost:3000”?

拥有回忆 提交于 2019-12-06 20:05:57
问题 Whenever I try to open Google Chrome with the URL "localhost:3000" it messes up and simply opens a blank tab with no URL. After some testing I've figures out it is the ":" messing it up. This works: $ google-chrome www.gmail.com but this does not work $ google-chrome localhost:3000 nor this $ google-chrome "localhost:3000" How can I open Google Chrome with this URL? I am using Ubuntu, bash script, and the gnome-terminal. 回答1: Have you tried? google-chrome http://localhost:3000 回答2: Got the

grabserial stops printing the log?

邮差的信 提交于 2019-12-06 08:53:52
i tried Grabserial to measure the startup code of my embedded Linux device. It works somehow but after a while (that means a longer startup code - talking about > 26 s) it stops printing out the messages, but grabserial still is running - i have to hit the [CTRL-C] to retrieve control. I checked the serial port with putty and it's working so it's a problem with grabserial. But i can't think of what it is. I downloaded and installed with both of the 2 install-variants and it just changed the look-and-feel but stucks at the same point. Does anyone ever had the same problem ? Greets [edit:] i

gnome-terminal doesn't work maybe because of locale setting

老子叫甜甜 提交于 2019-12-05 14:09:25
I installed Antergos (easy version of Arch) with the Japanese environment. But I wanted to chaned the language to English, so I reffer the wiki article then run some commands after uncomment #en_US.UTF-8 UTF-8 in /etc/locale.gen and edit /etc/locale.conf into following: LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL= The problem starts from