Ubuntu update stops while configuring mysql-server-5.7

The problem is that during the mysql-server configure process, the mysql service is restarted.
Check that you have mysql service enabled else mysql will not restart and the configuration process fails:

Execute

sudo update-rc.d mysql enable

Comment 'manual' if present in mysql.override

sudo vi /etc/init/mysql.override


Run headless chrome in Docker suddely crashes

Downgrading kernel to 4.18.0-25-generic solves the issue.
Seems to be an incompatibility between Docker and Kernel 5.0.0.


Disable secure boot.
Disable UEFI and change it to leagacy support.
Disable fast boot.

And you also need kernel 4.4 so i use ubuntu 16.04 lts on my lenovo y700 .


Brother MFC-J470DW scan function "Check Connection"

I fixed my scanning issue by typing in View Local Services, find Windows Image Acquisition (WIA), click on Log On, set Long on as: to Local System account with Allow service to interact with desktop checked, click OK.


You can set you default applications like that:

Click on the shutdown button on the top right of you screen
Go to "System Settings"
Go to Details (2nd, last row)

Go to "Default Applications"

Voilat! Here you can choose your default applications


Cannot update and install any software after installing ClamAV?

It looks like the package file is corrupted on disk.

Try

sudo rm /var/cache/apt/archives/clamav-base_0.97.2+dfsg-1ubuntu2_all.deb

and repeat the operation.


Samba could not change the permissions of folder "Network"

Connect and mount the drive to the Ubuntu computer. The format of the drive doesn't seem to matter.
DO NOT right-click on the drive and go into the sharing options via the drive’s properties. This will not work.
Make sure you have Samba installed. (You can find it in the Ubuntu Software Centre titled “SMB/CIFS file, print, and login server for Unix”)
Install, if you haven’t already, install the Samba GUI. (Also in the Ubuntu Software Centre titled “Samba” with a description of “Create, modify, and delete samba shares”.)
Run the Samba GUI. Search the dash for samba.
File|Add Share
Browse for the drive you wish to share and select it
Change the share name if you’d like to. (For this example my share name is “AlpahHD″)
Check “Writeable” if you wish to be able to write to this drive from other computers on the network.
Check “Visible” if you’d like others to see the share while browsing the network.
On the Access tab, select “Allow access to everyone” (This will avoid the problems of having to specify usernames and passwords in programs like XMBC and MediaPortal.)
Click OK (You should be done at this point but you’re not. This is what caused me the most headaches to find.)
Open a Terminal session (Ctrl+Alt+T)

cd /etc/samba
sudo gedit smb.conf

(Feel free to use the editor of your choice. I like Gedit.)
Scroll to the bottom of the file. There you should find [AlpahHD] (remember that’s the name of the share I created.)
Add the following new line in that section:

force user = username

(In my case username is “tim” since that’s the username I log in to Ubuntu with. Replace with your username.)
Save the edited file.
Restart Samba
    sudo restart smbd

You should now be able to access the shared drive from any Windows computer on your network.

Source


No sound and 'Dummy Output' in Ubuntu 14.04

I experienced a similar problem. In my case speech-dispatcher was not installed, but that doesn't seem to be the case for you. I recommend running:

sudo apt-get install alsa-base alsa-utils alsa-tools libasound2 libasound2-plugins

this will ensure that all the necessary packages are installed. Follow this with:

sudo alsa force-reload

to reload your alsa settings.


How to do "SUDO UPDATE and SUDO UPGRADE" without errors (NEWBIE)

You appear to be using an outdated End Of Life (EOL) version of Ubuntu, Ubuntu 12.10
Quantal Quetzal.

Upgrade to a newer version. Latest Long Term Support release is 14.04.

Also, please consider using pastebin next time rather than One Drive. Not sure about on a PC, but annoying on mobile.

Edit:

If this was a fresh install, rather than update process your better off downloading and installing latest from fresh iso.


Video lag after updating to 19.10 from 19.04

Finally got this fixed. Part of the issue is (what seems to be) a bug in Software & Updates video driver radio button code.
I built a new PC and installed xubuntu 20.04, nvidia drivers 440, same lag issue. Updated kernel from 5.4.0.42.46 to 5.8.3 with Ukuu and the res died: 1024*768, 76hz refresh, no other options, no connected displays. Software & Updates has a selected radio button for nvidia 440 still. But:
hwinfo --gfxcard
Driver Info #0:
    Driver Status: nvidiafb is not active
    Driver Activation Cmd: "modprobe nvidiafb"
  Driver Info #1:
    Driver Status: nouveau is not active
    Driver Activation Cmd: "modprobe nouveau"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

Then, Selected nouveau driver, apply, hwinfo says both drivers still inactive, restarted, looks good (hi res), nvidia settings absent from start menu settings, nouveau radio button highlit in software & updates,
hwinfo --gfxcard
  Driver Info #0:
    Driver Status: nvidiafb is not active
    Driver Activation Cmd: "modprobe nvidiafb"
  Driver Info #1:
    Driver Status: nouveau is active
    Driver Activation Cmd: "modprobe nouveau"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #7 (PCI bridge)

So nouveau is being used, problem fixed, nvidia definitely the culprit. I'll file a bug with them / that driver team.
After posting on Nvidia, the solution (for nvidia) was to Force Full Pipeline Composition in Nvidia X Server Settings, per this.


virtualbox kernel package is not supported while install vagrant

If the version of VirtualBox in the Ubuntu 12.10 repository does not support kernel version 3.8, you could try installing the most recent version of VirtualBox using the Oracle repository instead. More recent version of VrtualBox support more recent kernels.

Instructions for adding their repository are here:

https://www.virtualbox.org/wiki/Linux_Downloads

Note that you might need to uninstall your current VirtualBox and Vagrant packages first. Note also that the Oracle VirtualBox packages have different names.

Then, when installing Vagrant you will need to stop it from removing your new version of VirtualBox. You could try doing that by installing Vagrant from the Ubuntu repository but adding --no-install-recommends when you run apt-get, or you could try downloading and installing Vagrant direct from their website:

http://downloads.vagrantup.com/


Bash: populate a file name from present directory

Hit Tab twice. and your shell ( to find out echo $SHELL or getent passwd $USER | cut -d: -f7) will show you your choices.

Then, type the first few characters of the filename, and hit Tab again. If what you typed uniquely specifies 1 file, that filename will be filled in, if not, you'll see another list.


I had this problem just yesterday. I removed all my nautilus plugins, thinking that was the problem - but it seemed not to be.

In the end, I ended up noticing that the Desktop had been disabled all together. If you have GNOME-Tweak tool or Ubuntu-Tweak installed, re-enable the option to display Desktop icons, and your Desktop wallpaper will return.

Let me know if you need any further assistance in the comments.


Trying to install CUDA on Ubuntu 13.10 Amazon g2.2xlarge GPU Cluster

You could try:

sudo apt-get install nvidia-cuda-toolkit nvidia-profiler nvidia-cuda-dev nvidia-visual-profiler

This should install it and the unmet dependencies. If this does not work, these packages may not exist in these versions in your Ubuntu installation. Maybe you should try enabling multiverse?


Are the Ubuntu App Developer Showdown Workshops recorded?

Workshops can be seen live and are recorded to watch later on the Ubuntu App Showdown Workshops page


How to permanently edit the core_pattern file?

The /proc/sys/kernel/core_pattern configuration setting is set when the apport crash reporting service starts on system boot.  So the first step in the process would be to disable apport.  This can be done by editing the /etc/default/apport file, and setting enabled=0.

At this point, the kernel default core pattern should remain on boot.  If you want to switch to some other pattern you can do this by placing a file in /etc/sysctl.d that ends in .conf (e.g. 60-core-pattern.conf).  It's contents should look something like this (adjusting for your desired pattern):

kernel.core_pattern = core

That should cause your custom pattern to be loaded on boot.  You should be able to test it without rebooting by running sudo sysctl --system.


How can I make my shell scripts run in a new console automatically?

You could run your script in another terminal emulator window, I suppose gnome-terminal with the command

gnome-terminal -x ./script

You could simplify the process defining a function in your ~/.bashrc

start() {
  gnome-terminal -x "$@"
}

where can choose the name you prefer instead of start. You use the function in this way

start ./command arg1 arg2

(you need to restart the terminal for the shell to know about the new function).

As you can see, there is a little problem, the window closes once the command terminates. To avoid this you could wrap your command in a shell script and add a last line with a read command:

#!/bin/sh
# script

./command arg1 arg2
read answer

Then when you call

start ./script

it will not closes, waiting for your input.

Unfortunately, It is difficult to automate this in the start function.


Try doing sudo apt-get install steam then remove it again.


ARP.

The Address Resolution Protocol translates IP addresses to MAC addresses.


tar: Removing leading `../' from member names

From tar manpage:

-P, --absolute-names
      don't strip leading '/'s from file names

You should run:

sudo tar cPf - ../Documents | tar xPf -


Ubuntu has wrong resolution and won't let me change it

Run

sudo apt-get install mesa-utils

in terminal.This should hep you to change to correct resolution.
In case your drivers are not upto date , try installing proprietary drivers from the Software and Updates section of ubuntu.


Yes,I may help to solve this.

Right click the Kmix icon, click Select Master Channel.
In the current mixer,choose your Built-in Stereo Analogan.


Boot from an Ubuntu livecd and then download and install refind, for that see How do I permanently install rEFInd onto my mac from Ubuntu (without using mac os) and Installing rEFInd Using install.sh under Linux.


I can not install the evolution in Ubuntu 14.04.1 LTS

solved in answers.launchpad.net/ubuntu/+source/evolution/+question/258829 after inclusion of all previously switched off, jackdaws in repositories in Synaptic tab "software" and remove some of the old in the "other software" .and .....WAU.....evolution (his test release 3.12) has been successfully installed !


dpkg: error processing package linux-image-generic (--configure): dependency problems - leaving unconfigured

I had this issue just now.  What I did was purge the errant package using dpkg in my case then update and force the reinstall:

sudo dpkg --purge linux-image-3.13.0-35-generic
sudo apt-get update
sudo apt-get -f install

The installation process may take a bit longer, but it worked in the end.


Unable to prepare a bootable usb stick with 15.04 in Trusty

It's a bug. An incredible one....

In the release notes of 15.10 beta, you can read:

  Due to changes in syslinux, it is not currently possible to use
  usb-creator from 14.04 and earlier releases to write USB images for
  15.04; we believe that it is also not possible to use usb-creator from a 15.04 system to write USB images for earlier releases. For now the
  workaround is to use a matching release of Ubuntu to write the images,
  but we intend to issue updates soon to work around this
  incompatibility.

See the bug here: https://bugs.launchpad.net/bugs/1325801

So it seems that, for the time being, you need 15.04 or later to build a bootable USB for 15.04 or later. Catch 22...

So to work around this issue now: create an old-fashioned DVD or
try to use the mkusb method explained in  https://help.ubuntu.com/community/Installation/FromUSBStick .


Slow Performance of Ubuntu16.04 inside VMWare on laptop

Running a guest system on a host, that does not support hardware virtualisation, in general makes the guest (and host) slow and the whole experience not much fun.

As you are running a windows system with intel-chip this tool might help you to detect if VTx is enabled: https://www-ssl.intel.com/content/www/us/en/support/processors/processor-utilities-and-programs/intel-processor-identification-utility.html
If it is not enabled you might have the chance to enable it in your BIOS - if not the show is more or less over.

To enhance the performance of your ubuntu-guest install open-vm-tools - via sudo apt install open-vm-tools - inside your guest.

The systemd-analyze blame results you posted, clearly show that apt-daily.service is the culprit for your long boot time - this might be a one-time situation especially when there are many updates to fetch.

If this process always needs that long you could disable it via sudo systemctl disable apt-daily.service- yet I can't recommend this, as it takes care that your package-informations stay up to date and you are informed of updates.


How to fix all applications missing in Ubuntu's dash?

The problem seems to have been fixed; the apps are showing up again. I am not sure what fixed it, but here are all the things I did before the next reboot:

I renamed unity-scope-loader to unity-scope-loader.bak in /usr/bin. I
tried to reinstall libunity9 though it always gave me an error that it couldn't overwrite unity-scope-loader. Finally, I ran sudo dpkg-reconfigure libunity9.


If you're having problem while installing netbeans why don't you try this method:

Download this bash file from their official site
wget -c http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-linux.sh

Give executable permissions to the downloaded file
chmod +x netbeans-8.2-linux.sh

Now execute this file and it will lead to install netbeans
sudo ./netbeans-8.2-linux.sh

Happy Coding!


WinUSB install error Installation failed! Exit code: 512

The problem here is with the method used to install GRUB. It has nothing to do with the current filesystem on thumbdrive as WinUSB formats it.

To fix it you must edit the winusb script which is located in /usr/bin. Open it with any text editor with root permissions (e.g. gksu gedit /usr/bin/winusb). Now search for grub-install in that file (it may be on line 401 - 402) and change that line so it looks like this:

grub-install --target=i386-pc --boot-directory="$partitionMountPath/boot" "$device"

Save the script. Install the package grub-pc-bin as follows:

sudo apt-get install grub-pc-bin

Now, try again to use WinUSB.

WinUSB only creates MBR bootable USB drives. If you want to install Windows in EFI mode a different method should be used.

I also wrote about this on my website.


Ubuntu doesn't calculate expression in [ ..]?

The ((...)) conditional expression evaluates an arithmetic expression
like it was written in a "normal" algorithmic language (you can even
omit dollar signs from the variables) and sets the exit status to 1 if
the expression evaluates to 0, or to 0 if the expression evaluates to
a non-zero value.
In bash version 3.2 and later you can (and should) use $(( ))

Quote from this
What is bash?

Descended from the Bourne Shell, Bash is a GNU product, the "Bourne
Again SHell." It's the standard command line interface on most Linux
machines. It excels at interactivity, supporting command line editing,
completion, and recall. It also supports configurable prompts - most
people realize this, but don't know how much can be done.

You should use (( )) for math expressions:
echo "$(( 2*3 ))"

or
echo "$(( $X*$Y ))"

or even
echo "$(( X*Y ))"

Why does echo $[..] also works in some environment?

Arithmetic Expansion
Arithmetic expansion allows the evaluation of an arithmetic
expression and the substitution of the result. The format for
arithmetic expansion is:
$((expression))
The old format $[expression] is deprecated and will be removed
in upcoming versions of bash.


How do I install the manpage from node.js' source tarball?

It's not man nodejs, but man 1 node. And it will be there by default.

It will be installed for you with the regular installation method (e.g. sudo make install) as the tools/install.py called from the Makefile will take care of it:

if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
  action(['doc/node.1'], 'man/man1/')
else:
  action(['doc/node.1'], 'share/man/man1/')

In other words, it installs node.1 for you in /usr/share/man/man1/.

To read the manpage directly from the source, you can do:

man /path/to/nodejssource/doc/node.1


Will software in Ubuntu work in Xubuntu as well?

Yes all the software that work on Ubuntu 12.04 will definitely work on Xubuntu 12.04, after all both these Operating Systems are based on same Debian and Ubuntu base.


User-editable system wide configuration files in snap packages

What I'm generally doing is having the software reading multiple files:

user configuration
global configuration
default configuration

Each keys (like if it's yaml or json, or just key-value pair) that are upper on the stack overrides the ones below.

That way, you can ship your default configuration in $SNAP, if the user set a global configuration, he can tweak (or copy) in $SNAP_DATA with the same file name. and same at user's level with $SNAP_USER_DATA`.

Note that you can ship a configuration app as part of your snap to scaffold your configuration files.


Can you provide a full MySQL Workbench log file (execute MySQL Workbench with --log-level=debug3 command line arg)? I know this shoud be posted as comment, but my reputation not allow me fro that.


The steam controller works as a generic mouse until you start Steam and open big picture. I have had trouble with the mouse function over wireless when Steam isn't launched, but most of that really doesn't matter. Steam allows you to set shortcuts from inside the program. If your emulators have desktop launchers, or you are willing to create a desktop launcher for them, then you can also open them as non-steam games, which will allow you to set custom controller bindings on a per-game basis from the steam overlay.

So the answer is yes and no.

My recommendation is that you try setting your games as steam shortcuts, and then try and set controller bindings to either gamepad outputs, or keyboard and mouse outputs.

The steam controller, in my opinion, is great because of this- while you need the steam overlay, it really can emulate a keyboard and mouse, and do so much more than a traditional gamepad.


Can I use my old home partition and just format the root partition when installing Ubuntu?

If won't be picked up, unless you explicitely mount the home partition as /home. To do that, select the Manual Partitioning option (also known as Something Else), and select the appropriate mount point for the home partition.


How do mimeinfo.cache files relate to mimeapps.list?

Copy the desktop file from /usr/share/applications/ to ~/.local/share/applications/
and modify as needed.

Just remove some entries in MimeType

...
MimeType=text/html;text/xml;application/xhtml+xml;
...

Afterwards restart session.


Is it possible to do an upgrade without having to answer questions?

The following might help you :

edit/create /etc/dpkg/dpkg.cfg.d/force-confnew

sudo vim /etc/dpkg/dpkg.cfg.d/force-confnew

and add the following :

force-confnew

It'll say to dpkg to always put the package maintainer version of the file.

Delete the file when your upgrade is finished.

update-manager will still ask you the basic questions but it'll not ask you about if you agree to change this or that file.

Dpkg may still have questions but it is better for you to not disable it. If you still want dpkg to be quiet replace force-confnew by force-all

WARNING 1 : This is a dangerous option. It'll delete any modifications you made on the files that are changed. And with this option you'll not be aware witch file is changed.

WARNING 2 : As 12.04 is still in development the packages that are installed can have bugs. This include trouble in the installation/upgrade process. It may break your system.

Best regards,


How to get response from ssh command using expect

Try this:

send "show interf\r"
expect -re {HW address:\s+(\S+)}
set hw_addr $expect_out(1,string)
puts "the HW address is $hw_addr"

send "exit\r"  ;# or quit, or whatever
expect eof


@Hominid999,
Please be aware that xrdp can be used with UBuntu Gnome Desktop and can present exactly the same desktop look'n feel when connected through remote connection.
If you have performed a manual installation of xrdp, there are some post configuration actions that are required in order to provide the best user experience
To have the Ubuntu gnome desktop with dock bar presented to you, you can
Option 1 - Manual Fix
Try to create and populate the file ~/.xsessionrc with the following content
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg

Please note that the .xsessionrc file is a hidden file (located in your home directory)
This would be for a single user. If multiple users need to perform remote connection, each user would need to have this file created in their profile
Option 2 - Automated install
You can also use the xrdp-installer script that basically perform the installation of the software and perform some post configuration actions that would provide you the same look'n feel when remotely connected as the one you have when connected to local console
the script (current version is 1.2.1) and how to use it can be found here
Please always check for the latest version of the script at this location
Hope this help Till next time See ya


How can I execute scripts as root without pointing to its location?

Bash aliases

Aliases are the shortcuts in the command line. The regular shell, Bash, allows you to create your own aliases.

To try it out (without saving them permanently), try this:

alias myalias='gksudo gparted'
myalias

To save them permanently, create a file ~/.bash_aliases like this:

alias myalias='gksudo gparted'
alias edsources='gksudo gedit /etc/apt/sources.list'

The default ~/.bashrc file installed for users in Ubuntu will source the ~/.bash_aliases file by default.

Aliases allow you to append more arguments and 'overrule' current commands too. A common use case of this is

alias rm='rm -i'

To get a confirmation message for everything you try to delete with rm.

In case you want to 'escape' an alias by running the original command, prepend it with a backslash. So, with the rm example, just do

\rm myfile

to remove the file without the -i option forced by the alias.

Current script

About your current approach, you should just be able to prepend the command in the one-line script with sudo (or gksudo).


Ubuntu Studio, like all flavors of Ubuntu (including Ubuntu itself) have all their packages in the same repositories, so you can install them on top of each other.
There is no need however, to install the Ubuntu Studio desktop, unless you want.

To prepare Ubuntu for pro audio, this is all you need to do:

sudo apt-get install ubuntustudio-audio linux-lowlatency

Make sure to answer "yes", when asked about realtime privilege, while installing jackd. If you already installed it, make sure the file /etc/security/limits.d/audio.conf is not named /etc/security/limits.d/audio.conf.disabled. If so, rename it to the former.
Finally, in order to get the benfit of realtime privilege on Ubuntu, you need to add yourself to audio group. In a terminal:

sudo usermod -a -G audio $USER

If you also would like to try the Ubuntu Studio desktop, install it as well (it has a custom menu that you might find useful):

sudo apt-get install ubuntustudio-desktop

It won't replace Unity. When logging in, click the CoF button (the icon) to choose which desktop environment to login to.

Reboot. Make sure you boot into the lowlatency kernel. Enjoy!


how to install tomcat6 in ubuntu 16.04 using apt-get install

You'll have to download the tar file, decompress and move to a directory of your choice. You can choose a mirror here and get a different download link.

My steps:

$ wget http://ftp.unicamp.br/pub/apache/tomcat/tomcat-6/v6.0.53/bin/apache-tomcat-6.0.53.tar.gz
$ tar xvzf apache-tomcat-6.0.47.tar.gz
$ sudo mkdir /usr/local/tomcat
$ sudo mv apache-tomcat-6.0.47 /usr/local/tomcat

I'm almost sure that Tomcat 6 works in Java 6, so additional steps are required if your Ubuntu is using, for instance, Java 8.

As Java 6 is no longer distributed for Ubuntu, you'll need to download a legacy package and install manually, according to this answer.

$ chmod a+x jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ mv jdk1.6.0_45 java-6-oracle
$ sudo mv java-6-oracle /usr/lib/jvm

And now, you can switch java version using either update-alternatives or galternatives.

Additionally, modify your .bashrc file to set JAVA_HOME variable:

export JAVA_HOME=/usr/lib/jvm/java-6-oracle


Why bluetooth or USB 3.0 fails to load during booting?

You might need to blacklist ath3k with

echo "blacklist ath3k" | sudo tee /etc/modrobe.d/ath3k.conf
Reboot and open a terminal and enter sudo modprobe ath3k to see if it makes a difference with your USB 3.0 ports as ath3k could be trying to load the firmware at a bad time.


Time indicator is not showing the date/time

It's likely that the indicator is misconfigured.

Try to click Time & Date settings in your screenshot, in the next window choose clock and play with those settings.

If this doesn't work try this command, it will change the potenciall most complicated of your clock settings to the defaults:

gsettings set com.canonical.indicator.datetime time-format locale-default


Always on Top function missing on FF, Chromium, Opera

I just found the answer to my problem. If I am in the resize window cursor and I hold the super key down while I click BOTH Left and Right mouse buttons simultaneously I get the menu with the "Always on top" option.


I solved it by disabling "Suspend to RAM" in the boot menu.


I don't know why this just happend now, but this fixed my problem.

sudo nano /etc/NetworkManager/NetworkManager.conf

and add these lines

[device]
wifi.scan-rand-mac-address=no

Apperently my mac-adresse was changing constantly, which is a known 17.04 bug.


Laptop monitor plus two external monitors

Depending on your hardware. Most laptops are not able to do so. Linux is able to, if the hardware is supporting this.


Receiving Permission denied when trying to use cat command to create a file

I'm not an expert on cat but I suspect the command as you've entered it above will produce an error by design.  Cat is used to print and concatenate files.

Example commands with cat are cat filename.yaml which will  print the contents of filename.yaml to standard output (i.e. the terminal); while cat file1.yaml file2.yaml > filename.yaml will combine the contents of the existing files file1.yaml and file2.yaml into a new file called filename.yaml.


How to install and run Anbox in Ubuntu 18.04?

Anbox is now available for Bionic 18.04+:

Official Website
GitHub sources
Installation instructions
Install guide

Installation on Ubuntu 18.04:

sudo add-apt-repository ppa:morphis/anbox-support
sudo apt install -y anbox-modules-dkms
sudo modprobe ashmem_linux
sudo modprobe binder_linux
sudo snap install --devmode --beta anbox


Because it is not mantained anymore.
From its official webpage:

  News
  2013-08-25: Stop maintain.

I think that if you want to go in and developing/mantaining it no one will stop you! :D


How to get my grub2 Ubuntu  Win10 Bootloader (back)

This is what will get you going (in case you don't have a handy Live-USB). Once in grub prompt :

List partitions

grub> ls

  (hd0) (hd0,msdos2) (hd0,msdos1)

Identify Linux partition

If you don't know which is the Linux bootable partition try

grub> ls (hd0,1)/  the ending slash means root ~ lists the root of partition 1

On my system it was (hd0,msdos5) so the command would be :

grub> ls (hd0,5)/

The output should be similar to :

  lost+found/ bin/ boot/ cdrom/ dev/ etc/ home/  lib/
  lib64/ media/ mnt/ opt/ proc/ root/ run/ sbin/
  srv/ sys/ tmp/ usr/ var/ vmlinuz vmlinuz.old
  initrd.img initrd.img.old

Boot into Linux

Using tab key will auto-complete kernel names in the commands bellow

grub> set root=(hd0,5)
grub> linux /boot/vmlinuz-4.13.0-39-generic root=/dev/sda5  *
grub> initrd /boot/initrd.img-4.13.0-39-generic
grub> boot

* sda1 corresponds to (hd0,1) - mind that in GRUB partitions and devices were indexed startinf with 0 whereas in GRUB 2 partition indexing starts with 1

Locations of kernel files are probably sym-linked so this gets simple

grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot

That should boot into Linux, no questions asked.

Fix GRUB

$ sudo update-grub

At this point the boot should be recovered no matter the number of present operating systems. Including windows.

The honor for those instructions goes to Carla's How to Rescue a Non-booting GRUB 2 on Linux post. I recommend reading it as it includes many details and know-how.

I dare say that my system's boot got corrupt by Win10 update. However, one should never say that Windows or Bill shouldn't exist. They were a historical driving force which created the right circumstances for such a great OS as Linux.


How do I install CUDA on an EC2 Ubuntu 18.04 instance?

You should follow the official AWS documentation for EC2 to use NVidia there. You must also have a GPU-enabled instance. The regular instances do not have NVidia access, as I understand.


control brightness on the second monitor

the Brightness Controller should be able to manage brightness of the second monitor:

http://www.omgubuntu.co.uk/2017/05/adjust-external-monitor-brightness-ubuntu

If it's not the case anymore, as a temporary solution you can have your first approach with command line interface, if you execute the following command you can get the list of displays:

xrandr -q | grep " connected"
LVDS connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
DisplayPort-0 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm

my second screen is commected via DisplayPort-0, I copy and use that information to perform the next command and fix bightness:

xrandr --output DisplayPort-0 --brightness 0.7


Enabling the error log for cups might show something useful: Press Alt+F2 and type

gksudo gedit /etc/cups/cupsd.conf

Then find the line that saysLogLevel warn and change it to LogLevel debug. After rebooting, there should be a file called "error.log" in /var/log/cups/. Make note of its last line, then try to print something. Does something new appear in the log?


Where do I submit a bug report for video scope on ubuntu phone?

It's probably the Unity Media Scanner Scope (unity-scope-mediascanner). At least the settings screen with "Display results from My Videos" is in there.

I just search the source code using Google like that:

"<some phrase from the UI>" site:https://launchpad.net


A trick I picked up when adjusting someone else's computer:

For temporary limits, add the -o flag to your apt-get command:

sudo apt-get -o Acquire::http::Dl-Limit=25 install <package>

For permanent throttling, create the file /etc/apt/apt.conf.d/75lowerspeed and save the following in it:

Acquire
{
   Queue-mode "access";
   http
   {
      Dl-Limit "25";
   };
};

Both methods limits apt-get to 25 kBps (kilobytes per second).

You can also use a traffic shaping program, such as wondershaper  or trickle .


Cannot change icon on folder on desktop of 20.04

I don't think it's a bug. GNOME developers removed the SW code related to some desktop operations. EDIT: If you notice, for example you cannot do copy/paste operations directly on the desktop, you can do them only if you operate directly inside the Desktop folder. Similarly, you can create new files/folders only if you are inside the desktop folder, but not with a right click of the mouse in yur desktop. For example, drag and drop from a folder to desktop is not possible.

I've recreated your scenario in my Ubuntu 20.04 installation and what happens is the same as in your installation: I can change the icon from inside the Desktop folder, but I cannot see the new icon from the Desktop.

I don't know if it really exists a way to solve it, due to the fact that GNOME lacks of code to perfomr operations directly from the desktop (by a voluntary programmers decision)


What is the actual package name for the appearance app?

Appearance is one of the the control panels in the GNOME Control Center. In Ubuntu 11.10, the specific command to bring up Appearance is gnome-control-center background. (This is what gets run when you search for Appearance in the Unity dash and click on the result.) The package that provides GNOME Control Center executable has the same name as that executable: gnome-control-center

In earlier versions of Ubuntu, there was a specific executable that got run to bring up the Appearance control panel: gnome-appearance-properties (But this was still provided by the gnome-control-center package.)

In case you're interested, to find out this information, I opened a Terminal window (Ctrl+Alt+T) and created a file called 1 containing information about all the running processes on my system:

ps ax > 1

Then I opened the Unity dash and searched for Appearance, and clicked on the one search result. The Appearance control panel came up. I returned to the open Terminal window and created a new file called 2 containing information about the running processes on the system now:

ps ax > 2

Then I compared their contents:

diff 1 2

That gave me this text, in which there were only a few unpaired entries, of which the one that was most obviously correct was gnome-control-center background. (Then, if you're not sure that's the right one, you can check your answer by running that command to see if it brings up the Appearance window.)

Then I went to the online Ubuntu package information database, and under "Search the contents of packages", made sure "Oneiric" was selected as the release and searched for gnome-control-center. That revealed that this executable is provided by the package of the same name.

That's somewhat technical (and there's other ways to do it, like by looking in .desktop files to find the command), so please feel free to continue posting questions about this sort of thing. But if you feel up to it, you might be able to figure out the answers to these kinds of questions when you have them in the future...and when other users ask them.


Why does the run level change automatically?

Run level 2 is not reboot, in fact it is the normal run level. 6 is reboot. Also you generally want to use telinit 6 not init 6. It is more portable between different unix implementations.

What you really want is an actual abstraction to just reboot the box though. I suggest using reboot instead of trying to understand runlevels.


Cannot boot: “No init found. Try passing init=bootarg” standard fix not working

This bug sounds like a core problem with Ubuntu. It appears that your init file is missing or corrupt. There are two ways to solve this problem:
Option 1

You can simply re-install Ubuntu. This is the simplest and most reliable method of solving this problem. It also always works.
If you want to save your data, use a LiveCD in "Trial" mode and copy all important stuff to a
USB drive. You can then install directly from the drive.

Option 2

It is theoretically possible to pull a working init executable from a working installation and putting that in your /sbin folder. This, however, is rather complicated. You can try doing this:

Mount the install drive to the /mnt folder
As root, copy the init file from /sbin/init to /mnt/sbin/init.
Verify and copy the permissions from the working install to the bad install.
Test by rebooting.

You should only do this on functionally identical installs. Meaning, don't use a livecd. Instead, use a spare hard drive.

Pull out the current laptop hard drive and put it in an external caddy. Put the clean drive into the laptop and install Ubuntu. Then, mount and copy.


how to install nvidea drivers of my alienware m14x , ubuntu 14.04

The standard Ubuntu Nvidia drivers generate some problems on slightly older and slightly newer Nvidia hardware.

If you want more then the standard Ubuntu repository drivers, install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do.

If you don't know what a PPA is or need some guidance after reading their page, leave a comment below.


Ubuntu 12.04 Hangs with Software Center open then opening Dash Home

Mahesh, I just reinstalled for the 3rd time this time I was connected to the internet (other times I was not). I did all updates, configured my wireless (only device that needed a driver .. broadcom card) and EVerything works fine. I have 8 tabs open now in FF, software center, + opened dash home -Success all is well. I can not wait to install this OS on my Asus G73 with SSD!!!
Yes all the KB shortcut keys work. I held the magic key by mistake and many KB options appeared! What an AWESOME OS!


Removing and reinstalling ssh on the server worked for me :

My master node is : 192.168.1.6

My client is:  192.168.1.4

On the master I did this:

sudo apt-get remove openssh-client openssh-server
sudo apt-get install openssh-client openssh-server

Now from my client I did this:

root@ubuntu:/home# ssh 192.168.1.6
root@192.168.1.6's password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic i686)

 * Documentation:  https://help.ubuntu.com/

131 packages can be updated.
67 updates are security updates.

Last login: Thu Oct 24 15:18:34 2013 from ubuntu.local


Cannot boot into new install of Ubuntu 14 Server

SOLVED! Have solved this now, after talking to HP Support. Was actually, as you suggested, a Hardware (well BIOS) setting issue. The BIOS was set to only show the HP Smart Array Controller, so the system could not see the SATA HDDs on boot at all (I am not using the HP Smart Array Controller). Had to switch up the SATA settings in BIOS from using Smart Array to using SATA AHCI Support. Now it all works! Thanks anyway


You forgot the if= so using the correct syntax and sudo ;-) you get:

sudo dd if=/home/ubuntu/Desktop/tails-i386-1.5.iso of=/dev/sdc bs=16M && sync

From man dd:

if=FILE
      read from FILE instead of stdin


No EFI System Partition was found but I don't have a UEFI and the installer is in legacy mode

What my problem was:

The installer was running in UEFI mode (there were files in /sys/firmware/efi) even though my system doesn't support UEFI and Windows 7 is installed in BIOS mode. In my BIOS's boot menu, there was only one option: to boot from USB HDD. To create the bootable USB stick, I initially used Rufus but I also tried Universal USB Installer; I'm not sure if that made any difference.

What worked for me:

after an unsuccessful installation (not sure if this is relevant) that failed with "The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.", I closed the error message, rebooted into Windows, deleted the EFI folder in the USB drive, restarted, booted from the USB drive and got .

(Before, I was taken straight to the installer screen.) This time, Windows 7 was correctly identified by the installer (although I didn't get the "Install Ubuntu alongside Windows" option that assists with the partitioning). The only option is to select "Something else" as the installation type to manually do the partition. Since the Ubuntu root partition would leave me right at the limit of 4 primary partitions for BIOS, I decided not to create home and swap partitions. (Look into extended partitions if you'd like to have those.) The installation proceeded smoothly after that.


If your kernel images and headers had been installed from deb packages, not from repositories, you can remove them by

sudo dpkg -r linux-image-x.x.x.x-xyz linux-headers-x.x.x.x-xyz

But using synaptic is much easier. you will see what are you doing in GUI.


How to disable internet for a user on a system

As described here, you can block all Internet access for certain users using this iptables command:

sudo iptables -A OUTPUT -m owner --uid-owner {USERNAME} -j REJECT

If you want this command to run automatically when the system starts up, you should add it to the end of your /etc/rc.local file.

While this won't make it impossible for those users to create sockets, it will block all outgoing traffic (like a firewall).


When will Apache 2.4.2 be available in a ppa or normal pkg release?

Here's a PPA that works for me on 12.10: https://launchpad.net/~derek-morton/+archive/apache-2.4

and for 13.04: https://launchpad.net/~rhardy/+archive/apache24x


Weird pixelated checkerboard when installing Ubuntu 12.04

Try to boot through grub into the advanced mode and recovery mode.  Once the recovery window pops up, select resume.

If this works, check out grub start option nomodeset for the GRUB_CMDLINE_LINUX_DEFAULT and update afterwards with

sudo update-grub2


How do i make my jar file execute like a regular application from Terminal

First, cd into the directory containing your .jar file, and run:

chmod +x program.jar

Next, run:

nano ~/.bash_aliases

Then, add this line to the file:

alias custom_name='java -jar /full/path/to/.jar'

Exit nano saving changes, and restart the terminal window

Now, you can run it from anywhere like so:

custom_name {args}


How to execute some commands while background task of bash script is about to be killed

In case you wan't to execute some code before being executed you could use trap:

 #!/bin/bash
 trap "echo Exiting" SIGINT SIGTERM
 read

More info here.


VLC media player not working: No Interface

TL;DR: sudo apt install --reinstall libqt5svg5

On Ubuntu 18.04 fresh install I also got this issue.
It actually seems to come from some graphical libraries not being installed properly.
Here's my debug story.

First run in verbose with vlc -v as suggested by @kissste:

vlc -v
VLC media player 3.0.3 Vetinari (revision 3.0.3-1-0-gc2bb759264)
main libvlc warning: cannot load module `/usr/lib/x86_64-linux-gnu/vlc/plugins/gui/libqt_plugin.so'
(libQt5Svg.so.5: cannot open shared object file: No such file or directory)
main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
skins2 interface error: cannot instantiate dialogs provider
...
> Shutting down.
[000055cbfba501b0] [cli] lua interface: Requested shutdown.

So in my case it's complaining about libQt5Svg.so.5 not being found.
Let's check from which package it comes using dpkg -S:

dpkg -S libQt5Svg.so.5
libqt5svg5:amd64: /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9.5
libqt5svg5:amd64: /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9
libqt5svg5:amd64: /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5

We have the package name libqt5svg5 and we also have the path where the file should be, let's verify it's indeed not there with ls:

ls -l /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5*
ls: cannot access '/usr/lib/x86_64-linux-gnu/libQt5Svg.so.5*': No such file or directory

The funny thing is I just installed vlc so the package manager should have pulled the libqt5svg5 dependency itself. I'm curious so let's very if it's installed with dpkg --list:

dpkg --list libqt5svg5
||/ Name                  Version         Architecture    Description
+++-=====================-===============-===============-================
ii  libqt5svg5:amd64      5.9.5-0ubuntu1  amd64           Qt 5 SVG module

So yes it's installed, but probably broken then so we need to reinstall it:

 sudo apt install --reinstall libqt5svg5

Running vlc again with -v flag the warning message is gone and I can see the vlc UI.


Kubuntu 19.04 installer unusable at 800x600 in Virtualbox

I had seen the same issue trying to install Kubuntu 17.10 and 18.04 in VirtualBox.

The workaround in post #8 in the thread to which I linked above, is just to grab the title bar of the installer window and drag it to the left till the next or continue buttons are visible.


why the localhost page isn’t working in lampp (ubuntu)

Browsers, like Google Chrome and Mozilla Firefox, show this error
   as:

 Error 310 (net::ERR_TOO_MANY_REDIRECTS): there were too many
   redirects

This problem may be caused either at the client end or the server end.
   If there is no redirection loop on the server side, the problem is
   likely to be solved just by deleting cookies.

Go to Settings → Show advanced settings → Clear browsing data under Privacy options.

If this doesn't solve problem, I would
   recommend that first of all you check your .htaccess file. Look for any
   cyclic or too many redirection codes. Try to keep your .htaccess file in
   a clean state because if this file will become confusing, it can really
   break your website.


If you don't have anything valuable in your Fedora, you can just boot from Ubuntu Live CD and install over Fedora (choose manual partitioning, select Fedora's root partition as your root partition, tick Format, etc.)

If you have anything valuable there, then you need to make a backup first. If your /home is on a separate partition you can keep the data there, but having a backup is still a good precaution.


Ubuntu stuck in splash screen after using GPU for computing

Install the latest official stable (short-lived branch)  NVIDIA drivers 355.

But first uninstall every NVIDIA related software you had installed before.

Boot Ubuntu and when the login screen appears press Ctrl+Alt+F1.

Enter your user name and password and then execute:

sudo apt-get purge nvidia*
sudo reboot

If you have had bumblebee installed the commands are:

sudo apt-get purge nvidia* bumblebee
sudo reboot

Now install the new drivers and NVIDIA Optimus support.

When the login screen appears press Ctrl + Alt + F1.

Enter your user name and password and then execute:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot

Boot into BIOS and select "switchable graphics mode".


The manual should also tell what to put in the ~cad/etg/hope directory.

All the listed commands should be typed at the Terminal prompt. Hold CTRL and ALT keys, then press T - that will open a Terminal.
Each command needs a press on ENTER at the end, this to get it executed.

Note that ~cad in the description above may be directly replaced by $USER - and the instructions will work directly (with that change).

So "cd ~cad/etg/hope"  becomes cd $USER/etg/hope

Create the hope directory, if it doesn't exist:
mkdir -p $USER/etg/hope

Create the bin directory, if it doesn't exist:
mkdir -p $USER/bin

This more complex command will tell which file that contains "PATH" (the portion before ':' is the name).
cd; grep PATH .* 2>&1 | grep -vE 'dir|denied'

You need to edit that file and append :$USER/bin to the end of the line that contains PATH=

To edit the file, type
nano name_of_the_file

With nano running; the bottom of the screen will contain keys to press to access functions in nano - i.e. saving the file, and exiting nano.
Note that ^ denotes holding down CTRL and pressing the listed key.

If the 'complex command' above doesn't print anything, then there is NO file that contains PATH; then type:
echo >>.bashrc 'set PATH=$PATH:$USER/bin'
note the use of '-quotes, this is an important difference here.

Then:
setenv HOPE_MAN $USER/etg/hope
... add it to the end of the same file (on a new line) as where you put PATH e.g. with
nano .bashrc
... if that is where PATH ended up.


Modinfo, /etc/modules and lsmod: incoherent output?

The legacy real-time-clock driver rtc certainly exists:

./linux-3.2.0/drivers/char/rtc.c

but I believe it's only used in the module context as an include while building modules for specific RTC devices. For example, here's the rtc drivers available for Ubuntu's Linux kernel 3.2:

izx@i5:~/src-kernel$ ls /lib/modules/3.2.0-24-generic/kernel/drivers/rtc/
rtc-88pm860x.ko  rtc-ds1742.ko    rtc-max6900.ko   rtc-rs5c372.ko
rtc-ab3100.ko    rtc-ds3232.ko    rtc-max6902.ko   rtc-rv3029c2.ko
rtc-ab8500.ko    rtc-ds3234.ko    rtc-max8925.ko   rtc-rx8025.ko
rtc-bq32k.ko     rtc-em3027.ko    rtc-max8998.ko   rtc-rx8581.ko
rtc-bq4802.ko    rtc-fm3130.ko    rtc-mc13xxx.ko   rtc-s35390a.ko
rtc-ds1286.ko    rtc-isl12022.ko  rtc-msm6242.ko   rtc-stk17ta8.ko
rtc-ds1305.ko    rtc-isl1208.ko   rtc-pcf2123.ko   rtc-v3020.ko
rtc-ds1307.ko    rtc-m41t80.ko    rtc-pcf50633.ko  rtc-wm831x.ko
rtc-ds1374.ko    rtc-m41t93.ko    rtc-pcf8563.ko   rtc-wm8350.ko
rtc-ds1390.ko    rtc-m41t94.ko    rtc-pcf8583.ko   rtc-x1205.ko
rtc-ds1511.ko    rtc-m48t35.ko    rtc-r9701.ko
rtc-ds1553.ko    rtc-m48t59.ko    rtc-rp5c01.ko
rtc-ds1672.ko    rtc-m48t86.ko    rtc-rs5c348.ko

As Florian asked, why do you need this module? What is your platform? Are you using a specific RTC device?

/etc/modules is used to load external modules at startup -- the modules (.ko files) must first be present under /lib/modules/your-kernel-version/....; just having them in /etc/modules means nothing.

You can safely remove rtc from /etc/modules.


So, my question is if there's any problem by removing this program (I never use remote desktop),

No.

  And also, does removing them improve my security?

No. Ubuntu is shipped as secure as possible. If Remmina would be a security problem by just being installed it would have been removed from our installation. And any Linux system for that matter. Security is not taken lightly in Linux installations.

In general: you need to have vulnerable services exposed to the internet for someone to enter your systen. So for someone to abuse Remmina to access your system it 1st needs to be active (it is not when not running).

If you are concerned about this I would approach this from another point of view: your 1st line of defense is your router. Check that 1st for possible security holes. Like: is there any forwarding that does not need to be there. Update your router software (I installed DD-WRT on mine). Enable logging on the router and if possible enable alert/mail messages.

And on your Ubuntu system check for running services and disable them if you do not need them. In a default Ubuntu there are not a lot of services to disable though.

And of course it is always good to think about the value of your system to other people. If you have a normal desktop system it should not be of interest unless you pissed someone off really bad and they want to target you specifically. If you have a system with several webshops running on it security needs to be one of the main priorities. Those might be targetted by automated scripts.


I found the solution. The same encryption issue was preventing playback on an Irish video on demand service.

Close all browser windows and then:

Remove the adobe cache:

rm ~/.adobe -rf

Install hal & hal-info:

sudo apt-get install hal hal-info

Reinstall adobe player:

sudo apt-get install flashplugin-installer --reinstall

Credit to TokyoCrusaders92 on this thread.


How do I give Ubuntu more space (when installed inside Windows 7 (via wubi))?

Additional virtual disks are only useful if you're able to split the filesystem (eg putting /home/ on it) so aren't much use if you've installed a ton of stuff. You can split things like /usr/bin but it can get really messy, really fast.

Have you not seen a link to this post on your travels? You'll need a LiveCD or LiveUSB to action it, but it's very simple once you're at that point. Here are the main points:

mount your windows partition (where the Wubi install sits)
fsck the Wubi filesystem to make sure it's okay. If you don't do this and it has corruption in it before resizing, bad things can happen.
resize2fs the Wubi filesystem to increase its size.
Have a snack, chill out, high-five yourself... You've just increased the partition size.

Those aren't the full commands, I'll leave those in that thread because it seems to be well maintained.

Failing that, installing Ubuntu only takes a few minutes. If you like it, perhaps you should consider a proper install (disk performance is better too).


Try with this command:

wget -P path/where/save/result -A jpg,png -r http://www.mtgsalvation.com/forums/creativity/artwork/

According to wget man page:

    -A acclist --accept acclist
        Specify comma-separated lists of file name suffixes or patterns to
        accept or reject (@pxref{Types of Files} for more details).
    -P prefix
        Set directory prefix to prefix.  The directory prefix is the direc‐
        tory where all other files and subdirectories will be saved to,
        i.e. the top of the retrieval tree.  The default is . (the current
        directory).
    -r
    --recursive
        Turn on recursive retrieving.

Try this:

    mkdir wgetDir
    wget -P wgetDir http://www.mtgsalvation.com/forums/creativity/artwork/340782-official-digital-rendering-thread?page=145

This command will get html page and put it in wgetDir. When I tried this command I found this file:

    340782-official-digital-rendering-thread?page=145

then, I tried this command:

    wget -P wgetDir -A png,jpg,jpeg,gif -nd --force-html -r -i "wgetDir/340782-official-digital-rendering-thread?page=145"

and it downloads images. So, it seems to work, although I do not know if these pictures are the ones you want to download.


I actually need to confirm that writing the ubuntu core image to disk (a brand new one, there was no tolerance for an older one I initially tried) worked, same instructions, advised to wipe the disk using disk tools prior to the dd.

Thanks again to GabrielaGarcia, I do appreciate the answer but would like to remind you I asked an open question and really didn't deserve to be to rudely treated. I don't need to validate my *nix experience but would ask that your less rude and hostile in future comments or replies. My own initial comment was equally (if not more so) rude and with the benefit of hindsight appreciate neither was helpful or valid.

Have a nice day :)


Not able to install graphic card drivers

Before everything, run nvidia-smi to see which driver version do you have. If you have a version lower than the recommended one, then try this method (it worked for me with Nvidia GeForce 940MX):

Run this command ubuntu-drivers devices to see which Nvidia
driver is recommended for your graphic card
Run sudo ubuntu-drivers autoinstall.

If the previous command didn't install the desired version of Nvidia drivers, try this: sudo apt install nvidia-<driver_version>.

You can find more information and different methods in this link


Ubuntu not showing in grub menu in dual boot laptop

I had almost done it initially. Just didn't go ahead and do update-grub again. So, this is how the issue was resolved.

I first installed os-prober by doing the following -

$ sudo apt install os-prober

Then, as mentioned earlier in my question, did -

$ sudo os-prober
/dev/sda2:Ubuntu 16.04.3 LTS (16.04):Ubuntu:linux

And it was able to detect my other OS.

Then I went ahead and did -

$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-92-generic
Found initrd image: /boot/initrd.img-4.4.0-92-generic
Found linux image: /boot/vmlinuz-4.4.0-79-generic
Found initrd image: /boot/initrd.img-4.4.0-79-generic
Found linux image: /boot/vmlinuz-4.0.0-kali1-amd64
Found initrd image: /boot/initrd.img-4.0.0-kali1-amd64
Found Ubuntu 16.04.3 LTS (16.04) on /dev/sda2
Adding boot menu entry for EFI firmware configuration
done

And that was it. Now, both operating systems are visible in my grub menu.


Chromium is having difficulties in showing some web pages

Do you have some filters (such as do no track or adds filter). If yes disable them and try again. if it works then you must accept to not filter the website.

If this doesn't work :

Have you tried with chrome instead of chromium ? If no just do a test.

If the test is positive then it can be due to the lack of flash. There is tutorials on how to install it for chromium.

Best regards.


Avidemux (From PPA) - http://avidemux.sourceforge.net/
OpenShot (From PPA) - https://launchpad.net/openshot/ http://www.openshot.org/ppa/
Pitivi (From PPA) - http://www.pitivi.org/?go=download

I was going to mention commands like ffmpeg or avconv (The new one) which can OBVIOUSLY split files into groups. For example:

FFMPEG

ffmpeg -ss 00:00:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output1.avi
ffmpeg -ss 00:30:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output2.avi
ffmpeg -ss 01:00:00 -t 00:30:00 -i input.avi -vcodec copy -acodec copy output3.avi

Or

ffmpeg -ss 0 -t 100 -i source.m4v -vcodec copy -acodec copy part1.m4v
ffmpeg -ss 100 -t 100 -i source.m4v -vcodec copy -acodec copy part2.m4v
ffmpeg -ss 200 -t 100 -i source.m4v -vcodec copy -acodec copy part3.m4v
ffmpeg -ss 300 -t 100 -i source.m4v -vcodec copy -acodec copy part4.m4v

AVCONV

avconv -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi
avconv -i input.avi -vcodec copy -acodec copy -ss 01:00:00 -t 00:30:00 output3.avi

Or

avconv -ss 0 -i source.m4v -t 100 -vcodec copy -acodec copy part1.m4v
avconv -ss 100 -i source.m4v -t 100 -vcodec copy -acodec copy part2.m4v
avconv -ss 200 -i source.m4v -t 100 -vcodec copy -acodec copy part3.m4v
avconv -ss 300 -i source.m4v -t 100 -vcodec copy -acodec copy part4.m4v

Or do some script like here: http://icephoenix.us/notes-for-myself/auto-splitting-video-file-in-equal-chunks-with-ffmpeg-and-python/


Laptop Charger Not Recognised Properly on Samsung NP900X3F

upgrade your kernel again.  Saucy Salamander is out now and it should fix this.  It did for me with my np900x3e, though I now have a new problem, that my laptop no longer suspends.  So do so at your own risk.


I've Lost 2FA in PhpMyAdmin, how can i reset it?

You can reset the U2F(2FA) by deleting the row or the data in the phpmyadmin table phpmyadmin.pma__userconfig

DELETE FROM `phpmyadmin`.`pma__userconfig` WHERE username='root';

See my comment on https://github.com/phpmyadmin/phpmyadmin/issues/15433#issuecomment-521383779


fglrx is not supported on 16.04.  See here for more details.


Ubuntu 64-bit stuck on the purple loading screen on VM

Several paths to look into:

Increasing the number of processors in the settings of the mentioned machine (Right-click on the machine -> Settings -> System -> then the Processor tab).
Increasing the Video Memory in the Display in the Settings interface.
Turning off "Enable 3D Acceleration".
Is hardware virtualization enabled in the BIOS settings?


How can I analyze this debian package before installing it?

If you want this from the commandline, use dpkg-deb:

dpkg-deb --extract some-package.deb /directory/to/unpack

dpkg-deb --control some-package.deb /directory/to/unpack/DEBIAN

This should leave a directory structure similar to what you'd be able to see in gdebi.


sda5 is a logical partition that exists inside sda2, so you need to grow sda2 first.


Ubuntu one syncing only folders and no content!

For copying files Ubuntu One needs read access. You've to check if Ubuntu One has that access.

First determine which user and usergroupt runs Ubuntu One by using

# ps -C ubuntuone-syncd -o uid,gid

On my machine it gave me this result

  UID   GID
  1000  1000

Get the corresponding name of the GID

# id -G
# id -G -n

Results will be like this:

1000 4 20 24 46 116 118 124
orangetux adm dialout cdrom plugdev lpadmin admin sambashare

You can see that usergroup orangetux has group id 1000

Now check the folder you want to sync

# cd /path/to/folder

Now get a view of the folder

# ls -l

Output is something like this:

-rw-r--r--  1 orangetux orangetux   179 2012-03-19 20:04 examples.desktop

The line tells me this

-rw-r--r--

Root has read and write permissions.
Group has read permissions.
Owner has read permissions.

orangetux orangetux

This line tells me that the owner of the file is 'orangetux' and the group is 'orangetux'

Now you know if Ubuntu One has permissions to upload the file.

When group/user is oke, but the group/user has no permission you can change it with this command

# sudo chmod 444 .

Which gives read access to root, group and user in this directory.

When group/user of Ubuntu One aren't the same as the files, you can add the Ubuntu One user to the usergroup of the file with this command:

# useradd -G {group} user


Why does my VirtualBox application not show at Command key / VirtualBox?

Do you have a file /usr/share/applications/virtualbox.desktop ?
If you don't try creating one. Mine looks like this:

[Desktop Entry]
Name=VirtualBox
GenericName=PC virtualization solution
Comment=Run several virtual systems on a single host computer
Comment[de]=Mehrere virtuelle Maschinen auf einem einzigen Rechner ausführen
Comment[it]=Esegui più macchine virtuali su un singolo computer
Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza
Comment[sv]=Kör flera virtuella system på en enda värddator
Comment[ko]=가상 머신
Type=Application
Exec=VirtualBox %U
TryExec=VirtualBox
MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/$
Icon=virtualbox
Categories=Emulator;Utility;


No network connection after suspend\resume

Its seems that systemd "/lib/systemd/system-sleep" execution is way too flaky to really rely on it. Instead better to created systemd unit to execute "hack" script as shown here https://askubuntu.com/a/1041358/856436.


Removing the alpha channel from all the jpg images in a folder

find . -name "*.jpeg" -exec convert "{}" -alpha off "{}" \;
find . -name "*.png" -exec convert "{}" -alpha off "{}" \;
find . -name "*.jpg" -exec convert "{}" -alpha off "{}" \;


A possible way is to download and install everything on an online computer (including your software) and build out the hard disc, and thus install this hard disc on your offline computer (mind you you could have issues with certain drivers needed to have maximum performance; this you can check by running a live session on your offline computer ;) )

Another way is to install everything you need on an online computer and build an ISO with remastersys and thus burn a DVD (a CD-R will be to small) and install your software on this offline computer.

For the 32-64 bits problem; you should know what your offline computer has as specifications; it might be possible that this machine isn't capable to run Ubuntu (e.g. an older XP-computer) but that you need to run and install Xubuntu , so I'd say that you burn with remastersys 2 versions (Xubuntu and Ubuntu) so you won't have issuses with that offline computer.

I hope this will turn out the right way for you.
A side note: running Ubuntu without internet is not a very good thought; there are constant updates for improving the performance of Ubuntu.


Only Show an Xfce4 Panel While YouTube Is Launched

The following script works perfect. :)

#!/bin/bash

# Check to see if Chromium is already running.
# If it is not already running then it sleeps longer before recording the PID.
chrom_status=$(ps -e | grep chromium)

# Launch YouTube in Chromium
chromium-browser http://www.youtube.com &

# Display Xfce panel with clock
xfconf-query -c xfce4-panel -p /panels/panel-5/autohide-behavior -s 0

# Sleeping is essential here; otherwise the correct PID is not recorded.
# If you run the script and then immediately start opening up other Chromium windows and tabs, then the script will break.
if [ -z "$chrom_status" ]; then
    sleep 20
else
    sleep 5
fi

# Add YouTube PID to variable
ypid=$(ps -e | awk '/chromium/ { print $1 }' | tail -n1)

# Check every two seconds to make sure YouTube is still open
while true; do
    # Without sleep CPU usage is really high.
    sleep 2
    ypid_status=$(ps -e | grep "$ypid")
    if [ -z "$ypid_status" ]; then
        xfconf-query -c xfce4-panel -p /panels/panel-5/autohide-behavior -s 2
        exit 0
    fi
done


Why is the ubuntu-wsl pushed out to standard Ubuntu installations?

In my environment it does nothing as I'm not running WSL and ubuntu-wsl is a meta-package and it's primary purpose is to handle WSL integration.

Here's an excerpt from the control file in the .deb

Description: Ubuntu on Windows tools - Windows Subsystem for Linux integration
 Utilities for integrating Ubuntu well into the WSL environment.
 .
 It is also used to help ensure proper upgrades, so it is recommended that
 it not be removed.

The changelog within the .deb provides further clues as to why this latest update was pushed out.

  * Added ubuntu-wsl metapackage from the wsl seed (LP: #1822341)
  * Added wslu and ubuntu-minimal's dependencies and recommends to ubuntu-wsl

 -- Balint Reczey <rbalint@ubuntu.com>  Sat, 30 Mar 2019 15:59:08 +0100


How to install scratch 2 in ubuntu 18.04

... and this works for me on ubuntu 18.04 (64bit)

install necesary i386 libraries

$ sudo apt-get install libgtk2.0-0:i386 libstdc++6:i386 libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libqt4-qt3support:i386 libgnome-keyring0:i386 libnss-mdns:i386 libnss3:i386

make keyring visible for Adobe Air

$ sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
$ sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

Download Adobe Air

$ cd ~/Downloads
$ wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
$ sudo mkdir /opt/adobe-air-sdk
$ sudo tar jxf AdobeAIRSDK.tbz2 -C /opt/adobe-air-sdk

Download Air runtime/SDK from Archlinux

$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/adobe-air.tar.gz
$ sudo tar xvf adobe-air.tar.gz -C /opt/adobe-air-sdk
$ sudo chmod +x /opt/adobe-air-sdk/adobe-air/adobe-air

Get actual scratch file URL from https://scratch.mit.edu/scratch2download/

$ sudo mkdir /opt/adobe-air-sdk/scratch
$ wget https://scratch.mit.edu/scratchr2/static/sa/Scratch-456.0.1.air
$ sudo cp Scratch-456.0.1.air /opt/adobe-air-sdk/scratch/
$ cp Scratch-456.0.1.air /tmp/
$ cd /tmp/
$ unzip /tmp/Scratch-456.0.1.air
$ sudo cp /tmp/icons/AppIcon128.png /opt/adobe-air-sdk/scratch/scratch.png

Create Desktop Shortcut

$ sudo cat << _EOF_ > /usr/share/applications/Scratch2.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/opt/adobe-air-sdk/adobe-air/adobe-air /opt/adobe-air-sdk/scratch/Scratch-456.0.1.air
Icon=/opt/adobe-air-sdk/scratch/scratch.png
Terminal=false
Name=Scratch 2
Comment=Programming system and content development tool
Categories=Application;Education;Development;ComputerScience;
MimeType=application/x-scratch-project
_EOF_

$ sudo chmod +x /usr/share/applications/Scratch2.desktop


Per https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install


How do I increase the open files limit for a non-root user?

The ulimit command by default changes the HARD limits, which you (a user) can lower, but cannot raise.

Use the -S option to change the SOFT limit, which can range from 0-{HARD}.

I have actually aliased ulimit to ulimit -S, so it defaults to the soft limits all the time.

alias ulimit='ulimit -S'

As for your issue, you're missing a column in your entries in /etc/security/limits.conf.

There should be FOUR columns, but the first is missing in your example.

* soft nofile 4096
* hard nofile 4096

The first column describes WHO the limit is to apply for. '*' is a wildcard, meaning all users.   To raise the limits for root, you have to explicitly enter 'root' instead of '*'.

You also need to edit /etc/pam.d/common-session* and add the following line to the end:

session required pam_limits.so


How to edit detailed image metadata (exif)?

Try ExifTool.

  ExifTool is a platform-independent Perl library plus a command-line
  application for reading, writing and editing meta information in a
  wide variety of files. ExifTool supports many different metadata
  formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile,
  Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of
  many digital cameras.ExifTool

To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install exiftool


Why installing the i386 version of a package triggers removal of the x86_64 version?

Found out this is probably a bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837898.


Dual boot Ubuntu 20.04 Installation Questions /suggestions alongside Windows 10 in Dell G5

I suspect the 256 GB drive is SSD and is a lot faster than 1TB HDD. The answer is based on this assumption.
Step 1
Create unallocated space in the 256 GB SSD.
Step 2
Choose the installation option for side by side. There is no need for a separate swap partition. The default installation process will create a swap file.
Step 3 (Optional)
Windows Ubuntu dual boot - Share files between OS
Hope this helps


How do I create a bootable multiple OS DVD in Ubuntu?

You can use MultiCD, SARDU or Grub4dos. If the size of DVD doesn't allow you to put all the ISOs you want, then you can create a multiboot USB using MultiSystem


How to display all services and version that runs on a host?

This one works for sure, just tested it and it's exactly what you want:

nmap -p 1-1023 -sV host | head -n -5 | tail -n +7 | awk '{print substr($0, index($0, $3))}'

index finds the 3rd column and returns its position to substring which then marks that position in whole line $0. All of this is then sent to print which displays it. Default field separator in awk is whitespace (spaces, TABs, newlines) so no need in using -F switch.


How to make in-focus terminal windows more obvious?

I found a solution. I can use the Dim Inactive in Compiz to make inactive windows dimmer. This works not only for gnome-terminal but also for any application windows.

BTW, The default dimming speed is slow. I used Fading Windows section in Compiz  to speed it up.


When a Bash script is running a sleep, here's what the pstree might look like:

bash(10102)───sleep(8506)

Both have process IDs (PIDs), even when running as a script. If we wanted to interrupt the sleep, we'd send kill 8506 and the Bash session would resume... The problem is in a scripted environment we don't know the PID of the sleep command and there isn't a human to look at the process tree.

We can get the PID of the Bash session through the $$ magic variable. If we can store that somewhere, we can then target instances of sleep that are running underneath that PID. Here's what I'd put in the script:

# write the current session's PID to file
echo $$ >> myscript.pid

# go to sleep for a long time
sleep 1000

And then we can tell pkill to nuke sleep instances running underneath that PID:

pkill -P $(<myscript.pid) sleep

Again, this is limiting itself to only sleep processes running directly under that one Bash session. As long as the PID was logged correctly, this makes it a lot safer than killall sleep or pkill sleep, which could nuke any sleep process on the system (permissions allowing).

We can prove that theory with the following example where we have three separate bash sessions, two running sleep. Only because we're specifying the PID of the top-left bash session, only its sleep is killed.

An alternative approach is to push sleep into the background, store its PID and then return it to the foreground. In the script:

sleep 1000 &
echo $! > myscript.sleep.pid
fg

And to kill it:

kill $(<myscript.sleep.pid)


How do I restore/reinstall all PAM service configuration files?

Use dpkg -S /etc/pam.d/* to find out which packages installed PAM files/services, then use apt to reinstall those packages and tell it to also install missing configuration files:

$ sudo apt install --reinstall -o Dpkg::Options::="--force-confmiss" $(dpkg -S /etc/pam.d/\* | cut -d ':' -f 1)

Thanks to @alvin-row for the bit on how to tell apt to install missing configuration files


Truly share a folder with multiple users on a computer

I suggest you use bindfs.

bindfs allow multiple local users to read and write (create, delete, rename, modify...) all files (including newly created ones) from a shared directory and its subdirectories.

You can specify users by user name or group, it is very flexible.

The basic syntax (from the wiki page) is:

Creating the shared directory

e.g. in the /home directory:

sudo mkdir /home/shared

NOTE: If the directory already exist skip this step.

Allow only root to access it, we will set the permissions later with bindfs:

sudo chown root: /home/shared
sudo chmod 0700 /home/shared

Setting the permissions with bindfs

Now use the bindfs command to mount the shared directory with altered permissions. Syntax of the command:

bindfs [options] dir mountpoint

Example:

sudo bindfs -o perms=0700,mirror-only=user1:user2:user3 /home/shared /home/shared

Options explained:

perms=0700 sets the permissions to 0700 (read/write for the owner, none for the group and other)

mirror-only=user1:user2:user3 user1, user2 and user3 will see itself as the owner of the files (user names are separated by a colon).

To automatically mount at boot, use fstab . Open fstab for editing with sudo nano /etc/fstab and add a line

fstab example:

bindfs#/home/shared  /home/shared  fuse  perms=0700,mirror-only=user1:user2:user3  0  0

See - Ubuntu wiki bindfs for group options and additional details.


If this is a desktop installation, you should be using NetworkManager...

network:
  version: 2
  renderer: NetworkManager

However, to answer your question, just use this... no need for match, macaddress, or set-name...

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes

sudo netplan --debug generate # make config files

sudo netplan apply # apply new configuration

reboot # verify configuration


Is Ubuntu the operating system or is Linux considered the operating system?

The resolution required really depends who you're talking to. Let's do a car analogy!

You might tell a stranger you drive "a car".
You tell somebody you're meeting later you'll be in a "Red Ford Pickup" so they can recognise you in it.
When you call your mechanic, you explain it's a classic 1969 Ford F250 Pickup 360 V8 and you need a new exhaust for it.

You don't need to be atomically accurate all the time. If you run around telling everybody everything in the maximum detail, you'll just end up looking a bit like a weirdo-super-geek. The same applies to Linux advocacy. If you insist on telling everybody you meet you're running Ubuntu GNU/Linux with amd64 architecture, people are going to wonder why you're doing it.

But technically speaking, the GNU tools with Linux is its kernel together make up an operating system. Ubuntu as the distribution makes that all work and layers on useful tools like display servers, window managers and the applications.

But if you're just bragging about what you're running, Linux or Ubuntu will do. People will get the gist.


What to do to install Ubuntu 12.10 in Virtual PC?

You could try to start Ubuntu with basic graphics.
Immediately when the Virtual PC boots, hold down 'SHIFT' and you will go to the (hidden) GRUB2 menu, then press 'e' for the default (selected) option. Then add 'nomodeset' at the end of the the line starting with 'linux'

example:

linux   /vmlinuz-2.6.38-8-generic root=/dev/mapper/linux-root ro single nomodeset

then press the keyboard shortcut to boot (CTRL + x)


The syntax (at least for nmcli version 1.2.4) is

nmcli delete [id | uuid | path] ID...

i.e. the word delete (without leading --) followed by one of id or uuid or path, followed by the value of that field

e.g. given

$ nmcli con
NAME                UUID                                  TYPE             DEVICE
Wired connection 1  9340c518-13a2-32c0-ae96-8790600dee2a  802-3-ethernet   --

then

$ nmcli con delete uuid 9340c518-13a2-32c0-ae96-8790600dee2a
Connection 'Wired connection 1' (9340c518-13a2-32c0-ae96-8790600dee2a) successfully deleted.


Mysterious > prompt from missing right apostrophe

This is because you opened a quote (" or ') so the shell assumes that the command in continuing, what is indicated by this > character. So until the closing quote you will get the > prompt to finish the started command.

This is when you want to echo something with newline in it, for example:

user@host:~$ echo "this
> is a text
> with multiple
> newlines"

outputs:

this
is a text
with multiple
newlines

To abort you can also hit Ctrl+c.


Upgrade from 14.04 Trusty to 16.04 Xenial aborted

I would do an apt-get --fix-broken install to see if it corrects any broken package. In all cases where I have had problems with broken packages it has corrected the problem for me.


How to know the path of a particular software?

Find the path of an executable

Best way

type executable

Check out this question to learn more about how type is better. (Thanks, comments!)

Other ways

whereis executable
which executable

Those commands only search in the PATH variable (echo $PATH), thus they are not valid in some cases (built-in functions, aliases, or bash functions, and more).


I managed to fix it ₹

First, you need to take " Language and Region " under " Input Sources " choose " English ( India with Rupees ) " and bring it to the top as seen in the image below.

Now you will hope that when you type Alt Gr + 4 ₹ sign will appear. No, you will have to choose it from the top bar as well as seen below


If correctly installed, should I see an entry for the DVD drive in fstab, and if not should I add one manually?

There is no good reason to place an optical drive into your fstab file. I have no entries in my fstab file, and my optical drives can be used to play a movie, play an audio CD, burn a CD or DVD and view a DATA CD or DVD, plus ubuntu doesn't mount the Drive unless you insert a disc in.


You can also use "sudo -i" to login as root.


Xorg and Virtualbox break after installing Xen

To roll-back, set GRUB_DEFAULT=0 in /etc/default/grub
then update-grub


how to insert variables in command line?

Try sudo -S <command>

-S to accept the password that you piped in via echo


Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server

we have same problem,

and i have fixed that,
just replace localhost with 127.0.0.1

sqlcmd -S 127.0.0.1 -U SA


How to install a CLI-only system offline?

You should download the Alternate Installation CD or the Ubuntu Server CD.

If using the Alternate CD, you should be able to press F4 after choosing your language and select "Install a minimal system".


How to achieve same battery life on Ubuntu LTS 16.04 as Windows 10 using Nvidia graphics adapter?

Run in a terminal

sudo apt install nvidia-375

then reboot and disable Secure Boot in BIOS.

The system will run on Intel and Nvidia will not consume power unless you enable it manually.


Kill ( curl ) the process and start new one

The usual way to execute a command on a regular schedule is to use cron.  To terminate a command after a specified time there's the timeout command.
Putting the two together in a cron job (crontab -e):
23 * * * *    /usr/bin/timeout 59m /usr/bin/curl ...

would run /usr/bin/curl ... once every hour (at 23 minutes past the hour), terminating it after 59 minutes if it's still running.


Where can I find the Atom installation directory?

The file atom in /usr/bin is the shell script which launches the atom binary file.


Will Ubuntu 15.04 create a swap partition with the default installation?

Yes, it does. Ubuntu always creates a swap partition if you choose automatic install.

And it is not pain to add a swap partition. It is quite easy to do.


Why it is over half slower to cp a file instead of using Nautilus's GUI copy? (AFC protocol)

Nautilus would be going through fewer layers of indirection, which could account for the difference.

Nautilus is a native gvfs application, so it communicates with the gvfs backends directly.

In contrast, cp is talking to the kernel via a FUSE file system mounted at ~/.gvfs, which is handled by the gvfs-fuse-daemon process, which in turn talks to the gvfs backends.  Impedance mismatches between the POSIX API and gvfs might account for the less efficient transfers.

You might be able to get similar performance on the command line using the gvfs-copy command from the gvfs-bin package, copying to the appropriate  URL.


Installing ubuntu 15.04 on new SSD drive

There's nothing special to it.

When installing, if the old drives are still connected to the computer, you should select "something else" as the installation method instead of the other options to ensure that Ubuntu is installed on the correct drive. Then you will have to configure the partitions yourself (efi (if needed), swap, /, /home (if wanted seperate)). Please tell me if you need assistance with this.


VGA-connected display won't go beyond 1360x768

Found an answer that worked, based off of How to force native resolution on secondary monitor? and http://ubuntuforums.org/archive/index.php/t-1470168.html.

First, I ran nvidia-xconfig to get a base file in /etc/X11/xorg.conf. From there, I looked up my ASUS VX238H monitor and got its horizontal and vertical refresh rates (since that data isn't making it over the wire).
I then copied those ranges info xorg.conf fo the Monitor section looked like so (only one section was created, for the monitor that couldn't be identified automatically):

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "ASUS"
    ModelName      "VX238H"
    HorizSync       30.0 - 80.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Once I rebooted, display settings showed a bunch more resolutions available, including the native resolution of that monitor, which I'm successfully using now.

As fair warning, just because a resolution is shown via this method doesn't mean your monitor magically supports it. For example, my 1080p monitor doesn't now support 1920x1200, though the worst you'll get is an Out of Range error on the monitor if you try to drive too many pixels to it.


No such file or directory when installing liblinear for use on Ubuntu in MATLAB

Try:

ln -s /usr/local/matlabR2010a/extern/lib/glnx86 /usr/local/matlabR2010a/extern/lib/glnxa64


Vala compiler(valac) cannot find Lua package

How did you install liblua? If I install the liblua50-dev package, then pkg-config --cflags lua50 prints the correct include path. Does running pkg-config --cflags lua52 print the correct include path for you? I think you need to add the CFLAGS manually, as the lua.vapi in vala doesn't seem to know about what package to use for lua with pkg-config here.

I don't know what you're using for a build system exactly, but you can do this manually by running valac like so:

valac -X "-I/usr/include/lua52" -C --pkg lua luatest.vala


virtualization, guest Network settings error

Not sure what the problem you're trying to resolve is, but this looks like part of your problem:

ethtool -s etho speed 1000 duplex full
              ^
              |
           eth0

Zero =/= 'oh'


Wasn't there a version of Ubuntu without any branding and with only free software? What was it called?

I think it was GNewSense (see here for the project's page).

There was an official free version Gobuntu too.


They are all correct.

uptime shows that the system has been up for 90 days and some
hours.
who -b says the system was booted 2018-11-22 21:05 .. 90
days and some hours ago.
last reboot says that the wtmp log file was rolled over or trunctaded at Sat Feb  2 01:59:42 2019, so it don't contain a reboot record.


Why does bionic now freeze during LUKS boot?

The root cause of my problem was that somehow the root partition (/) was no longer owned by the root user, which led to various sanity checks failing during boot.

Using the suggestions in the comments above helped me see other error messages which were slightly more relevant , and which by googling showed me other people in a similar situation.

I am not sure how the root partition had its owner changed but the solution was simply:

$ chown root /

After booting into recovery mode and opening a console


You likely want to edit /etc/mail/submit.mc (the local submission half) instead of /etc/mail/sendmail.mc (the network-listening daemon half). Don't forget to run the "make" command /etc/mail after you've made changes.


./dkms-install.sh: command not found when installing rtl8812au driver

This instruction is obsolete.
Instead of
sudo ./dkms-install.sh

run
sudo make dkms_install

Source


What are the old-release alternatives for http://archive.canonical.com/ubuntu?

They don't exist. Just remove those lines, do a sudo apt-get update, and then continue with the upgrade.

When it's finished you can then re-add the partner repository:

How do I enable the "partner" repository?


How to stop USB full ubuntu install from probing hard disks?

I made an installed system for USB, that is available as a compressed image file via torrent. It is built from Ubuntu Server amd64 16.04 LTS, and it can be booted in UEFI and BIOS mode. I am running it right now to check how it works in a computer with a swap partition in the internal drive: It uses its own swap partition (according to the 'swap line' in /etc/fstab, but it does not touch the swap partition in the internal drive. This can be seen via the command line

sudo lsblk -f

where the 'own' swap partition is 'mounted' as [SWAP], but the internal swap partition has no such 'mount' evidence, or seen with

swapon -s

I have noticed that cryptswap (associated with encrypted home) in a USB pendrive may grab and convert swap in internal drives, which is very bad. My test drive is not encrypted, but with disk encryption (and no extra swap encryption) there should be no mechanism for grabbing a swap partition in the internal drive. It should be satisfied with the swap partition that is specified in /etc/fstab.

I have not tested exactly your configuration, so my answer is partly guessing. We can look deeper into the problem, if you give us more details about your system. For example, try installing Lubuntu into a USB pendrive according to the following link,

Lubuntu testcase for encrypted disk (but unencrypted home)

And let us know if it behaves like it should.


You have to install development package for Eigen3 by
sudo apt-add-repository universe
sudo apt-get install libeigen3-dev

and retry.
Also please note that Ceres itself is included into Ubuntu repositories. You have to install it with:
sudo apt-get install libceres-dev

so you do not need to compile it by yourself.


Add "not" to if statement in shell script

“Not” is spelled !, with no punctuation and a space after it.

if ! id "$user_name" > /dev/null 2>&1
then
    echo 1>&2 "This user does NOT exists.  Please create that user before using this script.\n"
    exit 1
fi

Your proposal would actually work, but the parentheses create a subshell to run the one command id, which is superfluous.

Other changes:

Always put double quotes around variable substitutions: "$user_name"
There is already a variable USER, which is the name of the current logged-in user. Variable names are case-sensitive, but humans not so much.
Return a value between 1 and 125 to indicate failure in a program.
Report errors to standard error (file descriptor 2), not standard output.


How do you make a bridge between two connections?

If you're using Ubuntu Desktop, then it's really simple. Click the network icon at the to right of your screen. Select "Create new wireless network". Give the network a name, choose an encryption type (wep, wpa, etc) and make a password. Click "create" and that should be it. You can now connect to the wireless network from other computers and the wired connection should be shared with the wireless network you just created. :)


Can I safely use suspend/hibernate during an upgrade?

As your edited question states, suspending does not usually cause a problem. You can minimize the already slim chances more by disconnecting from your internet connection so that the apt program can suspend the downloads gracefully.  There is always a chance that your computer may not suspend/hibernate correctly. If that happens, there is a chance that apt may lose track of the file it was downloading, likely the worst that that would cause would be having to restart that particular file again, so it's still only a small risk.

To answer your updated question, I would not suspend it while it is installing packages. Even on a good suspend and resume it might cause problems if you stopped it in the middle of updating important files, they might not install correctly.  If it crashed during the resume process, it would very likely cause partially installed packages, which can be recovered from, but it can be a headache that you can avoid by waiting a few minutes until the installation is complete.

As to the second part of your edit, I assume that by "Upgrade Manager" you are talking about upgrading your release, i.e. from 13.04 to 13.10.  Upgrading releases uses the apt program as well, it just downloads a lot more files before it installs them, so the answer is the same.  It is safe to suspend the download in the middle, but I would still disconnect the internet connection before shutting down/suspending.

The only difference is that it is more important to let the actual installation finish before shutting down, a partially installed distribution upgrade is much harder to recover from than a package upgrade; In a package upgrade you could just uninstall the package and reinstall it, but if you have 13.04 systems trying to boot with 13.10 files(for example) you could have a system that will not boot.  Again, you could still likely recover from that, but, it would be a lot more work.

To sum it up in one sentence, you should be safe suspending/shutting down during the file downloads, but I would not ever shut the computer down during the actual install of those files.  (Also I would not do it on battery power to avoid a low-power related shutdown)


Where is the supported graphics card list by bumblebee project?

From the  Bumblebee-Project FAQ page.

  How to know if my graphics card is supported?

  Bumblebee has two parts: power management and the ability to run
  programs using the discrete card. The first feature is supported with
  bbswitch which should be able to support all Optimus models. The
  ability to use the nvidia card depends on the driver: open-source nouveau and
  proprietary
  nvidia..

And from the proprietary nvidia page  it does seems to support  as

302.17 for Linux x86/x86_64 released
Release highlights since 302.11:

Added support for the following GPUs:

    GeForce GTX 670M


Ubuntu GUI unable to login in a Virtual machine

login in console mode using ctrl + alt + f1 then try to remove .Xauthority file then restart lightdm

rm -rf .Xauthority
sudo service lightdm restart

if problem persists try to see whats in ~/.xsession-errors files


Nvidia drivers interfering with computer booting

If this is helpful to anyone having similar problems, the issue was solved by updating the BIOS with the latest found on Lenovo's website. Lenovo seemed to only offer those for Windows, so I needed to update on the Windows side. Everything is back to normal now!


Connection timeout on seemingly random clients

Maybe you should ask on the #ubuntu-server help on freenode, but for me it's network issue, it can be the router, as I guess. You must check the router and the Dynamic DNS service, maybe the IP change to fast that can also cause it. Anyway this question should be on server section not askubuntu :)


Defining and incrementing a variable in bash

If you want to modify constant1 and constant2, you shouldn't declare them as read-only (that's what declare -r does). And if you want to operate of pairs of variables, you should consider using arrays:

array1=(1 2 3 4 5 6 7 8 9 10)
array2=(8 7 3 9 3 9 2 8 4 4)

for i in ${!array1[@]}
do
    echo "${array1[i]}" "${array2[i]}"
done


Kubuntu 17.04 : Issue with DNS resolution in Firefox

Could be your router settings. In my case the same symptoms were caused by the Thomson cable modem's IP Flood Detection setting. Turned it off and Firefox started connecting as well as Chrome. The problems started with the upgrade to 17.04, never saw the errors with 16.10.


Can't install drivers Alfa AWUS036H USB wireless adapter

I'm on Ubuntu 14.04 LTS 64bit with kernel 3.13.0 using AWUS036H and also could not get the driver installed from Alfa. But my kernel default rtl8187 driver would work partially.  It would shut down periodically and I'd have to unplug/plug the WiFi device to restart it (sudo modprobe -r rtl8187; sudo modprobe rtl8187 would also work).

Digging around I tried the backport drivers and it's been working great for over 8 hours. I tried 3.13 version but it wouldn't compile so I tried the latest at this time (3.18) and it worked. Here's some data to get you there:

Get your driver package from https://www.kernel.org/pub/linux/kernel/projects/backports/stable/ (see the one I used below).

tar -xf backports-3.18.1-1.tar.gz
cd backports-3.18.1-1/
make defconfig-wifi
make
sudo make install
sudo reboot

Check if it worked:

$ modinfo rtl8187
filename:       /lib/modules/3.13.0-74-generic/updates/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko
version:        backported from Linux (v3.18.1-0-g39ca484) using backports v3.18.1-1-0-g5e9ec4c
license:        GPL
description:    RTL8187/RTL8187B USB wireless driver


Yes I have the same laptop and had this issue with 16.04, 17.04 and 17.10 versions of ubuntu.
The following solution fixed mine.

sudo apt-get install -y linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe rtl8821ae

and restart. Hope this fix the issue.


Clickpad: how to right-click with both Two-Fingers and Area

I was able to achieve this by using the gnome-tweak-tool and enabling the area Mouse click emulation under the Keyboard & Mouse section.

Then I added a new file in /usr/share/X11/xorg.conf.d and named it 90-libinput-quirks.conf with the following content

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "True"
EndSection

The file name itself is somewhat important, it needs to start with a higher number than the libinput.conf file bundled with Ubuntu 18.04. Mine was named 40-libinput.conf so I named mine 90-libinput-quirks.conf to make sure it was loaded after, and thus overriding, the original config.

Alternatively you could just add the Option "Tapping" "True" to the section identifier Identifier "libinput touchpad catchall" just as above. Not sure if this file could be overwritten by something like an update, so I prefer the first approach.


Tweaking smplayer for quality over performance

Using vdpau with Nvidia cards should get you great performance with smplayer, and will ensure that you use very little cpu when playing dvds and x264 encoded video. As has been discussed in detail on the Ubuntu forums, it is very important to note that

  Vdpau is two things. One, a display device, like xv. The other, a codec that can use the PureVideo chip to decode certain files

such as mpeg1/2 and x264. If your card supports it (see here for a list of supported gpus) it is a better option than the old xv, and particularly xll, which will use considerably more cpu.

In smplayer there are some options that can be accessed via the configure button next to the vdpau option (see screenshot), but you usually don't have to fiddle with these unless you have any problems with the video performance.

NOTE: It is particularly important to note that when vdpau codecs such as ffh264vdpau are being utilised, none of the following smplayer gui options such as post-processing, deinterlace, etc, will have any effect. In the screenshot you can also see that 'disable software video filters' is checked when you click the vdpau properties.

However, as noted in the Mplayer manual special options such as deint can be passed on the command-line when using vdpau, although these are not usually needed; these special options are not supported in the smplayer gui.

vdpau (with -vc ffmpeg12vdpau, ffwmv3vdpau, ffvc1vdpau, ffh264vdpau  or
       ffodivxvdpau)
       Video output that uses VDPAU to decode video via hardware.  Also
              supports displaying of software-decoded video.
       sharpen=<-1-1>
                      For positive values, apply a sharpening algorithm to the
                      video, for negative values  a  blurring  algorithm  (de-
                      fault: 0).
       denoise=<0-1>
                      Apply a noise reduction algorithm to the video (default:
                      0, no noise reduction).
       deint=<0-4>
                      Select the deinterlacer (default: 0).  All modes > 0 re-
                      spect -field-dominance.

As has been shown at this forum discussion,

deint is a option for the video out (vdpau) not for the codec

and so to specify one of these special options  (where vo is video output and  vc is video codec), you could use the following command (taken from the forum above):

mplayer -vo vdpau:deint=1 -vc ffh264vdpau 00007.MTS

So, when using vdpau you don't really need to worry about these special options or any other settings in the smplayer gui such as post-processing or direct rendering that you can't normally apply anyway when using vdpau.


Have you tried checking to make sure nothing was muted. In the terminal, type alsaplayer.

Is your volume turned up, or is the speaker muted?
Double click on the "speaker" icon in the upper right hand corner of the screen. This will launch the Volume Control application, which has various sliders to control the volume. Make sure that the speaker, headphone and master sliders are not muted, and have the volume up from zero. On a fresh install of Ubuntu 8.10, the Speaker volume is turned all the way down.

You can launch Gnome Volume Control application using Alt+ and type

gnome-volume-control


Ubuntu with Ryzen 2500u Processor speed capped at 2GHz

Turns out that loading the AMD-Microcode on init resolves this problem.
We just need to edit the /etc/default/amd64-microcode file to load the microcode early.

sudo aptitude install amd64-microcode
echo "AMD64UCODE_INITRAMFS=early" | sudo tee -a /etc/default/amd64-microcode
sudo update-initramfs

Note that the lscpu | grep 'MHz' would still show the max frequency as 2.00 GHz but you can speed test by openssl speed and see the current clock speeds boost up.