linux-image-virtual packages empty in 14.04 trusty?

The linux-image-* packages that don't contain a kernel version number in their name are metapackages (see also this question). They work by providing no software directly, but instead always declaring the latest stable kernel provided for your Ubuntu release as a dependency. (Here's some more information on what dependencies are in general.)

This causes new kernels to be installed automatically when they are available (and does so without removing older kernels, so you can boot with an older kernel if something is broken for you in the newer one).

With all that said, the kernels linux-image-virtual causes to be installed are (currently) the same ones as with linux-image-generic. That is, in recent releases such as 14.04, Ubuntu no longer provides separate kernels for VMs. (But linux-image-virtual still gives you a kernel and causes updated kernels to be installed; you don't have to install any other metapackage to make that happen.) Ubuntu 12.04 does have separate virtual kernel packages.

There is still a difference between linux-image-generic and linux-image-virtual, and that is that linux-image-generic pulls in some extra kernel modules that may be considered nonessential, by depending not only on the latest linux-image-<VERSION>-generic package, but also the latest linux-image-extra-<VERSION>-generic package. In contrast, linux-image-virtual depends on linux-image-<VERSION>-generic but not on linux-image-extra-<VERSION>-generic.

This fulfills (at least part of) the goal of having "the virtual machine kernel" be more lightweight.

Considering this, you might be confused by how a linux-image-extra-virtual package still exists, even in Ubuntu 14.04. This works simply by declaring the linux-image-generic metapackage as a dependency. Back when linux-image-extra-virtual depended on actual linux-image-extra-<VERSION>-virtual module-providing packages (i.e., back when such packages existed, such as in 12.04), it installed what was then a separate virtual kernel, plus the extra modules. Now there's no separate virtual kernel, so all linux-image-extra-virtual needs to do is install the extra modules, which is achieved by making sure linux-image-generic is installed.

linux-image-extra-virtual is actually a transitional package in recent Ubuntu releases; it really only exists anymore so that old systems (e.g., 12.04) with linux-image-extra-virtual have the necessary packages installed after being upgraded to newer systems (e.g., 14.04).

Sources:

Embedded links to entries in the http://packages.ubuntu.com database.
Comment 1 for bug 1222278 by Adam Conrad, explaining the current difference between the -generic and -virtual kernel metapackages.

There's a lot of documentation that hasn't been updated to reflect that linux-image-virtual and linux-image-generic provide the same kernels, in recent Ubuntu releases, which is why I've provided links to packages.ubuntu.com to show the dependency relationships explicitly. (There's a slight bit of information in this question. Somewhere there are Ubuntu or Debian release notes that explicitly address this in more detail, I think.)

  Or is the whole thing deprecated now?

That may be considered an accurate description of what has happened. The key point, though, is that this is not related to there being no actual kernel files provided directly by linux-image-virtual; the linux-image-generic metapackage doesn't provide them directly either.


Move panel to the bottom in GNOME Shell 3.18.4

I am not sure what you call the panel. If you want to change the position of the top bar, you can install this extension:

https://extensions.gnome.org/extension/898/mmod-panel

Concerning the left menu bar (the Dash), you can install the Dash to Dock shell extension:

https://extensions.gnome.org/extension/307/dash-to-dock

You can then configure both through the Gnome Tweak Tool, in the 'Extensions' tab, or through the web interface.


Not able to install Android studio IDE in Ubuntu 18.04.1

Try to install it from snap, not from Ubuntu Application Store.

If you don't have snap installed, first install it:

sudo apt install snap

Then install android-studio:

sudo snap install android-studio


how to setup NAS drive on ubuntu desktop 16.04?

Just install samba and you are ready to go

sudo apt-get update
sudo apt-get install samba

Then you'll need to edit the conf file accordingly /etc/samba/smb.conf

This should be very basic config to start with:

# Global parameters
[global]
    workgroup = HOME
    netbios name = SAMBA
    server string = Samba Server %v
    map to guest = Bad User
    log file = /var/log/samba/log.%m
    max log size = 50
    security = User

# My share
[share]
    # Path to your share
    path = /home/user/samba
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755


How to migrate user settings and data to new machine?

User settings are stored in the Home folder by design. So, if you copy your /home/your-username to your new computer, you should be fine...

...but there are caveats:

Permissions. It is common that "programs" (shellscripts, custom build programs) are put in the home folder. To preserve permissions, use the --preserve=mode switch (using cp) or -p (using tar)
UserID / GroupID. Even if the usernames are equal on both systems, the user ID do not have to. Usually, this is not a problem, but if you've scripts/programs/settings relaying on the UserID, you should make sure that the user ID and group ID should be the same on the target system.
You can find the current userID and groupID by executing id. For example, to change the userID of user "your-username",  run sudo usermod --uid 1234 your-username. To change the groupID, you have to run sudo groupmod --gid 1234 your-username.

Settings (Firefox profile, appearance, ...) are often stored in hidden folders (or files). Hidden folders/files are prefixed with a dot, like .mozilla for Firefox (and other Mozilla applications).

As security is not an issue, and you want to have the copying job done as fast as possible, I suggest a combination of the netcat and tar programs. Both applications are installed by default. Make sure that the firewalls on both computers allows ingoing access to destination port 8888 (source computer) and outgoing to destination port 8888 (target computer). Put the nettop next to the computer so you can run the commands quickly.

On the source computer, you need to have the traditional netcat program installed (a.k.a. Swiss Army Knife, not the BSD one). To do so, install the netcat-traditional package. You may also want to configure the traditional netcat program as default. Commands to install netcat-traditional and use it as default:

sudo apt-get install netcat-traditional
sudo update-alternatives --set nc /bin/nc.traditional

On the source computer, type the next command in a terminal (do not press Enter yet):

 tar cz -C/home $(whoami) | nc -l -p 8888 -w 10

Explanation:

tar is an utility for packing files
cz creates such a packed file ("tarball")
The tarball is compressed using the GZip algorithm to lower the file size.
-C/home $(whoami) changes the working directory to /home and puts your username folder. Alternative, you can type your your-username folder in the tarball
nc (netcat) is used for setting up connections between machines easily
-l: Listening mode, allows other machines to connect to the current machine
-p 8888: Listens on port 8888 (randomly chosen number, it could be any other number higher than 1024 as well)
-w 10: quit netcat after 10 seconds silence. You must connect to this source computer within this time.

Now go to the target computer (nettop). To add the files to the target machine, type (do not run it yet):

nc 192.168.1.2 8888|tar xzp -C/home

192.168.1.2 is the IP address of the source computer. To get its IP address, run: ifconfig on the source machine
8888 is the port number as entered on the source machine
xzp: extracts the GZip-compressed tarball while preserving permissions.
-C/home: extracts the your-username folder to /home/your-username
Optionally, add the -v switch to the tar command for verbose extraction, so you can get an idea of the progress. This could slow down the copy process because every file has to be printed.

Now go to the source computer, press Enter to run the server command. Quickly switch to your nettop and press Enter to run the client command.

If you have any questions, just use the comment field below.


fglrx works on Ubuntu 12.10 (32-bit), but not Ubuntu 12.10 (64-bit) on the same computer. How do I fix it on the 64-bit install?

Solved!  Log in, and when Unity refuses to load, follow these steps:

Press Ctrl+Alt+T to open up the terminal.
Run sudo apt-get update, type your password, then hit enter.
Run sudo apt-get upgrade
Install any packages that report that they weren't installed.  You can do this by running sudo apt-get install PACKAGENAME
Repeat steps 2 and 3 until no packages are installed by step 3 and no packages report that they weren't installed.
Run sudo reboot

And you're done!  fglrx should work as intended.


Grub problem in uninstallation of Ubuntu in Windows 8

Thank you but my boot problem is solved. I had to install Ubuntu once again. This way I got the boot files back in the hard drive space. Then I used Boot Repair to repair my grub and then followed the uninstallation process. It is crucial while uninstalling that you first delete grub using command prompt in Windows and then delete Ubuntu from the drives. Also rebooting PC after removing grub is important.


Suddenly a new mounted volume appears, how to remove it

On your screenshot it is clearly shown that this filesystem is mounted on a file that has been already deleted. Probably uninstalltion of phpstorm for some reason did not unmount the snap before deleting the snap file. After you reboot the system everything should be resolved.


First install pavucontrol:
sudo apt install pavucontrol

Start it:
pavucontrol

Choose in Configuration the appropriate device and adjust the volume.
alternatively, you can also use
pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo+input:analog-stereo

You can find the exact name of your card (here alsa_card.pci-0000_00_1f.3) by running:
pacmd list-cards


Before creating file system, you have to partition the image and in your case to be a primary partition with bootable flag


Parallel printing not supported on 12.04LTS

Please make sure the lp, ppdev, and parport_pc kernel modules are loaded, open a terminal and run the following commands:

sudo modprobe lp
sudo modprobe ppdev
sudo modprobe parport_pc

More information: https://wiki.ubuntu.com/DebuggingPrintingProblems#Parallel_port_printer


GNU GRUB v2.02 on System restore on Windows 10

What has probably happened is that you no longer have grub/stage2.  Your have eliminated the partitions which were installed for dual boot, when you went back to Factory settings.

However, you can probably easily boot into windows.  You still have grub (apparently).

First, you can list the partitions on your machine:

grub> ls

You will probably see something like (hd0, msdos1) (hd0, msdos2)

Then, you can type something like the following at the grub prompt

set root=(hd0,msdos2)
chainloader +1
boot

(you can experiment with the various partitions -- on my Windows 7 machine, msdos1 goes into a diagnostics boot)

Now, if this gets you into Windows, you can use it temporarily (or permanently) to boot your machine. If it doesn't, you could make a grub rescue disk, giving you a more completely functioning grub.  This would be a dvd, cd, or flash drive.  It would boot into a grub which would have additional modules (like "insmod ntfs").

Then, you have two choices.  You can learn about Windows Repair, which probably has a way to rewrite the boot-strap loader -- but be careful, because it will overwrite grub.

The other choice is to make space for Ubuntu on your hard drive (by reducing the size of your partition) -- I would use "Computer Management" tools in Windows to resize your main partition. You don't need much space to have a minimal Ubuntu -- see the installation notes.

Then, you can install Ubuntu, which will give you a dual boot system, working grub and grub stage 2 which will allow you to boot into Windows more gracefully.

Additional useful commands for grub are:

set pager=1
help


All software center mirrors are not working?

I've solved it by disabling the proxy.

Go to System Settings, then Network, Network proxy and on method chose None.


Installing hplip 3.19.8 fails with errors about dependencies on Ubuntu 18.04

Using the latest hplip version that's available for download just didn't turn out to work for me.

Switching to specifically using the approach of using the apt managed version by the steps of this specific answer, solved it. It seems that the plugin step is really necessary and not mentioned as part of the process in other places I've looked at.


Script Remove All hardlinks for a specific file

You can use ! with the path to the original file to exclude it:

$ find . -samefile bar
./baz
./bar
$ find . -samefile bar ! -path "./bar"
./baz

The path must match what find outputs, so use absolute paths if you search from /.

Notes:

find has a -delete command
If combining with xargs, use -print0 and -0:

find  . -samefile bar ! -path "./bar" -print0 | xargs -0 rm

Use stat to get the inode number directly:

$ stat -c '%i' bar
257643


VirtualBox inside LXD cannot communicate with LXD's host

I had a similar problem (though slightly different scenario than yours) and I finally got it solved.

I think when there ara 2 bridges, the first is the lxd bridge and the second is the one virtual box creates, you join them through a tuntap device.

Here are the details

scenario:

ubuntu 16.04 with:
lxd 2.0 (with lxdbr0) and several containers in it
virtualbox machine

In my virtualbox configuration, I made available network adapter and connected it to bridge adapter, choosing lxdbr0. It seemed to work, but then I found the same trouble that you did, couldn't ssh to ubuntu host, couldn't ssh to lxc containers (on same bridge) and so on...

After searching on the internet (sorry I can't provide the links) I found this solution.

On ubuntu 16.04 machine, with root privileges:

root@ubuntu:~# ip tuntap add mode tap tap0
root@ubuntu:~# ip link set tap0 up
root@ubuntu:~# brctl addif lxdbr0 tap0
root@ubuntu:~# brctl show

bridge name bridge id       STP enabled interfaces
lxdbr0      8000.4e76f4d676d5   no      tap0

Once you have your tap0 added to the bridge, you can set up your virtualbox machine "bridge adapter type connection" to connect to tap0 (which is already in the other bridge).

It seems that you should bridge to an interface instead of bridging to a bridge.

In you scenario, you should create the tap0 in your lxd-box. This tap0 will be added to 2 bridges, the one on lxd and the other on virtualbox.


I went to Tqsl in XP, saved a P12 certificate and then successfully loaded it in the Ubuntu Tqslcert and It fixed the issue.


Why did I get two Ubuntu One cloud icons in the tray after the 13.04 upgrade?

You have the old indicator-ubuntuone package and the new indicator-sync as well. Remove the indicator-ubuntuone package by running sudo apt-get purge indicator-ubuntuone and restart your session, to have it go away.

The indicator-sync is the new system synchronization indicator, and the only officially supported indicator for Ubuntu One.


The best way to evaluate if your system is compatible with Ubuntu is to boot from a liveCD/USB. Just burn the .iso image file to a DVD, boot-up your system and see what happens :-)


phpenmod mcrypt and phpenmod mbstring return errors

Install them first:

sudo apt install php7.0-mcrypt && sudo apt install php7.0-mbstring

Then enable them with:

sudo a2enmod mcrypt
sudo a2enmod mbstring

Update

Based on the extensive research I believe a bug exist that prevents your php cli working well with php mcrypt.

Source:

Can't use PHP extension Mcrypt in Ubuntu 13.10 (Nginx, PHP-FPM)

php is not working well on ubuntu 13.10 and mcrypt is missing in phpmyadmin

To confirm that mcrypt is enabled in apache follow these steps:

Create a php file called info.php put this code in it:

<?php echo phpinfo(); ?>

Put the file in /var/www/html or your server root
Access it from the brower at say IP/info.php or localhost/info.php
Look at the out and you will find that mcrypt and mbstring are enabled

As you can see, its enabled in apache, but inaccessible from php CLI hence the error messages.
To confirm its working [as I have this problem also] I did the following:

installed prestashop application, and since one of the requirements of prestashop is php mcrypt it would have thrown an error and refused to proceed if mcrypt was not enabled on apache.

Simple put based on your the if your apache information page displays these modules as enabled then it is. The error seen are a result of php CLI having issues with mcrypt which has been noted to be a bug. Seen in earlier versions of php but now present in php 7


How do I set VLC media player as default video player?

Go to System Settings → System info → Default Applications, and set it there. It works in Ubuntu 11.10 (Oneiric Ocelot).

In Ubuntu 13.04 (Raring Ringtail) and later, it's found in System Settings → Details → Default Applications.


Ubuntu customization kit, not opening gnome-terminal, help please!

Try to change

 CONSOLE_APP=`which gnome-terminal`
    CONSOLE_APP_OPTIONS=(-T "UCK customization console" -e /bin/bash)

TO

CONSOLE_APP=`which xterm`
    CONSOLE_APP_OPTIONS=(-e /bin/bash)

in /usr/lib/uck/customization-profiles/localized_cd/customize
.
Works for me.


It's still beta quality software, in my opinion. But then again, I'm known for being very critical when it comes to software I'm using daily. It is much more stable than Ubuntu 11.10, I have experienced no overheatings this time, and my battery life has been multiplied by 3. Unity 2D finally is as good as on par with regular Unity.

Overall, Ubuntu 12.04 has gained some great improvements. I'd suggest you switch over to Ubuntu 12.04, or if you really need stability, wait for Ubuntu 12.04.1. Don't upgrade though, just backup everything and do a fresh installation (A regular installation! Not with experimental headache software like Wubi!).


How to install RecordMyDesktop in Ubuntu

I understand that you are in the following page,

Click on the orange color button. You get the following window,

The above actually wants to open the application xdg-open. Click at the bottom right button, for Launch Application. You get the following window in Ubuntu Software Center.

Click on Install. The rest of installation proceeds without any problem.

As an alternative, you may want to proceed with the preferred command line installation process. Press Ctrl-Alt-t, you get a terminal window.

Type

sudo apt-get install recordmydesktop gtk-recordmydesktop

Press Enter. Provide password if asked for, the installation automatically will proceed from here.


How to find out which executable is invoked when starting a program using the GUI launcher?

Find the desktop launcher in one of these 2 locations:

/usr/share/applications/
~/.local/share/applications

The Exec line is what is executed so ...

grep Exec audacious.desktop

(random example) would show

 Exec=audacious %U
 TryExec=audacious


How I can create a shortcut to maximize/minimize windows in Lubuntu?

Here are some keybindings I use for window control on Lubuntu/LXDE. The first binding is what you're searching for but I thought you might find the other ones useful as well:

<!-- Keybindings for window tiling -->

    <keybind key="C-W-Up">        # FullScreen
      <action name="Maximize"/>
    </keybind>
    <keybind key="C-W-Down">        # MiddleScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>center</x><y>center</y><width>50%</width><height>50%</height></action>
    </keybind>

    <keybind key="C-W-Left">        # HalfLeftScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
    </keybind>
    <keybind key="C-W-Right">        # HalfRightScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-1">        # UpperQuarterLeft
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-2">        # LowerQuarterLeft
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>-0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-3">        # LowerQuarterRight
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>-0</y><height>50%</height><width>50%</width></action>
    </keybind>

    <keybind key="C-W-4">        # UpperQuarterRight
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>50%</height><width>50%</width></action>
    </keybind>

You might have to tweak the percentages based on whether you use a panel or not.

C-W-Up means CTRL + SUPER + ↑


Please Try, "sudo apt-get update", "sudo apt-get upgrade", "sudo update-manager -c" and let me know if you see it.


Lirc not running, yet the remote can control the desktop. Through what?

Quite likely your remote is used as a keyboard. I don't know any real useful docs for how to configure it but /lib/udev/rules.d/95-keymap.rules and the files in /lib/udev/keymaps/ may give you some idea about how to do it.


Unable to setup a pxe server on Ubuntu VM (Virtual Box)

1G network card may let you connect both laptop using a direct cable. But for some 100M network cards and most old ones you have to use a crossover cable.

I'm not sure about this, but i have noticed that sometimes  DHCP daemon get killed when network connection drops while reboot/reset of the client machine, I would recommend placing an Ethernet switch between the two machines.

If you don't have switch, here what I used to make it works:

Power on VM PXE server
Power on PXE client machine
Wait to get no IP error
Restart DHCP service in VM PXE server
Try Reset PXE client machine multiple times till it gets an IP (don't power off, some brands accept Ctrl+Alt+Del for reset)


Your problem is that you are using sssd with Samba and shares. You now need to run winbind with your setup and shares. The problem is that you cannot use winbind with sssd, this is because sssd uses its own variant of some of the winbind libs and they are not compatible with the Samba ones. You can continue to use sssd with Samba, but only for authentication, no shares and it needs to be setup to use idmap-sss.
This all started from Samba 4.8.0, I suppose I should also mention that sssd doesn't do NTLM.
I suggest you read this samba wiki page:
https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Domain_Member


Headless Ubuntu MATE Raspberry Pi 3 Install?

Here is the answer from the Ubuntu MATE official site

  SSH

  Since Ubuntu MATE 16.04.2 the OpenSSH server is disabled by default.
  If you want to enable SSH you can use raspi-config to create a file
  called ssh on the /boot partition and reboot.


Permit only Admin users to mount Windows partition

Check your /etc/fstab file, the mounting permissions are in there, it sounds like a user like has been added for those filesystems you wish to be root mountable only.

The manual page has more info

https://linux.die.net/man/8/mount


xmbc is a great alternative. Before I switched to Ubuntu, I had been using it even on Windows in place of the Media Center.

http://xbmc.org/


Bootloader doesn't show other OS post-install of Ubuntu

I doubt that grub2's os-prober reads the Solaris file system or its boot loader. Grub does have .mod files for many file systems and if you add the correct driver (if one) you may get it to work.

You may be able to just chain load to the Solaris install.
 Adjust for your drive & partition number (hdX,Y).

menuentry "Solaris 11 {
    set root='(hd1,2)'
    chainloader +1
}

There are ufs.mod  and xfs.mod files in grub, you may need those like this before the set root.

insmod ufs


script -c "/path/prog" /path/log.txt

Sometimes shell redirecting does not work (specifically - when one shell spawns another shell, I think:). Above is the generic solution that simply grabs all the shell output and places it into the file. In your case this should work as well, since you're expecting output on stdout/stderr.


How to block specific ip address while being attacked by hping3?

Your method to test and demonstrate the functionality of your iptables rules will not work. Your hping3 generated packets do not have the SYN bit set, and therefore ultimately get DROPed, either by iptables rule or because nothing else knows what to do with it either.

If you modify your hping3 command to include the SYN flag, and if you have sshd listening to port 22, you will get a reply, and have the starting conditions for a test. Example (in my case 192.268.111.112 is running hping3 against 192.168.111.122)(I slowed things down also):

doug@s15:~$ sudo hping3 -c 5 -d 300 -w 64 -p 22 --syn --interval 5 s18
HPING s18 (br0 192.168.111.122): S set, 40 headers + 300 data bytes
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=0 win=64240 rtt=1.9 ms
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=1 win=64240 rtt=1.8 ms
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=2 win=64240 rtt=1.7 ms
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=3 win=64240 rtt=1.6 ms
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=4 win=64240 rtt=1.5 ms

--- s18 hping statistic ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.5/1.7/1.9 ms
doug@s15:~$

Over on the destination computer I had tcpdump running. Observe the tcp connection beging created via SYN and SYN ACK handshake. hping3 then resets the connection, whereas bad guys might not.

doug@s18:~$ sudo tcpdump -n -tttt -i enp3s0 host 192.168.111.112
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
2020-01-08 14:09:38.393919 IP 192.168.111.112.2728 > 192.168.111.122.22: Flags [S], seq 1675527679:1675527979, win 64, length 300
2020-01-08 14:09:38.393980 IP 192.168.111.122.22 > 192.168.111.112.2728: Flags [S.], seq 1494575109, ack 1675527680, win 64240, options [mss 1460], length 0
2020-01-08 14:09:38.394213 IP 192.168.111.112.2728 > 192.168.111.122.22: Flags [R], seq 1675527680, win 0, length 0
2020-01-08 14:09:43.394019 IP 192.168.111.112.2729 > 192.168.111.122.22: Flags [S], seq 1382198395:1382198695, win 64, length 300
2020-01-08 14:09:43.394068 IP 192.168.111.122.22 > 192.168.111.112.2729: Flags [S.], seq 3357751063, ack 1382198396, win 64240, options [mss 1460], length 0
2020-01-08 14:09:43.394318 IP 192.168.111.112.2729 > 192.168.111.122.22: Flags [R], seq 1382198396, win 0, length 0
2020-01-08 14:09:48.394156 IP 192.168.111.112.2730 > 192.168.111.122.22: Flags [S], seq 2046908564:2046908864, win 64, length 300
2020-01-08 14:09:48.394204 IP 192.168.111.122.22 > 192.168.111.112.2730: Flags [S.], seq 922870032, ack 2046908565, win 64240, options [mss 1460], length 0
2020-01-08 14:09:48.394457 IP 192.168.111.112.2730 > 192.168.111.122.22: Flags [R], seq 2046908565, win 0, length 0
2020-01-08 14:09:53.394252 IP 192.168.111.112.2731 > 192.168.111.122.22: Flags [S], seq 2005387083:2005387383, win 64, length 300
2020-01-08 14:09:53.394307 IP 192.168.111.122.22 > 192.168.111.112.2731: Flags [S.], seq 1168444666, ack 2005387084, win 64240, options [mss 1460], length 0
2020-01-08 14:09:53.394547 IP 192.168.111.112.2731 > 192.168.111.122.22: Flags [R], seq 2005387084, win 0, length 0
2020-01-08 14:09:58.394361 IP 192.168.111.112.2732 > 192.168.111.122.22: Flags [S], seq 1346771824:1346772124, win 64, length 300
2020-01-08 14:09:58.394415 IP 192.168.111.122.22 > 192.168.111.112.2732: Flags [S.], seq 1213532639, ack 1346771825, win 64240, options [mss 1460], length 0
2020-01-08 14:09:58.394651 IP 192.168.111.112.2732 > 192.168.111.122.22: Flags [R], seq 1346771825, win 0, length 0

Anyway, do the test again, but this time introduce the iptables rule during the hping3 command. Notice the replies stop. I only did one of the two methods you used, sudo iptables -A INPUT -s 192.168.111.112 -j DROP :

doug@s15:~$ sudo hping3 -c 5 -d 300 -w 64 -p 22 --syn --interval 5 s18
HPING s18 (br0 192.168.111.122): S set, 40 headers + 300 data bytes
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=0 win=64240 rtt=1.9 ms
len=46 ip=192.168.111.122 ttl=64 DF id=0 sport=22 flags=SA seq=1 win=64240 rtt=1.8 ms

--- s18 hping statistic ---
5 packets transmitted, 2 packets received, 60% packet loss
round-trip min/avg/max = 1.8/1.8/1.9 ms
doug@s15:~$

And on the tcpdump side, notice the reply packets stop:

doug@s18:~$ sudo tcpdump -n -tttt -i enp3s0 host 192.168.111.112
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp3s0, link-type EN10MB (Ethernet), capture size 262144 bytes
2020-01-08 14:21:53.046185 IP 192.168.111.112.2218 > 192.168.111.122.22: Flags [S], seq 1908410534:1908410834, win 64, length 300
2020-01-08 14:21:53.046228 IP 192.168.111.122.22 > 192.168.111.112.2218: Flags [S.], seq 4143478207, ack 1908410535, win 64240, options [mss 1460], length 0
2020-01-08 14:21:53.046441 IP 192.168.111.112.2218 > 192.168.111.122.22: Flags [R], seq 1908410535, win 0, length 0
2020-01-08 14:21:58.046251 IP 192.168.111.112.2219 > 192.168.111.122.22: Flags [S], seq 1400121544:1400121844, win 64, length 300
2020-01-08 14:21:58.046289 IP 192.168.111.122.22 > 192.168.111.112.2219: Flags [S.], seq 1009904372, ack 1400121545, win 64240, options [mss 1460], length 0
2020-01-08 14:21:58.046512 IP 192.168.111.112.2219 > 192.168.111.122.22: Flags [R], seq 1400121545, win 0, length 0
2020-01-08 14:22:03.046326 IP 192.168.111.112.2220 > 192.168.111.122.22: Flags [S], seq 628135359:628135659, win 64, length 300
2020-01-08 14:22:08.046392 IP 192.168.111.112.2221 > 192.168.111.122.22: Flags [S], seq 836315746:836316046, win 64, length 300
2020-01-08 14:22:13.046523 IP 192.168.111.112.2222 > 192.168.111.122.22: Flags [S], seq 1462266142:1462266442, win 64, length 300

And we can also observe the packet counters in the iptables rule set. 3 packets dropped after 2 had been replied to, total 5, which is what was sent:

doug@s18:~$ sudo iptables -v -x -n -L
Chain INPUT (policy ACCEPT 27 packets, 2784 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       3     1020 DROP       all  --  *      *       192.168.111.112      0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 7 packets, 1272 bytes)
    pkts      bytes target     prot opt in     out     source               destination


Change 'eclipse' command to correct PATH

I bet there is a better way, and hopefully someone will provide that as an answer but here is the easy solution I would use.

Make a bash alias

Add the following line to your ~/.bashrc

alias eclipse='/home/gabriel/Programs/eclipse/eclipse'


Using Kate's terminal plugin, how can I clear the terminal's history?

Ctrl-Shift-x

Works for normal terminal and also the kate plugin :)

Oops I had originally put Ctrl-Alt... too late at night it seems


Tl;Dr:
sed -i -e '/<scale>/ s/1/2/' ~/.config/monitors.xml && sudo systemctl restart gdm

Mutter does listen to some settings in Gsettings, and after looking at the code, there is some legacy gsettings support for deprecated settings like  gsettings ui-scaling-factor. For other things, it supports using XML for configuration. You'll probably need to Alt+F2, r to restart gnome-shell for settings to apply... or figure out the dbus details from the code.

Here is my config for an old monitor... notice the  line... easy to sed

~/.config/monitors.xml
<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <transform>
        <rotation>upside_down</rotation>
        <flipped>no</flipped>
      </transform>
      <monitor>
        <monitorspec>
          <connector>HDMI-1</connector>
          <vendor>ACR</vendor>
          <product>V226HQL</product>
          <serial>T0WAA0072442</serial>
        </monitorspec>
        <mode>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>

I put together the codes above to do 200x. It works on wayland and X, but will log you out. If you can do ALt+F2,r, that would obviously be better... I tried doing it with a terminal command and just kept crashing gnome. Might use Robot.js or xdotool to send a restart command... like this

xdotool keydown alt && sleep 1 && xdotool key F2 keyup alt && sleep 1 && xdotool key r && sleep 1 && xdotool key KP_Enter

My full version for X11 swap-res.sh... this works on an ubuntu keyboard shortcut too

#!/bin/bash
File=~/.config/monitors.xml
if grep -q "<scale>1" "$File"; then
  sed -i -e '/<scale>1/ s/1/3/' "$File"
else
  sed -i -e '/<scale>3/ s/3/1/' "$File"
fi

# Unix Utils
xdotool keydown alt && sleep 1 && xdotool key F2 keyup alt \
  && sleep 1 && xdotool key r key KP_Enter

Source: https://gitlab.gnome.org/GNOME/mutter/ (quite literally, leave a star!)

SEO / Similar Questions:
Scaling Gnome login screen on HiDPI display
How do I use Mutter with GNOME Shell?
Changing UI scaling from command line


Making files generally available on Linux system (when security is relatively unimportant)?

First of all, your first two commands can be combined :

sudo chown otb:otb -R *

Not sure if this will run faster however.

Second of all, since you don't care about security on this drive, you should mount the drive specifying a umask which makes all files 777 as they are written :

user,exec,umask=000

That might help prevent the need for running your third command at all.

Additionally, since it seems that a umask option may not be available for all filesystem types, there's another way to set the default file permissions of files created when in sudo.  This is achieved by editing /etc/sudoers.

From man sudoers, the option "umask_override" appears to allow this.

umask_override : If set, sudo will set the umask as specified by sudoers without modification.  This makes it possible to specify a more permissive umask in sudoers than the user’s own umask and matches historical behavior.  If umask_override is not set, sudo will set the umask to be the union of the user’s umask and what is specified in sudoers.  This flag is off by default.

I've never used this option though, so proceed carefully.  Editing /etc/sudoers can be dangerous and require a system rebuild (or live CD intervention) if you get it wrong.


Ubuntu 12.04.3 LTS x64 only shows 2GB memory

This is almost definitely a compatibility issue. You have two 1333MHz cards and one 1600MHz card.

In theory this can work by downclocking the 1600 but this can cause issues.

Secondly  your board wants to run dual channel, so you need to fill either 2 or 4 slots not 3.

I would take out the Kingston 1600MHz stick and try with just the other two. Make sure they are correctly placed (not necessarily next to each other, put them in the same colour slots).

If this works and gives you 4GB RAM, then you can try to fill the other two, a matching Kingston stick with he current Kingston stick may work, but everything matching is best.

If it will show 4GB RAM, then you can also try and take out the cards and put the 1600MHz to see if it's not dead or something.


The file PracticalMalwareAnalysis-Labs.exe is self-extractor RAR archive. I don't have an idea why 7z or Ubuntu's Archive Manager both can't handle it properly. So you need unrar tool for Ubuntu:

sudo apt update
sudo apt install unrar

Then you can extract the content of the file by the command:

unrar x PracticalMalwareAnalysis-Labs.exe

Where x - Extract files with full path.


Node throwing "unable to verify the first certificate" error when fetching from api

The way I ended up fixing this, was by chaining my personal certificate with the intermediate certificate of the certificate authority. (I was doing it in the wrong order before)

For example, I have my sites certificate, and the intermediate certificate.

So I join them together into a chained cerficiate by putting the site one over the intermediate, like so, and now no UNABLE_TO_VERIFY_LEAF_SIGNATURE errors.


With full respect to Ubuntu developers effort, I would not recommend upgrading from 12.04 to 14.04. Instead, do clean install to avoid problems. Just do backup copy of your data, an then feel free to install fresh Ubuntu 14.04 erasing and re-partitioning whole disk.


I ran the command sudo chown -R root:root /opt/popcorntime

The 'simple' user can now play medias in Popcorn Time.


Where is the list with the wallpapers (shown in the appearance window) stored?

You will find the wallpaper files -- backgrounds in the directory /usr/share/backgrounds/ (but you already know that).
The lists of these files are found in XML files in /usr/share/gnome-background-properties/.


LTSP client image load hangs on Ubuntu 14.04 LTS

I had same issue and for days couldn't debug it. As last resort I compared working LTSP in Ubuntu 12 with broken LTSP in Ubuntu 14. There was one difference in nbd-server configuration with nbd authentication.

File:  /etc/nbd-server/conf.d/ltsp_i386.conf

Nonworking config:

[/opt/ltsp/i386]
exportname = /opt/ltsp/images/i386.img
readonly = true
authfile = /etc/ltsp/nbd-server.allow

Working config:

[/opt/ltsp/i386]
exportname = /opt/ltsp/images/i386.img
readonly = true

Then: service nbd-server restart

It has been working for couple of days without issues.

UPDATE:

The above procedure may not solve your problem (as it turned out, my problems are not solved either). I'd like to share with you some Tips that could help you debugging your problems. Still.. I'm sure that the nbd-server is causing the issue.
On the LTSP server do a command: netstat -c  or netstat -c | grep nbd . Watch what happens with the nbd connections. When client connects to nbd, the port is being opened (let's say XYZ). The connection gets status ESTABLISHED. Then reboot the client and pay attention at nbd tcp connection. It doesn't close at client shutdown. So when the second time the same client boots, the same nbd port (XYZ) is assigned to the client but that port is already taken by the clients first boot cycle. This is the reason for yout socket failed erros. For NBD specifics read:  http://nbd.sourceforge.net/ . I doesn't know why default configuration of nbd-server in Ubuntu 14 acts like this. In Ubuntu 12 default configuration was fine (i have working LTSP deployment on Ubuntu 12 for 8 months now). But theres an alternative of NFS.

NBD differs fundamentaly from NFS. Ubuntu uses NBD, but Debian still uses NFS stating it is more stable and reliable. I have no errors with client booting on Debian LTSP server with NFS.

So my advice to you is either: 1) use LTSP with Debian with default NFS or 2) use LTSP on Ubuntu but switch NBD to NFS.


Ubuntu Control Center

Ubuntu Control Center (UCC) is an unofficial application inspired by
Mandriva Control Center, designed to bring simplicity and a less
cluttered interface (because a lot of applications add themselves to
the GNOME Control Center automatically) to manage the Ubuntu system
settings for the simple user.
Besides being an application you can use to launch various system
settings, UCC also lets you switch between low and high performance
graphics cards (if you have a netbook with 2 GPUs)

Download Link : 32-Bit , 64-Bit


I found the following script at http://sirlagz.net/2013/01/10/script-wifi-checker-script/

Just create a new file vi /root/checkwanup:

#!/bin/bash

wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l`

if [ $wlan -eq 0 ]; then
/sbin/ifdown wlan0 && /sbin/ifup wlan0
else
echo interface is up
fi

Then chmod 555 /root/checkwanup
Add it to your crontab

crontab -e
*/15 * * * * /bin/bash /root/checkwanup


Identical default gateway with different metric (0 and 100) Ubuntu 12.04 Desktop

I could solve this problem by changing managed=false in /etc/NetworkManager/NetworkManager.conf


Assigning only part of a string to a variable in bash

Using bash's string manipulation:

$ a=/home/myusername/folder1/folder2/folder3
$ echo "${a#/*/*/}"
folder1/folder2/folder3

So, the string you want would be (adding back the leading slash):

b="/${a#/*/*/}"

For a variable a, ${a#foo} will remove the shortest string matching foo from the start of a. So, we remove the shortest string containing three / (including the leading slash in the path), to remove the first two components of the absolute path.


How to disable touchpad while typing in 15.10

I use Touchpad-Indicator, a very flexible app. It is not available from Ubuntu repositories, so you need to add one manually.

Latest version: add the repository with

sudo add-apt-repository ppa:atareao/atareao

Then, install as usual:

sudo apt-get update
sudo apt-get install touchpad-indicator

To obtain desired option (disable touchpad while typing), Open the program and select that option from Preferences -> Actions.

Don't forget to add the app to the startup list, so this is always enabled. You can do this within the same program, from Preferences -> General options tab.

Now it should work. If it does not work at the beginning, restart the computer/session (some users mention that as an extra step).

If it still does not work, it might be because of this bug. The workaround is to create an empty configuration file that the program is unable to create itself. This is how (using the terminal):

mkdir ~/.config/touchpad-indicator
echo '{}' > ~/.config/touchpad-indicator/touchpad-indicator.conf
sudo chmod 777 ~/.config/touchpad-indicator/touchpad-indicator.conf

Then open the program and configure it again. You can then check that the new configuration variables are inside that file.

Older version (14.04 Trusty, known to work):

If for any reason it still does not work, then try a different version of the program. First, if tried the method above, uninstall it with:

`sudo apt-get purge touchpad-indicator`

Also, remove ppa with:

sudo rm /etc/apt/sources.list.d/atareao-atareao-trusty.list
sudo rm /etc/apt/sources.list.d/atareao-atareao-trusty.list.save

Then, add this ppa:

sudo add-apt-repository ppa:baltix-members/ppa

If you are not using Trusty, then you need to change the ppa version. Go to /etc/apt/sources.list.d/, open the above ppa (called baltix-members-ppa-trusty.list) and edit the ubuntu version so that the files contain trusty as below:

deb http://ppa.launchpad.net/baltix-members/ppa/ubuntu trusty main

Then install:

sudo apt-get update
sudo apt-get install touchpad-indicator


This is your (first) issue: Operation not permitted.  This is likely because Secure Boot is enabled.  Try follwing the steps here to disable it.
 Ubuntu 16.04 - how can I disable Secure Boot?


Ubuntu Mate Mate 20.04: No Down Bar to show me what programs are open

Launch MATE Tweak (mate-tweak) and reset panel layout to Traditional.


how to partition my disk after i have installed ubuntu

You could use GParted Live to partition your storage.

http://gparted.org/download.php


The following answer gives a possible explanation.

I will quote from it :

  note that if the expansion leads to nothing, i.e. in that case if the directory contains no non-hidden files, the * is left unchanged and passed as is to the command called.

That is, it expands the wildcard character *, but when it matches nothing, it is retained as is and passed to the command called, 'echo' in this case.


Updated Windows 8, tried to fix with Boot Repair and can't pass GNU GRUB screen

You did this. Better to undo it. This is for those systems that only boot Windwows from UEFI menu, but then can only boot Windows backed up file bkpbootmgfw.efi from grub menu.
WinEFI detected. Do you want to activate [Backup and rename Windows EFI files]? yes (if any choice fails, please retry with the other)

To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.

You show grub installed to protective MBR. Were you booting Ubuntu in BIOS mode from UEFI/BIOS menu and Windows from UEFI menu in UEFI mode?

After undo of rename confirm if you can boot ubuntu entry in UEFI menu. Windows will also work from UEFI menu after undo of rename.


ls -al .* shows the contents of all directories in the current directory whose names begin with . (ie all those matching the shell glob .*)

In Bash, the .* glob resolves to . and .. as well. Since . represents the current directory, and .. the parent directory, the contents of both of these directories, including any hidden files and directories, are shown too.1

.* also catches hidden files in the current directory, but they are listed anyway as contents of .

As explained in What does `ls --directory` stand for? the -d flag causes the directories themselves to be displayed, instead of their contents.

1this is also the case in dash, which is the shell symlinked to sh in Ubuntu. However, other shells, including zsh and mksh, behave more intuitively and don't include . and .. when expanding .*. It is also worth noting that, while most commands will operate on .. and . when they are included in a .* glob (including chmod and chown - you can really mess up your system with those), the rm command will helpfully fail by design to do so.


Move and rename all files in dir to date and number

You could add a counter and achieve it like so
#!/bin/bash

d=$(date +%Y%m%d%H%M%S)

echo "$d"
counter=0
for f in *.pdf; do
    # Since you are using mv, be very sure to check it by echoing, ow, files will be renamed
    mv -- "$f" "$d-$((++counter)).pdf"

done

exit


You will have to make new USB bootable key with Ubuntu. You have to run GParted from live sesion from USB because you are trying to resize the partition that would be in use if you run GParted from Ubuntu installed on hard drive. USB live key can be done with StartUp Disc Creator in Ubuntu. As commented by @oldfred the windows partition is to be shrinked by windows tool (diskmgmt). The data should not be lost, but like always it is very recomendable to make a backup of any important data.


Take erlyvideo, it is really a rtmp streaming server, vlc is not


Ubuntu Studio Nvidia drivers compatibility

I have now tested Ubuntu Studio and can confirm that the included lowlatency kernel 4.15 works with the nvidia drivers.

Loads of special features of Ubuntu Studio totally didn't work - but the graphics did.

However the ubuntu studio installer and live usb stick does not work with an nvidia card, I had to install with my monitor plugged into my mobo's graphics and swap it after I had installed and installed the nvidia driver.

This was NOT my experience on Mint, where i couldn't get the lowlatency kernel to work with nvidia. When trying to solve that I found a number of peoples saying it is incompatible. I now think they are wrong, but don't know what my original problem on Mint actually was. (probably DKMS)


All docks cause an unsightly line through the desktop

I copy and paste from https://answers.launchpad.net/plank/+question/262027:

"Just go to 'Setting > Window manager Tweaks > Compositor' and uncheck 'Show shadows under dock windows'."

I had the same problem and now everything works fine.


Why can I not upgrade for 12.04 to 13.04?

You don't upgrade 12.04 to 13.04, at least not directly if that is what you mean. You will need first to upgrade from 12.04 to 12.10 and, if everything goes fine, you have to upgrade now from 12.10 to 13.04

12.04 > 12.10 > 13.04

To be able to upgrade from 12.04 to 12.10 you first need to go to Software Center>Edit>Sources and in the update tab enable 'Every new version'

Not really sure about xfce but you should be able to enter Software Sources with your package manager or software update settings.


The easy way to do this, is to use SSH's socks proxy. From the man page:

  -D [bind_address:]port

  Specifies a local “dynamic” application-level port forwarding. This works by allocating a socket to listen to port on the local side, optionally bound to the specified bind_address.  Whenever a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine.

Browsers can also use socks proxy. How to configure it depends on which browser you happen to use, but I typically use one browser for work over socks, and another for non-proxied work.

First, start ssh with the following command:

ssh -D1080 user@example.com

This will run ssh, creating a socks proxy to the remote host, listening on port 1080. In your browser, enter a socks proxy on localhost, port 1080. In Firefox this is located under Preferences - Advanced - Network:

This will tunnel traffic from the browser to the remote machine, and traffic will appear to be sourced from the remote machine.


How do I fix the duration of frames when using avconv?

I'm not sure where you got the -delay option from; in the manpage for avconv I have on my system it isn't mentioned.

Try

avconv -i image%d.png -r 60 ./filename.mpg

as it wasn't the only problem with your command.


Using Unikey to type Vietnamese in different Keyboard layout

Ubuntu 14.04, I'm using ibus-unikey with my French keyboard. The Solution is to modify the default English keyboard layout (QWERTY) to match my physical French keyboard layout (AZERTY).

Step 1: Modify the file: /usr/share/X11/xkb/symbols/us based on the fr file (in the same folder). The syntax is not hard to guess. I kinda copy the fr layout into it.

Step 2: Apply the change: sudo dpkg-reconfigure xkb-data. So the English keyboard will now got the French layout which matches my physical Keyboard, and ibus-unikey uses the English keyboard (welcome)

Make sure to create a backup of /usr/share/X11/xkb/symbols/us before editing it.

(voilà, I pulled out my hair for 6 hours to come up with this hack)


Keepass 2 doesn't show any files present on a pendrive

With the help of this question, I got to an answer, the pendrive must be formatted as ext4, in order to have the necessary permission to view and open the files from there.


Window borders suddenly became transparent and ugly

I think I've ran into the same issue - please check my post with the screenshot as well as provided possible scenario to resolve this.


.vbs script doesn't run gnome-terminal unless I run the program in terminal first [WSL]

Apparently adding the read command after gnome-terminal gets it to work. Now I don't need to enter the commands in a command window with every reboot to get the desktop shortcut to work.

Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "wsl 'DISPLAY=:0 gnome-terminal;read"
oShell.Run strArgs, 0, false


What does the setting "Number of Desktops" in CompizConfig Settings Manager do?

In the previous version of my answer I mixed up the concepts of viewports and desktops. What I wrote below applies to viewports, not desktops. Desktops don't seem to be supported any more, the setting in CCSM is probably outdated and doesn't do anything useful anymore. I edited my answer accordingly.

There are several ways to switch between viewports:

Keyboard shortcuts

You can switch between your viewports by a variation of the cursor keys. For example, to go to the viewport that is located to the right of the viewport you currently are on, press Ctrl-Alt-Right. To go to the viewport that is located to the bottom of your current viewport, press Ctrl-Alt-Down, and so forth.

Button in Launcher

There is a button in the Unity launcher (the bar at the left side) that allows you to switch between viewports with your mouse. The symbol shows the 4 viewports (2 x 2) that were standard before Canonical decided that having multiple viewports activated by default was confusing for people. If you click on that button, you get a "bird's eye" view on all your viewports and can simply click on the one you'd like to go to.

Other ways

Switching between viewports with the keyboard shortcuts or the launcher button are the most common methods, but there are more. I, for example, have activated one of the "active corners" to show the "bird's eye" view described above. So, whenever I move the mouse cursor to the lower right corner of the current viewport, I can switch to another one. You can configure the "active corners" with tweaking tools like Unity Tweak Tool.


I replaced pip for python 2 by installing pip3 with easy_install3 pip. How do I get pip to point at python 2's version?

/usr/bin/pip* are just python scripts.

Copy pip2

sudo cp /usr/bin/pip2 /usr/bin/pip

Edit the new /usr/bin/pip and change 'pip2' to 'pip':

sudo nano /usr/bin/pip

This is a copy from Ubuntu 14.04:

#! /usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.5.4','console_scripts','pip'
__requires__ = 'pip==1.5.4'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
    )

Well, /usr/bin/pip2 isn't in place. Purge then reinstall it:

sudo apt-get remove --purge python-pip
sudo apt-get install python-pip

To check installed files:

dpkg -L python-pip


14.10 Cannot connect to internet through a wired connection. Still trying before install

You're booting a 64-bit kernel and I think the VIA USB controller driver wants some kind of IOMMU, try booting with iommu=soft parameter. It worked for me on Ubuntu 15.04


how do I set up my sd card reader and USB flash drives?

Most SD card readers, SD cards and flash drives are recognized by Ubuntu as soon as you plug them in. Most SD cards and flash drives are also automatically mounted by Ubuntu as soon as you plug them in. If the device is mounted, then an icon for that device will appear in the Launcher. To browse the folders and files on a device, just click on the device's icon in the Launcher.

It is also possible to easily safely remove a portable device if it is mounted similarly to the way you would do it in Windows using an application in the Ubuntu Software Center called ejecter. Ejecter is a simple menu that sits in the system notification area, providing you a quick way to unmount an external peripheral device such as USB flash drive, CD/DVD disk, external hard disk and so on. To safely remove a portable device click on the Ejector icon in the notification area, select the device that you want to safely remove from the Ejecter menu and then you will see a popup notification telling you that you can safely remove the portable device.

Alternatively if you don't want to install Ejecter you can simply right-click on the device in the default file manager and select "Safely Remove Drive" as shown.

Update for Ubuntu 14.04
You no longer need to install Ejecter in Ubuntu 14.04. Instead just right-click the portable device's icon in the Launcher and select Safely remove.


Port forwarding between bridged interfaces

You can use iptables. Below is a script version of a proposed solution. I do not know what iptables rules you might already have, so some merging work might be required.

#!/bin/sh
FWVER=0.02
#
# test-oli rule set 2016.01.14 Ver:0.02
#     Having tested this on my test server using port 80,
#     convert for what Oli actually wants (which I can not test).
#
# test-oli rule set 2016.01.14 Ver:0.01
#     Port forward when this computer has one nic and
#     is not a router / gateway.
#     In this case the destination is a guest VM on this
#     host but, with bridged networking and all IP addresses
#     from the main LAN, that should not be relevant.
#
#     This script may conflict with other iptables rules on the
#     host, I don't know. On my test server, clobbering the existing
#     iptables rules is O.K. because I do not use the virbr0 stuff,
#     nor the default virtual network,  anyhow.
#
#     References:
#     http://askubuntu.com/questions/720207/port-forwarding-between-bridged-interfaces
#     http://ubuntuforums.org/showthread.php?t=1855192
#     http://www.linuxquestions.org/questions/linux-networking-3/iptables-forwarding-with-one-nic-80009/
#
#     run as sudo
#
echo "test-oli rule set version $FWVER..\n"

# The location of the iptables program
#
IPTABLES=/sbin/iptables

# Setting the EXTERNAL and INTERNAL interfaces and addresses for the network
# Use br0 instead of eth0. While using eth0 seems to work fine, the packet counters
# don't work, so debugging information is better and more complete using br0.
#
#
INTIF="br0"
INTIP="10.10.0.2"
FORIP="10.10.0.15"
UNIVERSE="0.0.0.0/0"

echo " Internal Interface: $INTIF  Internal IP: $INTIP  Forward IP $FORIP"

# CRITICAL:  Enable IP forwarding since it is disabled by default
#
echo Enabling forwarding...
echo "1" > /proc/sys/net/ipv4/ip_forward

# Clearing any previous configuration
#
echo " Clearing any existing rules and setting default policy to ACCEPT.."
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
# Delete user defined chains
$IPTABLES -X
# Reset all IPTABLES counters
$IPTABLES -Z
# While my references do not have it, I think this is needed.
$IPTABLES -t nat -Z

# First we change the destination of any incoming port 80 traffic
#
$IPTABLES -t nat -A PREROUTING -p tcp -i $INTIF --dport 9000 -j DNAT --to-destination $FORIP:9000
$IPTABLES -t nat -A PREROUTING -p tcp -i $INTIF --dport 9001 -j DNAT --to-destination $FORIP:9001

# And then we do the actual forward
# FORWARD rules would only be needed if the default policy is not ACCEPT
# (Shown here for completeness)
#
$IPTABLES -A FORWARD -p tcp -i $INTIF -d $FORIP --dport 9000 -j ACCEPT
$IPTABLES -A FORWARD -p tcp -i $INTIF -d $FORIP --dport 9001 -j ACCEPT

# Now, we need to change the source address, otherwise the reply packets
# would be sent directly to the client, causing confusion.
$IPTABLES -t nat -A POSTROUTING -o $INTIF -j SNAT --to-source $INTIP

echo "test-oli rule set version $FWVER done."


Running Matlab with Gnome-Do: bash script problem

Use a launcher (.desktop file). To do this, right click on your desktop and click 'Create Launcher...' and fill in the details:

You can then copy it to ~/.local/share/applications and you should be able to type 'Matlab' to open it with gnome-do.


How do I remove the "launch" menu in Unity Launcher? I want folders to launch immediately

Double click on the folders - they will launch / open immediately.


How to recover a file which was removed in nautilus when running as root?

open nautilus as root:gksu nautilus
then, after entering your password, you will have the nautilus windows.
press Ctrl+H to show the hidden files
then go to /home/.trash-0
all your deteted files during your root session should be there.


Cannot remove landscape-common or dist-upgrade

Doing this:

  update-alternatives --install /usr/bin/python python
  /usr/bin/python2.7 1

will fix your Ubuntu!!!

DO NOT SET Python3 to be your default Python version!!! Or cross fingers if some app doesn't set it...


Dual installed Ubuntu 13.10 with Windows 7 does not boot

today i tried to run both os's (windows 7 -that is already instaled, and ubuntu 13.10 - ina another partition), and guess what? as same as you, the message "grub rescue" show up. after many attempts, i gave up, i try many code lines, and nothing fix the problem. So in the end i restore the windows boot line. run the windows 7 disk in restore mode, open the prompt and enter this line (( bootsect /nt60 ALL /force /mbr )) after that you'll be able to run your windows normaly.

the way is to grab the grub 2 manual and look for solutions.


Ubuntu 19.10 keeps locking screen despite screen locking / dimming etc etc

I wasn't able to find a fix via the Ubuntu / gnome-settings, but it did occur to me that I could uninstall the screensaver itself:

sudo apt remove gnome-screensaver

While that has completely disabled the screen saver, it's also definitely stopped the accidental locks. (Locking by closing laptop lid and via keyboard shortcut etc still works.)


You can achieve this with:

# make sure you set the right paths for sdX
dd if=/dev/sdX of=~/outputfile bs=512 skip=205266 count=29106280

Explanation of options:

 if=     describes the inputfile path
 of=     describes the output file path
 bs=     states the blocksize in bytes
 skip=   skips bs size blocks at the beginning of input file
 count=  read N blocks (so in your case N = (End+1)-Begin)


Nvidia driver 390 broken dependencies install preventing uninstall or new install

I had this issue once. To fix it I had to reboot into single user mode, uninstall all of the old packages related to the nvidia driver and cuda, and then reinstall.

Download packages from the nvidia site
Reboot into single user mode. This can be achieved various ways but it involves rebooting, clicking the letter e at the grub menu, and then editing the boot parameters. In Ubuntu 16 this required adding the word single at the end of the line that start with "linux" and ends with "ro". You may have to check what your version of Ubuntu requires
Attempt to uninstall cuda packages and nvidia drivers from the system. You mentioned using dpkg clean for each of them. (Perfect!)
Go to downloaded packages and reinstall each starting with the nvidia video driver.
I recommend rebooting the system, and then installing the cuda package.


Open MS Office Documents with Google Chrome Web Apps?

Assuming you have google chrome installed and set up, you need to install the following google docs extension for chrome:

https://chrome.google.com/webstore/detail/google-docs/aohghmighlieiainnegkcijnfilokake

Then, in nautilus, right click on a docx or xlsx file, go to properties and choose google-chrome as the default application for these files.

This should do it.


Qiime2 conda environment changing the name

I think that Qiime2 official forum will be more helpful for you
https://forum.qiime2.org


Compiled and installed compat wireless. How do i remove it

This problem sometimes happens because installing the new package replaces an old (or otherwise different) version, and uninstalling the new one leaves you without either.

Perhaps a previous version of compat-wireless was installed before you installed with checkinstall. If so, you should reinstall that.  You can check whether or not this was the case by looking at /var/log/dpkg.log.


How can I define startup applications with the Awesome Window Manager?

awful.util.spawn("conky")
awful.util.spawn("nm-applet")

Lines like these at the bottom of your .config/awseome/rc.lua will do the trick. If you want it simple. At least, that's what the awesome-wiki calls simple.


dpkg --configure -a unsuccessful due to battery running out of power

Now that you've resolved the read-only mount and repaired the file system. You can clean up the mess and try again. Before doing so it would be wise to check the SMART status of your drive as an impending hardware failure can make all your efforts useless. If the drive is reported to be in  good shape, it should be safe to continue.

sudo apt-get purge linux-signed-image-generic will purge the unconfigured, not fully installed package.

sudo apt install linux-signed-image-generic will install the currently supported version.


Support for Ubuntu 9.04 Jaunty has ended on 23 October 2010. No updates will be released for that version. The repositories for this version has also been removed.

You need to upgrade Ubuntu to a newer version - recommend doing a clean install.

If you dont want to upgrade, you can download the sources and compile yourself.


OKI MCD563 printer issue after OS update

I had connected the printer via USB. The new driver is not working via USB.

Now the printer is connect with a network cable to my router.
This works fine :-)


I'm currently running my Acer Aspire 5440 laptop off of an external WD Passport 500gb hard drive, and have been for a year now. I haven't had any issues with it, other than the occasional disconnect issue. I don't see any performance problems with it, as long as the computer has a good set of hardware, RAM, video, processor, etc.


Unable to run snapcraft :Additional properties are not allowed

source needs to be at the same level of plugin as it is a property of the example part.


Is it possible to combine two movie files into one, interleaved like a zipper using ffmpeg?

Well, not with ffmpeg alone. You would need something to render the transition from clip1 to clip 2.
I've checked out this tool (based on ffmpeg) which might come close to what you want:
ffpeg-concat

But it takes some time, since the clips are rendered into scenes and put together again using ffmpeg and openGL for the transitions


It looks like this message is displayed when jitsi is already running, which you can test with something like ps -ef | grep jitsi. There is also a lock file: ~/.jitsi/.lock.

I had this problem when trying to run jitsi with java 8. Apparently jitsi does not run with java 8:
[jitsi-dev] Jitsi doesn't working in Java 8

Using java 7 fixes it.


The file manager in Ubuntu is called Nautilus, and it seems to do what you are after when you pass a file to it on the command line.  For instance, the following command:

nautilus ~/Documents/foo.txt

opens a file manager window showing the ~/Documents folder with foo.txt selected.


Check to make sure that '/media/jianyue' exists. I assume that jianyue is your username. Ubuntu seems to have a bug in that they now want to mount these removable drives in /media/'username' but it does not automatically create it...

So, I think this should work for anyone for their own user account:

$ sudo mkdir /media/$USER
$ sudo chown $USER.$USER /media/$USER

You would need to have administration privileges to be able to do execute these commands. You should end up with the directory /media/jianyue created and owned by jianyue.

Good Luck!


sudo mysql_secure_installation : command not found

It seems that I missed one step in the install. This page helped me identifying the missing step

I've double check it, and installed it on Ubuntu 16.04, and saw that it worked.

The full steps are:

  update your system

sudo apt update
sudo apt upgrade

  Install both - mysql client & server

sudo apt install mysql-server mysql-client

    Note: You need to type the password for the MySQL root user:

  Run mysql_secure_installation to secure your installation

sudo mysql_secure_installation


How can I automatically jump to the viewport of a newly opened application?

The script below will change the current viewport to the one where any new window appears.

The script does not add any noticeable/measureable burden (using system monitor) to your system.

#!/usr/bin/env python3
import subprocess
import time

def get_wlist():
    # get the output of wmctrl -lG, try because wmctrl is a bit buggy :)
    try:
        return subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

def get_wids(currlist):
    # get the window ids
    return [l.split()[0] for l in currlist.splitlines()]

def get_abspos():
    posdate = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split()
    return [int(n) for n in posdate[5].split(",")]

while True:
    # wait until the desktop is ready to run wmctrl
    wdata1 = get_wlist()
    if wdata1:
        break
    time.sleep(1)

# and then...
wlist1 = get_wids(wdata1)

while True:
    time.sleep(2)
    wdata2 = get_wlist()
    if wdata2:
        wlist2 = get_wids(wdata2)
        new = [w for w in wlist2 if not w in wlist1]
        for item in new:
            line = wdata2.splitlines()[wlist2.index(item)].split()
            pos = [int(line[n]) for n in [2, 3]]
            absposcount = get_abspos()
            abspos = [str(pos[0]+absposcount[0]), str(pos[1]+absposcount[1])]
            # print(abspos)
            subprocess.Popen(["wmctrl", "-o", ",".join(abspos)])
        wlist1 = wlist2; wdata1 = wdata2

How to use

The script needs wmctrl:

sudo apt-get install wmctrl

Copy the script into an empty file, save it as move_toviewport.py
Run it by the command:

python3 /path/to/move_toviewport.py

If all works fine, add to Startup Applications: Dash > Startup Applications > Add. Add the command above.

How it works

The script keeps an eye on possibly newly appearing windows, using wmctrl -lG
If there is a new window, the script will read its (absolute) position on the spanning workspace, and subsequently move to the corresponding viewport using wmctrl -o x,y


Port Forwarding stops working after several minutes

I discovered that it was sshguard causing the problem by blocking all requests from my public ip address. Problem was solved by whitelisting the ip address.


Assuming that you are talking about an ordinary button (as supposed to a togglebutton) you can see  all the methods it has here. As I read it there does not seem to be a function for what you are looking for, probably because these things are designed to be event driven.

In any case, I am wondering, can't you just get the events to set a boolean and have a look at that to see if it is pressed. Otherwise, maybe you can explain the rationale of why it is important to you to go around the events.

EDIT

After realizing that I misread you original post and that you were talking about keyboard keys and not buttons I came up with the following suggestion.

When the program is run, it will make a gtk window and hide it, to make it possible to listen for keyboard events. Then it will listen for key released events from any of the keys that are in the shortcut that started the program (in this case ctrl-alt-u). If any of those keys are released, within the start up timeout, it will quit at the end of the timeout, otherwise, it will show the program.

If you want to delay the actual start of your program code to save resources, you can of course just use a dummy window and not load the real window or any of the underlying classes before in the start_or_not function.

import pygtk
pygtk.require('2.0')
import gtk

class DelayedStart:

    def __init__(self):
        self.w = gtk.Window()
        self.w.connect('destroy', gtk.main_quit)
        # Connect key released events to a function
        self.w.connect('key_release_event', self.on_key_press_event)
        self.w.show_all()
        # Hide the window, we actually need a gtk window to listen for
        # keyboard events, so we just hide it
        self.w.set_decorated(False)
        self.w.set_opacity(0)

        self.show_on_timeout = True
        # Ask gtk to call the this function in 2 seconds
        gtk.timeout_add(1000*2, self.start_or_not)
        gtk.main()

    def on_key_press_event(self, widget, event):
        """ Check if any of the key in the shortcut ctrl-alt-u is released """
        # ctrl = 65507, alt = 65513, u = 117
        keys = [65507, 65513, 117]
        if event.keyval in keys:
            self.show_on_timeout = False

    def start_or_not(self):
        """ Check if the program should be started or not """
        if self.show_on_timeout:
            self.w.set_decorated(True)
            self.w.set_opacity(1)
        else:
            gtk.main_quit()
        # Returning false will destroy the timer, we only want to run this once
        return False

if __name__ == "__main__":
    DELAYED_START = DelayedStart()


Desktop environment without Python dependency

If you read my (IMHO best) answer to that, you will see that the user did NOT learn Linux, and thought that sudo apt-get remove python 3.5.0 would affect Python version 3.5.0. It does not. It removed python, and his system stopped working.

Don't be that user! Make heavy use of the man command, don't run sudo anything until you fully understand what it does.

There is NO piece of software that is safe from an uninformed user using sudo.


ubuntu didn't restart after using testdisk

When restoring, you may have confused Ubuntu where the install was due to the nature of hard drives. Try doing a fresh ubuntu reinstall after plugging the drive into another computer and copying the files you want off it.

PS: You cannot recover Windows OS from Testdisk. Whatever you could get off your lucky to have, but you can restore Windows with the recovery partition.


Install NetBeans 8.01 in Ubuntu 18.04 - JRE not found

I don't believe you can use JDK 11 to install Netbeans 8.0.1.

In order to install Netbeans 8.0.1 you will need to install JDK 8 and use that for the installation.

As an alternative, if the version of Netbeans you use is not important, you could use a later version that does support JDK 11 such as Netbeans 10.


Try running the following command from a terminal while logged in:

xrandr --output HDMI1 --set "Broadcast RGB" "Full"

Your screen will probably flicker/turn off momentarily to apply the new settings.

If that fixes your problem, you can add this command to your ~/.xprofile file so that it runs whenever you log in to the graphical environment:

echo 'xrandr --output HDMI1 --set "Broadcast RGB" "Full"' >> ~/.xprofile

Hope that helps! It took me months to discover this fix!


Installation problem of openssh client and openssh server and some packages during system update

You need a different mirror. This mirror no longer exists. Choose a new mirror - I won't go into detail about that here, that is out of scope of this question. Have a look at How can I get apt to use a mirror close to me, or choose a faster mirror?.

Select your mirror and open a Terminal. Run:

sudo apt-get update

And then you can install openssh-client.

sudo apt-get install openssh-client


KDE does not notice laptop running on battery

I noticed that after killing and restarting plasmashell, the battery monitor begins to function properly on my end.


Ubuntu 13.10 - Skype not working correctly

I was able to fix the issue using the link  @payorivero gave me.

The issue appears to be caused by incorrect Skype installation ( I have downloaded the Skype from its official web site).

The following line fix the problem permanently:

sudo sed -i 's/^Exec=.*/Exec=env PULSE_LATENCY_MSEC=30 skype %U/' /usr/share/applications/skype.desktop

The above code is showing how to install Skype properly on Ubuntu 13.10:

sudo apt-get update
sudo apt-get install skype


Ubuntu LiveUSB doesn't recognize my Windows 8 installation

It is possible that the Ubuntu installer is not recognizing Windows 8 because of GPT partitions. Below are some links that helped me.

Links:

Why is Windows 8 invisible on Ubuntu 12.10's installer?

Zapping GPT Data Structures

Note: The second link asks for gdisk. I was unable to download gdisk via terminal. I had to go through firefox and get the .deb file, which took me to ubuntu's software center. Here is the link to get the .deb file: GPT fdisk gdisk

Hope this helps!


MAC address display in terminal and command for requesting elaboration on output

Your command has wrong syntax. Current command ifconfig grep ether means that you call ifconfig with two arguments - grep and ether. Both are unknown to ifconfig util (see man ifconfig for details).

So you forget two moments:

add pipe symbol (|)
ignore case while greping to get Ethernet in the search result.

The correct one would be

ifconfig | grep Ether

or

ifconfig | grep -i ether

Here -i (or long variant --ignore-case) means

  Ignore case distinctions, so that characters that differ only in  case  match  each              other.

For details see man grep.


How do I get a Canon PIXMA ip1900 to work?

I managed to recreate the packages on my 32bit Ubuntu install, I couldn't test them on 64bit, but I did show that it's possible to build them for 64bit:

Download this file: http://files.canon-europe.com/files/soft31335/software/iP1900_debian_printer.tar (7.7MB)

Unpack it on your desktop and grab the cnijfilter-common-3.00-1.tar.gz file (ignore the deb files), extract this archive and you should get a cnijfilter-common-3.00 folder. Now you need to go into the terminal and use these commands:

cd Desktop/cnijfilter-common-3.00
sudo apt-get install libcupsys2-dev libxml2-dev libtiff4-dev
debuild -i -us -uc -b

This should in theory make for you a set of 64bit drivers, both the pimxa ip1900 and the common deb files (as well a bunch of other debs) on your desktop. Install the ones you need and delete everything when finished. If it doesn't work, please report back here.


How can I see modification times in nautilus (instead of only dates)?

There is a dconf setting which I think should control this behaviour, but it seems not to have any effect on Nautilus on my 16.04 Ubuntu (Unity desktop), it only affects file-choser windows like the "Open..." or "Save as..." dialogues of most applications.

You can get the current value of this setting using the command

gsettings get org.gtk.Settings.FileChooser date-format

The default is regular, the other option is with-time. You change the value with one of the two commands below.

gsettings set org.gtk.Settings.FileChooser date-format with-time
gsettings set org.gtk.Settings.FileChooser date-format regular

I am not sure whether it's a bug that this setting does not affect Nautilus or whether that is by design though. However, unfortunately I could not find anything closer to what you want.


How do I fix 'MDS CPU bug present and SMT on, data leak possible' errors from logwatch?

Note: Undo your previous edits to /etc/default/intel-microcode and /etc/default/grub.
Mitigation control on the kernel command line
The kernel command line allows to control the MDS mitigations at boot time with the option “mds=”. The valid arguments for this option are:
full

If the CPU is vulnerable, enable all available mitigations for the MDS vulnerability, CPU buffer clearing on exit to userspace and when entering a VM. Idle transitions are protected as well if SMT is enabled.
It does not automatically disable SMT.
full,nosmt

The same as mds=full, with SMT disabled on vulnerable CPUs. This is the complete mitigation.
off

Disables MDS mitigations completely.

sudo -H gedit /etc/default/grub
Change:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mds=full,nosmt"

Save the file and quit gedit.
sudo update-grub
reboot
Note: Understand that you'll take a HUGE performance hit on multi-cpu or multi-core configurations.
Note: If the performance hit is too great, try mds=full instead of mds=full,nosmt.


How do I Fix Grub Error 15 on New Dual Boot Install

OP posted:

  I burned a RescuTux  Disk and used it to recover grub2 (simplest and easiest way for me.
  http://www.supergrubdisk.org/category/download/rescatuxdownloads/


There is a PPA from "Subversion Team", so it should be safe. If you cannot use add-apt-repository you can add the corresponding repository manually in /etc/apt/sources.list file:

deb http://ppa.launchpad.net/svn/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/svn/ppa/ubuntu hardy main

and importing the corresponding key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2F4C039


Why /lib/modules taking so much space on xubuntu?

Automatic update is installing each new kernel, but there is no clean-up, and there is a copy of the module for each kernel.

There is a package entry called :

linux-image-<version>-generic

Removing it removed the corresponding files in /lib/modules


Ubuntu set permissions for future created files

I would advice you to not set 775 as default. But if you really want to you can either use umask which will show you your current default and lets you set a new default.

Or you'll use this: chmod 775 filename.txt>>!#:2 from now on for files you are certain that should have these access rights.

I would advice you to adjust the permissions individually.

Stole this from here: https://stackoverflow.com/questions/21342371/single-command-to-create-a-file-and-set-its-permission

Hope that helps!

@Edit: umask 0002 ("Default is 0022, If I am not mistaken")


Run PHP 5 with other than Apache http server?

Well since you have asked for an alternative solution , I think the best better alternative for Apache webserver is Nginx if you are not about to server any dynamic webpages. Apparently I should mention an alternative mail server solution which is free and opensource is "iRedmail". This can be tuned and scaled as you like and is an enterprise grade one as well.


No boot in partition problem after ext3 format

Boot up with your Ubuntu CD, you should be able to access your windows 7 partition.

Plug in an external hard drive and back up your data from win7 to external hard drive.

Then find a win7 CD and use the repair tool.
You should be able to re install the windows boot fairly easily following instructions if you get a CD somewhere.

But back up your CD above all. It's your priority right now.


How to resolve this problem? "Failed to download repository information"

Your configuration seems to include the CD you installed from, which is no longer mounted, and is useless for updates.

Either ignore the error (after all, They have been ignored, or old ones used instead. or find the line(s) in /etc/apt/sources.list and /etc/apt/sources.list.d/* that mention "deb cdrom://Ubuntu 16.04.1 LTS ..." and comment (with a # in the first column) or delete these lines.


How can I convert my old MySQL raw data files

You might want to first check your databases with a compatible environment. E.g. a docker container

docker run --name mysql55 --detach --env=MYSQL_ROOT_PASSWORD=root mysql/mysql-server:5.5.53

will get you such an environment
https://severalnines.com/blog/mysql-docker-containers-understanding-basics
shows you how to go from there.

Now you can check with other versions whether the import works. Personally I would not go for 5.7.19 directly since that version has "features" that make handling it more difficult then e.g. 5.7.14. E.g. in my environment a 5.7.14 docker image works on Mac an Linux but a 5.7.19 does not. See http://wiki.bitplan.com/index.php/Docker_on_Mac


User @ajgringo619 (https://askubuntu.com/users/975100/ajgringo619) had highlighted that it may have been a network issue.

I looked inside the package

    guiverc@d960-ubu2:~$   apt-file show grep
    grep: /bin/egrep
    grep: /bin/fgrep
    grep: /bin/grep
    grep: /usr/bin/rgrep
    -- plus redacted doc & man pages

and Yes those would impact any tool that used those programs, but I doubted it was your issue agreeing with @ajgringo619.

I suggested using wget to download the grep package (suspecting you'll get errors there) then dpkg -i to install.

@H20NaCl (OP) had trouble with wget so switched to ftp..


Lightdm not running when turning computer on

Seems you somehow disabled lightdm on boot.

I would advise start using systemd better than upstart scripts for that kind of tasks.

With sudo systemctl enable lightdm.service, lightdm should be re-enabled (recreates the pertinent symlink).

You can (maybe should) start using sudo systemctl enable|disable|start|stop|reload|restart servicename.service as replacement of sudo service servicename start|stop|reload|restart.

If lightdm still doesn't work, try sudo dpkg-reconfigure lightdm.

At last, if you still experience the same problem, you'll need to change the settings manually either by using lightdm-set-defaults or manually editing /etc/lightdm/lightdm.conf.

Open lightdm.conf and check you have the following settings under [SeatDefaults] (if not add it):

user-session=ubuntu

greeter-session=unity-greeter

Hope it helps.


How to add packages to Ubuntu 11.04 Install DVD?

To Remaster a Ubuntu CD/DVD/USB you have to use:

A) The Ubuntu LiveCD Wiki

B) remastersys

C) Ubuntu Customization Kit

I, personally suggest you to use UCK, which is more user-friendly.


Long input in terminal doesn't change to new line

Terminal size in Docker is a known issue, and the quick fix suggested works for me:

docker exec -e COLUMNS="`tput cols`" -e LINES="`tput lines`" -ti container bash

The COLUMNS and LINES variables tell the shell and other commands what the size of the terminal is. They seem to be unset in a docker terminal, so you set them manually.

I think you can also use the $COLUMNS and $LINES variables instead of tput cols/tput lines.

docker exec -e COLUMNS="$COLUMNS" -e LINES="$LINES" -ti container bash


Switch to proprietary drivers and your system should run much faster.

You can try them both fglrx and fglrx-updates for this adapter.

The updates is newer, but for this adapter fglrx may be better or not.


How to connect to Protected EAP (PEAP) wifi via terminal

In the words of kemtnbkr on the Ubuntu forums:

  Make sure wpasupplicant is installed

  Remove network manager from startup apps; log out and log back in
  change your /etc/network/interfaces to: Code:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wireless-mode Managed
wpa-ssid **censored**
wpa-ap-scan 1
wpa-proto RSN WPA
wpa-pairwise CCMP TKIP
wpa-group CCMP TKIP
wpa-key-mgmt WPA-EAP
wpa-eap PEAP
wpa-identity **censored**
wpa-password **censored**
wpa-phase1 fast_provisioning=1
wpa-pac-file /home/kyle/Downloads/chain2.cer

  With terminal: Code:

sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo dhclient wlan0 -v

  You are Connected.


How do I add a fixed text before and after each item of a list in a txt file?

With awk:

awk '{printf "%s\n%s\n%s\n%s\n", "SOMETEXT1", "SOMETEXT2", $0, "SOMETEXT3"}' input-file

If you want to replace the current file, use -i inplace, with GNU awk:

gawk -i inplace '{printf "%s\n%s\n%s\n%s\n", "SOMETEXT1", "SOMETEXT2", $0, "SOMETEXT3"}' input-file

This will work as long as SOMETEXT* doesn't have quotes - in which case you'll have to escape those quotes.


How do I get a PS3 Sixasis Controller working via USB?

I have read something about it and I think it would be better to connect PS3 controller using bluetooth directly. Take a look of this.

I have read your limitations, and I still think that you need to use bluetooth. you could Buy a Bluetooth USB dongle, they are cheap (dealextreme.com/p/…).


For you to run it from terminal, you need to be logged into mysql first and then you execute your program. The ideal code would be

mysql -u(username) -p(password) (the name of the database) -e "DELETE FROM `wp_posts` WHERE `post_type` = "attachment""

I`m sure this works, hope it helps


Problems uninstalling a program using Ubuntu Software

Found the official package name at https://play0ad.com/download/linux/#Ubuntuprovidedpackages

so please run sudo apt uninstall 0ad && sudo add-apt-repository --remove ppa:wfg/0ad to remove the game and its PPA.


Actually there is no separate user named as root in Ubuntu. Generally Ubuntu users will be turned to root user when they want by using sudo -i command from terminal.

The user you will create for the first in the installation Ubuntu will be the original root user of the Ubuntu Machine you have installed. He can turn into root user with above command I have mentioned.


it's been a while since you were looking into this, but I wanted to offer some help.  About 2 years ago I was asking the same question.  I am also a ChemE, so I can relate to the need.
(fyi-this forum will only let me post 2 links bc I just started my account here) , so here are the first two you should take a look at
SALOME and OpenFOAM

Short Answer

CAD

blender
CAELinux
Salome

Meshing

OpenFOAM
GMSH
SU2
Salome

Simulation

OpenFOAM
SU2

PostProcessing

Paraview

Each of the above I have tried (except CAELinux) and I chose to use Salome+OpenFOAM+Paraview.  There are also some other programs that I have not tried that are more GUI based:

helixOS
CAELinux
CALCULIX (just found this with google)

Longer Answer

This way of building simulations is pretty different from building with a package like Comsol.  There are GUI tools for building the simulations.  I have not used these because the reason that I like using Linux is that I can just look at the source code.  The # of hours it takes to read through a blog, paper, or tutorial that explains how a GUI works and learning how changes through the gui modify the simulation takes as long as it does to read through the source code and think through the problem.

How I came to these conclusions...
I am also a chemical engineer and have been performing simulations for a couple of years now.  I have tried several ways to do this.  There are a couple of things you should consider such as:

Do you want to be able to perform more complex tasks like modifying cad files based on the output of the simulation?

How comfortable are you with programming, and code development?

I have run Comsol and Ansys myself and I see how it can be a great tool for developing opensource Multiphysics simulations because they have great:

documentation designed for engineers not just engineers who are also
full fledged programmers
ample # published papers utilize Comsol and Ansys
good GUIs

In my opinion all of that comes at a cost:
 1. licensing can be prohibitive
 2. learning how the gui is changing the simulation adds an additional step in learning the simulation process.
 3. online documentation and development for these opensource tools is huge, and the community is very helpful
 4. adding more users,simulation methods, extensions, and addins all tack on a lot of additional fees.
 5. your limited by what the software company will let you do within the box they have designed with the software.

I have included the longer answer so that you can understand what your working towards, Comsol Versus the opensource tool combination is apples and organges for basic usage, but if you want to do a lot of simulations at low cost, and try out new algorithms I'd go with OpenFOAM+Salome or just OpenFOAM


Snapcraft error whith glib-compile-schemas

Ok found it: Surely it is glib-2.0, not glib2. Damned typos! :-)


Ubuntu 16.04 - timezone changing to Los Angeles time automatically

Check current timezone settings by opening a terminal and executing : timedatectl status

$ timedatectl status
      Local time: Di 2017-03-21 14:32:44 CET
  Universal time: Di 2017-03-21 13:32:44 UTC
        RTC time: Di 2017-03-21 13:32:44
       Time zone: Europe/Berlin (CET, +0100)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

Important is that RTC in local TZ is set to no - change the timezone settings by executing :

timedatectl set-local-rtc 0
timedatectl set-ntp true
timedatectl set-timezone Europe/London

Make sure that Network time on and NTP synchronized are set to yes -
 reboot the system.
Enter the BIOS ... check (modify in case they are wrong) time settings there - then boot Ubuntu.

Check whether the time synchronization service is running with : systemctl status systemd-timesyncd.service. For reference and more comprehensive information -> man timedatectl


"PXE-E61: Media test failure" installation boot problem with Ubuntu

Remove the installation media(pendrive) and then change the boot order in bios to HDD as the first option.
Save the changes and then reboot your pc.


Monitor turns off when I unplug from AC power, how do I stop this?

Pommed is misconfigured by default to set brightness to 6 (out of 44000) on battery for nvidia. The pommed config file is /etc/pommed.conf, and the section is sysfs_backlight/on_batt. Setting this to a more reasonable, value such as 22000 fixes the issue. You can mess around with values to set it to by running

$ cat /sys/class/backlight/${driver}/max_brightness
$ echo ${0 < brightness < max_brightness} | sudo tee /sys/class/backlight/${driver}/brightness

Note that's kind of pseudo shell code, the value for driver will probably be the only subdir or backlight, so just hit tab in the shell to autocomplete it, and the value to echo can be whatever you want so long as it's between 0 and max_brightness. Setting to 0 will turn off your backlight so I can't really recommend you do that.


By the time of posting the main post, the USB was plugged to one of the front USB ports.
I plugged the adapter to one of the USB ports in the back (if it matters - to a USB 3 port) - and I could successfully connect to my home network!
And the best part - switching back to the front USB port still worked!


Is Bitcoin core V.0.9 not updated on PPA ppa:bitcoin/bitcoin?


problem to install Ubuntu alongside Windows 7

On that screen, Click on SOMETHING ELSE.
In the next screen, Click on Install Ubuntu alongside Microsoft Windows...
Next Screen, Most likely you'll see one row showing /dev/sda  (SDA is 1'st Hard Disk).

VERY IMPORTANT,  STEP
highlight the free space row & only then Click on ADD button, enter how many GB you want for Linux.

you will see 2 extra rows now,
Ubuntu Linux & temporary swap partition.

Hope this helps.

If you need screenshots, Plz use the below link.

http://www.techspot.com/community/topics/step-by-step-beginners-guide-to-installing-ubuntu-11-10.172128/


How to roll up windows with mouse wheel with unity-2d

There is one workaround I have used before, and it may be of use to you so I record it here.

If it's not possible to configure the rolling up of the window in your window manager (Xfce users have the mousewheel_rollup option in xfwm4), it is often worth trying tools like wmctrl and xdotool, though some window managers ignore their commands. The shade option seems to be present in wmctrl, but not in xdotool.

It is possible to use wmctrl to select the currently active window and roll it up by using this command, adapted from the helpful manpage:

wmctrl -r :ACTIVE: -b toggle,shaded

This command lets wmmctrl select the active window and toggle whether it is shaded or not. This should be supported on most window managers including metacity: test it in gnome-terminal but not guake as it won't have any effect because of the way guake terminal displays.

I would not bind it to mouse wheel, but to another button on the mouse, like a secondary one on the side (if you have one). Then just clicking it will toggle the rollup of the active window.

So install the programs with

sudo apt-get install wmctrl xbindkeys

You need to add the lines below to ~/.xbindkeysrc (you can choose your own binding or combination; this is just my additional mouse key as an example):

# specify a mouse button/combination
"wmctrl -r :ACTIVE: -b toggle,shaded"
b:9

Run killall xbindkeys and then xbindkeys & so that the configuration file is reread (or logout and login again).

This is about the best you can do for the minute, and is the same as what you ask for, but done in a slightly different way, so it might be useful for you.

For more information, see man wmctrl, man xbindkeys or the Ubuntu manpages online.


Simple, use vorbis instead of ogg in your command


Is it possble to link a comment to installed packages, so I know why I installed it?

No .. but you can make a file (or journal), where you write when you install special packages and why.


How to investigate ext4.vhdx file and see what's inside while using wsl2

Examining the VHDX directly is not advised on Windows because it contains an ext4 filesystem.
Essentially, what the VHDX holds is the entire Ubuntu operating system on it, plus any additional files/programs/libraries/etc. you've installed within WSL onto it.  It is the entire 'hard disk' of the system that WSL2 uses with virtualization to run the Ubuntu WSL environment.  Basically, any file you can navigate to in WSL and see (/usr/lib/... for example) is what is in the VHDX.


How to execute applications with super-user privileges in Gnome-Do

You should never use sudo to launch graphical applications. Use gksudo instead. If you want to shorten the command, then you can make a file such as this:

#!/bin/bash
gksudo some command

Place it somewhere you like, in /usr/bin, for instance and make it executable. Then you can just run filname (the name you gave the file) to run it. It will ask for your password and run the command as root.


Can't downgrade to the version I just upgraded from

If you run:

aptitude versions ^firefox$

You will get:

pi  45.0.2+build1-0ubuntu1         codename                              500
id  53.0+build6-0ubuntu0.16.04.1   codename-security,code-name-updates   500

You can also use something like:

apt list -a firefox

To get available version for install.

Listing... Done
firefox/release-updates,release-security,now 53.0+build6-0ubuntu0.16.04.1 amd64 [installed]
firefox/release 45.0.2+build1-0ubuntu1 amd64

The idea is that in release-updates only the last version of a software is available for installation.

You can either install a software from release which is the start point and frozen (in our case is 45.0.2), or from release-updates/security which last version (53.0) is there.

If you want to install Firefox 52, you can download it from here, or have access to all versions from here.

You can also check the cache:

ls -l /var/cache/apt/archives/firefox*

If you didn't used something like apt autoclean or apt clean there should be at least previous version of firefox deb package:

/var/cache/apt/archives/firefox_52.0.2+build1-0ubuntu0.16.04.1_amd64.deb
/var/cache/apt/archives/firefox_53.0+build6-0ubuntu0.16.04.1_amd64.deb

Then first unistall the current version of firefox and after that use dpkg or gdebi to install the downloaded deb file:

sudo dpkg -i firefox-version.deb

or

sudo gdebi firefox-version.deb

Remember that you can always use apt-mark hold to prevent a package from updating:

sudo apt-mark hold firefox


How to set display ICC profile in Kubuntu?

For me in Kubuntu 18.04/bionic the following worked:

Install colord-kde
This adds a page in the system settings devices section. There, in the profiles tab, I could install my icc profile system-wide (to /var/lib/colord/icc/).

Run colormgr get-devices-by-kind display and lookup the id of your display.

Run colormgr find-profile-by-filename /var/lib/colord/icc/<name of your icc file> to lookup the id of your profile.

Then run the following commands to connect the profile to your display and make it default:

colormgr device-add-profile <display id> <profile id>
colormgr device-make-profile-default <display id> <profile id>


Sound stopped working on Ubuntu 16.10, Dell vostro 5568

To restart pulseaudio you can use the following commands in a terminal:

 sudo pulseaudio -k; pulseaudio -D;

This should bring the sound back, don't know about the system tray icon. Might come back when I find out how that works.
Appears to be a bug in Ubuntu 16.10, happens to me too when connecting headphones or other external devices (loudspeakers, amplifiers etc.)
Please file a bug on launchpad!