Ubuntu default terminal not working

I have the new Ubuntu 19.04, I tried writing some alias and it’s my first time however the aliases did not work so i cleared them, I think in the process I might have tempered with the .bashrc file, so on trying my terminal after that point it comes up and goes off, in a couple of milliseconds, downloaded powershell and works fine however I’m not comfortable with it. Any way to fix the .bashrc file without having to reinstall the OS?

copy paste issue in Windows powershell/Ubuntu terminal of Windows 10

I am trying to use Ctrl+Shift+v or c to copy and paste multiple lines on text, as usual, we do in Ubuntu. However, suppose when I try to copy and paste multiple lines; for eg: if I write 3 words on 3 separate lines and then copy all of them and paste them say on the 4th line, the words get pasted (so now, on the 1st three lines I have the original words and on the next three lines I have the copied words). But now when I come on the 4th line and press ‘End’ key, I go directly to the end of 3rd copied word while I expected to be at the end of the 1st copied word itself. How can I fix that?

Nautilus error message when launched from Bash (Gnome) terminal

When the Nautilus file explorer is launched from the command line, the following error sometimes occurs:

Nautilus-Share-Message: [TIME]: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory) 

The bash terminal shows a strange extra line and you must either hit SPACE or Ctrl+Z to exit when you are returned to the normal Gnome prompt.

This happens with all of the following:

* `nautilus --browser` or `nautilus --browser PATH` * `gnome-open .` or `gnome-open PATH` * `gio open .` or `gio open PATH` 

The error does not appear every time:

1) Typically, the error does not occur at all

2) Sometimes Nautilus is launched, the cursor returns to the prompt briefly, and then the error appears a fraction of a second later. In this case, when Terminal is closed, the Nautilus file explorer stays alive.

3) Sometimes the error occurs before the Nautilus file explorer is displayed. In this case, if Terminal is closed a box pops up warning that closing Terminal will also terminate another blocked process. When Terminal is closed, the Nautilus file explorer is also terminated.

Looks like a timing issue. Any ideas what is causing this?

How can I clean up devices such as `media*` or `tty*` under `/dev` properly from terminal?

I am running Ubuntu 18.04.2 LTS and seem to be suffering from a kernel bug (reference: https://www.spinics.net/lists/linux-media/msg135812.html), which leads to the problem that I now have media0media255 all occupied under dev, which in turn leads to the following problem (media: could not get a free minor):

dmesg | tail -13 

[ 5068.870529] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c)
[ 5068.911713] uvcvideo 2-5:1.0: Entity type for entity Extension 4 was not initialized!
[ 5068.911716] uvcvideo 2-5:1.0: Entity type for entity Extension 3 was not initialized!
[ 5068.911717] uvcvideo 2-5:1.0: Entity type for entity Processing 2 was not initialized!
[ 5068.911719] uvcvideo 2-5:1.0: Entity type for entity Camera 1 was not initialized!
[ 5068.911722] media: could not get a free minor
[ 5069.249598] usb 2-5: USB disconnect, device number 56
[ 5069.556176] usb 2-5: new high-speed USB device number 57 using xhci_hcd
[ 5069.767923] usb 2-5: New USB device found, idVendor=0c45, idProduct=670c
[ 5069.767929] usb 2-5: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 5069.767934] usb 2-5: Product: Integrated_Webcam_HD
[ 5069.767938] usb 2-5: Manufacturer: CN09GTFM7248753ABDZMA00
[ 5069.779009] uvcvideo: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c)

Although this bug has been fixed, it looks like it’s not yet back-ported to my LTS version (for reference: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1836654, entry media: uvcvideo: Fix driver reference counting).

My questions now are however:
1) how can I clean up these media controller devices (device controller nodes) manually (ideally from terminal) in a proper way?
2) in general, how can I figure out which items under /dev are inactive / obsolete and purge those?


Additional information:

Under /sys/devices/pci0000:00/0000:00:14.0/usb2 it keeps trying to add but afterwards removing a 2-5 directory.

Under /sys/dev/char I have lots of broken links of two sorts now:

lrwxrwxrwx 1 root root 0 Aug 15 09:52 13:256 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/input/input42/event256
lrwxrwxrwx 1 root root 0 Aug 15 09:52 13:257 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/input/input43/event257
…………
lrwxrwxrwx 1 root root 0 Aug 15 09:52 13:495 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/input/input281/event495
lrwxrwxrwx 1 root root 0 Aug 15 09:52 13:496 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/input/input282/event496


lrwxrwxrwx 1 root root 0 Aug 15 09:52 241:0 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/media0
lrwxrwxrwx 1 root root 0 Aug 15 09:52 241:1 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/media1
lrwxrwxrwx 1 root root 0 Aug 15 09:52 241:10 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/media10
…………
lrwxrwxrwx 1 root root 0 Aug 15 09:52 241:98 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/media98
lrwxrwxrwx 1 root root 0 Aug 15 09:52 241:99 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-5/2-5:1.0/media99

Then there is also /dev/char and /dev/input

Just in case, I am running on a DELL XPS13 9343.

Ubuntu terminal ssh and use session to auto create tabs and open defined log files

I have created a keyboard shortcut that initiates an SSH session to my server which works as expected and there is no issue with that.

However, to enable faster access to multiple log files I have resorted to opening multiple terminals with the same command, this means several terminals each with its own ssh session.

What would like to happen is to have just one terminal/ssh session and open each log file under a separate tab.

How would you approach this?

The current keyboard shortcut I use is:

gnome-terminal -x ssh server1r 

Where server1r is a just a predefined ssh configuration in ~/.ssh/config

Keyboard shortcut to kill uWSGI process in mac terminal

WSGI app 0 (mountpoint='') ready in 5 seconds on interpreter 0x56549c79e7d0 pid: 12 (default app) uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***  *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 12) spawned uWSGI worker 1 (pid: 20, cores: 1) 

The above is the output on my terminal after the docker run command to run a flask API. I can open another terminal and use docker exec command to test the endpoints. But, how can I kill the process running in the terminal of uWSGI process? Ctrl+Z, Ctrl+Q, Ctrl+X, Ctrl+C, Cmd+Q, Cmd+X, Cmd+Q, Cmd+X doesn’t work.

Also, please share if I am making any naive mistake here in the process?

Delete from gnu Grub terminal

I had a partition on my computer for a while. Recently I wanted to delete it. So I deleted the partition of Ubuntu on my windows computer. The thing is that I did it the wrong way. I just deleted it and reset my computer to the fabric settings. But when it started resetting, the gnu grub terminal appeared. Now I don’t know how I can go back to windows system or how can I just delete Ubuntu from the grub terminal