New answers tagged

0

Usually terminals allow text selection with the mouse, but the shell is not made aware of this. So unfortunately neither bash, zsh, fish nor es can support mouse-based editing. I think to do so, they would need to take greater control over the terminal. However (and this is a bit of a stretch) if you open Vim or GVim, and then enter shell commands using: ...


2

for IF in *.* ; do OF="${IF%.*}.txt" ; mv -n $IF $OF ; done


0

in Lxterminal (default terminal in Lxde ), you can fully customize shortcuts:


1

A search online yields this issue with the paper theme and this issue with the numix theme. Apparently it is caused by your icon theme no longer fully supporting the current version of GTK that you are using. The developers of both themes replied that updating GTK or using an older version of the theme will fix the issue. However, it seems that this ...


0

Simple way may be also just to run System Monitor (if started from Terminal you must write gnome-system-monitor) and under "Processes" tab arrange the running processes by Name and than count the number of occurrences of Bash in the listing (they will be all together if you arrange by name, so it's easy to count). Note that you must look for Bash and not ...


2

The option to set the terminal title has been deprecated in 16.04 LTS, however there is still a way to set the title. Edit your ~/.bashrc file and add the following lines: # function to set terminal title function set-title(){ if [[ -z "$ORIG" ]]; then ORIG=$PS1 fi TITLE="\[\e]2;$*\a\]" PS1=${ORIG}${TITLE} } After that close and reopen the ...


0

Press CTRL+ALT+T and type in unity - Once you've pressed Enter on your keyboard, it should prompt you to login. Login, and hopefully you will see your Unity desktop! In my opinion, the Unity desktop environment, including the launcher, is very organized and clean. I use the Gnome Tweak Tool and I use the Oxygen theme (GTK) to provide extra cleanse to my OS. ...


1

Open a terminal and type unity and hit return, after you have your desktop back close the terminal and reopen it normally. Actually i have the same problem on my second computer but i do this direct after boot up and have then menu bars everywhere. As far i know this is a known bug and a fix is in the making, just couldn't find the link anymore.


0

As command substitutions are performed by the shell, you have to execute your command as an argument to the shell: gnome-terminal -x /bin/sh -c "youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 $(xclip -o)"


0

A few terminal emulators (not including gnome-terminal) support the escape sequence ESC [ 2 t to minimize the window: echo -ne '\e[2t'


0

About xdotool xdotool lets you programatically (or manually) simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions. How to minimize active terminal window using xdotool You can minimize the current active terminal window like that xdotool ...


0

By using gconf-editor and dconf-editor. Open both editors and manually update all settings you want. Since you say that you want migrate only some settings this might be your only option. By writing small application / script that reads settings from gconf and then sets them in dconf.


5

If you really need to get the number of terminal you have open, go for counting the files owned by you under /dev/pts (although this might include ones opened by background processes, not by graphical terminal emulators). Alternatively, count the number of child processes of your terminal emulator(s), as shown by Jacob in the first line of his response. ...


1

An awk way: who | awk 'BEGIN{count=0}{ if(NR!=1){count++} }END{print count}' Explanation: In above 1 liner command, awk is used to find the count of terminal. Inside awk program, it is just checking the number of lines return by who command - 1.


5

In a single user situation, if we take the example of xterm, we can simply count the number of pids of xterm; xterm creates a separate pid for each and every window. gnome-terminal however runs a single pid, but the good news is that it creates a child process for each and every window and/or tab. we can retrieve these child processes by the command: pgrep ...


13

Running who -u will give you something like this: user@system:~$ who -u | grep pts user pts/4 2016-05-20 07:39 . 13897 (:0) user pts/5 2016-05-20 08:06 . 29505 (:0.0) user pts/6 2016-05-20 08:07 . 29505 (:0.0) pts are opened terminals. Counting those lines is also easy, just run who -u | ...


1

I needed to work out what DHCP server I was connected to via Ubuntu 14.04 so I used this command: nmcli dev list|grep DHCP4 as this is what I wanted only from the original command "nmcli dev list" DHCP4.OPTION[1]: expiry = 1464073312 DHCP4.OPTION[2]: domain_name = [omitted_proper_details] DHCP4.OPTION[3]: broadcast_address = 10.1.45.255 ...


3

There is no config file. The gnome-terminal manages all its settings through dconf (or gconf in old Ubuntu releases) which is comparable to the Windows registry. It's a binary file optimized for quickly reading its values, you can not edit or view it manually like a text document. If your dconf-editor or whatever tool you're trying to use is not working, ...


2

In bash's primary prompt ($PS1) all non-printable characters (e.g. escape sequences that change the color) have to be enclosed between literal \[ and \]. Similarly, for all other readline-based apps, such as gdb, non-printable characters in the prompt need to be enclosed between a 0x01 and a 0x02 byte. You can refer to these in .gdbinit as \001 and \002.


0

http://ubuntuforums.org/showthread.php?t=1479239 Looks like there's a full post on customizing various classes. Unfortunately, aside from looking at the source code and going through it, it doesn't look like very many people have created a list for the specific classes that can be used in the CSS file. With a bit of looking around, at least for the issue ...


0

I don't think there's such a file: such a setting doesn't show up at all, neither in gnome-terminal's preferences nor in gnome-terminal's profile preferences. However, even though you can't directly set how gnome-terminal starts, you can always set how your system invokes gnome-terminal: cp /usr/share/applications/gnome-terminal.desktop ...


1

You can use command line options to launch the terminal window with desired settings. In codeblocks : Go to Settings > Environment > General Settings. Change the "Terminal to launch console programs" option to : gnome-terminal --geometry=WIDTHxHEIGHT+XOFF+YOFF -x +XOFF : The left edge of the window is to be placed XOFF pixels in from the left ...


0

Use Ctrl+PageUP and Ctrl+PageDown (annoying, but it is what we have).


0

For gnome-terminal, the terminal title is set via PROMPT_COMMAND which is defined in /etc/profile.d/vte-2.91.sh. PROMPT_COMMAND, as defined in this script, does two things: changes the terminal title using the OSC 0 escape sequence (\033]0;NEW_TITLE\007), changes the terminal's notion of the current directory using the OSC 7 escape sequence ...


0

This will work for you open ~/.bashrc . Find the line that says: PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" Comment out this line, by putting a # character in front of it: # PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" Now add this line (you may want to put it just after the commented-out line): ...


2

Fixed by setting Hinting to Slight in Gnome Tweak Tool.


0

You can take a peak at the processes who list your shell's PID as parent. As you may or may not know , we can specify ps format SHELLPID=$$ ; ps -e -o cmd,pid,ppid | awk -v shell=$SHELLPID '$NF~shell' Here, we get the shell's PID from special variable $$ into SHELLPID , which then can be used by awk in pipe's subshell. Essentially we're just listing ...


2

If you started some process in terminal (eg. gedit) than the Process ID (PID) (of bash) and Parent Process ID (PPID) (of gedit) will be the same for this two processes will be the same. This can be seen in the output of ps -ef command. To make it more readable lets first "pipe" the output to grep to find the PID of all "bash" processes and than take only ...


0

gnome-terminal does not let you redefine the escape sequences, so no, there's nothing you could do there. In other terminal emulators this might be possible, however, you'd have to create your own escape sequences and configure both your terminal emulator and your emacs accordingly, and it won't be compatible with anyone else's setup.


0

Actually I was able to fix it myself. It started when I added a new ppa to my software sources and overwrote the default version of cmake. I removed the ppa and reinstalled the default version of cmake and the problem went away. For further information, this is what I did to cause the issue, and I simply undid it to fix it: ...


0

You can also turn on the menu bar with this command in terminal: gnome-terminal --show-menubar It helped me to solve this problem, so I'm posting it here. I hope it will be useful for others.


1

You can edit ~/.bashrc and apply the change yourself. Open up ~/.bashrc and look for the following line: #force_color_prompt=yes Remove the # from the beginning of the line and save. You will have to source the file for the change to apply. If you reboot everything should work. If you want to change the colour as well, see this: Changing colors for ...


0

You can download the debian package from this link http://packages.ubuntu.com/xenial/gnome-terminal and simply install it with dpkg or ubuntu software center if you have problem with the dependencies you can do sudo apt-get install -f for fixing it.


0

It's TerminalWindow .notebook .button . This works for me: @define-color bg-grey #222; @define-color active-grey #333; @define-color border-grey #555; TerminalWindow .notebook { border: 0; padding: 0; color: #eee; background-color: shade(@active-grey, 1); } TerminalWindow .notebook tab:active { border: 1px solid @border-grey; background-color: ...


0

If you can't get to the terminal at all. You can always use 1 of the 6 tty sessions. In all Linux distributions, ctrl+alt+F1 will open the first tty session. You can login from there an use it just like the gnome terminal. Then, take a look at the link below. similar problem Follow the steps in the answer. It looks like the same problem you are having.


0

I have no idea why the errors read the way they did, but by pure luck I did author a functioning code... It goes like this: Plugin #!/usr/bin/env python3 import sys exec(sys.stdin.read()) -Shortcut key: Alt+R ---or whatever you're comfortable with -Save: Nothing -Input: Current selection(default to document) -Output: Display in the bottom pane ...


2

Based on the way Chrome is designed to be self contained, there likely isn't any way to make an extension to do this. However, most newer Linux users don't seem to know that if you highlight text with your mouse, you can middle-click and paste it anywhere else. So you can just highlight the text in the browser and middle-click it into your terminal.


0

For Ubuntu 16.04, create a file named ~/.config/gtk-3.0/gtk.css, and place the following into it: TerminalWindow .notebook tab:active { background-color: #b0c0f0; } Credit: http://eli.thegreenplace.net/2014/highlighting-the-active-tab-in-gnome-terminal/


1

How to make a new terminal window, initiated by Ctrl+Alt+T open on the currently active screen? Although Very much related to this one, not a dupe, and it requires a completely different solution. Your question is specific to gnome-terminal, and you are using a shortcut to start the application. These two make a background script unnecessary, and ask for ...


0

Try to install unity-gtk3-module. It helped some people on the internet.


0

There's another way to do this, tested and working on Ubuntu 16.04 LTS: First install gnome-panel: sudo apt install gnome-panel Then install gksu: sudo apt install gksu After installation is complete, run: gnome-desktop-item-edit ~/Desktop/ --create-new This creates a desktop shortcut. You should have the option to name it. I called mine 'X-Term' ...


0

Looks like it's a confirmed Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=408007


0

Here is how I do it! 1.Download the Tilda. 2.Set up the Tilda to your preferred position. 3.In Compiz, configure the Window Rules as follow. Image of window rules 4.Add a startup option Image of startup application settings 5.You are done!!!


0

All sorted. Turns out that some of the files in the default python package were missing. I used the following: sudo apt-get -m --reinstall install python python-minimal dh-python sudo apt-get -f install


0

Well i found a solution finally!( How stupid problem) :( At first , i was created the file (test.py) with nano. My first command was #!/bin/usr/python then i saved my file. Every time i wanted to change the code i opened the test.py with the editor and i wrote the code there, then i just opened the terminal writing "python test.py" to run my script. This is ...


1

Such file: #!/usr/bin/env python3 x = 50 def func_outer(): x=2 print('x is '), x def func_inner(): nonlocal x x=5 func_inner() print('the local x changed to '),x when run as ./file.py yields no errors with python3.5 on Ubuntu 16.04.


1

PDF is not a normal text file. You shouldn't cat it anyways. There are programs for reading a PDF.


0

Many programs that exist for creating a bootable Linux installer on a USB stick don't work very well with Ubuntu. UUI is one of the wordt, and LiLi isn't much better. Using Rufus has fixed a lot of issues for those trying to install Ubuntu from a flash drive. Use that instead.


1

Entering reset should fix it again.


2

The cursor move speed is related to your keyboard's repetition rate you can use kbdrate to change it but it will change it globally. sudo kbdrate will give you the current settings Usage: kbdrate [-V] [-s] [-r rate] [-d delay] I'm not really sure on this .. didn't look into it but I found that the delay is the time before the repeating starts and ...



Top 50 recent answers are included