After installing ubuntu, all my partitions are gone. Boot-repair log

Your Boot Repair log clearly shows that your NTFS partitions are intact (they're /dev/sda1, /dev/sda4, and /dev/sda5. Except for the very latest version, fdisk is useless on GPT disks, and it will show just one partition (typically partition #1). Your report of GParted showing just one partition is more troubling, but you haven't shown the actual program output, so it could be you've misinterpreted something. You might want to post the output of sudo gdisk -l /dev/sda and/or sudo parted /dev/sda print to verify that your partitions are present. (You'll probably need to install gdisk from a package of the same name.)

Assuming that your Boot Repair log is accurate and up-to-date, my guess is that you've got a boot loader problem, not a partition problem. Your description of the nature of this problem is unclear, though. Broadly speaking, several solutions commonly work:

Disable Secure Boot -- You mentioned disabling "safeboot" in your question, so if you meant Secure Boot you've probably already done this. If not, though, see this brief description for some general information. Unfortunately, details vary greatly between computers.
Update your firmware -- Check with the manufacturer for any available firmware updates. These can fix bugs, which are rampant in the EFI world. I recommend doing this before trying the next two options; or if you put it off, try rEFInd and/or Boot Repair again after updating the firmware.
Test (and perhaps install) rEFInd -- My rEFInd boot manager can often help. You can try the USB flash drive or CD-R image (available from the rEFInd downloads page) without making any changes to your computer. If that boots both Linux and Windows, installing the Debian package in rEFInd should fix the problem. (A caveat, though: Some HPs have known EFI bugs that may require jumping through some extra hoops to get rEFInd to launch automatically. See here for details.)
Use Boot Repair -- Boot Repair can often fix boot problems; however, since you've already tried it and it didn't help, I wouldn't hold out too much hope. One additional thing is worth trying, though: Click the Advanced option and check the box to rename and replace the Windows boot loader file. This is helpful on buggy EFIs, such as some HPs are known to have, that refuse to launch boot loaders except from the filename that Windows uses for its boot loader.


Scale application differently on different monitors - Ubuntu 16.04

I have nvidia driver 340.98 with GT218M [NVS 3100M], Xubuntu 16.04, any results below are from this environment if I don't mention otherwise. Here is my testing environment info, the output of:

sudo apt-get install pastebinit; \
sudo sh -c "lsb_release -sd; \
 dmidecode -s system-product-name; echo ==; \
 lshw -c display; echo ==; \
 xrandr --verbose; echo ==; \
 cat /etx/X11/xorg.conf" \
 | tee ~/Desktop/ubuntu-graphic-info.txt \
 | pastebinit

Weird and complex stack to debug specially using proprietary drivers. Most of the time, I get unexpected behaviors, may be due to lack of knowledge about the current Linux graphics stack setup.

I wrote this answer before, that may introduce some debugging tools like xtrace
Avoid running multiple/sequential xrandr commands, only after X server reset. Same command may have different result depending on previous commands. I have noticed that with --scale (see test case from my answer, linked above) --transform & --fb. Still don't know an easy way only by logout/login. So always logout/login before making another trial.
Screenshots take only pixel size image from FB, so I will add camera photos to show the real results.

Method 1: xrandr --output .. --scale HCoefxVCoef or --scale-from WxH

Note, works fine for me. --scale is a shortcut for --transform, see method3

(VGA-0 below DP-3)

xrandr \
--output DP-3 --mode 1280x800 --scale 1x1 --pos 0x0 --fb 2880x2600 \
--output VGA-0 --mode 1440x900 --scale 2x2 --pos 0x800

or:

xrandr \
--output DP-3 --mode 1280x800 --pos 0x0 --fb 2880x2600 \
--output VGA-0 --mode 1440x900 --scale-from 2880x1800 --pos 0x800

FrameBuffer size calculation:

width = max(1280,1440*2) = 2880
height = 800+900*2 = 2600

Results:

nvidia xrandr scale screenshot

nvidia xrandr scale photo

Method 2: nvidia-settings View Port In/Out

Note, doesn't work well. nvidia-settings does not change frame-buffer to the required size as in xrandr command. It seems a bug (kind of, nvidia has its own FB), need more research.

Tried to replicate xrandr setup directly using nvidia-settings (I used xrandr from method1, marked down nvidia setting, reset settings, then used nvidia-settings directly):

gksu nvidia-settings → X Server Display Configuration
Select external monitor → advanced...
Make ViewPortIn & Panning double of ViewPortOut (which is the same as original resolution)
Leave internal monitor unchanged then Apply

Example:

Internal monitor nvidia settings

Position:    +0+0
ViewPortIn:  1280x800
ViewPortOut: 1280x800+0+0
Panning:     1280x800

External monitor nvidia settings

Position:    +1280+0 (rightof) or +0+800 (below)
ViewPortIn:  2880x1800
ViewPortOut: 1440x900+0+0
Panning:     2880x1800

Results: Notice the mouse pointer, it can reach all edges of the 2nd monitor even it only draws  the top left quarter.

nvidia-settings viewportin screenshot

nvidia-settings viewportin photo

Update: Well, I could finally get a workaround trick. Add 1px to the width or height of panning (Panning)

    Panning:     2881x1800 or 2880x1801

New Results: I can't explain this, just the background is corrupted if i use below, otherwise every thing seems ok.

nvidia-settings viewportin with panning trick screenshot

 lowered the color quality of above picture to make less then 2MB imgur limit

nvidia -settings viewportin with panning trick photo

Method 3: xrandr --output .. --transform "H,0,0,0,V,0,0,0,1"

Note, works fine for me, same as method1

(VGA-0 right of DP-3)

xrandr \
--output DP-3  -primary --mode 1280x800 --pos 0x0 --transform "1,0,0,0,1,0,0,0,1" --fb 4160x1800 \
--output VGA-0 --mode 1440x900 --transform "2,0,0,0,2,0,0,0,1" --right-of DP-3

FrameBuffer size calculation:

width = 1280+1440*2 = 4160
height = max(800,900*2) = 1800

Results:

nvidia xrandr transform screenshot

nvidia xrandr transform photo


rails -version command error in Ubuntu 12.04

Look in .rvm/gems/ruby-2.2.0/bin/rails  at line 23

Change

gem 'rails', version
load Gem.bin_path('rails','rails', version)

to

gem 'rails', version
load Gem.bin_path('railties','rails', version)

Worked for me.


Complete Uninstall from your android phone

For a complete uninstall, I'd recommend reflashing your android rom. The reflashing process really depends on your phone model.


Why is my laptop's keyboard screwed up since kernel 5.4.0-47 till 5.8.0-20?

The solution was found here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1894017
I just blacklisted intel_vbtn kernel module in /etc/modprobe.d/blacklist.conf and rebooted. Author mentioned that somehow intel_vbtn thinks my laptop is in tablet mode (WHAT?!) and disabled keyboard/touchpad.
How to blacklist
To implement this, you can either create a new file in /etc/modprobe.d with the suffix .conf or use the main blacklist.conf file. The former may be preferable, since you can then just delete the file when it is no longer required (i.e. when the bug is fixed):
sudoedit /etc/modprobe.d/blacklist-intel_vbtn.conf

Add a line to the file, optionally with a comment explaining why you are doing this
# bug in module breaks keyboard, so don't load it
blacklist intel_vbtn

Save the file, exit and reboot.
P.S. After mailing with Mr. Hans de Goede from RedHat I got following answer:

This should be fixed by this upstream commit, which landed in Linus'
tree a couple of hours ago:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/platform/x86?id=8169bd3e6e193497cab781acddcff8fde5d0c416
Igor, if you do:
cat /sys/class/dmi/id/chassis_type

On your laptop, and the output is NOT "31" or "32" then this fix
should work for you.
If the output actually is "31" or "32 (which I do not expect), then
please let me know, because then we need a different fix.

P.P.S. On my system (Intel Celeron N2940) chassis_type returns 10


Basically forget it. Recent versions of Autocad does not work in wine.

You can get ancient versions to work, by what WineHQ has to say about the state of the software.

If you need Autocad, and are unwilling to boot Windows, install a virtualization-solution and install autocad in a virtual windows machine.


How to tell the version of jetty that apt-get will install?

To see what version(s) of Jetty are available for installation on your system:

apt-cache policy jetty

This lists the installed version (if any) and all the versions available for installation, and indicates which one would be installed by default.

If you want to know about other Ubuntu release, look on packages.ubuntu.com.

If you want to see the package before installation, download it but don't install it yet:

apt-get -d install jetty

The package is in /var/lib/apt/cache/jetty*.deb.


Where can I buy a ubuntu phone for the US?

BQ offers global shipping when ordering from their online shop:

https://store.bq.com/gl/ubuntu-edition-e5/

But you should be aware of the compatibility to only two carriers at the moment, which you can read about here:

http://www.technobuffalo.com/2015/08/09/first-ubuntu-phone-is-now-available-in-the-u-s-but-with-a-catch/

Meizu does not offer global shipping at the moment, as far as I know. At least there is no reference to a US reseller.


No WIFI on Ubuntu 12.04 LTS after today software update

I had the same problem.
The solution is here http://ubuntuforums.org/showthread.php?t=2103062 (Compaq has the same adapter). I followed the instructions and now wi-fi works properly.

...we install the prerequitites needed to compile:

sudo apt-get install linux-headers-generic build-essential

Now we download the package, extract it and install it:

wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.6-1-snpc.tar.bz2
tar xvf compat*
cd compat-wireless-3.6.6-1-snpc
sudo su
./scripts/driver-select ath9k
make
make install
modprobe ath9k
exit


How do I enable OSX-like three-finger swipes in 11.10 and 12.04?

have you looked into Touchegg? it provides multitouch gesture options.

Check this post for more info.


NVidia GeForce GTX970 problem ubuntu 16.04

I have solved my problem.

I first write the potential source of my problem, and in the next paragraph I explain my solution. I recall my specs here :

Motherboard : GIGABYTE z170a

CPU : i7 6700k

GPU : NVIDIA GTX 970 (the one I am trying to install)

OS : Ubuntu 16.04

Source of the problem : I had the graphic card running before, and an issue forced me to re-install the OS. This caused my BIOS to set the graphic card chosen for display during POST to be my NVIDIA card, which had no drivers anymore because I re-installed the OS. Therefore I would get a black screen and could not run my computer with the graphic card plugged in. Because I didn't recall how I setup my graphic card the first time, this lead me to think that I needed to plug in the graphic card AFTER installing the driver, but it goes the other way around ; you cannot install the driver without the graphic card plugged in.

Solution : I went into the BIOS, and indeed the graphic card selected for POST was the PCI slot I was using before for the graphic card. If this is the case, unplug the graphic card, for it will cause your monitor to get no video output, even if your monitor is plugged in your motherboard. In the BIOS of my motherboard (GIGABYTE GA-z170 Gaming K3), one must select "IGFX" instead of "PCI Slot 1" (or whatever slot was set there) as the graphic card selected for POST ; for a different motherboard, find the option which enables the integrated graphics of the motherboard, not the GPU's. Complete the boot, shutdown, plug in the graphic card and reboot. Your monitor should display nomrally.

I ran the following commands after a fresh install of my OS, but I assume they could also work if no NVIDIA drivers have been previously installed or if old NVIDIA drivers have been purged (via sudo apt remove --purge nvidia*)

In a terminal, enter the following commands :

sudo apt update && sudo apt dist-upgrade (this is always good to do whether you're installing drivers or not, keeps your computer up to date)
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo reboot (might not be necessary, but I didn't take any chances)

After logging in again, open a terminal (Ctrl+Alt+T) and enter the following command, where *** must be replaced by the version of the driver you want to install :

sudo apt install nvidia-***

In my case, I installed the latest (28/06/2016) driver, which is nvidia-367. So the command looked like this :

sudo apt install nvidia-367

To check that your graphic card is indeed being used to display graphics, go in the "About this computer" section (or System Settings -> Details) which should display "Graphics GeForce (...)" instead of "Graphics Intel (...)".

I have not tested other drivers. I have spent five days on this, so I guess I became a sort of medium expert on these issues...

Remark : I did not disable anything in the file /etc/modprobe.d/blacklist.conf and did not add any extra file in there. I am guessing that the script installing nvidia-367 takes care of disabling nouveau, whereas when installing directly from the .run installer from nvidia.com, one must do this manually.

Hope that helps,


How i solved it:

In ~/.config/pulse, there happened to be multiple config files. I just moved them to a new folder within the directory, and did run killall pulse

killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*

and then reboot.

It is working now.


from livecd find the installed kernel version on ht hard disk

You may have to mount your ubuntu partition and chroot

Run below commands AS ROOT

mount /dev/ -rw /mnt/ubuntu
chroot /mnt/ubuntu
uname -a


Sound disappeared after OSS installation

OSS is no longer supported by Ubuntu

  Canonical/Ubuntu has chosen to disable OSS support in their kernels
  and ignore any bugs filed against OSS4 packages. If you're considering
  using OSS4, you should probably use another Linux distro like Arch
  Linux.

It also may be likely your hardware does not support OSS,  you can find the list of supported hardware here

If you really want to try to install and get OSS working you should have a read of the Ubuntu Wiki Documentation for OpenSound


Looking for a button or shortcut for accessing Google Chrome's Create Application Shortcut feature - any ideas?

(my best guess)

from: http://ubuntuforums.org/showthread.php?t=1275363

You are looking for a "one click" method of converting the current URL (from Chrome or Firefox) to the desktop, where this can be used as a 'desktop shortcut'.

And, you want this 'icon' to load the URL (website) as a browser window without toolbars, statusbars, and the like.

Please confirm, and/or clarify ..


In Ubuntu this option is disabled by default, go to System > Preferences > Mouse, in the Touchpad tab select "Two-finger scrolling" and that's done.


The --line (abbreviated -l) command-line option specifies which line number to go to after opening the file.

Presumably, specifying a very high number like 1 billion (1000000000) should ensure it goes to the last line each time.


A bridged network adapter means that it is going to try to use the existing network which is 192.168.2.0/24.  10.10.10.6 is outside the range that your network uses so it doesn't work as it supports 192.168.2.2-254
You would have to use a NAT network to give the system its own private network to work from if you want to stick with 10.10.10.1/24, though you may have restrictions communicating between the 192.168.2.0/24 and the 10.10.10.1/24 network.


The imported target "Qt5::Gui" references the file "/usr/lib/x86_64-linux-gnu/libEGL.so" but this file does not exist.

Anyway let me sum up the story..

$ ls /usr/lib/x86_64-linux-gnu | grep -i libegl
libEGL.so
libEGL.so.1
libEGL.so.346.59

ls -l /usr/lib/x86_64-linux-gnu/libEGL.so
lrwxrwxrwx 1 root root 18 mar 30 17:10 /usr/lib/x86_64-linux-gnu/libEGL.so -> mesa-egl/libEGL.so

and

lrwxrwxrwx 1 root root 15 mar 30 17:10 /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so -> libEGL.so.1.0.0

But I didnt do have any libEGL.so.1.0.0..

So it looks like it was a mess coming from mesa and nv binaries

I installed the binaries a third time and it worked..

Another possible solution is the one of Angelo Geels (in the comments):

sudo rm /usr/lib/x86_64-linux-gnu/libEGL.so; sudo ln /usr/lib/x86_64-linux-gnu/libEGL.so.1 /usr/lib/x86_64-linux-gnu/libEGL.so


Nautilus not showing thumbnails for PNG files

It might be the package libgdk-pixbuf2.0-bin missing. First you can check if it's installed with:

dpkg -s libgdk-pixbuf2.0-bin

If not installed, then you can just install it:

sudo apt install libgdk-pixbuf2.0-bin

If you have dconf-editor please also check the values for org / desktop / thumbnailers and make sure your file type is not disabled in there.


How do I completely uninstall LAMP Server and start fresh?

My preference is using apt/apt-get rather than tasksel.

Many times seems to fail for me + disallow simple customizations.

Destroying an entire LAMP Stack install can be a bit tricky.

You'll use apt-get purge $package to removed code + all config files.

Then use dpkg -l | grep $package to verify you've actually removed all traces of related packages.

Installing Apache-2.4.28 + PHP-5.6 covers how I install full lamp stacks for my hosting clients. Just change all occurrences of 5.6 to 7.1 to install latest PHP code.


Linking libGLEW.so.2.0.5 to libGLEW.so.1.13

You use the force option --force or -f to overwrite any existing Symbolic Link.

For PaintStorm specifically, check what version of libGLEW you have:

ls /usr/lib/x86_64-linux-gnu/ | grep libGLEW

Use that version to create a symlink. In my case, I had libGLEW.so.2.1.

sudo ln -f -s /usr/lib/x86_64-linux-gnu/libGLEW.so.2.1 /usr/lib/libGLEW.so.1.13

I also had this specific issue with PaintStorm, and this worked for me.


So I tried the newer command by setting radeon.dpm=1, but whatever it's doing I don't believe is setting the power usage to "low" because I can hear the difference. (Sounds like mid.)

Correct, it isn't setting the power usage to low. radeon.dpm=1 is a kernel parameter that enables DPM.

Read up here to see how exactly DPM works in current kernels.


How to mount FreeNAS network share persistently

If you're looking to have a persistent mount that is stale-proof (outside of the networking being down, or the remote machine being off) I would recommend using AutoFS

In short Autofs (also know as Automount) will only mount a directory when it is needed or accessed and after a few moments of inactivity will unmount itself. By doing so you can setup a persistent network location like you NAS and have it always accessible on your machine in the same mount point without having to worry about the mount going stale when networking drops or if you suspend your computer.


Well there is no such methods to retrieve a broken or exited terminal session. I can recommend an option, better try using "Screen" or "tmux" application for multiplexing terninal usgae while connecting remotely so that this will terminal session will continue till its exited with command. A few info can be viewed over here and here  as well.


this worked for me:

sudo sed 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="/' -i /etc/default/grub

sudo update-grub
sudo reboot


Ha, seems to be this bug: http://bugs.launchpad.net/ubuntu/+source/zenity/+bug/968534


you can try recovering grub with a live medium example with using a ubuntu cd/dvd in live mode ...please go through this post :
how to recover grub with a live media ubuntu/mint live usb/cd/dvd


Knowing nothing about badbay, I opened a search engine and found http://www.badboy.com.au/download/add

…which lists http://www.badboy.com.au/download/send?svId=120 as the download for my 'linux' machine. It downloaded a short bash script wtm_installer_1.1.1.sh which contained a large binary blob (a tarball) and I didn't go any further.

To run the shell screen, you just use its name:

./wtm_installer_1.1.1.sh


How to prevent Persistent install on USB from accessing the HDD

Persistent live drive with a standard user, that cannot mount internal drives

I made a persistent live drive with mkusb from ubuntu-16.04.1-desktop-amd64.iso, which has the longest support of the present iso files.

A standard user ID (alongside the normal live system's user 'ubuntu') cannot run programs that need sudo: 'standard is not in the sudoers file. This incident will be reported.' Partitions on the internal drive are not mounted. To mount them, you need sudo permissions both for mount and udisksctl.

The persistent live system will boot into the ubuntu user, and you log out in order to switch to the standard user.

Encrypt home with users-admin

It is possible to create the standard user ID with encrypted home and login with a [good] password. This can be done easily, if the program users-admin is installed by activating the repository universe and installing the package gnome-system-tools.

sudo add-apt-repository universe
sudo apt update
sudo apt install gnome-system-tools

Tick the box according to the screenshot in order to create the new user with encrypted home.

The computer should be shut down or rebooted after using the encrypted home. Otherwise the live user (or another user) gets access to encrypted data.

Persistent live drive with a standard user and a user with administration permissions

I made a persistent live drive with mkusb from ubuntu-16.04.2-desktop-amd64.iso, which is a newer LTS iso file, in order to test that these tasks work with more than one iso file.

In some computers, the system may leave you with a black screen after logging in (after a logout). This might depend on the graphics driver. If it happens, you can do something with the mouse or keyboard to get to the desktop. If still no luck you can enter a text screen and then return to the graphics screen with the hotkey combinations

ctrl + alt + F1

ctrl + alt + F7

It is possible to create another user ID with administration permissions, that can manage system tasks, for example install and upgrade program packages (if you want to separate the tasks because of security reasons). One (or both) user ID(s) can be made with encrypted home if you wish.

With these two user IDs it will be possible to remove the live system's normal user 'ubuntu'. You can do it from the user ID with administration permissions after killing the processes that are running with the user 'ubuntu'

ps -Af | grep ubuntu  # identify which processes to kill
sudo kill <the PID numbers that you found (without any brackets)>

sudo deluser ubuntu

After that you can also remove the content in the 'casper-rw' partition (or file) concerning the deleted user (if you wish), but there is probably not much data, so not very important unless you suspect there is some confidential data.

Now after removing the live system's normal user 'ubuntu', the persistent live system will boot to the login screen, and you can select which user ID to log in to, the standard user or the user with administration permissions. I like this behaviour, and I think it is worth the extra effort (compared to a system with a standard user alongside the normal live system's user 'ubuntu').

Backup is important

Frequent backup is important, because it is a

persistent live system (makes it sensitive)
an encrypted system (makes it difficult to repair/recover).

See this link: Backup and restore of persistent overlay data

Security - turn off swapping

If this kind of system finds a swap partition in the internal drive, it will probably use it, and might leave traces that are not encrypted. So please turn off swapping if there is a linux swap partition in an internal drive in the computer, where you are running the system.

You must log in or 'su' into the user ID with administration permissions, 'guru', to turn off swapping

su - guru
/sbin/swapon -s  # check
sudo /sbin/swapoff -a
/sbin/swapon -s  # check
exit

Comparing to an installed system

Comparing this kind of persistent live system to an installed system (in a USB pendrive in both cases),

Advantage:

more portable (than an installed system).

Disadvantages:

less stable (than an installed system).
less secure (encrypted home is less secure than encrypted disk, which is possible with an installed system). But it might be secure enough.


Konsole Message after upgrade: cannot find -lcr

That message means that the cr library cannot be found.

Konsole shouldn't compile/ link anything when started, check your Konsole profile and the below files if exist:

.bashrc
.bash_profile
.profile
.bash_completion
.bash_aliases

If in doubt, post the files on http://paste.ubuntu.com so we can check these files.

If you've a legit need for linking files, you need to install the libcr-dev package.


You could install the bluetooth mouse driver provided by the manufacturer, or you could check for some updates in Ubuntu update manager.

You could also check extra drivers in system preferences (is this correct?).


How to add natural (/inverted) mouse-scrolling in i3 window manager?

Edit /usr/share/X11/xorg.conf.d/40-libinput.conf

Add there Option "NaturalScrolling" "True" like this:

For your mouse:

# Match on all types of devices but joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "True"
EndSection

For your touchpad:

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

Then log off and on to apply.


Is there an activity monitor(mac) GUI tool in Ubuntu?

There is System Monitor for that in Ubuntu. It has status information of the type you're looking for, but not everything you listed.


If you always want /opt/ros/kinetic/setup.bash sourced when you open a new interactive bash shell, put the source command at the end of the .bashrc file in your home directory.

You may want to back it up (though if you haven't modified it then it's the same as /etc/skel/.bashrc). You can do by running:

cp ~/.bashrc ~/.bashrc.orig

Open ~/.bashrc in a text editor. To use the in-terminal editor nano:

nano ~/.bashrc

To use the GUI editor Gedit, replace nano with gedit.

Add this line at the end of the file:

source /opt/ros/kinetic/setup.bash

Save the file and quit the text editor.

Subsequently started interactive shells will bet set up for ROS.

You don't have to manually source setup.bash anymore. The change persists across logins and reboots, because ~/.bashrc is itself automatically sourced, but not automatically modified, in interactive bash shells. But it applies only to your user account and only in bash.

If you want to undo it, just open ~/.bashrc in a text editor and remove the line you added or comment it out by writing a # at the beginning of it. (Or restore the backup of the file.)


Xubuntu 14.04 disables video output when disconneting / reconnecting a HDMI monitor

I faced the same issue and below is the solution I came up with. It seems after reconnecting the HDMI cable it doesn't enable that output automatically. The solution I found is to run the following command after reconnecting the HDMI cable:

xrandr --output HDMI1 --auto

On my desktop the name of the output is HDMI1. To discover the correct name in your machine, run xrandr when the monitor is connected and functioning correctly. It will list your outputs and show the name of the connected output.

You can map the command to a keyboard shortcut using XFCE Application Shortcuts found in the settings manager or you can use a program like xbindkeys which does the same thing. That way you reconnect the cable and press a keyboard shortcut to get everything working.


while installing ubuntu 15.10 alongside windows 8

The set up of 15.10 was not proper.The booting DVD doesn't contains any '.exe' files.so it was showing message of boot failed.I have now installed the Ubuntu 14.04 LTS which is running perfectly with windows.


How to find out the name desktop manager package running on my ubuntu 12.04?

env | grep XDG_CURRENT_DESKTOP

Answer by https://askubuntu.com/users/1543/sagarchalise


Installing Lubuntu 12.04 on a Mac G4 Powerbook

On PowerPC processor, the bootloader used by Linux is Yaboot, regardless of the distro. Same for Ubuntu and all *buntus. See  http://en.wikipedia.org/wiki/Yaboot. So it is the yaboot menu that is not showing up yet.

I don't know why yet, because I am just learning how myself.

See https://wiki.ubuntu.com/PowerPCFAQ#What_do_I_need_to_know_for_dual-booting.3F


Problem while installing oracle-java8-installer

I would suggest you to try:

sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get remove -f

and then install Java8 again.


How to make Ubuntu GNOME ignore VMware's vmnet8?

I found a very simple solution for this problem.
Just type:

vmware-netcfg

in a terminal and remove the NAT and Host only Network interfaces, or any you want to get rid of.

Of course you can't use them from now on. You have to use the bridged connection.
For me this connection doesn't show up in the Gnome networkmanager.


Access Windows PC over network from command line

Check that the folder windows-pc exists in /mnt

If its doesnt create it with

mkdir /mnt/windows-pc

Your C drive will need to be shared for this to work? If you want to access it why don’t your just try telnet to it? Or FTP? Are you only trying to share drives?

Thanks
William


All those E486: Pattern not found: not initiated in a row are from unnamed buffers. I don't know why you have so many, but you do. Each time Vim switched to a buffer with a filename, the filename and details are printed, hence "aaa.cpp" [dos format] 1399 lines, 39255 characters, etc.

For each buffer where the search failed, Vim prints an error message. But nothing's printed for buffers that did have something, so unless you had output like:

"aaa.cpp" [dos format] 1399 lines, 39255 characters
"bbb.cpp" [converted][dos format] 5829 lines, 235847 characters
E486: Pattern not found: not initiated
"ccc.cpp" [dos format] 741 lines, 28473 characters
E486: Pattern not found: not initiated

Two filenames in a row without an error, there's no telling if anything was matched anywhere.


configure juju with openstack using keystone

Juju configuration uses the attribute "tenant-name" to refer to the name of the project/tenant on Openstack. So where you have "project-name: demo" in your configuration, you need to replace "project-name" with "tenant-name"


I am new to Ubuntu so I am assuming Livepatch is the only option for me for updating the OS

No. Live kernel patching is the process of applying security patches to a running Linux kernel without the need for a system reboot. It is not a replacement for updating your system.

  However, with 1.9 GB of disk space available, will updates eat up memory?

In due time yes. But updates tend to be patches, not complete files. If a whole file is downloaded it most times will replace another file. The largest update I saw up to now is when I just re-installed but even then 350-400 Mb is the update size. Not saying it can not be 1.9Gb at some time but that is a lot.

  Does Ubuntu Livepatch updates take up disk space?

Are you sure you are using live patch? Desktops do not use it as "up time" is not an issue for desktops and you need to subscribe to it. Check with

 $ ls /sys/kernel/livepatch
 $

It is comes up empty livepatch is not active regardless of what settings are set.

Or look at


Bios not was not loading due to a weak lithium wafer battery. The battery was last changed in 2003. I installed a new battery in the motherboard and the machine boots up the bios and OS. All is OK with the PC and Linux is performing well. Dell Dimension C521. Ubuntu 14.04 LTS.


How to run asynchronous tasks in Python GObject Introspection apps

Your problem is a very common one, therefore there are tons of solutions (sheds, queues with multiprocessing or threading, worker pools, ...)

Since it is so common, there is also a python build-in solution (in 3.2, but backported here: http://pypi.python.org/pypi/futures) called concurrent.futures. 'Futures' are available in many languages, therefore python calls them the same. Here are the typical calls (and here is your full example, however, the db part is replaced by sleep, see below why).

from concurrent import futures
executor = futures.ProcessPoolExecutor(max_workers=1)
#executor = futures.ThreadPoolExecutor(max_workers=1)
future = executor.submit(slow_load)
future.add_done_callback(self.on_complete)

Now to your problem, which is much more complicated than your simple example suggests. In general you have threads or processes to solve this, but here is why your example is so complicated:

Most Python implementations have a GIL, which makes threads not fully utilize multicores. So: do not use threads with python!
The objects you want to return in slow_load from the DB are not pickelable, which means that they can not simply be passed between processes. So: no multiprocessing with softwarecenter results!
The library you call (softwarecenter.db) is not threadsafe (seems to include gtk or similar), therefore calling these methods in a thread results in strange behaviour (in my test, everything from 'it works' over 'core dump' to simple quitting without results). So: no threads with softwarecenter.
Every asynchronous callback in gtk should not do anything except sheduling a callback which will be called in the glib mainloop. So: no print, no gtk state changes, except adding a callback!
Gtk and alike does not work with threads out of the box. You need to do threads_init, and if you call a gtk or alike method, you have to protect that method (in earlier versions this was gtk.gdk.threads_enter(), gtk.gdk.threads_leave(). see for example gstreamer:  http://pygstdocs.berlios.de/pygst-tutorial/playbin.html).

I can give you the following suggestion:

Rewrite your slow_load to return pickelable results and use futures with processes.
Switch from softwarecenter to python-apt or similar (you probably don't like that). But since your employed by Canonical, you could ask the softwarecenter developers directly to add documention to their software (e.g. stating that it is not thread safe) and even better, making softwarecenter threadsafe.

As a note: the solutions given by the others (Gio.io_scheduler_push_job, async_call) do work with time.sleep but not with softwarecenter.db. This is, because it all boils down to threads or processes and threads to not work with gtk and softwarecenter.


Cannot proceed with installation of Ubuntu 17.04

Not sure if this should be flagged as a duplicate if the solution is on a different StackExchange site, but this posted solution should help: https://superuser.com/questions/1200994/no-sprom-available-error-when-installing-ubuntu-from-usb

  To fix this I first disable the WLAN module from bios then proceeded to add nouveau.modeset=0 to the end of the linux line in the GNU kernel. This allowed me to boot into the test mode and install from there. Once this had been done I was able to install the drivers from the Additional Drivers application.


How can I see or change default run level?

Yes, it deals with them differently.

To see the current (and previous) runlevel:

runlevel

To switch runlevels:

sudo init $runlevel

For example, to reboot:

sudo init 6

The init you are reading about was replaced by upstart starting with Edgy Eft 6.10; and, one of the programs provided by upstart is its own implementation of init.
Here are the docs for 10.04.

To change the default runlevel, use your favorite text editor on /etc/init/rc-sysinit.conf...

sudo vim /etc/init/rc-sysinit.conf

Change this line to whichever runlevel you want...

env DEFAULT_RUNLEVEL=2

Then, at each boot, upstart will use that runlevel.


How do I get my window frames back in Gnome Flashback?

It should probably be using gtk-window-decorator for decorations. If that isn't loading, perhaps Metacity (the wider window manager) hasn't loaded properly either.

I'd start by running metacity --replace in a run box, terminal or whatever you can get your hands on. If you need to use a TTY, remember to set export DISPLAY=:0 first.

If that works, it's a case of getting that to load on start. I'm afraid I've no idea what the start-up sequence is like on Flashback but if you have a Start Up applications, sticking a record in there for Metacity might work.

Whether or not it's maintained is a slightly more difficult question to answer. There certainly seem to be a number of people milling around it and there's a fair bit of detail on its wiki page. The mailing list also gets a fair amount of traffic. Yeah, I'd say it's alive.

But how fast they'll turn around any of these problems is anybody's bet. You might have more luck on an actual Gnome 2 fork rather than trying to emulate it with Gnome 3. MATE seems plenty active and it had a fairly solid base to grow off.


Adjust brightness with xrandr and cron job

Cron provides limited set of environment variables by default [1]. To get xrandr to work through a Cron job, you should export [2] the value of the current user's $DISPLAY variable [3]. To do that add the follow line to the beginning of your script (or add it within the crontab file [4]):

export DISPLAY=$(w $(id -un) | awk 'NF > 7 && $2 ~ /tty[0-9]+/ {print $3; exit}')

References:

Crontab and C program that should be executed into a terminal window
How to programmatically find the current value of DISPLAY when DISPLAY is unset?

I liked the idea and already implemented it in my system. Here is my version of the above script:

#!/bin/bash

# While the user is not logged in == until the $DISPLAY variable is unset or empty
unset DISPLAY
while [ -z "$DISPLAY" ] || [ "$DISPLAY" == "" ]; do
        DISPLAY=$(w "$(id -un)" | awk 'NF > 7 && $2 ~ /tty[0-9]+/ {print $3; exit}' 2>/dev/null)
        if [ "$DISPLAY" == "" ]; then sleep 30; else export DISPLAY="$DISPLAY"; fi
done

brightness(){
        # Get the list of the active monitors automatically
        # To set this list manually use: OUT=( VGA-1 HDMI-1 HDMI-2 HDMI-3 )
        OUT=$(xrandr --listactivemonitors | awk 'NR!=1{print " "$NF" "}')
        # Adjust the brightness level for each monitor
        for current in "${OUT[@]}"; do xrandr --output "${current// /}" --brightness "$1"; done
}

if [ -z "${1+x}" ]; then  # If the scrip is called from Cron or CLI without an argument: 'brightness'
        H=$(date +%-H)
        if   ((  0 <= "$H" && "$H" <  7 )); then brightness ".5"
        elif ((  7 <= "$H" && "$H" < 10 )); then brightness ".6"
        elif (( 10 <= "$H" && "$H" < 19 )); then brightness ".7"
        elif (( 19 <= "$H" && "$H" < 22 )); then brightness ".6"
        elif (( 22 <= "$H" && "$H" < 24 )); then brightness ".5"
        else echo "Error"
        fi
else brightness "$1"    # If the scipt is called with an additional argument: 'brightness "<value>"'
fi

The script is able to get the list of the active monitors automatically. I've tested it with two monitors.
Nice idea is to place the executable file [5] in /usr/local/bin, thus it will be available also as shell command. Let's assume it is called brightness.
The script is able to use an arguments, which will override the default brightness values, for example: brightness .9.
While /usr/local/bin is not listed in the crontab's $PATH variable [1] [4] [6], the Cron jobs should use the full path:

@hourly /usr/local/bin/brightness

Probably the @reboot Cron jobs will not work with the current version of the script [7].


No Wifi Connection on Ubuntu 18.04 in WSL1

You can't run VMware inside WSL1 or WSL2. If you don't want to do a dual boot install (harmless), then make a Linux LiveUSB with persistence and install it on the LiveUSB (which will be slow).

Download Ubuntu's 19.10 or 20.04 ISO file or for a supported 'flavour' with a different Desktop Environment, download from https://ubuntu.com/download/flavours .

Next, check for download errors

Make a LiveUSB with persistence following these instructions on your Windows PC using the Windows Rufus Open Source app to provide persistence, so you can subsequently iinstall GNS3 and its VMware payload.


Setting up fastcgi on an Ubuntu server (socket file permissions issue)

/var/run is not a "real" filesystem on Ubuntu, it's tmpfs (something like "ramdisk"). So I think permissions and files are not preserved in case of reboot since that filesystem only exists till the reboot. You can use another location which is a real filesystem, or you can modify some startup script to create and set the rights/ownership of the socket you want to use. Issue the command mount in terminal, you will see that /var/run is on tmpfs.


How to set up SAMBA on ubuntu with a 2tb drive connected to my dlink router?

First of all you have some extra garbage in /etc/fstab - the string to your /etc/fstab after the last 0 does not belong there.

If your router allows you to password-protect your share that do that and consult the official ubuntu wiki page about how to store that password in your /etc/fstab


Ubuntu 19.04, with g++-8

objdump -x /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI_1.3.8
37 0x00 0x0bafd178 CXXABI_1.3.8
        CXXABI_1.3.8

  Ref. MatLAB search:
  /usr/local/MATLAB/MATLAB_Runtime/v90/sys/os/glnxa64/

Please do :

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH && [other command]

I.e. this will set /usr/lib/x86_64-linux-gnu/ first in the search path.


DNS server configuration is changed automatically

In a full ubuntu these files are rewritten by network-manager, It's better to manage these changes by using the GUI in System > Settings > Network Connections.

Without desktop I think this is controlled by a serie of entries in dbus / gconf. So if the network is reliable I think its better uninstall network manager and roll your own manual configuration.

Also there's something called nmcli which is a sort of command line tool for network-manager.


Recorder in which I can record while pausing is available?

You can use Audacity for the your needs.

sudo apt-get install audacity

Hope this helps...


Problem with org.freedesktop.Geoclue.Providers.Hostip, running Qreator on Xubuntu-14.04

It seems that one dependency is missing (to provide org.freedesktop.Geoclue.Providers.Hostip).

Try to install the following package:

sudo apt-get install geoclue-hostip


just for reference: it solved itself. i have no idea how, as i definitely did restart and dis-/reconnect this soundcard a few times before posting. maybe it sorted itself out with just a normal update - any way it's miraculously working again, yay! sorry for bothering, but never the less thanks for the help!


script skipping user input in nested case statement

You're piping find output to the while loop. The inner read command is reading a line from find's output, not from stdin.

You can restructure like this: send the find output to the while loop on a different file descriptor. This leaves stdin free for the inner read.

while IFS= read -u3 -r -d '' FILE; do
    if [ "$FILE" != "." -o "$FILE" != ".." ]; then
        OUTPUT=$($FILE $STATUS)
        case "$OUTPUT" in
            *disabled* )
                read -p "Do you wish to start $FILE ?" yn
                case $yn in
                    [yY] | [yY][Ee][Ss] ) $FILE start ;;
                    [nN] | [nN][Oo] ) ;;
                    * ) echo "Please answer yes or no.";;
                esac
                ;;
            * ) echo "App $FILE is running" ;;
        esac
    fi
done  3< <(find /etc/init.d/* -name '*' -print0)

This uses a process substitution, instead of a pipe, to read from find


change file permissions in ubuntu through command line

To make it readable to everyone

you can provide the command

chmod 777  koha-conf.xml

where 7 is divided into  three value 4 (read) + 2 (write) + 1 (execute)

so it would be accessible by all user & all groups & everyone else.


Can not boot from SSD on Samsung NP530U4C

The BIOS of the Samsung NP530U4C does not allow booting from the SSD drive (/dev/sda). When you do an install you can install Ubuntu to /dev/sda but you will have to install grub to the hard drive at /dev/sdb. In the BIOS you will also need to disable fastboot, disable secure mode, and change boot mode to CMS.


Is there an easy command line command to check disk space?

You can use df like so:

df -h

which will show something like this:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        56G   47G  6.8G  88% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            940M  4.0K  940M   1% /dev
tmpfs           192M  996K  191M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            957M  5.1M  952M   1% /run/shm
none            100M   44K  100M   1% /run/user


Brightness keys not working and no obvious interface for adjustment either

Open a terminal and type ls /sys/class/backlight. Note the exact name of the Intel interface. In my case it is intel_backlight.

Then type sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf

Copy and paste the following:

Section "Device"
    Identifier  "card0"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
    BusID       "PCI:0:2:0"
EndSection

Edit the option line as necessary.

Logout and in again.

Source: http://itsfoss.com/fix-brightness-ubuntu-1310/


Accessing image module for python in ubuntu

First, make sure you have the python-imaging package installed:

sudo apt-get install python-imaging

Then, from the Python prompt, enter

from PIL import ImageOps

If you don't get any errors, then everything installed correctly and you're ready to use PIL/Pillow in your programs.


Python program starts running again after pc wakes up?

The simple answer is yes but the truth is a little more complicated.

Yes the application will still be running; it'll resume with the rest of the system's processes. There are, however, stateful things like network connections and graphics driver states. These need to reinitialise with external hardware and that may mean some added network latency to begin with, or even a proper disconnect-reconnect (as happens to me on Ethernet). In particularly bad situations —definitely exceptions to the rule— the entire desktop environment can crash and restart.

So I can't guarantee what'll happen to you. If your application will crash if it loses network connectivity, there might be an issue. If it's doing rendering or CUDA/OpenCL stuff, it might break.

If it's just a plain CPU/disk stuff, it should be fine.
But who knows for certain. Computers make fools of us all.
Good luck.


Ubuntu 16.10 Desktop (32-bit) file please

You can find the torrent file for the 32-bit version about the middle of the page of the following link:

https://www.ubuntu.com/download/alternative-downloads

or the ISO from here:

http://releases.ubuntu.com/yakkety/

Hope this helps!


Why doesn't gnome extension update and keeps prompting?

I solved the issue by following this problem.

The issue was to

flatpak repair
flatpak install flathub org.freedesktop.Platform/x86_64/19.08
flatpak update

This also let me install org.freedesktop.Platform.openh264. Haven't encountered the problem again.


Can't connect to local MySQL server i am getting error

I think you are mixing up different types of applications.
MySQL is a database application. It stores data in tables and lets you use SQL (structured query language) to store and retrieve data.
The text you posted seems to be copied from a browser. Browsers are fed HTML (which is text) and can display that graphically. Browsers interact with webservers, like in your case Apache. Webservers host content like webpages, images, CSS files, etc. Sometimes, those webpages are just files containing HTML. And sometimes, those webpages are executable scripts that generate HTML, like PHP scripts.
You are trying to use a browser (for displaying HTML) to interact with MySQL (for storing data). This is not how it works.
Either use a MySQL client application (not a browser) to talk to the database, or use a programming language like PHP to generate HTML that your browser can display.
There is a project called phpMyAdmin. This is a set of PHP files that talk to your MySQL database, and then generate HTML to be displayed in your browser. In effect: you have a website that you can use to manage your MySQL database.
Install phpMyAdmin using sudo apt install phpmyadmin from a terminal, or by using a GUI tool. See here for detailed instructions on installing phpMyAdmin.


Weeeell, I have spent allot of time researching this problem today to no avail...

Until I tried to re-install Virtual Box again. Everything went fine, it installed ok no problems...

Then I read somewhere that I needed to update the dkms, so I did but through the terminal this time... Well I checked to see how it was progressing and what did I find "* No suitable module for running kernel found". The same error I got after my computer crashed, no less...

Do not know exactly how they did it but the dkm update, up"rooted" my laptop and killed it...

So I uninstalled virtual box along with the dastardly dkms today, and now all is well...


Warning: Permanently added '111.222.33.40' (ECDSA) to the list of known hosts

rsync is using ssh under the hood, and this is a normal informational message from ssh when the remote host has not been encountered before. From man ssh:

 ssh automatically maintains and checks a database containing identifica‐
 tion for all hosts it has ever been used with.  Host keys are stored in
 ~/.ssh/known_hosts in the user's home directory.  Additionally, the file
 /etc/ssh/ssh_known_hosts is automatically checked for known hosts.  Any
 new hosts are automatically added to the user's file.  If a host's iden‐
 tification ever changes, ssh warns about this and disables password
 authentication to prevent server spoofing or man-in-the-middle attacks,
 which could otherwise be used to circumvent the encryption.


No it isn't.

As you said, man sim doesn't exist.

And running sim gives

No command 'sim' found, but there are 23 similar ones

In your example 'sim' was only used as part of a file name. 'fun-sym' could have been almost anything, it has no effect on the command. Since it is only the file you are creating, it only has to be a valid file name.

All that you did was instead of linking to ../fun dir1/fun-sym you linked to  ../fun dir1/fun-sim

This command still worked because when you are using ln to create symbolic links (i.e. -s option) the target does not have to exist, except for hard links Kudos @TheSchwa


/etc/rc.local

# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.

Essentially the Multiuser Runlevel means when you boot up.
/etc/profile

This file is invoked only for login shells because that is its specific purpose.

/etc/profile, run by all Bourne-compatible shells (including bash and dash) when started as a login shell.
/home/$USER/.profile

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash if ~/.bash_profile or ~/.bash_login
# exists.

  Both the ~/.bashrc and ~/.bash_profile are scripts that may be executed when bash is invoked. The ~/.bashrc file gets executed when you run bash using an interactive shell that is not a login shell. The ~/.bash_profile only gets executed during a login shell.

Source

So I think .profile gets executed if neither of those were (for whatever reason).
Finally, your GUI method is probably putting .desktop launchers in /home/$USER/.config/autostart

This is run at user logon (GUI login only I think - so startx would but not tty login).

My pronouns are He / Him


Ubuntu 12.04 Nvidia GTX 460 video card installation

After several hours of research I found a working solution to my problem. From reading all the other forum posts I a lot of other people are having the same issue with the Nvidia driver and Ubuntu 12.04. Here's what I did to solve the problem for me. It may be advised to make a back up before you start. As we will be compiling a new kernel and reinstalling all the Nvidia drivers. Proceed at own risk

Download the Nvidia driver from the Nvidia website here,

Open module black list

 gksudo gedit /etc/modprobe.d/blacklist.conf

Add these lines

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv

Remove all previously installed Nvidia driver.
Might want to print out the rest of the steps as you will be rebooting after this step

sudo apt-get --purge remove nvidia-*

Reboot your computer. You may have to interrupt grub to and boot it safe or single mode. Do this by holding shift during boot. From there enable networking and open the root terminal

sudo reboot

Once at the root terminal enter the following to upgrade kernel.

sudo apt-add-repository ppa:francisbrwn9/kernels
sudo apt-get update
sudo apt-get dist-upgrade

Next you should run the Nvidia installer, by changing directory to where you downloaded it.

cd ~/Downloads/
sudo sh NVIDIA-Linux-x86_64-195.36.24-pkg2.run

Next start gdm

sudo service gdm start

Reboot

sudo reboot


Unable to install more than one Software at once

If I understand your question correctly you want to install more than one package at once. I suggest you use "synaptic package manager". At the command prompt,
1. sudo apt-get install synaptic
2. sudo synaptic
3. in synaptic, you can choose whatever packages you want to install. All packages will be installed afterwards.


After contacting patrick.hochstenbach@ugent.be who maintains the package now instead of Tim Brody, some changes are necessary to the above mentioned example.
One modification of which I am uncertain whether it is really necessary was to add
use HTTP::OAI::Metadata::OAI_DC;

The main modification, however, is that instead of the "next"-method the callback-method is to be used. The modified code looks as
# Using a handler
$response = $h->ListRecords(
   metadataPrefix=>'oai_dc',
   handlers=>{metadata=>'HTTP::OAI::Metadata::OAI_DC'},
   onRecord=>sub {
     my $rec = shift;

     printf"%s\t%s\t%s\n"
          , $rec->identifier
          , $rec->datestamp
          , join(',', @{$rec->metadata->dc->{'title'}});
   }
);


How to change the port which Wekan uses?

try to set using root url of Wekan with following

sudo snap set wekan root-url="http://localhost:5001"

restart your snap of Wekan again

sudo systemctl restart snap.wekan.wekan

and check your url of Wekan

sudo snap get wekan

it will appear like

and sign-in your Wekan on your browser like below

That's works to me, Hope this helps.


Run Application using Command without blocking Terminal

In this case nohup [CMD] & is a good alternative. nohup frees the command from the terminal running it and makes it immune to terminal hangups.

Also, the command you posted opens a new session and immediately sends EOF with </dev/null which forces matlab to not accept any input from terminal. This might be an issue depending on how a given program executes upon opening. I also do not think disown serves any purpose here, as the & runs it in the background and setsid should free it from the terminal. disown does not disconnect the program from the terminal, it only removes it from the job list.  In any case, I'd use nohup [CMD] & as it does

1) separate the program from the terminal running it

2) closes standard input

3) redirects stdout and stderr to a separate file for examination instead of just sending it into the /dev/null abyss

4) & at the end puts it in the background


Cannot boot into recovery mode on Macbook Air with encrypted disk after upgrading to Ubuntu 17.10

I figured this out: at the moment you start the laptop power, keep pressing the ESC button. It'll lead to the grub menu where you can navigate to "Advanced Ubuntu Options" and then select the recovery mode.


#!/usr/bin/python3

import os

def create_list(string_input):
    number = 0
    string_list = []
    while number <= 1000:
        number = number+1
        string_list.append(string_input+str(number))
    return(string_list)

command_list = create_list(string_input = "test")
for item in command_list:
    os.system("firefox -new-tab "+item)

This would run firefox 1000 times, opening new tabs with "test1, test2" as url (don't try :))

change "string_input" to your string, "firefox -new-tab" to your application.

edit: I must have had a weak moment, can be much shorter in python as well of course:

#!/usr/bin/python3

import subprocess

command_list = [
    "firefox -new-tab "+"test"+str(number) for number in range(0,1001)
    ]
for command in command_list:
    subprocess.call(command)


How to configure DNSv6 on a LAN without internet access?

First: you don't need to run a separate DNS server on IPv6. Your DNS server doesn't even have to listen to requests over IPv6 to answer with AAAA records. So you can even use DNS and make IPv6 connections while doing all DNS resolving over IPv4. It's not more or less efficient.

Of course, actually doing everything including resolving over IPv6 is much cooler :-)

Making BIND listen to queries on IPv6 is easy (and other DNS servers will be similar):

options {
    listen-on-v6 {
        any;
    };
};

Then you will have to let your clients know that they can do DNS resolving over IPv6. Usually you do this with DHCPv6, but you can also include the information in the Router Advertisements. What your client will use depends on the operating system they run.

DHCPv6 can be used in two ways: stateful and stateless. The stateless setup gives all clients extra information like DNS resolvers etc. without actually doing all the difficult work like assigning addresses and maintaining a leases database. An example configuration for the dibbler DHCPv6 server (again, other DHCP servers will be similar):

iface eth0 {
    stateless
    option dns-server 2001:db8:0:1::53
    option domain example.com, test1.example.com
}

Then you need to let your clients know that there is a stateless DHCPv6 server available on the network. We also include the DNS information for clients that want it this way instead of through DHCPv6 (yes, it's annoying there are two ways to set the same settings, but that's the way it is). I use RAdvD here:

interface eth0 {
    AdvSendAdvert on;
    AdvDefaultPreference high;
    AdvManagedFlag off;
    AdvOtherConfigFlag on;
    prefix 2001:db8:0:1::/64 {};
    RDNSS 2001:db8:0:1::53 {};
    DNSSL example.com test1.example.com {};
};

Now the RA tells the client the DNS settings (if it can understand them here) and it tells the client that there is a stateless DHCPv6 server present (managed off, other-config on) and the DHCPv6 server provides the DNS settings as well (for clients that expect them here). The DNS server listens to both IPv4 and IPv6 and can answer all requests via either protocol. The answers (A and/or AAAA records) tell the client what they can use to connect. Most clients will prefer IPv6 (the AAAA answer) when they can.

PS: Replace 2001:db8:0:1::53 with the real IPv6 address of your DNS server of course.


Help me to interpret my memtest+ result and guide me what to do next

TL;DR Your memory module is broken.

Sorry to be the harbinger of bad news.

(harbinger – Thx @Fabby for the nice word)

Explanation

Tst – shows which test has failed
Pass – Test 4 has one pass
Failing Address – shows exactly which part of the memory has errors.
Good and Bad – show the data that was written and what was retrieved respectively. Both columns should be equal in non-faulty memory (obviously).
Err-Bits – shows the position of the exact bits that are failing.
Count – shows the number of consecutive errors with the same address and failing bits.
Chan – shows the channel (if multiple channels are used on the system) which the memory strip is in.

Taken from the great answer of BloodPhilia

What is to do?

I am writing this here for completeness. In your system is only one memory module.

Use the process of elimination – remove half of the modules and run the test again…

If there are no failures, then you know that these two modules are good, so put them aside and test again.

If there are failures, then cut down to half again (down to one of four memory modules now) then test again.

But, just because one failed a test, don't assume that the other doesn't fail (you could have two failing memory modules) -- where you've detected a failure with two memory modules, test each of those two separately afterwards.

Important note: With features like memory interleaving, and poor memory module socket numbering schemes by some motherboard vendors, it can be difficult to know which module is represented by a given address.

Taken from the great answer of Randolf Richardson


When you installed Ubuntu, you must have created an User and assigned a password to it, right? By default that user is an administrator and can ask for root privileges. So whenever asked for root password, just key in the password of the user.


which file contains network configuration for MAAS?

Technically all MAAS configuration is in PostgreSQL database named maasdb. You should change it via API, CLI or GUI. I wouldn't recommend to mess up with database directly.


I removed the line in my set -e. Apparently,when using var=$(program | grep string) the command grep exits with an error. Now the line above works.
Alternatively, we can do var=$(program | grep string || true).


Using sudo apt remove libc6-udeb seems to fix the issue as shown in the question above.


Ubuntu starting from live CD, flashing screen?

Zakee,

EDIT: PLEASE REFER TO THE DUPLICATE LINK LUCIO HAS PROVIDED AS IT COVERS IT MORE DETAIL!

Try and see if you can get to a BIOS boot screen, depending on the UEFI BIOS, you could potentially use the Ubuntu UEFI loader which could give you better results. This link has more information for you, as in making sure you have the 64-bit download, changing BIOS to support Legacy etc.

Good Luck!


While installing Ubuntu, It asked me to allocate something called Swap Space, What exactly is it?

Swap space is space on the disk used as if it was temporary memory (RAM). If you did allocate it, your computer would use it when its RAM is starting to be used up. If you don't allocate it, nothing happens unless you run out of RAM space. Then any program wanting more RAM would be closed.

If you want to use hibernate, you need at least as much swap as you have RAM. This is because when your computer hibernates, it copies the RAM to the swap and turns off.

As binW says, swap is slower than RAM.


It won't work. The hardware is completely different and you will likely end up with a soft-bricked device. The CPUs are different (grouper/tilapia has Tegra 3, razor has Snapdragon 600), and so are the kernels.


I made a clean installation with the 12.04 and found a workaround for this:
-After the login screen's sound, I wrote my password and entered to my user (blind login).
-Waited until I was sure that the load finished and closed the lid to suspend.
-Then, I opened the lid and everything was fine, except by that the touchpad stopped working and I had to use a usb mouse.

reference: http://www.ubuntu-es.org/node/173550#.Ug7vXb-IS0w

-At this point, I had to do this: http://www.taringa.net/posts/linux/15304352/Touchpad-no-funciona-despues-de-suspender-Ubuntu.html
-Still not working but, after suspend normally using the session's menu, everything was fine, except by the black screen (violet, really)at the login.

*references in spanish


Ubuntu destop not working and Libreoffice menu text missing after ubuntu update

Open up dconf-editor (you might have to install it beforehand) navigate to /org/gnome/desktop/background and check that show-desktop-icons is checked.


Clone Ubuntu server on different machine

the most time-saving solution is to use the command "dd" to clone your disk to another disk. Of course, the storage size of the newer disk should be equal or larger than your current disk storage.

sudo dd if=/dev/sdX of=/dev/sdY

WARNING: THIS COMMAND MAY DESTROY YOUR DATA. PLEASE MAKE SURE WHAT YOU ARE GOING TO DO BEFORE USING THIS COMMAND.

The "X" of sdX and "Y" of sdY depend on your machine.
sdX means your current disk label.
sdY means your target disk you want to move in.
Please use "mount" or try to google to know your sdX label of your system. I could not judge the exact lable name for you because this varies between systems. In most cases, your current disk is /dev/sda and your target disk will be /dev/sdb.

use this command to get more information in your terminal:

man dd

You do not worry about driver issues too much. Linux kernel will detect and (try to) enable hardware components during every booting.


You can have the + for a new tab added: Chrome Theme 1

You could also edit Google Chrome's icons, saved in /usr/share/icons/.


How to switch between graphics on Dell Inspiron N5110?

Is it one of their Optimus cards? That's what I have, and I use Ironhide to switch between cards. My laptop uses the Intel card most of the time, but when I need more power I run the application through optirun <command>.


How do I disable window move with alt + left mouse button in Xubuntu?

If you go to the Xfce menu and choose settings > settings manager > window manager tweaks > accessibility, you can select another key instead of alt  to move the windows or choose none at all. This should be just what you want.

You can also use xfconf-query to set easy_click to none (or another key) on the command-line:

xfconf-query -c xfwm4 -p /general/easy_click -s none


Can I sort files in Dolphin into date order on Kubuntu 12.04.01?

Switch into Details view mode and then you will be able to click on the top of the Date column.


After upgrade to 16.04 my system reboots continually

Try changing all options to Do nothing in the power management settings.

Maybe it's the Suspend when inactive function causing this issue.


Ubuntu MAAS 2.0 on 16.04 server won't import images

Update:

I created a local mirror and it appears to be working.

Apache2 + this http://maas.io/docs/en/installconfig-images-mirror


You can use debsums to do this. From the man page:

  debsums is intended primarily as a way of  determining  what
  installed
         files  have  been  locally  modified by the administrator...

You will need to install debsums yourself as it is not installed by default.

I found when I tested this that it complained about most packages not having md5 checksums so I ran

sudo checksums_init

This looks for packages that did not install their md5sums
       files. Then, it will generate those md5sums files from the binary packages downloaded via APT if available.

Once that was completed I ran :

sudo debsums -ce > ~/changed-configs.txt

and that produces a file called changed-configs.txt that lists configuration changes made locally compared to the files provided from the repositories.

I think that should provide what you need.


LuckyBackup scheduled backup does not work

The problem is about root user rights. The solution is to edit the profile schedule and to enable the console mode. See here.


It turned out I needed to flash my BIOS, which did not work well with my SSD (it did not really detect it). This was a bug in ASUS' UN45 Model.


No.  You can only upgrade from a release to the next release, or from a LTS release to another LTS release.  Since your installation is so old, it would probably behoove you to just reinstall from scratch, rather than perform the time-consuming upgrades one at a time.  See this question for a good explanation of why, if you're curious.


What is the correct order of the commands to replace my current kernel?

I actioned the commands in this order:

sudo apt install linux-{image,headers,modules,modules-extra}-4.15.0-43-generic
sudo apt-mark hold linux-*-4.15.0-4[45]-generic
sudo apt remove linux-*-4.15.0-4[45]-generic

I them reboot and uname -a confirmed the default kernel as: linux-4.15.0-43-generic


How to figure out the "install" step in a debian package?

You don't need to worry about modifying the initrd inside the container, unless you're giving access to the container to modify the initrd explicitly. Just install the package and it should work fine.

There is no "script" in the .deb which describes where to install files to, or how. The tarball of contents is simply unpacked in the root directory. The scripts which update the initrd are likely postinst and prerm or postrm in the package.


How can I check and change the partition table type?

What is a partition table? How is it related to Windows 8?

In addition to general partitioning, it should be noted that information about partitions are stored in a partition table on the hard disk.

The whole topic didn't receive much attention because DOS/Windows computers – where one would install Linux onto – just had one choice for almost three decades. (MBR was introduced in 1983.) Until Windows 8 finally replaced the long overdue and outdated BIOS/MBR subsystem combination with UEFI/GPT. (Comparison of GPT and MBR on the Arch Wiki.)

While GPT is the name for the new format, there is some confusion about how to name the old one as MBR previously described the bootloader code that is stored along the partition information in the partition table.

How do I check and change the partition table?

Read these instructions carefully before you start!

Also note that you can convert partition tables: How can I change/convert a  Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

GUI-method - Using GParted

To find out what partition table type the selected drive has select View > Device Information from the menu.

Select the disk of which you want to change the partition, then select Device > Create Partition Table from the menu.

If you get a warning that the device contains active partitions, unmount these. Note that you cannot unmount partitions of your currently running operating system. You will then see the window below, where you can choose the partition table type. msdos is what GParted calls the old format, gpt the newer one. All the others for other operating systems or architectures.

Please also note the warning message. Creating a new partition table will discard all information about existing partitions on the disk. It will not overwrite data on the partitions, but you still don't want to have to dig through and restore data afterwards. Therefore consider the old partitions gone and all data lost after you created the new partition table and backup your data before doing so.

CLI-method - Using parted

To display partition table information run:

sudo parted --list

To create a new partition table run:

# This is a destructive action that will destroy all data on the partitions of the device
sudo parted device mklabel label-type

device should be replaced with the device name (e.g. /dev/sdb) and label-type with msdos or gpt.

You can also run parted interactively by just running sudo parted. More details in the manpage.


Unless you delibaretely not want the group members to access the directory (will be a unusual case), you should use 755 for directories.

You can use find.

For files :

find /path/to/public_html/ -type f -exec chmod 0644 {} +

For directories (using 755) :

find /path/to/public_html/ -type d -exec chmod 0755 {} +

-type f will only find the files and execute chmod 0644 accordingly
-type d will find the directories only and execute chmod 0755 on them.


Sources missing in /etc/apt/sources.list, how do I get them back?

You seem to have removed all your software sources. To re-add them, launch the Software Center, then go to Edit -> Software Sources in the menu, and then check all the boxes under the Ubuntu Software tab:

Then click close, and the system will ask for your password and then generate a new source file for you. You probably won't need the Source code box checked:

Do I really need the "Source Code" in my repository list?


Online accounts and password manager forget Google; how to make them remember?

Yes , I am also facing the issue and I know  one reason why it is.

actually Google offered advanced security protection to their e-mail to stop hackers to attack their users. They have placed a new security service and nothing but 2-step verification.

So every time I have login from Ubuntu I will get a red warning at system options where we have online accounts menu. Again I need to click that and then I need to authorize it.

It will provide me a message windows like this   & I need to enter the password everytime which will be received by my mobile everytime.

If I want to remove this , I can do that :). Google also providing an Unique password for applications. If your google account have to get logined from the application then , If you enter your login password that will grant the temp access through the application. If you have entered the application password that was created at the google then you no need to enter the login password everytime and no longer grant access process .

https://support.google.com/accounts/answer/185833?hl=en


Free software to connect to Skype for Business

There is some information here from Chris Rob about using Skype for Business on Ubuntu 14.04 with Pidgin.

Seems you need to compile/install the latest SIPE plug in for Pidgin and then configure to connect to the Skype for Business server.


The only solution I see is to kill processes one by one and try to run xbindkeys -n each time. Then you will be able to deduce which process occupies your key combinations. To identify which PIDs you should kill look at ps aufx|grep $(whoami). Start with obvious ones, then continue with leaves except of course non-X applications (bash, mc, etc.) and your terminal application. Unless you kill your terminal app you should be able to proceed.


What is the proper way to select a new version of the kernel and boot into it in Ubuntu for Raspberry Pi?

To install a specific kernel version from the repos (for example 5.8.0-1016), install it first:
sudo apt install linux-raspi-headers-5.8.0-1016 linux-image-5.8.0-1016-raspi linux-headers-5.8.0-1016-raspi linux-modules-5.8.0-1016-raspi linux-headers-5.8.0-1016-raspi

then enable it with the command:
sudo flash-kernel --force 5.8.0-1016-raspi

this is reverted if an update to the kernel is installed afterwards.


I had the same problem. what i had to do was to uninstall everything i had on my laptop and install ubuntu. That was foolish of me. And fortunately, my Ubuntu still did not boot, and showed a grub prompt.
later i realised that this was a UEFI mode problem. What you need to do is

First, disable uefi boot mode. and then try installing ubuntu. (NOTE: the problem isnt with your ubuntu 12.10 image). you also need to disable your secure boot. install in legacy boot mode.

OR

Second, live run your ubuntu OS, use boot repair. this must be added using apt-get repository. OR use LINUX SECURE REMIX which is essentially made to solve this problem of dual booting. it comes with a preinstalled package called boot repair, run it to modify your booting options in favour of your linux distribution. simply live run your Operating system ie Ubuntu and run boot repair available in the dock on the left.
then install the OS.

this worked for me. here is the reference for more technical info and the link to the linux secure remix image.  https://help.ubuntu.com/community/LinuxSecureRemix


Simply open up the Software center and uninstall and reinstall it.


How to disable the touchpad on a Dell Inspiron 5040

Nothing did the trick for me, so I made the following little script that works:
!/bin/sh
touchpad_id=xinput list | grep PS/2 | cut -f 2 | cut -d "=" -f 2
xinput set-prop $touchpad_id "Device Enabled" $1


How to link Tomcat server config in Intellij IDEA?

The solution to this problem is putting:

/usr/share/tomcat9 in Tomcat_Home.
/var/lib/tomcat9 in Tomcat base directory.

As seen in the screenshot below.

Note: Apparently, it is very important to add Artifacts in the 'Deployment' section and apply it. Like this:


Dependent on the desktop you use (I don't know, if you use Unity-Desktop or Gnome-Shell or even KDE),there is a different way, how to find the app "screenshot". It is installed by default.

In Gnome-Shell: go to your menu and there go to accessories.
There you will find "screenshot".

In Unity:       go to the unity-lens and look for all your installed apps.
There you should find "Screenshot".

In Cinnamon:    go to your menu and there to "accessories" and there to "screenshot"

In KDE:         to to your KDE-menu and there to "accessories" and there look for
"screenshot".

This app is really easy to handle and lets you save your screenshot in your selected folder. So no problem of taking screenshots in Ubuntu or even LinuxMint.


"Connection is Untrusted " error in Firefox

OK,after a lot of tries I understand the problem and find the solution.

Just use this(in hebrew) page in the Internet Rimon ISP site.

פשוט תשתמש בקישור הזה באתר של אינטרנט רימון.

Explanation

my ISP(INTERNET RIMON -only in IL) is a special one. It filtering violence, porn and bad content. But in secure pages they have a problem. they can't look in it...
so the solution they fond is simple: 'man in the middle'. they actually take a look in the secured information, and re-encode it using netspark.com certificate. so my data is protected (except what my ISP servers see), but the browser, who doesn't know who is netspark.com, tell me that there is a risk that someone sniffed my information(and that's true..).
If i say to the browser who is netspark (and that I trust it) and what is it's certificate (this isn't regular certificate), the browser will work perfectly.

In my case, Because there is no problems in my chrome, I exported the certificate of netspark from chrome, and imported it back to firefox, but the simpler one is in the beginning of the answer.

TIP:
If your ISP is INTERNET RIMON (אינטרנט רימון) and you have problems with ssl, your google or somthing related, then you can be sure that the RIMON is the reason.


Use a 3rd-party software repository (ppa) for apt.
It currently provides the latest libreoffice for all LTS versions and the latest non-LTS:
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt upgrade

Current version is 7.0.4


After upgrade to 16.04 the Desktop UI is broken

For anyone having the same issue in the future, I had the exact same UI problem after trying out gnome3-staging ppa's gnome-terminal. Here's how I fixed it.

Try resetting compiz and unity configurations first (be sure to backup config files first!)

dconf reset -f /org/compiz/
setsid unity
unity --reset

For me that didn't work. However, I remembered I added gnome3-staging ppa right before so removed it

sudo ppa-purge pa:gnome3-team/gnome3-staging

Removing gnome3-staging ppa fixed everything for me


I had the same problem too, I saw you already fixed the problem, but for the next Xiaomi Ubuntu user:

Use rfkill list to see the list of available wireless devices, the result will be something like:

   rfkill list
        0: phy0: Wireless LAN
            Soft blocked: no
            Hard blocked: no
        1: acer-wireless: Wireless LAN
            Soft blocked: yes
            Hard blocked: no
        2: hci0: Bluetooth
            Soft blocked: no
            Hard blocked: no

then you will see that an acer wireless lan is also there and this loaded module is interrupting the correct one so you can deactivate it, the next steps show how to do it.

With this command you can see which Kernel modules are loaded
lsmod | egrep '_acpi|_bluetooth|intel_oaktrail|_laptop|_rfkill|_wmi'

my result was:

acer_wmi               20480  0
dell_wmi_aio           16384  0
sparse_keymap          16384  2 dell_wmi_aio,acer_wmi
intel_lpss_acpi        16384  0
intel_lpss             16384  1 intel_lpss_acpi
mxm_wmi                16384  1 nouveau
wmi                    20480  4 dell_wmi_aio,acer_wmi,mxm_wmi,nouveau
video                  40960  3 i915_bpo,acer_wmi,nouveau

so the problem was the module called acer_wmi so I deactivate it sudo modprobe -r acer_wmi

then the problem was solved temporally but after a restart the module will be loaded again so as suggested in the comments the solution is to put it in a black list

Add to /etc/modprobe.d/blacklist.conf the following line blacklist acer-wmi and done.


In Recoll on Ubuntu, how do I specify a particular directory to search?

Also in query language option you can specify

dir:/home/wayne/recoll

The search would restrict to 'recoll'


Your user does not own the file. On all Linux and Unix systems, there is a special user called root, who's job is to "own" all system files so an ordinary user cannot accidentally break the system. You must also be root to perform some administrative actions.

You can perform changes as root by prefixing a command with sudo, and entering your password. To open a root file explorer (WARNING!!! VERY dangerous, easy to cause a lot of harm), press CTRL+ALT+T and then type gksudo nautilus followed by Enter. Enter your password at the prompt, and change away (be VERY careful).


How to make dual monitors output the same color?

The easiest way would be to get a device like Spyder http://www.northlight-images.co.uk/reviews/profiling/spyder3pro.html
You can get Express version for something around 100$. It's not that cheap but will give you decent result.


Calendar (notification panel) in the Arc-Black shell theme is unreadable

The solution is posted by the user UnKNOWN:

Related? askubuntu.com/a/1282050/739431 – UnKNOWn 7


Script to remove JPG's with particular vendor tag

Probably tons of different ways there but here's a pythonic one:

#!/usr/bin/python

import os, glob
for filename in glob.glob('*.*'):
    if os.popen('exif %s | grep Manufacturer | grep Motorola' % filename).read():
        os.remove(filename)

Yeah, the filepattern is *.* and it simply checks for words Manufacturer and Motorola in the same line from the exif results per filename and removes that file if found (i.e. there's a readable output from the command pipe).


How do I auto-connect to a DSL-USB-modem?

Your TD-8817 modem can also be connected with the Ethernet network adapter of your PC. See also this answer on DSL connections. It is best advice to do so as connecting by USB can only be done with (usually proprietary) drivers and network needs to be bridged to the USB driver. The problem you encounter may likely come from the USB driver that only allows you to connect after re-plugging your device.

For your modem use this socket to connect with an Ethernet cat5 patch cable to the LAN port on your computer:

Once your modem is connected with the Ethernet port all traffic can be handled by default Ubuntu applications withouth the need to install any additional drivers. You will be able to autoconnect to the modem in network manager settings:

Edit your eth0 settings by ticking Connect automatically in order to connect everytime you turn on your PC:

In case you need to stick to USB connection then the option to autoconnect may depend your USB driver's capabilities.


"invalid Python installation: unable to open /usr/lib/python2.7/config/Makefile (No such file or directory)"

If you can't use apt-get try downloading python .debs and install them manually.

You can download them from here: python2.7 and python2.7-minimal. Don't forget to download the correct version for your architecture.

After that just open a terminal, change to the directory where you have downloaded the files and install them:

sudo dpkg -i python2.7-miminal*.deb
sudo dpkg -i python2.7*.deb

Note: the names in the dpkg command are not completely right. So replace them with the correct name of the files you downloaded.


USB 3.0 doesn't work after waking up from suspend

I solved it going into the BIOS and activating "USB S3 resume" (or something like that) option under the advance tab.

Hope this works for you!


I need an Open source Dreamweaver alternative

For quick and effortless web development - Quanta Plus is steadily becoming a worthwhile competitor to the commercial web editors on the market. Quanta Plus's features include multi-document interface, WYSIWYG editing and templates. Among the advanced features your will find team development, plug-in support and a PHP debugger. The objective of the team behind Quanta Plus is simply to developer the best tool for web development.


Running application associated with wrong .desktop entry

Fix seems to be as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1585369

E.g.

Exec=/opt/firefox/firefox --name Nightly -P clean %u
StartupWMClass=Nightly


can not install from usb with error cannot find grub_platform

This is probably caused by the fact that your laptop does not support UEFI.
Converting the USB drive partition table from GPT to MBR may help in that case.
See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1905491/comments/8


How to re-install ubuntu that is pre-installed by manufacturer

The simpliest way is to do a fresh install of Ubuntu. For example, see https://help.ubuntu.com/community/GraphicalInstall


Which alternative to using CCSM (Compiz Config Settings Manager)

Most of the settings in CCSM can be altered/changed using gsettings command. dconf-editor is a graphical alternative to it also. But both of them requires some knowledge about the backend system.
MyUnity and Ubuntu tweak was great (limited), but I heard they get removed from 12.10.

Here is the manual page for gsettings
For example, to change the font from Ubuntu 11 size to Ubuntu 10 size, you would execute this command:
  gsettings set org.gnome.desktop.interface font-name 'Ubuntu 10'

You can install dconf-editor with the command sudo apt-get install dconf-tools

Update: Ubuntu tweak is back now!! That is a great news actually. So happy tweaking !


No, it is not mandatory to install the "server" image to get MongoDB to work properly.  It might be "recommended" but MongoDB will run just fine on the 16.04 "desktop" image as well.

  Why is it recommended?

Because the "desktop" image includes extra packages (like a GUI/Desktop) that can consume resources.  This can hurt the performance of things like a database.  So for production, server-based images are usually the best way to go.


How to move the lock window on the lock-screen?

For Unity/Gnome, the position is hard coded and requires patching the gnome-screensaver source and rebuilding it

  I don’t expect this to be very difficult

Sorry, but it is, because it's hard-coded, at least for Unity and Gnome:

The lock dialog and lock screen are part of the gnome-screensaver package.
The position of the dialog is controlled via this bit of code at/around line 1212 in gnome-screensaver/src/gs-window-x11.c:

    window->priv->lock_box = gtk_alignment_new (0.5, 0.5, 0, 0);

The 0.5, 0.5 are the relative X- and Y-dimension center coordinates of the lock dialog (ranging from 0=left/top to 1=right/bottom).
Setting it to e.g. 0.1, 0.9 gives your desired bottom-left alignment. Of course, this requires recompiling from source :(
Result:

older widescreen screenshot

The patch

--- gnome-screensaver-3.4.1.orig/src/gs-window-x11.c    2012-06-04 18:14:11.000000000 -0700
+++ gnome-screensaver-3.4.1/src/gs-window-x11.c 2012-06-04 18:14:36.972433823 -0700
@@ -1209,7 +1209,7 @@
                     guint32   id)
 {
         window->priv->lock_socket = gtk_socket_new ();
-        window->priv->lock_box = gtk_alignment_new (0.5, 0.5, 0, 0);
+        window->priv->lock_box = gtk_alignment_new (0.1, 0.9, 0, 0);
         gtk_widget_show (window->priv->lock_box);
         gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->lock_box, TRUE, TRUE, 0);

or see raw pastebin

Customize the 0.1, 0.9 to taste.

To build and install

sudo apt-get install build-essential dpkg-dev
sudo apt-get build-dep gnome-screensaver
mkdir gssrc && cd gssrc
apt-get source gnome-screensaver
wget -Olockbox-left.patch http://pastebin.com/raw.php?i=pqDYRrW1
patch -i lockbox-left.patch
cd gnome-screensaver-3.4.1
dpkg-source --commit
dpkg-buildpackage -us -uc
cd ..
sudo dpkg -i gnome-screensaver_3.4.1-0ubuntu1_{i386|amd64}.deb
cd ..
rm -rf gssrc
killall /usr/bin/gnome-screensaver

No logout or reboot needed. To uninstall, simply do an apt-get --reinstall install gnome-screensaver. You'll need to repeat the whole patch-build-install process whenever gnome-screensaver is updated, so hold it to make life easier and update when you're ready.

How did you figure this out? (by request)

No, I'm not one of the developers, but I have a decent knowledge of C/C++. Otherwise, it's all Google and heuristics. :)

Google tells you there is no obvious way to answer this question.
It also tells you the lock dialog is provided by gnome-screensaver
Download source and examine. Hmm, gs-lock-plug.c sounds interesting:

create_page_one (GSLockPlug *plug)
{
GtkWidget            *align;
...
align = gtk_alignment_new (0.5, 0.5, 1, 1);

That could be it! Look up gtk_alignment_new syntax, change to 0.1, 0.9 and rebuild. Doesn't work :(
Notice debug-screensaver.sh in source folder, run it, and then lock and login. Output contains:

[find_window_at_pointer] gs-manager.c:668 (19:26:42):    Requesting unlock for screen 0
[gs_window_request_unlock] gs-window-x11.c:1522 (19:26:42):  Requesting unlock
[window_dialog_up_changed_cb] gs-manager.c:909 (19:26:42):   Handling window dialog up changed: up
[handle_window_dialog_up] gs-manager.c:851 (19:26:42):   Handling dialog up

Look at gs-manager.h, which includes:

gboolean    gs_manager_request_unlock       (GSManager  *manager);

Examine gs-manager.c:

gs_manager_request_unlock (GSManager *manager)
{
GSWindow * window;
...
/* Find the GSWindow that contains the pointer */
window = find_window_at_pointer (manager);
gs_window_request_unlock (window);
}

gs_window_request_unlock isn't from gs-manager. grep -i -r -n gs_window_request . reveals:

./gs-manager.c:1353:        gs_window_request_unlock (window);
./gs-window.h:92:void        gs_window_request_unlock     (GSWindow  *window);
./test-window.c:66:        gs_window_request_unlock (window);
./gs-window-x11.c:1518:gs_window_request_unlock (GSWindow *window)

Heuristically jump to line 1518 in gs-window-x11.c; gs_window_request_unlock doesn't help directly but contains a number of window->priv mentions.
Look at struct GSWindowPrivate near the beginning of gs-window-x11.c. It contains GtkWidget *lock_box and GtkWidget *lock_socket
Search for occurrences of lock_box in file; third result is:

window->priv->lock_box = gtk_alignment_new (0.5, 0.5, 0, 0);

Do a little mental victory dance, change, build, test, succeed, post answer, edit answer..and win bounty? :)


Login Screen/Background Change? (kubuntu)

At here

KDE System Settings > Login Screen (LightDM); Theme tab

Background image

and the log in screen has new background.

Why it is not working - White background - Check these

1) The image file has wrong extension

Tested with jpg picture with the png extension.
The file properties is showing the right image format.

Right click the file > Properties: Information tab

The picture should have correct extension - If not the LightDM can't read the picture data.

2) The image file has wrong permissions

The user has forbidden the read of the image.

Right click the file > Properties: Permissions tab

The Owner/Group/Others should have the right to read the picture data.


In order for lvresize to work you must first extend the sda3 partition which holds the LVM physical volume:

sudo parted /dev/sda -- resizepart 3 -1

This will resize /dev/sda3 to occupy all the space available on the disc. (resizepart 3 -1 means "move the end of partition number 3 to the last sector on the disc".)

You may want to boot from the installation media into a live session, in order to avoid any problems with mounted file systems.


LibreOffice problem integrating with Unity

I had the same issue. After I installed the lo-menubar (see synaptic) i haven't seen this issue (to be sure I will need to test longer). I'm wondering if you have the same experience.


Ctrl C/V/F/L shortcuts and super by itself no working in Ubuntu 20.04

You should press: Ctrl + Shift + [whatever]
but not:  Shift + Ctrl + [the-same-thing]
Ctrl+Shift working but not Shift+Ctrl in Ubuntu 20.04 LTS


Audio doesn't work on iMac 20" early 2008 with Ubuntu 12.04

Download and install the latest DKMS. This will resolve your issues (as it did mine with my Macbook Pro 17" early 2008).

Here is a link: alsa-hda-dkms_0.201210170702~precise1_all.deb


Someone or something has altered the permissions to your .Xauthority file. To get back the permissions to your user run the following command at TTY:

sudo chown $USER:$USER ~/.Xauthority

Now just try to login normally.


Ctrl+Alt+Arrow (switch workspace) won't work even if workspaces are enabled. Instead, it seems to have other effects in several programs

You can resolve this issue by using dconf-editor. It's available by first enabling the universe repository and then issuing the command sudo apt install dconf-editor After which you can launch it from the applications menu. See below for the relevant section:

Navigate in the left hand column down to wm, click the arrow that points to the right to expose and then select keybindings. Scroll down the right window to expose "move-to-workspace-down", select it and click the Set to Default button. This should set this binding to ['<Shift><Control><Alt>Down'] Repeat this process for the next 3 entries which correspond to left, right, and up. The changes should take effect immediately. If not, reboot.

kudos to @doug for this comment which pointed out the right place to look.


Synchronise icons between .desktop and dock

You need to add a proper StartupWMClass entry to your .desktop file. To do this follow the steps below.

Launch the application in question.
Launch a separate Terminal window and run xprop WM_CLASS.
Place the cursor over the opened application window in question. The cursor should turn into a crosshair by now. Click. You should get a WM_CLASS string for the application in the Terminal window.
In the .desktop file add the following line

StartupWMClass=OBTAINED-VALUE

In place of OBTAINED-VALUE put a value you got from step 3 without any quotes.

Update from the OP:

  also it seems I needed to provide a name for the xterm instance. The exec line now looks like xterm -name myApp -e myScript.sh


There's no 100% reliable method for determining if a terminal supports a given number of colors.  You set TERM to tell applications to use a particular terminal description, so that ncurses and other libraries know how to work with the terminal.

The xterm-256color description is part of ncurses-base, an essential package:

$ dlocate /lib/terminfo/x/xterm-256color
ncurses-base: /lib/terminfo/x/xterm-256color

If your application cannot open it, that's likely because you have an environment variable set (such as TERMINFO) which tells ncurses to look in a place where that description does not exist.

You can use strace to see which files are opened by an application, and (usually) see problems of this sort, e.g., by looking for failed opens of "xterm-256color".

Further reading:

TERMINFO, environment variable in the ncurses manual page


I found a easy way using VLC media player. winff is also capable of doing the same conversion.

Convert Video to Audio using VLC media Player.

1). Open up VLC media player.then in menu bar select Media -> Convert/Save or Simply press CTRL + R.it will open up a window called "open Media".

2). And then in File selection area browse for the Video file which you want to convert using "Add" button.

3). Select "Convert/Save" button. it will pop up a window called "Convert".It will show the path to your selected video file as source file.

4). In settings area in front of profile label there have a small button to change settings.click that.

5). Under Encapsulation tab check out "Wav" option. then click Audio Codec tab.as Codec Select MP3.and give a suitable bit-rate,number of channels and sample Rate. after doing all the modification hit save.

6). then in Convert Window under Destination area click Browse button to give a file name and a path to the output file. in that opened up window select the path where you want to save the converted file and give a file name you want. after all hit save.

7). Click save in Convert Window. VLC will do the rest for you.


Some files on Samba shares are displayed as folders

I was experiencing the same issue, and the solution was worked for me was this:
All affected files/folders had the extended attribute user.DOSATTRIB. When performing getfattr #filename the result of a 'bad' file would be something like this:
getfattr Borat\ \(2006\).mp4
# file: Borat (2006).mp4
user.DOSATTRIB

To resolve this, I removed the extended attribute using the command setfattr -x user.DOSATTRIB #filename. So for the above example doing:
setfattr -x user.DOSATTRIB Borat\ \(2006\).mp4
getfattr Borat\ \(2006\).mp4

returned no extended attributes, and my network share file was able to be accessed again.
I'm currently figuring out how to run setfattr -x user.DOSATTRIB recursively on my folders. I'll edit this response when I've figured it out.
Update: Alright, so I did a kind of sloppy solution.

First I used the command getfattr -R Movies > DOS-Movies.txt on the directory ABOVE my movies folder. The above command runs getfattr recursively on the movies folder and returns all files & folders that have extended attributes, then saves them in a text file.
I opened that text file in Notepad++ in order to clean it up a bit, as other attributes which I did not want to remove were present, such as "user.encryptable".
I used the regular expression (?-is)^.+\Ruser.encryptable\R to
remove the line that included that attribute AND THE PREVIOUS LINE
(the filename). I also removed all blank lines so I ended up with # file: Movies/Dune (1984)/Dune (1984).mp4 = just the files that had the DOSATTRIB extended attribute, one item per line. I also used Find/Replace to find \r\n and replace with "\r\n to add a " character at the end of each line.
The command to remove the attribute is setfattr -x user.DOSATTRIB, so I did a basic Find/Replace and each line looked like this at the end: setfattr -x user.DOSATTRIB "Movies/Dune (1984)/Dune (1984).mp4"
I then just pasted the commands which removed the DOSATTRIB on all files and folders, rendering them once again as readable from windows.

Hope this helps!