Tag Info

Hot answers tagged

5

If you want to display running time in your terminal you can use this command. It will display time in the upper right side of your terminal. while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-11));echo -e "\e[31m`date +%r`\e[39m";tput rc;done & But note that displaying time using this command sometime may overlap the text present in terminal. So ...


4

The default terminal emulator on Ubuntu is the GNOME Terminal. It's located at /usr/bin/gnome-terminal and can be run with the gnome-terminal command. What You Really Want What you probably want is a shell running as root, as though it were produced from a root login (for example, with all the environment variables set for root rather than for your user). ...


4

You can run gnome-terminal disabling the factory mode. This will prevent it from starting a terminal connected to an existing terminal, so that the command does not return immediately: gnome-terminal --disable-factory echo Done. # Will only run after the terminal opened above has been closed From man gnome-terminal: --disable-factory Do not ...


3

If all you want to do is show a clock, just use date: while :; do date +%r; sleep 1 ; done That will show the time every second until you stop it with CtrlC. If you want it to be on the same line (the above will print a new line every second), do this instead: while :; do printf '%s\r' "$(date +%r)"; sleep 1 ; done


3

Short answer: gksudo gnome-terminal (assuming gksu is installed) opens a terminal as root: root@jacob-Satellite-L300:~# No need to explain that you can use this to open any terminal as root like this; like Vala (gksudo vala-terminal), Xterm (gksudo xterm), Termit (gksudo termit), UXTerm (gksudo uxterm), Konsole (gksudo konsole) and so on.


3

This is normal because when you run a Wine application it actually loads other apps to work together, each is it's own parent (not related) and each creates it's own childs. So to effectively kill all Wine related processes you need to use the wineserver command that comes with wine. Instead of sudo kill -9 wineAppProcessID you would run wineserver -k The ...


3

Edit your .bashrc, change PS1 to: PS1='\u:\w\$'


2

Go to System settings and select Language Support app then do the steps like in screen shot:


2

If terminal has only one shell process, I cannot see a problem. read __ __ TERM_PID < <(xprop _NET_WM_PID) &&\ SH_PID=$(ps --ppid "$TERM_PID" -o pid=) kill -STOP "$SH_PID" Works for XTerm, should work for GNOME Terminal too, I believe. Otherwise – if there may be more than one shell running under single terminal process (in several windows, ...


2

You could have your C program write its output to a text file and have the second terminal watch that text file using tail -f myfile.txt


2

If the output produced by your scripts is very important to you (to look for error, warning, actions that were run and so on), then you shouldn't rely on the display of the console you're using. You have to redirect the output of your scripts to some files, this has advantages : you are no more bounded to the number of lines in the scroll buffer of the ...


2

RGB colors can not be used in the terminal for these reasons: Bash does not choose the commandline colors. Bash can only specify ANSI colors. The two above reasons are very closely linked. Most of these are dependant on your screen and ANSI color specification. If you use a good terminal emulator, you might be able to set custom RGB colors for certain ...


2

Go to System Settings -> keyboard -> shortcuts. Click on + to add a custom shortcut.Name it anything. In the command box type gnome-terminal -e "path_of_script". Make sure your script has executable permission. Also if you want your gnome-terminal should remain open after executing the script, add read at the last of your script.


2

You're probably welcome to submit a fix The fact that they are not useful to you does not mean they have no use. Try command 2> /dev/null.


1

It's as simple as this: sudo -i Update: Seems like you want to get into root automatically whenever terminal is opened. Well, I'm not going to give you a lesson about security, but instead will provide you a solution: Get rid of password when doing sudo: sudo visudo And add following line (replace username with whatever you need): username ...


1

The Read-only file system error is the major clue here. I would guess that your home directory, where bash tries to store your command history and so forth, is inside a read-only partition. I would guess that it tries to update your recent command history on disk once every 32 commands, which is why it's failing on the 32nd command you type in a session. ...


1

This is because of a small mistake in the command: gnome-terminal --title="abvtrm" --geometry 80x10-0-0 will go to there - see the -0-0 gnome-terminal --title="abvtrm" --geometry 80x10+0+0 will go to the top - see the +0+0. man X | grep corner Thanks @pandya gives the following: four corners of the screen using the following specifications: ...


1

Alternatively follow the command: gnome-terminal --title="abvtrm" --geometry 80x10+1366+768 (Here I used +1366+768 because of my screen resolution is 1366x768). If your screen resolution is (let) n1xn2; then use it as follows: gnome-terminal --title="abvtrm" --geometry 80x10+n1+n2 This will give output of opened window at bottom+right! For quickly ...


1

Edit your ~/.bashrc file. I prefer editing it with nano, so nano ~/.bashrc Here's the portion of my own edited file: if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\$' else # PS1='${debian_chroot:+($debian_chroot)}[*\u@Ubuntu*]:\w\$ ' ...


1

I really like the ncmpcpp clock feature, triggered by 0-key (see screenshot). For more detail on the installation procedure, please refer to this post.


1

From this answer, the color palettes list is hardcoded, so you can't edit it. But you can simulate that list with bash script files, where each file is a color palette. This awesome project might help to build these scripts: 4bit Terminal Color Scheme Designer


1

You can change this in ~/.gitconfig by adding the following under the section labeled [core]: [core] editor = emacs -nw


1

Have you tried using env to run the shell in a custom environment e.g. /usr/bin/env HISTIGNORE='*' /bin/bash from the gnome-terminal Title and Command tab? This seems to work for me - although I can't help feeling there's a more efficient way that doesn't involve testing each command against the wildcard.


1

That's because gnome-terminal is "clever". When you fire up gnome-terminal, it will determine if another instance of gnome-terminal is already running. If no, it creates a new gnome-terminal process and spawns a window. If yes, it will simply cause that existing gnome-terminal process to spawn a new window. Therefore, all gnome-terminal windows run as a ...


1

LC_TIME=si_LK affects your time output. Try: LC_TIME=en_us ls -l To make permanent changes, edit your /etc/default/locale.


1

The http does syntax coloring naturally. To set a bash prompt like this one, add the contents of this file to your ~/.bashrc. It is an adaptation of the prompt from this SO answer. I have changed the colours, added couple more colour variables and parentheses.


1

As there are no keys for changing the font size in the keyboard shortcut preferences, I assume "zooming" the font size is not supported. You can change the font size in the preferences tab "Appearance", in the place where you choose the font. As a workaround, you could directly change the configuration on gconf level. The UI will directly use the changed ...


1

To expand a bit on the comment by muru, running graphical problems with sudo can sometimes lead to problems like this. sudo runs the program as the root user account, but the program still believes that user's home directory is your regular home directory. Thus it'll end up creating files in your home directory, but under the root user. This will result ...



Only top voted, non community-wiki answers of a minimum length are eligible