ThinkPad OneLink ProDock with ThinkPad Yoga

I have a ThinkPad Edge E540 and I just bought OneLink Pro Dock. Everything works fine - USB, sound, DVI... (I have not tested DP yet) except ethernet. Ubuntu finds OneLink Pro Dock ethernet adapter, but I can't connect to the internet. I have to plug the LAN cable to the laptop to get online.

There is some patch https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1291890 , but it does not work for me.


Download emails from office365 in 'company mode' via CLI

Well - I found an answer!!!
:)
Remember, I ONLY wanted to Download emails - not upload anything to the mailbox, or change anything...
I found that MBSYNC could do the job for me :)

sudo apt-get install mbsync

vi ~/.mbsyncrc

paste:
IMAPAccount gmail

Address to connect to

Host TheEmailServer...
User MyUserName4TheMailBox
Pass MyPassWord4TheMailBox
UseIMAPS yes

SSLType IMAPS

SSLVersion TLSv1.2

CertificateFile /etc/ssl/certs/ca-bundle.crt
PipelineDepth 1

To store the password in an encrypted file use PassCmd instead of Pass

PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"

#

Use SSL

AuthMechs *

SSLType IMAPS

SSLVersions TLSv1 TLSv1.1 TLSv1.2

The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.

CertificateFile /etc/ssl/certs/ca-certificates.crt

CertificateFile ~/.cert/imap.gmail.com.pem

CertificateFile ~/.cert/Equifax_Secure_CA.pem

IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local

Subfolders Verbatim

The trailing "/" is important

Path ~/.mail/my_local_mailbox_folder/

Inbox ~/.mail/didnt_work_for_me

Channel gmail
Master :gmail-remote:
Slave :gmail-local:

Exclude everything under the internal [Gmail] folder, except the interesting folders

Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"

Or include everything

Patterns *

Automatically create missing mailboxes, both locally and on the server

Create Both

Save the synchronization state files in the relevant directory

Sync Pull
SyncState *

Then run "mbsync gmail" where 'gmail' is the name from the ~/.mbsyncrc above

Then wait for all the emails to arrive :)

NB: It took a couple of days for me to get them all to complete, and I had to restart the sync a couple of times :)

Please don't forget to 'like' this, if it's usefull to You :)


Is it safe to delete 14.04 from dual boot 14.04 and 16.04 system?

The grub boot loader lives as I can see from the photo you've provided on sda1 (EFI system partition). Unless you manually uninstalled grub from your 16.04 install or expressly chose during installation to not install grub at all you should be fine, provided you copy your 14.04 /boot/grub/grub.cfg to your 16.04 install (same directory) or generate another with update-grub (from 16.04).


Ubuntu 18.04 No Wi-Fi Adapter Found on ThinkPad T440s

So after installing all packets from Ubuntu I wrote this command and all drivers got downloaded

sudo modprobe iwlwifi && dmesg | grep iwl

[    4.477277] iwlwifi 0000:03:00.0: loaded firmware version 17.948900127.0 op_mode iwlmvm
[    4.509779] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144
[    4.533684] iwlwifi 0000:03:00.0: base HW address: 7c:7a:91:46:43:bc
[    4.756595] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[    4.758792] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0


Eclipse Luna update to 4.4.1 fails in Ubuntu 14 (32-bit)

Discovered the trick: run Eclipse (just this once, just for updating) as root.

In Terminal, run

gksudo /opt/eclipse-luna/eclipse

or whatever the path is on your system.

Then proceed with the update.
This worked updating Luna from 4.4.0 to 4.4.1

Never ran into this when using Eclipse on a Mac.


Where are (partial) screenshot stored or how to specifiy location?

As I know holding Ctrl copies the screenshot to the clipboard and you need to paste it in an application to save it.

You can check the shortcut keys in Keyboard Settings.


How to simultaneously play audio via 2 separate HDMI output devices connected to one GPU?

First of all, backup your PulseAudio configuration $sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak

Once it's done, we'll check our list of hardware playback devices and take note of the ones we are looking for using $ aplay -l. Your output should look like this:

Take note of the Card ID AND the Device ID of the outputs you want to sink together. Now we'll try and make a new sink for each one of those outputs using the alsa-sink module (you should really follow this link). Open any text editor and copy/paste:

load-module module-alsa-sink device="hw:[CARD_ID],[DEVICE_ID]" sink_name=vsink_[CARD_ID][DEVICE_ID] sink_properties="device.description='HDMI [DEVICE_ID] VSINK' device.icon_name='audio-card'"

Change the [CARD_ID] and the [DEVICE_ID] with the ones you took note in the last step. You should have as many lines of this code as outputs that you want to combine, with their respective CARD_ID and DEVICE_ID.

Once this step is done, we'll use the combine-sink module (you should follow this one too) so we can "glue" our outputs together. Copy and paste this in your editor:

load-module module-combine-sink sink_name=combined_vsink slaves=[first vskink name],[second vsink name],[n vsink name] sink_properties="device.description='[a name for your combined vsink' device.icon_name='audio-card-symbolic'"

In the end you should have something like this:

Once you have your configuration done, we'll have to load it into the PulseAudio configuration (we've made a backup of it as the first thing). Open it for editing using gedit admin:///etc/pulse/default.pa and search for this section:

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
...
...

You section my have a couple more commented lines if you never edited this file before. Right after the last line of that section, paste your lines. Bellow you'll find my mock ones in way that your file should look like after pasting:

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)

load-module module-alsa-sink device="hw:0,0" sink_name=vsink_00 sink_properties="device.description='HDMI0:0 VSINK' device.icon_name='audio-card'"
load-module module-alsa-sink device="hw:0,1" sink_name=vsink_01 sink_properties="device.description='HDMI0:1 VSINK' device.icon_name='audio-card'"
load-module module-combine-sink sink_name=combined_vsink0 slaves=vsink_00,vsink_01 sink_properties="device.description='HDMI0:0 + HDMI0:1' device.icon_name='audio-card-symbolic'"

Now that we've done that, for it to work consistently we'll have to deactivate the PulseAudio udev-detect module (that's the last one, I promise) so it doesn't override the changes we did manually while trying to configure the system. You'll find a section like this one, make sure to comment all of its lines:

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

Now, to finish our editing, just set your new sink as the default one in the very last line of your file:

set-default-sink combined_vsink0

Save the file and then let's restart PulseAudio and check if everything is working using pulseaudio --kill && pulseaudio --start and then make sure to check if your levels are set right at alsamixer as it sometimes load new outputs muted by default. Once you're done, check your system settings to select the newly created output.

If you face any problems, you can always revert your PulseAudio configuration using the backup file I'm sure you created as your first step.


Problems with permissions in apache Ubuntu 13.10

Let's say your webserver runs as the user www-data and that your site's document root is /var/www/blah.

Check that the www-data user has permissions to enter /var/www/blah with:

As root, run su - www-data then cd /var/www/blah. If this returns a permission denied error, your permissions to one of the directories in the path are set incorrectly. Fix with chmod +x /var/.....
Again, as root run: date > /var/www/blah/date.txt; chmod +r /var/www/blah/date.txt. Can you access http://yourdomain.com/date.txt ? If you can, your virtualhost is probably configured with directory indexing disabled and most likely it tries to find an index.html, index.htm, index.php, etc. and when it fails, it throws an HTTP/403.


How to give control over keyboard back to X server after Alt + SysRq + R trick

sudo kbd_mode -s -C /dev/tty7

Eventually you have to change the console path, if your X server is running on a different virtual terminal.

Source: https://unix.stackexchange.com/questions/19296/recovering-from-sys-rq-r


Try grub-customizer We can customize grub. For you, you can select option automatically boot last booted OS.


OK... Your computer runs over 32b or 64b ? Do you know?

I have no idea of what it can be but MAYBE some file was corrupted during/after installation.

Check this points:

Are you using the right bit version of Ubuntu? 32/64
During install time, any errors or windows poped up?

If you answer YES to the first question and NO to the second one, try accessing the recovery mode during boot and run the dpkg. It will check for corrupted system files and maybe solve the problem.


How to recover files from a crashed computer?

You have a few options (larger number means more difficult):

Restore your last system back-up then your last data back-up...

OR

Boot an Ubuntu live CD and make a back-up, re-install Windows, then re-install Ubuntu and restore the back-up you just made.

OR

Re-install Windows without a back-up and pray to the gods of Micro$oft (Gates & Balmer) that they won't delete any of your Ubuntu data.
Then re-install Ubuntu and pray to the gods of Ubuntu (Shuttleworth & Torvalds) that they won't delete any of your data anywhere.
Especially pray to your own god(s) that you will not make any mistake yourself on any of the steps.


How to prevent automatic bookmarks in Nautilus from being created on (bind) mounts?

I tried it out as an alternative to symbolic links. It works on Manjaro 20.0.3 Gnome.
From my fstab:
# My Storage:
# <file system>               <mount point>         <type> <options>                  <dump>  <pass>
UUID=LONG-NUMBER              /mnt/mydrive          ext4   defaults                   0       0

# My Folders:
# <file system>               <mount point>         <type> <options>                  <dump>  <pass>
/mnt/mydrive/esteban/Bilder   /home/esteban/Bilder  none   defaults,bind,x-gvfs-hide  0       0


Use Computer headset like a hands-free for cell phone

I know that some bluetooth devices will not connect with a phone I used to have. There seems to be some incompatibilities between different BT devices, and there is not much that could be done there. So far, Bluetooth was more trouble that it was worth it. I also had issues with such keyboards that would always disconnect.

I know this is not the answer you are looking for, but this might be a fact, and unless you can hac the Bluetooth connection, or change bluetooth-related internal settings, you may not be able to do anything.


I deleted my password but sudo keeps asking me for it

I had the same problem and this solved it, unfortunately ubuntu can not handle this situation you created.
You need to boot to recovery and set a password.

Boot up the machine, and after the BIOS screen, hold down the left Shift key (note that for UEFI BIOS you might need press ESC instead). You will then be prompted by a menu that looks something like this:

I've noticed on some systems that timing when to hit the left Shift key can be tricky, sometimes I miss it and need to try it again.

Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.

Now you should see this menu:

Using the arrow keys scroll down to root and then hit Enter.

You should now see a root prompt, something like this:

root@ubuntu:~#

At this stage you should have a read-only filesystem. You have to remount it with write permissions:

mount -o remount,rw /

Now we can set the user's password with the passwd command. (In this example I will use jorge as the example, you need to substitute whatever the user's username is):

root@ubuntu:~# passwd jorge
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~#

Type in what you want the new password to be at the prompt. After it's successful reboot the machine and the user will be able to log in with their new password.

Recovery Mode documentation
Lost password documentation

There is concern about this being a security vulnerability. It is not. You need to have physical access to the machine to do this. If someone has physical access to your PC, they could do far worse than change a password. When it comes to physical access, the battle for security is lost. Be wary of who you let on your PC.

Even setting a root password will not be successful, as one can simply boot with init being /bin/sh and have full root access. Again, given physical access, anyone with computer knowledge can do ANYTHING to your computer.


Change download folder destination from command line apps

I would personally suggest creating a LiveUSB of ubuntu and rebooting to it,

then starting gparted and with it resize the partitions one by one.

I think since the partitions are stuck next to each other you'll fisrt have to make the 175GB partition smaller on it's left hand side (this operation might take awhile)

and then you can resize the 50GB partition on the right hand side to take up the free space you created.

alternatively, if you're willing to have a single partition on that drive, and given it contains no mountpoints such as /home you can first delete the 170GB partition then resize the 50Gb partition to use the available empty space.


How to use Arguments in QML without getting qmlscene arguments

http://qt-project.org/doc/qt-5.1/qtqml/qtqml-releasenotes.html suggests that there is a Qt.application.arguments property in Qt 5.1. I do not know whether this does what's required, though.


Accessing Ubuntu Server from a Windows Machine?

You have to install openssh-server in order to connect via SSH (e.g. using PuTTY):

sudo apt-get install openssh-server


ERROR with Ubuntu: Cannot open the disk 'D:\My Documents\My Virtual Machines\Ubuntu\Ubuntu-1.vmdk' or one of the snapshot disks it depends on

Try to logout and login again or restart, maybe virtual hard disk is still in use by any application somehow.


Ubuntu 12.04 How do I bind the "scale" and "expo" features of compiz to my Logitech Performance MX?

The first step is to hit alt+f2 which will bring up a "run application" dialog box. In the entry field put in gconf-editor and then click 'run'. From here you will navigate to:

  apps -> compiz -> plugins

You then need to find the expo and scale plugin entries as shown below.

If you want to use corners you would use the 'expo-edge' for expo and 'initiate-all-edge' for scale. The edges are case sensitive.

BottomRight, TopRight, etc.


run a shell script in linux to process multiple .grb files

Your loop is missing a do and your variables are missing their de-referencing $:

#!/bin/bash
for i in 000 100 200 300 400 500
do
  cdo -f nc copy NLDAS_VIC0125_H.A19901231.0${i}.002.grb NLDAS_VIC0125_H.A19901231.0${i}.002.nc
done

However if you want to loop over all the .grb files in the directory it would be simpler to use a * wildcard, and derive the nc filename from the .grb one by removing and replacing its extension

#!/bin/bash
for file in *.grb
do
  cdo -f nc copy "$file" "${file%.grb}.nc"
done

Also, it's better practice to make the script executable and simply call it by name

chmod +x myscript.sh

then

./myscript.sh


New user, new install, Wifi doesn't work

This should get your wireless working.

sudo apt-get purge bcmwl-kernel-source

sudo modprobe brcmsmac


Ubuntu 13.04 - HP Laserjet P1006 not recognizeed

I have the same printer and had the same problem.

What I did to solve it:

Downloaded HP LIP 3.13.5 from here
Note: if you don't have python-dev you should install it
Installed HP LIP with default options, except one about re-plug or reboot: re-plug didn't work for me for first time, so I've chosen reboot (if you want to save your time - choose reboot)
After reboot it appeared that some HP Device proprietary plug-in is
missing, so I installed it

Now my printer is working again : )

P.S. If your printer became unresponsive, button "Install Required Plugin" in HP Device Manager->Actions may help you.


LibreOffice Draw is very slow with big projects

Edit from the LibreOffice README: As a general rule, you are recommended to install LibreOffice via the installation methods recommended by your particular Linux distribution (such as the Ubuntu Software Center, in the case of Ubuntu Linux). This is because it is usually the simplest way to obtain an installation that is optimally integrated into your system. Indeed, LibreOffice may well be already installed by default when you originally install your Linux operating system.

This answer is based on LibreOffice Version: 5.1.6.2 Which is current for Xenial

As pointed out by this comment you can increase RAM usage to reduce lag.
 1. Launch LibreOffice. (The current version in the Ubuntu repositories is Version: 5.1.6.2 Build ID: 1:5.1.6~rc2-0ubuntu1~xenial3)
 2. From the menu bar Select Tools->Options and then
    memory.
 3.Increase the allowed memory for Libre Office and the amount
        of memory per object allowed. Example below:

Another thing that you can do to help increase speed is to disable LibreOffice use of the Java Runtime Environment if you have it enabled. This is option is available under the advanced settings as shown below. Simply clear the checkbox:

Edit: It should be relatively simple to determine why your system is bogging down with the appropriate tools. For example you could utilize System Load Indicator which allows you to keep tabs on useful tidbits of information such as CPU usage, IOwait, RAM, Network throughput, System Load and Disk throughput. It can be installed from the Universe Repository with the command sudo apt install indicator-multiload

Hovering your pointer over it drops down useful real time info as seen below:

I've found it to be quite useful in rapidly ascertaining which subsystem may be struggling to keep up.For instance you might see that Cached RAM jumps after you load and re-save the project (which would explain why your workaround does the trick).

Other things you  might see include higher than expected I/O waits, lower than expected disk throughput, or a higher System Load than expected. Honestly any of these (or combination thereof) could cause a perceptible reduction in performance.

Edit: Some other useful resources are:

https://help.libreoffice.org/Common/Memory
https://help.libreoffice.org/Common/Drawing_Options

Sources: https://www.maketecheasier.com/speed-up-libreoffice/
and testing.


Can't login after Nvidia driver install v 14.04

This happens when you install Nvidia drivers using a .run file, downloaded from Nvidia site. This a wrong way to install drivers. After each kernel update you will have to install them again using console, because GUI won't start.
Now you can fix it by going to console by pressing Ctrl+Alt+F1. Then login there and run

sudo apt-get purge nvidia*
sudo apt-get install nvidia-331

Then reboot.

If this does not work, then you need to uninstall the driver. You can look HERE for instructions.


Wubi not working on 64-bit Intel i5 2nd generation

It seems to be a somewhat common error with Wubi. One of the answers in the linked question just recommends doing a reinstall or a full dual-boot installation of Ubuntu. If you can't access Windows either, then you may have to run a repair disc (boot-repair-disk, Windows repair disc, etc) to restore the MBR to factory default.


Unable to install 14.04. a few tries, a few issues

I'm stuck at installing. It worked once but I wasnt able to put Windows with it.
Because of gpt. Now it's supposed to be in mbr but I lost the normal orange menu for the blue one.

It may have installed because it said it said it had apt-update problems, yet sais it finished. but I don't have any grub showing.

Sorry, english isn't my first language

15.05 just doesn't open the live cd or the install


Ubuntu 20.04 Intel Integrated Graphics not working

This solved my problem: https://askubuntu.com/a/1240633/39261

Edited /etc/default/grub, setting GRUB_CMDLINE_LINUX_DEFAULT="quiet"  (removing nosplash)

sudo update-grub
sudo reboot

All monitors are working and I can get to the login screen.


Can’t get to virtual terminal from login screen on MBP with 19.04

I actually couldn't get this to work, but my workaround was to boot into recovery mode and use the terminal there.


My laptop boots into BIOS after I installed Ubuntu 16.04

It sounds like the UEFI.  Set it to Bios Legacy mode.  I read the following in a comment concerning Asus accepting only Windows UEFI signatures. For this question Here

Windows is the culprit, as usual !! Boot into UEFI menu, disable Secure Boot and enable Legacy Boot or something like that. Every modern operating system is using a secure signature (key) to tell UEFI it is a genuine operating system (not malware fakes). For some weird reason (Windows motherlover) the manufacturer (ASUS) has set the G551V UEFI to accept only Windows signatures. – ipse lute Jun 13 at 21:49


How to remove unity3d game engine from Ubuntu (and its dependencies)?

I've got it:

sudo apt-get remove unity-editor -y


Folders not visible in mounted drive but space is occupied

There are many possible reasons why your drive's partition(s) is/are invisible.
In order to be sure about the actual size of your external hard drive, actual partitions, partition sizes, partition types, used space and free space on each partition, connect your external hard drive, then open a shell terminal emulator window and run this command:
sudo df -hT

If you confirm that in fact there is/are partition(s) but it's/they're not visible, run Gparted to see if the partition(s) filesystem type is wrong (should be e.g. EXT4). If you don't have Gparted you can install it by running this command:
sudo apt-get install gparted -y

If your drive's partition(s) is/are of NTFS type, install NTFS-3G:
sudo apt-get install ntfs-3g -y

...and then try using it to mount your partition. E.g. (assuming that your external hard drive's first partition is SDB1 and that its second partition - SDB2 - is the invisible one):
mkdir /mnt/myexternaldrive ; sudo mount -t ntfs-3g /dev/sdb2 /mnt/myexternaldrive ; cd /mnt/myexternaldrive ; ls -l

If the problem isn't a specific partition being invisible but instead some files being visible and others invisible inside the same partition, it's possible that such invisible files are encrypted, in which case they can only be decrypted by the same method used to encrypt them. But if they're not encrypted then it's possible that the partition and/or disk surface is damaged.
In order to check the disk's partition(s), assuming that it's a disk with EXT2/3/4 partition(s), you can run this command on your connected but unmounted external hard disk (assuming that it's mapped at /dev/sdb):
e2fsck -cfpv /dev/sdb

c will cause e2fsck to check for badblocks, f will force-check the drive even if it doesn't look like it needs cleaning, p will cause e2fsck to try to automatically repair the disk, and v will make the process verbose.
Reboot the system and then run e4defrag on your mounted external hard drive:
sudo e4defrag -c /path/to/myfiles

Note: if e4defrag is not available, issue the shell command sudo apt-get install e2fsprogs in order to make e4defrag available on your system.


Remove GRUB boot selecting after Windows is gone

The blog post http://linuxnorth.wordpress.com/2011/03/09/grub2-revisited/ revisited will provide you with a blow-by-blow set of instructions on how to manually edit GRUB2's configuration files. If you check the other postings in the series (by filtering on Category = GRUB) you will also find information on removing old kernels and what happens when a new kernel arrives as an update. The postings include references to a number of related web sites.


How can I rename files/change their extensions based on mimetype with a script?

You should be able to use the mimetype utility - from man mimetype:

NAME
       mimetype - Determine file type

SYNOPSIS
       mimetype [options] [-] files

DESCRIPTION
       This script tries to determine the mime type of a file using the Shared
       MIME-info database. It is intended as a kind of file(1) work-alike, but
       uses mimetypes instead of descriptions.

So for example:

$ mimetype somefile
somefile: image/jpeg

However, by default, mimetype will "believe" the extension if present - so:

$ cp somefile somefile.gif
$ mimetype somefile.gif
somefile.gif: image/gif

You can tell it to use only the file's magic bytes to do the determination by adding the -M switch:

$ mimetype -M somefile.gif
somefile.gif: image/jpeg

and you can add -b to give a brief description:

$ mimetype -bM somefile.gif
image/jpeg

If you wanted to script the renaming, I'd suggest something like this:

#!/bin/bash

while read -r -d '' f; do
  mt="$(mimetype -bM "$f")"
  ext="${mt##*/}"
  case "$ext" in
    jpeg|gif|png)
      echo mv -v "$f" "$f.$ext"
      ;;
    *)
    echo "skipping mimetype $mt... "
      ;;
  esac
done < <(find -type f -print0)

NOTES:

it doesn't actually rename anything as written: the echo mv just outputs what it would do - please check and double check that it is behaving as expected on your files before removing the echo
it only operates on jpeg,gif, and png files: if there are other image types, you will need to add those explicitly
it will rename (add an additional extension to) any files it considers to have the wrong extension, based on magic bytes

There may be other - easier - options using tools like exiftool


Depends: libnss3 (>= 2:3.26) but 2:3.21-1ubuntu4 is to be installed

You should fix broken dependencies, see corresponding part of man apt-get below:

  -f, --fix-broken
     Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system.
     It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item: APT::Get::Fix-Broken.

The complete command is as follows:

sudo apt-get install -f


How to switch to a TTY in Virtual Box VM?

The keyboard shortcut in VirtualBox to switch to a TTY is (replace X with the number of the TTY you wish to switch to (e.g.: F1 for TTY1)):

Host Key + FX

Normally, the Right Control key is your host key.


Check the output of

rfkill list

If it shows a "hard block", then run:

echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus.conf

and reboot. Check the buttons (if any)


CLI: Extract metadata, properties from video files

Look for mediainfo package in repository


MATLAB R2015b Installation Launcher problem

Thanks for the answers. The problem has been resolved - it seems that the archive I downloaded was corrupt in some way. I realised this when I downloaded the archive again from the Mathworks website a few minutes ago and tried to install it again, and low and behold, it worked! I'm sorry to have wasted everyone's time without having tried that before. Now I only wonder whether the initial problem encountered was due to a poor internet connection and thus a faulty archive downloaded, or whether the .zip archive provided by Matlab is not the best archiving / compressing format.


Declare a variable when running the script bash

If you invoke it with the variable declarations before the command, bash will put those variables in the environment created for that command. After the command, the variables will no longer exist in the current shell:

$ cat ./script.sh
#!/bin/sh
echo URL is $URL
echo COMMAND is $COMMAND
$ ./script.sh URL=www.google.com COMMAND=wget
URL is
COMMAND is
$ URL=www.google.com COMMAND=wget ./script.sh
URL is www.google.com
COMMAND is wget
$ echo $URL,$COMMAND
,

Reference: http://www.gnu.org/software/bash/manual/bashref.html#Simple-Command-Expansion


Is there any way for selecting text in Ubuntu server?

The Package gpm enables mouse support for the console.

GNU screen Supports copy&paste as well if you don't have a mouse at all.


You could also take a look to CopyQ on GitHub, it can manage (among lot of things) multiple clipboard organized through tabs.

  CopyQ monitors system clipboard and saves its content in customized tabs. Saved clipboard can be later copied and pasted directly into any application.

  Items can be:

  edited with internal editor or with preferred text editor,
  moved to other tabs,
  drag'n'dropped to applications,
  marked with tag or a note,
  passed to or changed by custom commands,
  or simply removed.

Less straightforward to install than the accepted answer, but really really powerful and customizable. I fell in love with it :)


How to setup ~/.vnc/xstartup/ with Unity as Desktop, in Ubuntu 14.10?

This answer helped me to get my Ubuntu back:

Unity doesn't work on VNC server under 14.04 LTS

I still have a few things to get back, like the launch bar that was on the left, but I thought this might help you if you are still looking. :)


Start Ubuntu from SDHC card without booting into it

I think that is impossible. If you boot from your internal HD, you can't boot from your SDHC card.. because you are booting from your HD and not from your SDHC card.
And to answer to your question, what your are asking is impossible. Your notebook to startup have to know where point what, if you don't declare (choose what to boot) where to start your PC won't start because it hasn't a starting point (boot drive).
All right?


Ubuntu 16.04 Does not detect additional display

I did the following and hopefully it'll help others who stumble upon this problem:

The problem seems to have been a combination of the "hybrid graphics" in BIOS as suggested by @SunnyDaze in one of the comments (thanks for that). "Optimus" - as SunnyDaze suggested - is apparently the hybrid (Nvidia+On-board integrated graphics) approaches that switches between the two at run time automatically to get best battery and graphics performance link

I had to go into BIOS -> Advanced -> Built-in Device Options -> Graphics (options: hybrid, discrete, and auto). I selected discrete.

Thereafter I restarted but the displays were still not showing so I executed following commands

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
sudo apt install nvidia-396 (the latest one as given on Nvidia website).

After this I restarted and voila! All of my displays (2 monitors and laptop display) started working.

In summary, the nvidia-396 probably helped get the displays up and running, and disabling hybrid graphics probably avoided the blank screen after logon/logon loop problem mentioned in the question!


If you are using lightdm then this may work sudo service lightdm restart
Or you can shift from  lightdm to gdm:sudo apt-get install gdm


It should start automatically at boot when you install from software center, or using apt-get.

If you install from source code, you want to add its init script to the approriate run level. The init script is typically /etc/init.d/apache2 where you could manually run /etc/init.d/apache2 start to start it.

sudo update-rc.d apache2 defaults

will make th job


Multiple Juju environments on the same cluster

Massimo, yes, with recent MAAS and Juju packages, you can have multiple different Juju environments running using one MAAS controller.

When a Juju MAAS environment is bootstrapped, it gets an "agent-name", which is a created UUID.  This is then used to discriminate between different Juju environments, so a single user can have multiple non-overlapping Juju environments that don't accidentally step on each other's toes.


Your question is a bit "vague" on how can you get SQL server's data in Ubuntu.

But answering it in a simple manner, there are many tools in the wild that you can choose from for connecting to your SQL server, most if not all are CLI based but the one's most common tool is called sqlcmd which can be installed by  following this article: https://www.tecmint.com/install-ms-sql-server-centos-ubuntu-linux/

Shifting from GUI to CLI is a bit hard to adapt to or accept at first.


Windows formated disks; are they any use on Ubuntu?

i have some cds with windows files too and for me it always worked using WINE. try to look for the right .exe file and open it with WINE.


Apparently Debian has package sources at https://salsa.debian.org.
https://lists.debian.org/debian-devel-announce/2017/12/msg00003.html
Virtualbox's package sources are here: https://salsa.debian.org/pkg-virtualbox-team/virtualbox


How to get remote access after VPN connection?

After connect to VPN using openvpn, I used remmina, a tool to remote desktop access already installed on Ubuntu.

I just opened it, put the right IP enabled for remote access (server IP) through the VPN and clicked on connect button. Then, in the dialog box opened, I put the right credentials for the remote machine (login and password).


Where can I get the hash for 12.04.1 ISO?

It is not the same; a hash is individually calculated for each ISO image.

Visit the Release Directory page , here as


Where should I put programs that I download so they're available to all users?

The preferred method for that is /opt, although some people are known to put them in /usr/local/bin

As for your other question related to the Ubuntu Software center, not all packages in the Ubuntu Software Center are set to install to /opt - in fact, most of them don't follow that "standard".


I happened to stumble upon this problem for 3 different releases of Ubuntu on two different computers. While most of the time the swap-partition was mounted despite the warning message, sometimes the GUI refused to start upon boot completion because of it.

Here's what I did as a workaround:

Open a terminal by pressing Ctrl + Alt + T.

Type gksudo gedit /etc/fstab and press Enter.

Search for the line that reads:

/dev/mapper/cryptswap1 none swap sw 0 0

Now enter the value noauto right after sw (separated by a comma), so it looks like this:

/dev/mapper/cryptswap1 none swap sw,noauto 0 0

Save and exit. This way, your swap partition won't be mounted while booting, thus the warning message won't appear or even hinder the login screen to appear.

Now type in a terminal

gksudo gedit /etc/rc.local

and enter the following lines before the entry exit 0:

sleep 10

swapon /dev/mapper/cryptswap1

If there's no entry exit 0, you'll have to enter it right beneath those two lines.
Save and exit again. This will tell your system to wait 10 seconds after login to mount your encrypted swap partition.

Reboot your system. You should not get the warning message any longer. After login, wait some time, then open up a terminal again and type

free -m

Your output should look something like this:

  fuzzyq@Samsung-R710:~$ free -m

              total       used       free     shared    buffers     cached

 Mem:          3949       3806        143          0         86       1783

 -/+ buffers/cache:       1936       2013

 Swap:         4095          0       4095

  The last line is the important one. If there's a positive value showing for total swap, your swap partition was being mounted successfully.


You can also try by executing the following command:

Get the list of all Nginx packages installed

dpkg -l | grep nginx

Remove all the packages for nginx by executing the following command:

apt-get --purge autoremove nginx-*

or

apt-get --purge autoremove <packages listed in ouput of 1>

The above commands will remove all Nginx dependencies. In addition to that check if /var/lib/nginx and /etc/nginx are deleted or not. If it is not removed, removed the directories by executing the following command:

rm -rf /var/lib/nginx /etc/nginx


Application crash reporting "This problem report is damaged and cannot be processed"

It seems this is because of faulty RAM.

I had the same problem on 12.04. I had bad RAM. When I removed it, the problem seemed to go away.
I tried another 1 GB DIMM and the problem appeared again. I removed the 2nd DIMM and the problem continued periodically.

I looked in /var/crash but I don't see segmentation faults in the crash output. Just very hard to tell what / where the problem is.

My experience is that Windows could handle bad DIMMs better than Ubuntu.


How I do to the driver to install/upgrade automaticly? And manually?

Graphic Interface:
Automatic Installation:
I found one solution for this problem without to execute the terminal, this is workable solutions can save you:
First made a backup before doing anything (I recommend installing TimeShift for this, because that program is more effective), second — upgrade your system on occasion, third — before to reboot the PC, reboot the driver instead reboot only the PC, because if you reboot the PC, is possible the system don't change the driver.
Manual Installation:
And How I install the driver manually? Searching by the Nvidia, AMD or Intel website, you need to know your kind GPU Nvidia, AMD, or Intel to you has for you install the correct driver.
Terminal:
Automatic Installation:
I was to search something related to the automatic installation on the terminal and I find one solution very easy and practical, open the terminal and write:
sudo dpkg-reconfigure -plow unattended-upgrades

You should to accept and don't worry, the system go usually find one stable upgrade of driver more recent
Manual Installation:
Go to additional driver, and you will see these names:

I recommend installing of the open source driver, because the community can resolve better the bugs and problems than the close source driver. Now for example, whether I want to install the open source driver, I write on terminal:
sudo apt-get install driver-name (as xserver-xorg-video-nouveau, nvidia-driver-460, etc)

I wait to have helped, the solutions are interesting


How to rearrange machine numbers on Juju?

You cannot change the sequence number used for machine ids. It always starts at 0 and never goes back, even when you remove a machine and add another one. This is by design and is needed to maintain internal referential integrity of the DB.


That appears to not be working because you aren't sending the echo anywhere, so it looks like it is failing. You need to send it to a terminal, like pts/1 or something.

To find out a terminal you can send it to, type in w at a command prompt.  You should see something like the following:

terrance@terrance-ubuntu:~$ w
 16:00:43 up 1 day, 22:38,  3 users,  load average: 0.89, 0.60, 0.50
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
terrance tty7     :0               Sat17   46:38m  4:15m  7.24s /sbin/upstart -
terrance pts/16   :0.0             Sun10    7:30m  0.07s  7.78s /usr/bin/xfce4-
terrance pts/1    xxx.xxx.xxx.xxx   16:00    2.00s  0.06s  0.00s w

There you see my last command of w appeared on pts/1.  So, for your crontab keeping that terminal open, have your line read

* * * * * echo "hello" > /dev/pts/1

Then in about 1 minute you should see hello appear.

Hope this helps!


Setting a blank password, without disabling password authentication for performing administrative tasks, tends to break an Ubuntu system. Blank passwords don't work for all important forms of authentication, and they will prevent you from performing administrative tasks.

Fortunately, this an be completely fixed pretty easily.

As Tautvydas Miknevičius has suggested, you can simply reset the password (to something that is not blank).


How do I copy same files with a particular extension to another directory in terminal

Try this command,

for i in /path/*.png; do sudo cp $i /path/to/destination/directory; done

It will copy all the .png files and paste them to the destination directory.


Is it already possible to enable Compiz on an i5 Thinkpad laptop?

I feel your pain as the proud owner of a T510 with i915. I had way too many freezes to be
productive, and this was 10.04. I ended up disabling compiz completely, and eventually installed Enlightenment which was much more stable and faster.

So how does this help you? I type this post on an Acer aspire one D255E which is using i915 on Natty and have not encountered a single graphics issue, all the eye candy works, it's responsive, no hangs, no nothing. Suspend/Resume is fine but there's minor graphics glitch with hibernate, I can live with that.

So give Natty a try, you might find that your graphics trouble have gone away. Barring that, you should be able to install the Natty kernel on Maverick via backports. That could help things. I don't know about a backports for Xorg, I presume that's alot of extra packaging work. Hope that helps.


Error while installing, upgrading or autoremove: insserv warning: script 'K01runlcactivator' and 'runlcactivator'

First of all, the problem is that you are stuck at the boot sequencing.

The boot sequencing method is decided during installation or upgrades. If there are no loops in the dependencies declared by the LSB headers of all installed init.d scripts and no obsolete scripts, the system is converted to dependency based boot sequence.
We have to check for

Loop in dependencies: Occurs when >

There are missing LSB tags in some scripts or error in LSB tags like missing Required-Start: or Required-Stop: tags
Some scripts depend on other scripts which depend on the system facility $all, which cannot be true because the script depending on $all is loaded last at starting. Since it loads last, nothing can depend on it. Hence, it messes up the dependency based boot sequence.

Obsolete scripts: Occur when

Some packages being upgraded to newer versions which may not use a script in /etc/init.d/ and the maintainer may have missed the code to remove the old script. Not our mistake.

The cause is surely foreign. Go to /etc/init.d and view the file corresponding to runlcactivator and confirm that it has an LSB comment with Provides,Required-Start/Required-Stop (at least empty), Default-Start/Default-Stop in it as below.

### BEGIN INIT INFO
# Provides :          runlcactivator
# Required-Start :
# Required-Stop :
# Default-Start :     2 3 4 5
# Default-Stop  :     0 1 6
# Short-Description : runlcactivator
# Description :       runlcactivator
### END INIT INFO

If it's not there you can either add the LSB comment or completely purge the program and scripts from /etc/init.d/ and /etc/rc? files. There are two scripts:  K01runlcactivator and runlcactivator

Please note that I have cribbed this answer shamelessly from Unable to install anything using apt-get because of insserv on Unix & Linux SE.


Will a crontab job every 2 days start today or tomorrow?

If you used */2 in some field, looking at man 5 crontab:

The time and date fields are:

      field          allowed values
      -----          --------------
      minute         0-59
      hour           0-23
      day of month   1-31
      month          1-12 (or names, see below)
      day of week    0-7 (0 or 7 is Sun, or use names)

A field may be an asterisk (*), which always stands for ``first-last''.

And:

Step  values can be used in conjunction with ranges.  Following a range with ``/<number>''
specifies skips of the number's value through the range.  For example, ``0-23/2''  can  be
used  in the hours field to specify command execution every other hour (the alternative in
the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22'').

So */2 for day of month is 1, 3, ... and for day of week is 0, 2, ....

If you used the day of week field (going by the mention of Monday), then it would first run on Tuesday (since 0 is Sunday, 2 is Tuesday). If you used the day of month field, it would run on Monday if the date on Monday was an odd number, and on Tuesday otherwise.


Ubuntu 18.04 error on waking up from sleep : Read-error on swap device

The Ubuntu 18.04 kernel you are currently using is missing a rather important bug fix.

The fix for this is already present in the upstream Linux kernel version 4.16.8.  (The suspend bug effectively started happening in kernel version 4.15).  Ubuntu only needs to cherry-pick this small patch from upstream.  The bug frequently causes Xorg crashes immediately after suspend, i.e. it crashes the whole graphical login session.

Note this bug often happens without showing Read-error on swap device. Most of the time, there was no error in the kernel log.  (A few times, it showed EXT4-fs error and Buffer I/O error instead).  Also, these error messages could be caused by a hardware failure instead.  When diagnosing this problem, please focus on other, more distinct details.

A test kernel is available at the end of this Ubuntu bug, i.e. in this comment: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1776887/comments/5

So far no-one has reported their results from suspending with the Ubuntu test kernel.  It might be that if someone can report success, it will encourage the Ubuntu developer to finally include the bug fix.  I could be wrong though, I'm not 100% sure what's holding this up.

There is also a known workaround.  You can avoid the crash if you configure the kernel command line to include the option scsi_mod.scan=sync.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1776887

  This upstream bug has been confirmed to affect Ubuntu users[1]. As per
  the fix commit (below), the most frequent symptom is a crash of
  Xorg/Xwayland, i.e. killing the entire GUI, when a laptop is woken
  from system sleep. Frequency of the bug is described as once every few
  days[2].

  [1] E.g. this user confirms the bug & very specific workaround:
  https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1760450/comments/11

  [2] E.g. this log of crashes:
  https://bugzilla.redhat.com/show_bug.cgi?id=1553979#c23

  This is a bug in blk-core.c. It is not specific to any one hardware
  driver. Technically the suspend bug is triggered by the SCSI core -
  which is used by all SATA devices.

  The commit also includes a test which quickly and reliably proves the
  existence of a horrifying bug.

  I guess you might avoid this bug only if you have root on NVMe. The
  other way to not hit the Xorg crash is if you don't use all your RAM,
  so there's no pressure that leads to cold pages of Xorg being swapped.
  Also, you won't reproduce the Xorg crash if you suspend+resume
  immediately. (This frustrated my tests at one point, it only triggered
  after left the system suspended over lunch :).

  Fix: "block: do not use interruptible wait anywhere"

  in kernel 4.17:
  https://github.com/torvalds/linux/commit/1dc3039bc87ae7d19a990c3ee71cfd8a9068f428

  in kernel 4.16.8:
  https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.16.y&id=7859056bc73dea2c3714b00c83b253d4c22bf7b6

  lack of fix in 4.15.0-24.26 (ubuntu 18.04):
  https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic/tree/block/blk-core.c?id=Ubuntu-4.15.0-24.26#n856

  I.e., this bug is still present in Ubuntu source package
  linux-4.15.0-24.26 (and 4.15.0-23.25). I attach hardware details
  (lspci-vnvn.log) of a system where this bug is known to happen.

  Regards Alan

  WORKAROUND: Use kernel parameter: scsi_mod.scan=sync


To install Picasa 3.9

1) Install wine and winetricks:
sudo apt-get install wine winetricks

2) Download Picasa 3.9 from google:
cd ~/ && wget http://dl.google.com/picasa/picasa39-setup.exe

3) Install Picasa with wine:

wine ~/picasa39-setup.exe

To fix login

Now you have Picasa 3.9 installed but there is a problem if you want to login to Google to upload some pictures, so to fix it do this:

4) Install Internet Explorer 6:
env WINEARCH=win32 WINEPREFIX=~/.tmp winetricks ie6

You will have to click "Next" and "Accept" in a few windows:

5) Copy the installation into wine folder:
cp -r ~/.tmp/* ~/.wine/

6) Done! Now just open Picasa as any other program:

Open Dash and search for Picasa. Click at the top right corner to login:

Notes:
I) With this method each user will have to run the steps 2 to 5 to get Picasa fully working into his/her user folder. Or ask for he/she to run this once at terminal:

 cd ~/ && wget http://dl.google.com/picasa/picasa39-setup.exe && wine ~/picasa39-setup.exe && env WINEARCH=win32 WINEPREFIX=~/.tmp winetricks ie6 && cp -r ~/.tmp/* ~/.wine/

II) If you are feeling lazy, just paste this at terminal and all the steps above will be done for you (as a user specific installation):

 sudo apt-get install wine winetricks && cd ~/ && wget http://dl.google.com/picasa/picasa39-setup.exe && wine ~/picasa39-setup.exe && env WINEARCH=win32 WINEPREFIX=~/.tmp winetricks ie6 && cp -r ~/.tmp/* ~/.wine/

III) After the step 5, the file "picasa39-setup.exe" can be deleted:
rm ~/picasa39-setup.exe

And also the folder "~/.tmp":
rm ~/.tmp

IV) To uninstall everything:

sudo apt-get remove --purge wine ; sudo apt-get remove --purge winetricks ; sudo apt-get autoremove ; sudo rm /usr/share/applications/Picasa3.desktop ; rm ~/picasa39-setup.exe ; rm -r ~/.tmp ; rm -r ~/.wine ; rm -r ~/.local/share/applications/wine* ; sed -i '/wine/d' ~/.local/share/applications/mimeinfo.cache


Another option, using xrandr, is the command:

xrandr | grep ' connected'

Output:

DVI-I-1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
VGA-1 connected 1280x1024+1680+0 (normal left inverted right x axis y axis) 376mm x 301mm

(mind the space before connected, else disconnected will be included)

Important differences between xdpyinfo and xrandr

While xrandr lists screens separately (in case of multiple monitors), xdpyinfo outputs one single set of dimensions for all screens together ("desktop size" instead of screen size)
As noticed by @agold there is (quite) a difference between the two, which seems too big to be a simple rounding difference:

xrandr: 473mm x 296mm
xdpyinfo: 445x278

It seems related to a bug in xdpyinfo. See also here.

If you'd insist on inches

Use the small script below; it outputs the size of your screen(s) in inches; width / height / diagonal (inches)

#!/usr/bin/env python3
import subprocess
# change the round factor if you like
r = 1

screens = [l.split()[-3:] for l in subprocess.check_output(
    ["xrandr"]).decode("utf-8").strip().splitlines() if " connected" in l]

for s in screens:
    w = float(s[0].replace("mm", "")); h = float(s[2].replace("mm", "")); d = ((w**2)+(h**2))**(0.5)
    print([round(n/25.4, r) for n in [w, h, d]])

To use it:

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

python3 /path/to/get_dimensions.py

Output on my two screens:

width - height - diagonal (inches)

[18.6, 11.7, 22.0]
[14.8, 11.9, 19.0]

Edit

Fancy version of the same script (with a few improvements and a nicer output), looking like:

Screen  width   height  diagonal
--------------------------------
DVI-I-1 18.6    11.7    22.0
VGA-1   14.8    11.9    19.0

The script:

#!/usr/bin/env python3
import subprocess
# change the round factor if you like
r = 1

screens = [l.split() for l in subprocess.check_output(
    ["xrandr"]).decode("utf-8").strip().splitlines() if " connected" in l]

scr_data = []
for s in screens:
    try:
        scr_data.append((
            s[0],
            float(s[-3].replace("mm", "")),
            float(s[-1].replace("mm", ""))
            ))
    except ValueError:
        pass

print(("\t").join(["Screen", "width", "height", "diagonal\n"+32*"-"]))
for s in scr_data:
    scr = s[0]; w = s[1]/25.4; h = s[2]/25.4; d = ((w**2)+(h**2))**(0.5)
    print(("\t").join([scr]+[str(round(n, 1)) for n in [w, h, d]]))

EDIT 2 (May 2019)

"Kind of" on request (in a comment), a modernized / more advanced / improved (no system calls, no parsing but using Gdk.Display) version, doing pretty much exactly the same:

#!/usr/bin/env python3
import gi
gi.require_version('Gdk', '3.0')
from gi.repository import Gdk

dsp = Gdk.Display.get_default()
n_mons = dsp.get_n_monitors()

print(("\t").join(["Screen", "width", "height", "diagonal\n"+32*"-"]))

for i in range(n_mons):
    mon = dsp.get_monitor(i)
    mon_name = mon.get_model()
    w = mon.get_width_mm()/25.4
    h = mon.get_height_mm()/25.4
    d = ((w**2)+(h**2))**(0.5)
    print(("\t").join([mon_name]+[str(round(n, 1)) for n in [w, h, d]]))

Output:

Screen  width   height  diagonal
--------------------------------
eDP-1   20.0    11.3    23.0
HDMI-1  18.6    11.7    22.0

I will leave the original answer, since it seems inappropriate to remove the answer after such a long time, that generated the existing votes.


Ubuntu 18.04 Nautilus copy image instead of path

what I do, and I know this may seem slow but it's the "get it done approach", is I open the image in www.photopea.com or a locally installed editing app such as pinta or gimp.

Pinta : pinta

Gimp : gimp

Hit Ctrl+A, then Ctrl+C then I have it ready to paste as an image.

the plugin you mention is of 2016 and must have broken down in ubuntu 18+. you might have to signal a bug then wait for a new verison to come out or for another plugin to come out.

Xclip could get you what you wish in the meantime in a terminal-based approach :

xclip

xclip -selection clipboard -t image/png -i example.png

NOTE: Some research shows that you need xclip from SVN revision 81 (from April 2010) or later to have the required -t option. Or apply the patches yourself.

sources :

How to copy an image to the clipboard from a file using command line?
https://unix.stackexchange.com/questions/145131/copy-image-from-clipboard-to-file


Are there any GUI apps that can create .desktop files?

Have a look at my project, Arronax:

It's available as a plugin for Nautilus and as a standalone application.
To install, open a terminal and type:
sudo add-apt-repository ppa:diesch/stable
sudo apt-get update
sudo apt-get install arronax
nautilus -q


Upgrading from 13.10 to 14.04 broke Grub

I did not test this with a broken grub in 14.04 but I never got in trouble by using these instructions:
https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd or usb. Then

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal (Applications > Accessories > Terminal).

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th

Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt

Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition:
sdYY is the /boot partition designation (for example sdb3)
 sudo mount /dev/sdYY /mnt/boot
6)
Mount the critical virtual filesystems:
 sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys
7)
Chroot into your normal system device:

sudo chroot /mnt

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub

9)
Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX

10) Verify the install (use the correct device, for example sda. Do not specify a partition):  sudo grub-install --recheck /dev/sdX

11)
Exit chroot: CTRL-D on keyboard

12)
Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys

13)
If you mounted a separate /boot partition:

sudo umount /mnt/boot

14)
Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr

15)
Unmount last device:

sudo umount /mnt

16)
Reboot.
sudo reboot "

Also these are other ways to repair grub: How can I repair grub? (How to get Ubuntu back after installing Windows?)


Run:

dmesg

to find what name your device has, something like /dev/sdb1 or so.

Then mount it with (media/usb0 exists):

mount -t auto /dev/sdb1 /media/usb0 && ls /media/usb0


I can't display any linux right anymore after starting to use a new video card on my pc -hd 6570-

There was no fglrx to uninstall.

I'm installing fglrx ....AND DONE :P Everything is alright no problem at all :D


Is it possible to set a gtk theme for flatpak apps independet from the Gnome theme configuration?

Yes, it is possible.

A simple method is to install a theme, and it will switch to newest installed theme automatically.

e.g.

flatpak install org.gtk.Gtk3theme.Yaru


Unable to add new bookmarks to Mozilla Firefox's bookmark bar any more

I finally found a way. Although it is a little odd that you have to do it this way, it still works. Instead of going into the Bookmarks bar folder in the Bookmarks menu section, you instead have to click on the thing next to the star:

Then go to the pull-down menu called Bookmark Toolbar, and then you can right-click in there and paste bookmarks either from the Unsorted Bookmarks pull-down menu if they are new, or the other sections where you stored them if you have already moved them somewhere else. And then they should appear in the bookmarks bar.

These are the pull-down menus I mean:


Who owns Ubuntu and the ownership of Ubuntu as a going concern

As Ubuntu is an established brand, with many supporters and a good reputation most likely some sponsor will buy them out and continue. But this is not going to happen some time soon. Also such a speculative question is usually deleted closed here.


"screen" exit by itself after broken ssh?

Both the ssh connection and the screen session are handled by running processes and both will be lost with a server reboot.  You should check the server uptime, or look for boot indications in the messages file.

If it has rebooted, you'll need to diagnose that separately.


Cannot detect wireless network after reboot

Have you seen the Ubuntu community wiki?

There is a very good wireless troubleshooting guide that I suggest to follow.


Problems with external monitors on my laptop

I solved it using an old kernel 2.6.37. Apparently, the new 2.6.38 branch has problems with the Arrandale chips.


Ubuntu restricting download speed to 15kbps

Actually, Linux (Ubuntu in your case) does not limit the speed. In all cases i have known it boosts the speed to the maximum on the connection to the modem. you must have a router limit, modem limit or maybe you configure something on Ubuntu that changed that (For example trying to see a youtube video while downloading with transmission)

I repeat in all cases i have known since several years ago, all the PCs i have installed with Ubuntu have reported having better internet speed than any windows version. And that is about 1000 PCs, maybe more.


pgAdmin4 got removed after upgrading from Ubuntu 18.04 to 19.10

As far I can understand the pgadmin4 package was installed from third-party repository.

Quick search gives me this page - https://atalia.postgresql.org/morgue/p/pgadmin4/ .

So you have to open Software & Updates (software-properties-gtk) and enable line similar to above.

Or add this repository again as described in http://wiki.postgresql.org/wiki/Apt:

sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

sudo apt-get update
sudo apt-get install pgadmin4


How to connect to remote computer with public and local ip?

Ok then,

Remote PC:

sudo apt-get install openssh-server

Optional: For better security change the default SSH port.

 sudo vim /etc/ssh/sshd_config

Search for

# Port 22

Edit it to:

Port XXXX

where XXXX is the new port number.

Once this is done, login to the remote router (not your router but the router on the remote network).
Apply port-forwarding. It something like
Trigger port XXXX for ip address {remote LOCAL ip address (something like 192.168.0.100)}

Once you set up the remote connection go to your PC and type:

ssh {public ip address} -p XXXX -l username

For instance:

ssh 98.123.211.111 -p 1414 -l root

You will be asked to enter the user's password and once you do that you will have remote connection to the desired address.

NOTE: You can trigger different ports in order to connect to different PCs on the remote network.


How do I remove the corrupted Windows in another drive and keep Ubuntu only?

There are some steps here for you if you want to reuse the Windows space for your Ubuntu system:

Use Gparted to format the unusable Windows partition. Make sure you choose the right partition. Format it and create an ext4 file system on it. Give it a useful label, like "MyBigSpace". No extra flags are necessary.
You now have a nice bit of extra space; let's add it to your Ubuntu system. Let's say that the partition is called /dev/sda2. Create a mount point for your partition: mkdir ~/mybigspace if you want to use it for just your own user, or sudo mkdir /mnt/bigspace if you want a system-wide partition. If you're the only user of your system, there is not much difference, and you can create a mount point anywhere.
Now hook the space up to your system: sudo mount /dev/sda2 /path/to/your/mountpoint. Fill in the right partition you formatted in step 1, and the mount point you created in step 2.
If the mount command ends with no error, enter df and find the partition. It is ready for use! However, it will be unaccessible after a reboot. In order not to have to enter the mount command after every, add a line in /etc/fstab at the end like:

/dev/sda2 /path/to/your/mountpoint     ext4     rw  0     0


Ubuntu 12.04 does not recognize Kingston DT108 16GB USB drive

first format the USB in NTFS. just use fidisk-l to check wether if it is showing in the device list WITH NTFS file system. Remember the device name and mount the device using command sudo mount /dev/sda2 /mnt  //assuming sda2 is NTFS formatted USB device.

edit: I recommend you to format the USB device as ntfs for it makes easy on a linux system to check the ntfs device and figure out what it is.


Ubuntu 17.04: External USB mouse is not working

Did you turn off mouse acceleration by adding a file to /usr/share/X11/xorg.conf.d/, like in this thread: How to disable mouse acceleration in Ubuntu 16.04 ?

This file could be called 90-mouse-accel-disable.conf, 50-mouse-acceleration.conf or something like that.

If yes, then you have to change value -1 in line Option "AccelerationProfile" "-1" to 0. Apparently there were some changes in the underlying code in 17.04.

Mine 50-mouse-acceleration.conf looks like this:

Section "InputClass"
    Identifier "My Mouse"
    MatchIsPointer "yes"
    Option "AccelerationProfile" "0"
    Option "AccelerationScheme" "none"
    Option "AccelProfile" "flat"
EndSection


I finally managed to figure out a work around. In KDE the keyboard configuration can be set in:

System Settings
Keyboard Settings
Layout
Select 'Show indicator'
Select 'Per window'
Add
Select a variant without 'dead keys', eg. "English (US, with Euro on 5)"

After applying these settings, I select the window for input focus and I click the indicator in the system tray when I want to switch the keyboard configuration.
The keyboard setting needs only be set once per window and is rememberd over program restarts.


Gedit has a wide range of features, from syntax highlighting to plugins.

See :

http://grigio.org/pimp_my_gedit_was_textmate_linux

http://live.gnome.org/Gedit/Plugins

http://www.micahcarrick.com/gedit-html-editor.html

Is there some function you want not covered in one of those links (I am not familiar with Notepad ++ ) ?

There are other editors with a number of features (vim / gvim / cream / emacs), vim is my favorite. Cream is in the ubuntu repositories and is cross platform

http://cream.sourceforge.net/

Cream features / screenshots - http://cream.sourceforge.net/features.html

If all else fails, you can run notebook ++ in wine

http://portableapps.com/apps/development/notepadpp_portable

notepadpp portable would also be cross platform.


League of Legends issue ubuntu 16.04 LTS

This seemed to work for me in 16.04

https://github.com/TheUnnamedDude/pol_league_of_legends


Install ssmtp :

sudo apt-get install ssmtp
Edit the ssmtp config file :

gksu gedit /etc/ssmtp/ssmtp.conf
Add these lines in the file and don't forget to edit according to your needs

root=username@gmail.com
mailhub=smtp.gmail.com:465
rewriteDomain=gmail.com
AuthUser=username
AuthPass=password
FromLineOverride=YES
UseTLS=YES

Enter the email address of the person who will receive your email:

ssmtp recepient_name@gmail.com

Now enter this:

To: recipient_name@gmail.com
From: username@gmail.com
Subject: Sent from a terminal!

ADD you contents here now
To send the email:

Ctrl + D

This links shows you another 4 different methods how to send mail from terminal


You should install the updates as soon as it appears. Updated are tested before released to the public. These unreleased updates are called proposed updates. Sometimes an update breaks something, this is called a regression. These regressions are rare due to the testing before, but that does not lower the chance of breaking a package completely.

In the case of Flash, the installer does sometimes not work. I noticed that an upgrade of flashplugin-installer using KPackageKit sometimes removes Flash without installing the  new version. The solution was re-installing it, for which I prefer the terminal so I can see any error messages:

sudo apt-get install --reinstall flashplugin-installer

Note that this installer is special, due to licensing, the Flash libraries cannot be distributed in the package and therefore the package downloads Flash from archive.canonical.com.

As with other packages, it's likely a bug of the regression type as mentioned before. Most packages have a bug tracker on Launchpad.net, a solution could be available as well. Regressions are often quickly fixed.

To "revert" an update, you need to know what version the previously installed package was. /var/log/apt/history.log contains changes to packages including their versions.

I hacked a bash command together, you have to execute it and enter package name. Then a list of previous versions is displayed. It could be done cleaner with awk, but I've yet to learn that :D

oIFS="$IFS";IFS=$',\n';read -p 'Package name: ' package;for w in $(grep "^Upgrade: " /var/log/apt/history.log | cut -c9-);do [[ ${w/:*/} == \ $package ]] && echo "$w" | cut -d"(" -f2; done;IFS="$oIFS"

After you've determined the old version, you must run the next command in a terminal:

sudo apt-get install packagename=version

To downgrade firefox to version 4.0.1+build1+nobinonly-0ubuntu0.11.04.1, you have to run:

sudo apt-get install firefox=4.0.1+build1+nobinonly-0ubuntu0.11.04.1


I hadn't been given the right server address, I put the right one it in and it connects. Thanks for the help!


X250 trackpad multi finger gestures not working after Sleep

I have a workaround, hardly a solution. It's taken from the debian wiki about Synaptics Touchpads. Unloading and reloading the psmouse kernel module fixes the problem for me:

sudo modprobe -r psmouse
sudo modprobe psmouse


I was unable to find any obvious errors in the log you attached, although admittedly I'm not that familiar with boot-repair. But I think the following might solve your problem, as it did for a friend who also had a UEFI HP laptop skipping grub:

Boot into windows and open a command prompt as an administrator
Execute the following: "bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi"

Although I feel I should note that according to boot-repair you're either hibernating windows instead of shutting down, or using hybrid shut down. Doing so will prevent you from accessing the files on your Windows partition from inside Ubuntu. If you don't care that's fine, if you do care then don't hibernate windows and turn off hybrid shutdown as described below.

Open "Control Panel" > "Power Options" > "Choose what the power buttons do"
Click "Change settings that are currently unavailable"
Under "Shutdown settings" uncheck "Turn on fast startup", then click "Save"
If you don't see "Turn on fast startup" it is already disabled

If the first set of steps doesn't fix the problem, you'll have to wait for an answer from someone with more detailed knowledge of boot-repair and grub.


The application you are trying to build from source and install, includes some non-Python code, and therefore you probably are missing the required dependencies. You will also need the development files for building C/C++ applications that link to the Python runtime or provide compiled modules for it. You can do this by running:

sudo apt-get install python-all-dev

You will also need to install the g++ and gfortran compilers, as indicated at http://www.bempp.org/installation.html .


You have to import media into Shotwell for it to show up in your library. This option should be in the main Shotwell menu.

There is also a Shotwell viewer that you can use by right clicking and selecting Open with...


The drum-roll login sound was dropped in 14.04.  On the other hand, it's easy to add any log-in sound in 14.04:

Go to the dash
Open software center
Search for vorbis-tools and install
Go to the dash again
Type startup applications
Click the sole icon remaining
Click Add
Name= Desktop login sound

Command=ogg123 /usr/share/sounds/ubuntu/stereo/desktop-login.ogg
Click Save
Log out
Log in

Done!

Obviously, to have any other log-in sound then the drum-roll, change the file you want to play to something else. (Mine has Majel Barrett saying "Authorisation acknowledged")


How can I block a specific wireless network using the terminal

If I understand you correctly, you can just delete the connection from network manager by going to the network manager -->edit-->wireless then highlight the connection and click delete.

There is also a package in the repos called nmcli that is a command line interface for network manager, but I haven't tried it.


What you are describing is using your Windows 7 server machine as a Masq/NAT router, and probably as a firewall as well.  I have found the Shorewall package to be an excellent, and user friendly package to assist in this task.  This howto guide should get you pointed in the right direction:

http://www.shorewall.net/two-interface.htm

If you have any more questions or troubles, I know quite a bit about Shorewall, and would be willing to help.


If you use NVIDIA drivers you must change your settings from there.I would recommend using xrand command to change your settings, you can make auto run script or a key combination to switch between settings using xrand command.

Edit: To fix it set IgnoreLid=true in /etc/UPower/UPower.conf file!


How to uninstall Ruby which was build from source?

running "sudo make uninstall" from source folder worked..


Anti-aliasing changed after update (or something...)

I went through the descriptions of the listed packages in Synaptic, and figured what was causing it. It was libcairo2. And this (and -dev) was the only package from an unofficial ppa. So I downgraded the two packages like so:

sudo apt-get install libcairo2=1.8.10-2ubuntu1 libcairo2-dev=1.8.10-2ubuntu1

then restarted X-server and now it's back to the rendering style.


putting a battery status icon into my stalone

The fdpowermon package provides a battery status indicator that docks to the system tray.  So:

Via a shell:

sudo apt-get install fdpowermon
sudo apt-get install stalonetray

Then in your FVWM StartFunction:

AddToFunc StartFunction
+ I Test (init) Exex exec stalonetray
+ I Test (init) Exec exec fdpowermon

Changes will be there next log in.


I've solved this myself...

I right clicked on the desktop and created a new folder and called it whatever.
I opened it then I navigated to /usr/share/applications/
After that I opened this command line called XTerm.
I typed in sudo apt-get install unity
Then I typed in sudo apt-get install software-center

And everything was fixed.


How do I install Google Integrated System Conky on Ubuntu 18.04?

Sorry for those disappointing long comment discussion. This is the best I could do. But the configuration poor. It have braking and will take lot of your time.

This is what I did.

1) I have teejeetech conky manager. You have to install the same.

http://www.teejeetech.in/p/conky-manager.html

2) I have downloaded the zip file, of mustafaozhan/GoogleIntegratedSystemConky and extracted in folder the folder ~/.config

3) Created a new folder in ~/.conky folder and copied the files conkyrc and conkyKeepRc

4) Opened the conky manager and run the code.

5) Set the background image give in background folder

Warning: You have to try this on your own risk. For me the conky flicker and hangs the computer.

I am not good at python. Further you are on your own. Just share the details if you have managed to fix it. I will too use this conky.


Why is Compiz crashing whenever I try to load saved settings?

You probably cannot recover your saved settings because of the fact that the profile would have been saved with an older version of compiz that what is found in Natty, and quite likely cannot be loaded.

If the profile is a text file (I believe they are but I don't remember off hand), then you could manually recover the settings, but remember that some settings will have changed in this new version of compiz, and you might be better off starting from scratch (unfortunately). I had to do the same on my system, because the settings are not transferred from the older version (different gconf root keys).


What's the difference between the magic REISUB reset and holding down the power key?

I'll try to explain those in an easily understandable way, but it might not necessarily be 100% complete or 100% correct.

R - switch the keyboard mode

This is said to "Switch the keyboard from raw mode, the mode used by programs such as X11 and svgalib, to XLATE mode" (from Wikipedia), but I don't really know if this would normally have any notable effect.
E - gracefully terminate all running programs

This sends the SIGTERM signal to all processes except init and thereby asks them to gracefully terminate, giving them a chance to tidy up and free their resources, save data, etc...
I - forcibly kill all running programs

This is similar to the E, but sends the SIGKILL signal to all processes except init, which kills them immediately and forcibly.
S - sync all disks and flush their caches

All your disks normally have a write cache, a piece of RAM where the system caches data it wants to save on the device, to speed the access up. Syncing tells the system to flush these caches now and perform all remaining writes. That way you do not lose any data that has already been cached but not been written yet, and it protects from leaving the file system in an inconsistent state.
U - unmount all disks and remount them read-only

This is again pretty unspectacular, it simply makes all mounted disks read-only to prevent any further (partial) writes.
B - reboot the system

This reboots the system. However, it does not perform a clean shutdown, but instead a hard reset.

However...

On Ubuntu, these SysRqs are normally masked and partially disabled. Only syncing, remounting read-only and shutting down/rebooting are enabled.

This is controlled by the kernel interface file /proc/sys/kernel/sysrq, which holds the decimal representation of a bitmask of the allowed SysRq actions. The Ubuntu default is 176. See this answer for loads of additional explanations and material.

So actually you could also just Alt + SysRq + { S | U | B }.


I think it depends on how your touchpad is recognized - it looks the same with my HP Envy x360 15'. You will have more GUI options with gpointing-device-settings or Touchpad-indicator.

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator


Why is setxkbmap in .xsession not working?

Try this (it helped me):

Run ibus-setup.
Click Advanced tab.
Click Use system keyboard layout.


There is no way to convert in place a non ZFS file system to a ZFS one. You need to backup the former, create the pool and restore your data.

It is also unclear how you want to create a RAIDZ pool with only two 4TB disks. You can only create a mirror or a stripe with two devices.


Ubuntu Desktop 12.04 LTS hangs with dual display

I had the same problem and the "fix" for this is to revert back to an older version of xserver-xorg-input-evdev until a proper fix is implemented.

Download the following two packages to your desktop:

xserver-xorg-input-evdev-udeb_2.6.99.901-1ubuntu3~lp921236_amd64.udeb (24.0 KiB)

xserver-xorg-input-evdev_2.6.99.901-1ubuntu3~lp921236_amd64.deb (38.0 KiB)

Open a terminal and execute:

cd Desktop

sudo dpkg -i *.deb
Restart your computer or if you are lazy just restart the X Server with ALT+PRINTSCREEN|SysRq+K


ChrootDirectory /srv/samba/share should have been ChrootDirectory /srv/samba


Failed the last task of Openstack Autopilot via Landscape

I've resolved that. The issue was on the network configuration of VMware ESX, corrected that the deploy of Openstack has completed all tasks.

after that


Synchronize packages between multiple wsl installations

Here is my complex answer. Make sure that Acct-2 uses the same repositories as Acct-1. Create a list of packages from Acct-1 in a directory accessible to both Accounts, e.g. /mnt/c/WorkTemp and then remove the packages already installed in Acct-1. Install the remaining packages in Acct-2

Specifically, on Acct-1:

sudo apt-get update
sudo apt-get upgrade
aptitude search '~i!~M' | sort > /mnt/c/WorkTemp/aptitudelist-1

Do the same on Acct-2 piping into /mnt/c/WorkTemp/aptitudelist-2

comm -23 /mnt/c/WorkTemp/aptitudelist-{1,2} >/mnt/c/WorkTemp/pkglist

Review /mnt/c/WorkTemp/pkglist deleting the lines containing packages you don't want in Acct-2. Then in Acct-2:

sudo apt-get install $(tr -s ' ' </mnt/c/WorkTemp/pkglist |cut -d ' ' -f2)


How/Can i flip/rotate a page 90° in Scribus

You should not rotate full pages.

But you can create a "rotated" page by adding a landscape page:

page > insert
orientation : lanscape

You can then layout your landscape page without rotating!

This is the answer for your question... But i wonder, if you are not looking for creating a full landscape document.

In that case, just create a new document and pick the "landscape" orientation.


Redirect Local DNS redirect a specific IP address

To resolve contactlist.local to 192.168.86.15 add following line at the end of /etc/hosts:

192.168.86.15    contactlist.local
192.168.86.16    pudim.com.br

This change only effects your Ubuntu box not your router, modem, etc. How to do it depend on your network topology and devices and is out of range of this community.


How to get differents backgrounds for each desktop working properly?

My guess is that the necessary image loading plugins are not enabled.

In the Image Loading category within CompizConfig Settings Manager, make sure the JPEG, Png, and/or Svg plugins are enabled to suit the types of images you are using for your wallpaper.


Yes, to use the lxd-support snap interface, you need to migrate to the LXD snap package.

Note that your snap package needs to manually connect to the lxd-support interface.

If you want your snap to access the deb package of LXD, then you need to forgo all protections in snap packages. Use either classic or devmode confinement.


The .desktop file specification is here:
http://standards.freedesktop.org/desktop-entry-spec/latest/

An example .desktop file would be:

[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Comment=The best viewer for Foo objects available!
TryExec=fooview
Exec=fooview %F
Icon=fooview
MimeType=image/x-foo;
NotShowIn=KDE;

A .desktop file can have translations integrated, by specifying the language:

Name=Foo Viewer
Name[en_GB]=Foo Viewer
Name[el_GR]=Φου Βιούερ

If you want to add unity submenus to unity panel icon, then you can create a desktop file. An example from http://maketecheasier.com/8-really-useful-ubuntu-unity-quicklists/2011/05/07

First copy the original .desktop file and open it with your favourite text editor:

cp /usr/share/applications/firefox.desktop ~/.local/share/applications
gedit ~/.local/share/applications/firefox.desktop

Then edit the file:

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
GenericName=Web Browser
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;
StartupWMClass=Firefox
StartupNotify=true
X-Ayatana-Desktop-Shortcuts=NewWindow;Private;Safe;ProfileManager;MakeTechEasier

Name[en_US]=Firefox Web Browser

[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox -new-window
TargetEnvironment=Unity

[Private Shortcut Group]
Name=Private Mode
Exec=firefox -private-toggle
TargetEnvironment=Unity

[Safe Shortcut Group]
Name=Safe Mode
Exec=firefox -safe-mode
TargetEnvironment=Unity

[ProfileManager Shortcut Group]
Name=Start Profile Manager
Exec=firefox -ProfileManager
TargetEnvironment=Unity

Now run nautilus ~/.local/share/applications/ and drag-and-drop your newly-created "Firefox" unity desktop file in the unity bar.


Navigate through Edit Menu → Profile Preferences → Background Tab → Click the Radio button for Transparent Background and adjust the slider.


Recover windows uefi after ubuntu install

Fixed the hibernating issue here .

Ended up re-installing after multiple tries using boot-repair.


`usermod: user 'mahmoud' does not exist dpkg: error processing kismet (--configure)` error when installing kismet

Congratulations, you found your first bug. Now to workaround you need to create the user yourself:

sudo adduser mahmoud

Now uninstall kismet:

sudo apt-get purge kismet

Now clean your system:

sudo apt-get autoremove


Why don't you ask your teacher?!? Maybe you are interested in nsnake. To install it, run the following command in terminal:

sudo apt-get install nsnake

After is installed, you can start to play using:

nsnake

(Source of the image: http://alexdantas.net/nsnake-screenshot.png)


Create disk with qemu-img, fix owner with chown and make filesystem with mkfs.ext3 or mkfs.ext4:

qemu-img create -f raw /var/lib/nova/instances/_base/ephemeral_0_20_None 20G
chown nova:nova /var/lib/nova/instances/_base/ephemeral_0_20_None
mkfs.ext4 -L ephemeral0 -F /var/lib/nova/instances/_base/ephemeral_0_20_None


RAM is used to hold your active working applications. Any unused RAM is used as a disk/file buffer/cache. By setting vm.swappiness=10, you reduce swapping, but you potentially also reduce this disk/file buffer/cache space that is used for large file copies.

Since we tried sudo sysctl vm.swappiness=60, that seemed to work for you.

To set vm.swappiness=60 permanently, do it this way...

sudo -H gedit /etc/sysctl.conf # edit this file

Search for an existing vm.swappiness= entry...

CTRL+f vm.swappiness

If found, edit it to say vm.swappiness=60
If not found, add vm.swappiness=60 at the end of the file

Save your edits and quit gedit

sudo sysctl -p


first try to upgrade video/graphics driver (NVIDIA/ATI) and restart the OS,

after that run the command :- sudo apt-get update and follow this link:-

https://wiki.ubuntu.com/Valve

here are all details of intel and other drivers of dependencies.


How to setup DNS Server on Local network

Take a look at dnsmasq instead, is pretty far more easy to configure than bind: you just need to install it, and it will use DNS defined in /etc/resolv.conf as upstream server, and in /etc/hosts you can define the 2 records you need.

Remember to reload it on every change.


Determine the settings used to create an existing m4a audio file

Try ffprobe <filename> on each file.  Compare the results.


Use this command to see all the files of an installed package:

dpkg -L wiznote

Then search the executable, eg. in /usr/bin

/usr/bin/WizNote


autossh forwarded ports left open on connection failure

Okay...  Partial solution, tho I'm still not sure it's completely resolved.  I made the following changes and things are at least still connected over night.  I'm not sure whether it will successfully reconnect once the session terminates however.

Added the following lines to the remote server sshd_config:

ClientAliveInterval 600
ClientAliveCountMax 12

Modified the rc.local script to launch autossh as follows (added ServerAliveInterval and ServerAliveCountMax options):

su -s /bin/sh autossh -c 'autossh -M 20000 -f -i /home/autossh/.ssh/id_rsa -o "ServerAliveInterval 120" -o "ServerAliveCountMax 5" -N -R 99999:localhost:22 autossh@remotehost.com'

I also found that connecting using the GatewayPort was unreliable. Instead of:

user@machine1 $ ssh -p 99999 remotehost.com

I log into the remote host directly and then connect to port 99999 on localhost, ala:

user@machine1 $ ssh remotehost.com
user@remotehost $ ssh -p 99999 localhost

This seems to be more reliable.  The gateway port tends to hang.  But if I connect in two steps as above I'm still getting thru.  Will post back with updates once I have a chance to see if it reconnects after an session drops.

Hopefully this might help others!

Corey


Assigning a static IP to Ubuntu Server 14.04 to access ownCloud out of the server

In order for machines outside of your LAN (ie: The Internet, WAN) to have access to a machine inside of your LAN, you'll need a few things.

The WAN IP for your Network
A NAT-capable Router/Gateway
Port-Forwarding from the WAN IP:PORT to the LAN IP:PORT

WAN IP

You can set up a true DNS solution if your IP doesn't change.  Another option would be to look into dynamic dns providers.

Depending on your Router/Gateway, you may have settings to automatically update different dynamic dns providers with your new IP if it changes.  I would recommend using one of these services if your Router/Gateway supports it.  One such Router/Gateway firmware that supports dynamic dns is DD-WRT.

NAT

This just means you need to have a Router/Gateway that allows multiple clients to connect to it and share the Internet connection.  This is a typical setup, but thought it was worth mentioning.

Port Forwarding

You will be connecting to ownCloud through ports 80 or 443 (TCP).  This is http:// or https://, so it is highly recommended that you connect and force connections through https.

Your Router/Gateway needs to be set up so that it forwards all connections from its WAN IP:PORT to your machine's LAN IP:PORT.

On the machine running ownCloud, you can run ifconfig to determine your IP.  Go to your Router/Gateway configuration and ensure these ports are forwarded.


You can implement a script to empty the /tmp directory every hour like so:

Create and edit a script file in your home directory by running the following command in the terminal:

nano ~/EmptyTmp.sh
Copy and paste the following code into the editor:

#!/bin/bash

while true
        do
                sleep 1h
                find /tmp/{*,.??*} -exec rm -rf {} \;
        done

Save the script file and exit the editor by pressing Ctrl + X then press Y.
Make the script file executable by running the following command in the terminal:

chmod +x ~/EmptyTmp.sh
Run the script by running the following command in the terminal:

sudo bash ~/EmptyTmp.sh

Done, /tmp will be emptied every hour.


20 to 40 seconds pause during the boot on 12.04

The source is most probably not goa-daemon but a delay/error in accessing your hard drive:

ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

ata/frozen typically appears after a drive fails to respond and the kernel has tried/re-tried the operation a few times, which may explain the 20-40 second wait.

To troubleshoot further, please pastebin the content or output of the following commands/files (instructions in this answer): file(s): /var/log/kern.log, /var/log/syslog and command(s): dmesg.


Can't run a wine application from a launcher

Turns out the problem was just the fact that I didn't set a working directory, now I just put the directory where the program is located and it works as expected


Can VeraCrypt be made available for users securely on a server?

Short answer: No

More elaborate answer: that depends on how much you trust your users and whether they act in good intention.

Allowing ordinary users to mount VeraCrypt volumes opens an array of attack vectors such as mounting maliciously crafted volumes.

For example please carefully review the following answer and comments:

https://security.stackexchange.com/questions/178610/is-it-secure-to-mount-veracrypt-without-sudo-password-in-this-way

If you trust your users you can allow them mounting volumes_

How can user mount an encrypted file container in VeraCrypt?

but please review the comments.


How can I call system settings app from the terminal?

The System Settings app can be started with the gnome-control-center command.


Natural scrolling not working for horizontal scroll, how to fix this?

Instead of using a designated application to configure natural scrolling, a script can be made to reverse the scrolling directions - both on the vertical and the horizontal axis.

First, obtain the xinput prop related to the scrolling distance (note the variables wrapped in angle brackets):

$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜   ↳ Virtual core XTEST pointer id=4   [slave pointer (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad id=<TOUCHPAD_ID>   [slave pointer (2)]
⎣ Virtual core keyboard id=3    [master keyboard (2)]
    (...)

Fetch the appropriate values for that prop:

$ xinput list-props <TOUCHPAD_ID> | grep "Scrolling Distance"
    Synaptics Scrolling Distance (<DISTANCE_KEY>):  <V_DISTANCE>, <H_DISTANCE>
    Synaptics Circular Scrolling Distance (301):    0.100000

Than, create the script file to apply the reversed directions, by negating the values for vertical / horizontal distance. Feed the variables returned earlier:

#!/bin/sh
xinput set-prop <TOUCHPAD_ID> <DISTANCE_KEY> -<V_DISTANCE> -<H_DISTANCE>
nautilus -q
nautilus -n &

Grant the file with execution permissions, set it to run at startup, and there you have it.

Source:

This method was ported from Andy C.'s old web blog, to create a self contained answer. Thank you, Andy, for providing an elegant, system wide solution.

Fixing natural scrolling in Ubuntu 12.04 by Andy C..

Notes

It seems that calling nautilus is breaking the script on 13.04. Omitting the two calls to nautilus solves it.
Natural scrolling (both vertically and horizontally) is working properly out-of-the-box in 14.x, so no need for scripting there, just toggle the "Natural Scrolling" in the Mouse & Touchpad options.


No audio with xubuntu + asus rog strix G17

The following seems to enable the audio but the volume control does not seem to work properly. It's either off or on. But something better than nothing.
sudo gedit /etc/modprobe.d/alsa-base.conf

Add the following line
options snd-hda-intel model=asus-zenbook

https://itectec.com/ubuntu/ubuntu-no-sound-alc294-asus-rog-strix-512-ubuntu-20-04-01/
I ended up setting the default volume level using alsamixer


Everything looks more or less OK except for the layout names.
try using the following command to get list of supported keyboard layouts:
localectl list-x11-keymap-layouts

I used answer from this FAQ in the past:
https://faq.i3wm.org/question/4761/keyboard-input-language-problems-want-to-switch-to-greek/index.html
The only difference is that my solution is for 104 keys keyboard and Russian layout.
Exact line that was working for me.
exec --no-startup-id "setxkbmap -model pc104 -layout us,ru -option grp:alt_shift_toggle"

You could rather run the command in quotes from command line(applies for the single session) or add to the ~/.config/i3/config and use  $mod+Shift+c to refresh your config.


Memtest

Memtest is for testing your system's RAM for errors.  Very useful if your computer starts crashing and there is no software explanation.

Ubuntu kernels

The multiple Ubuntu entries are for the multiple kernels you have installed.  Kernels are the core of every Linux system; they are what allow your operating system to use your computer's hardware.  New kernels generally improve compatibility with new hardware and fix security vulnerabilities but sometimes there will be a regression--hardware that used to work no longer works with a new kernel--and therefore Ubuntu keeps some old kernels and Grub allows you to boot into an old kernel in case the new one has a regression.

Other Operating Systems

If you have other OSes on your system (from Windows to other flavors of Linux to whatever) chances are Grub will detect them and list them as well.  Other versions of Linux will also likely have multiple kernels displayed.

Recovery mode

There will also be a recovery option for every kernel. You can use this in case anything ever goes wrong with your system and you can't boot up normally.  Recovery mode loads the file system in read-only mode and then offers you these options:

resume (resumes into normal mode, sometimes a full reboot will be required to get full graphics capabilities)
fsck (remounts your filesystem in read/write mode and checks the filesystem, fixing any errors - useful for checking for and fixing filesystem errors that are preventing a normal boot, if you can't even boot into recovery mode you can also use a live CD/USB for this
clean (Tries to create freespace by cleaning the apt cache and auto-removing unneeded packages, if your disk is so full you can't even boot up normally, chances are you'll need to remove more than this, but this is a start at least)
apt-snapshots (I've never used these, but in theory if you use apt snapshots this will let you resume to a previous one)
failsafeX (This boots into a failsafe graphics mode)
grub (This runs update-grub, which I can't really see why if you could use grub to get into recovery mode you would need this.... but it will run all of grub's auto-detection scripts so it could be useful)
network (Tries to enable networking)
system-summary (Gives you information about your system, specifically (file)System mode, CPU information, Network connectivity state, Detailed disk usage, Software RAID state, LVM state, Detailed memory usage, Detailed network configuration info, and System database (APT) state)

and finally, the most important and useful option:

root (which will drop you to a root prompt where you can diagnose and fix just about any (fixable) problem with your system with enough time and patience - note that your filesystem is still mounted in read-only mode so you will need to remount it with write access to make changes)

These might be out of order, I didn't actually reboot and look at the menu I just got the options from the scripts (stored at /usr/share/recovery-mode/) Hope this helps!


VLC does not play PCM S24 LE audio in mov-file

My guess is that PCM S24 LE 48kHz/24Bit is so uncommon that VLC doesn't expect nor support it in a media file yet. PCM is also very inefficient, lossless codecs like FLAC provide the same quality. Using libav/ffmpeg you can copy the video and convert the audio stream to FLAC, which should give you working audio playback:

avconv -i $myfile.mov -c:a flac -c:v copy $myfile.mkv

I have seen (L)PCM 24Bit audio on concert Blurays before, audio actually does play but has a very loud signal on top of the actual audio stream – which could be a format parsing error.

I chose the MKV container as an output format here because it has no format restrictions that I know of and is very extendable, pairing MOV or MP4 with FLAC may not work.

One last note, who ever made this file should check if that is really the desired result. 50fps is fine and may indicate that this is PAL or some other non-NTSC content, but 1280x736 is 16 pixels above 720p (1280x720), which may be fine with the codec or encoder but not optimal or even incompatible with typical playback devices.

The third stream was unexpected (and you didn't say that you pull raw material from what appears to be a camera), we can probably map to just include video and audio in the output and leave out what appears to be time code data.

avconv -i $myfile.mov -map 0:1 -c:v copy -map 0:2 -c:a flac $myfile.mkv

A similar question on SuperUser: ffmpeg stripping out third stream not working and also related How drop an audio stream using avconv?

It's probably also relevant to note that we have a site for video production.


Possible to vertically or horizontally tile several open windows?

You could try xmonad.

Install it so:

sudo apt-get -y install xmonad dwm-tools

The blog says that dmenu is the application launcher. There was also something called as poison or similar, but I cant recall it.


sudo apt-get update failed me repeatedly

Try edit your sources.list
and change with

deb http://et.archive.ubuntu.com/ubuntu xenial main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-updates main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-backports main inRelease
deb http://et.archive.ubuntu.com/ubuntu xenial-security main inRelease

and try again

sudo apt-get update && sudo apt-get upgrade


How to remove dual boot and assign the space to ubuntu?

Boot from the Ubuntu Live USB.

After running swapoff in a terminal to disable the swap files, run GParted to delete the Linux Mint partition. With GParted, you define a change, then commit the change with the green checkmark, before moving on to make the next chantge.

Then you can resize the partition for Ubuntu.

You may need to edit GRUB later to remove the entry for Linux Mint.