How to install nVidia drivers with Bumblebee on Ubuntu 14.04

NB: this post is the result of many days spent reading various stuffs on the web, so take it at your own risk. It was tested on Ubuntu 12.04/12.10/13.04/13.10/14.04 (all 64bit) with nVidia GT650M graphic card. Feel free to add comments and suggestions

Install nVidia and bumblebee

1.
First of all, we have to delete all the video drivers on the computer:

sudo apt-get remove --purge nvidia*

Then bumblebee in case if you have installed it previously:

sudo apt-get remove --purge bumblebee*

We have also to delete all the nouveau driver with:

sudo apt-get --purge remove xserver-xorg-video-nouveau

To be sure to have deleted the whole stuffs, try to type dpkg -l | grep nvidia and dpkg -l | grep bumblebee: it shouldn't return anything. For dpkg -l | grep nouveau it is likely that it returns some lines saying libdrm-nouveauXXXXX; for now, just ignore them.

2.
Then, we have to assure to have all the headers typing:

sudo apt-get install linux-source && sudo apt-get install linux-headers-$(uname -r)

3.
The next thing to do is to blacklist the remaining nouveau drivers and some other packages that could cause problems:

sudo cp /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf.bak
 sudo gedit /etc/modprobe.d/blacklist.conf

Adding the following lines at the end of file:

# Necessary to install nvidia drivers
blacklist nouveau
blacklist lbm-nouveau
blacklist nvidia-173
blacklist nvidia-96
blacklist nvidia-current
blacklist nvidia-173-updates
blacklist nvidia-96-updates
alias nvidia nvidia_current_updates
alias nouveau off
alias lbm-nouveau off
options nouveau modeset=0

Just save and exit.

4.
Now, run the best knows ubuntu commands

sudo apt-get update && sudo apt-get dist-upgrade -y

5.
From now, we works on tty. Open the tty1 console with CTRL+ALT+F1 and login with your username and password. Then execute:

sudo service lightdm stop

Now we will install the drivers. Execute:

sudo apt-get install nvidia-XXX-updates nvidia-settings

where XXX is the latest stable drivers. I'm using the 331 drivers, but I've read somewhere that the 343 are available to download (don't know if they are stable).

N.B: With the latest driver versions, it also install nvidia-prime by default. This technology is intended to automatically switch between Intel and nVidia graphic card without user intervention. To do this, it leaves both the cards turned on. Optimus, on the other hand, turn on the nVidia graphic card only with explicit user request; it translates in significantly less power consumption respect to prime.

I personally prefer optimus over prime, but if you don't bother on the enormous waste of energy, stop here. Otherwise, you have two options:

completely delete prime (sudo apt-get remove --purge nvidia-prime);
leave prime there; in section "Prime with optimus" we will see how to make optirun
work also with prime installed

6.
Now, we have to install bumblebee and the virtualgl packages with

sudo apt-get install bumblebee bumblebee-nvidia virtualgl virtualgl-libs virtualgl-libs-ia32:i386 virtualgl-libs:i386

Then, we have to add our user in the bumblebee group with:

sudo usermod -a -G bumblebee $USER

And then reboot the pc.

7.
Login on your user account, open a new terminal window and type:

cd /etc/bumblebee
ls -Al

Among the various listed files, there should be two in particular: bumblebee.conf and xorg.nvidia.conf. Let's make a backup copy of both with:

sudo cp FILE_NAME FILE_NAME.bak

You should replace FILE_NAME with the actual name of the file. Then, let's go to modify the first file with sudo gedit bumblebee.conf, adding (all without quotes)

[bumblebeed] section: after "Driver=" insert "nvidia"
[nvidia-driver] section: after "KernelDriver=" insert "nvidia-XXX-updates"
[nvidia-driver] section: after "LibraryPath=" insert "/usr/lib/nvidia-XXX-updates, /usr/lib/nvidia-331-updates:/usr/lib32/nvidia-XXX-updates"
[nvidia-driver] section: after "XorgModulePath=" insert "/usr/lib/nvidia-XXX-updates/xorg,/usr/lib/xorg/modules"

Assure that the "XorgConfFile" under [nvidia-driver] is equal to "/etc/bumblebee/xorg.conf.nvidia" (again, without quotes), then save and close gedit.

Now we have to edit the other file with sudo gedit xorg.conf.nvidia (in this case we have to insert the quotes also!!). Replace
Option "ConnectedMonitor" "DFP" with   Option "UseDisplayDevice" "none", save and exit.

8.
Run gedit /etc/modprobe.d/bumblebee.conf and make sure that all the lines containing blacklist <something> are not commented (i.e. they don't start with #).

9.
At this point, run the following command

sudo service bumblebeed start

If it returns an error, try to run again the command with restart rather than start. If you have still errors, something like:

restart: Unknown job: bumblebeed

It's probably something wrong in the bumblebee.conf file; so, recheck step 7.

If instead the result is similar to:

bumblebeed start/running, process XXXXX

You're soon done setting up bumblebee!

10.
Now we can simply run optirun glxspheres or optirun glxspheres64. If all work as expected, you have an output like this:

$ optirun glxspheres64
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 650M/PCIe/SSE2
182.253407 frames/sec - 203.394802 Mpixels/sec
182.940725 frames/sec - 204.161849 Mpixels/sec
....

To double-check that we are actually using nvidia-drivers, open another terminal while optirun <application> is running, then type sudo lshw -c display | grep driver. The result should be something like that.

configuration: driver=nvidia latency=0
configuration: driver=i915 latency=0

If, on the other hand, you close all the application started with optirun it should show only the intel driver. That's it!!

Install Bumblebee UI

Thanks to this answer from Pavak Paul, here is the instructions to add the bumblebee user interface on Ubuntu 14.04 to manage apps to be opened using nVidia.

1.
Install Python App Indicator:

sudo apt-get install python-appindicator

2.
Install Git:

sudo apt-get install git

3.
Make a directory for git:

mkdir git && cd git

4.
Check out the repository:

git clone https://github.com/Bumblebee-Project/bumblebee-ui.git
cd bumblebee-ui
sudo ./INSTALL

5.
Go to Startup Applications and add bumblebee-indicator [click on Add, then insert the Name and comment that you want; insert bumblebee-indicator in the command box and click on Add).

6.
Reboot.

Prime with optimus

If you want to have the option to also use nvidia-prime sometimes, try to follow the instructions below.

1.
To prevent bumblebeed from starting at boot-time, execute:

echo "manual" | sudo tee /etc/init/bumblebeed.override

2.
This point is the most problematic; it prevents bumblebee to blacklist nVidia drivers and should result in graphic session freeze. Try it at your own risk!
Run:

sudo gedit /etc/modprobe.d/bumblebee.conf

And comment the line containing your nVidia XXX drivers. It should result in something like that.

# XXX
#blacklist nvidia-XXX
#blacklist nvidia-XXX-updates
blacklist nvidia-experimental-XXX

3.
Reboot the system and launch nvidia-settings. The final situation is this:

If you select "Intel (Power save)" in nvidia-settings, you have only the Intel graphic card turned on by default. You still have to run an application with optirun to use the nVidia graphic card

sudo service bumblebeed start
optirun <application>

If instead you want to use the "Nvidia (Performance)" profile, select it from nvidia-settings, then login/logout and all should work automatically. The only thing is that you don't have to launch bumblebeed daemon with this profile selected because it could cause troubles.

In case you have problems:

1.
If you want to use only nvidia-prime:

sudo apt-get --purge remove bumblebee*

Then reboot.

2.
If you want to use only optimus without removing nvidia-prime, edit again the previous file:

sudo gedit /etc/modprobe.d/bumblebee.conf

Uncommenting (removing the # character) from the lines previously modified:

# XXX
blacklist nvidia-XXX
blacklist nvidia-XXX-updates
blacklist nvidia-experimental-XXX

And rebooting. In this case, you can leave bumblebeed run at boot-time:

sudo rm /etc/init/bumbebeed.override


How to play embedded flash videos in external players?

As this question looks useful to me, I have created it in order to provide an answer. (The meta issue of doing this was discussed and answered (here and here).

A specialized application to see Youtube videos in an external player is Youtube Viewer (youtube-viewer). It runs in terminal and uses mplayer or mpv to play the youtube video.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-viewer

More here.

By default it uses mplayer. To make it use mpv instead, run youtube-viewer --video-player=mpv. So, a desktop file with this content may be useful:

[Desktop Entry]
Exec=bash -c 'youtube-viewer --video-player=mpv'
Icon=youtube-viewer
Name[en_US]=Youtube Viewer
Name=Youtube Viewer
Terminal=true
Type=Application

When running the program, a terminal window opens, saying:

=>> Search for YouTube videos (:h for help)
> ^J>

Just type the search item. Then type the corresponding number(s) of the videos you want to be played.

A cross-platform solution that is not limited to youtube is to use the well-known Firefox addon FlashGot, which is meant to send video streams to different download managers, but make it to send the URL stream to VLC (or mpv, which I prefer lately):

add VLC to Flashgot list: FlashGot options, General tab, Add, give a name 'VLC' , - then go to the VLC executable and select it

FlashGot options, FlashGot tab, choose VLC

playing the video in Firefox, a Flashgot button should appear (add that to the toolbar or the status bar). Right-click the button, Available formats, and left-click the video. VLC should start playing the video stream

SMPlayer. - limited to youtube (unless used with the solution above: have not tested that yet)

and the Youtube Browser

sudo add-apt-repository ppa:rvm/smplayer
sudo apt-get update
sudo apt-get install smplayer smtube

It starts the separate application, SMPlayer Youtube Browser, to search for videos. One can create a link/desktop launcher to it,

or just run

  smtube

Using VLC. It looks like VLC is able to start videos of this kind from more websites, while smplayer is limited to youtube.

One can add the link to the video in VLC

Using Totem:

Some plugins are available for Totem player, among which a youtube browser similar to that of SMPlayer. You can open youtube videos in Totem, at lower quality it seems than in the previous options, but they load faster and are perfect for listening music from youtube.

There is also an arte-tv plugin for Totem that is not working at the moment... but maybe it will in the future... and supplementary plugins, including a BBC iPlayer. (The later no better than the one for arte-tv I fear.)

But I think that a more elegant method is using add-ons/extensions to open the external players directly from the internet browser's interface or context menu, like the aforementioned Flashgot addon.

The re is also the Firefox Openwith addon, created initially to open links in different web browsers, can do just that, by adding in its Preferences vlc and smtube  instead of/beside browsers .

In Chromium there is an extension to start youtubes in VLC - here.

To use it, the youtube video has to be playing, the VLC web interface has to be enabled  (VLC Tools-Preferences-Show Settings -All-Interface-Main-enable Web, restart VLC) and VLC has to be already open.

While VLC seems able to do this outside youtube, it has limitations when dealing with other websites. In Dailymotion works perfectly, but on Google videos it already may have problems, in others it's the OpenWith addon that would not work. I hadn't time to test them enough, I'll update this post in time, and invite comments and edits that would help find ways to open any embedded flash in VLC or other external player.

(This answer was based on ideas coming from izx, Halknner and user55822 as they answered or commented on other question.)

There is a VLC add-on to play YouTube videos and playlists - here

Copy the URL of the youtube video or playlist (must contain "list=PL...")
Start VLC, press Ctrl+N, paste the url then click on "Play" (or Alt+P then Enter), the video /playlist should start.

In 'Media', 'Save Playlist to File' and may open it later in VLC.


L380 Yoga wont boot to Ubuntu 20.04 unless I disconnect the power cord

Seems like it has something to do with changes in the latest firmware initialization package version 1.16 r0ruj17w (UEFI BIOS 1.24 r0ret41w and ECP 1.14 r0rht31w). Downgrading to 1.15 r0ruj15w solved the reboot issue for me. This should be reported to Lenovo. Here is the FW init package download page https://support.lenovo.com/cl/en/downloads/ds502400.


Trying to Download Ubuntu 14.04 with ImgBurn; Received I/O Error!

The Ubuntu 14.04 iso file is too large to fit on a CD, so you have to use either a DVD or a USB flash drive that has at least 2GB to make the Ubuntu 14.04 installation media. For Ubuntu 18.04 and later the USB flash drive should be 4GB or larger. Two useful tutorials at www.ubuntu.com are:

How to burn a DVD on Windows - This  tutorial includes a link to download the Ubuntu 14.04 installation file.
How to create a bootable USB stick on Windows


File>Preferences>Input and unchecking 'Auto Capture Keyboard' seems to have fixed this issue.


Mac mini Server Late 2009 cannot connect to network on Ubuntu 20.04 LTS

I encountered the same problem with a Macbook Pro 2009, which has a very similar hardware setup. The issue was that the Broadcom Wifi Driver was not installed.
Assuming you can get Internet Access to the Mac Mini either via Ethernet or tethering with your cellphone, then you can run the following commands in Terminal and WiFi should work. Rebooting was not required based on my experience.
sudo apt-get update
sudo apt-get install bcmwl-kernel-source
Hopefully this helps and good luck.


Use a terminal multiplexer.

A good one to use that's easy to learn is screen. You can get it by:

sudo apt-get install screen

To create a new screen session:

screen -S somename

This will spawn a new session with your default shell. To detach, press ctrl+a followed by d.

To list current screen sessions:

screen -ls

To re-attach to a detached session:

screen -r somename

To create a "multi-user" screen session so that more than one person can view and type in the session:

screen -m -S shared

To join a multi-user session:

screen -X shared

To terminate a screen a session, you can either:

kill PID (found with screen -ls)

or while the screen is attached ctrl+d


Can't boot windows 8 after installing ubuntu 12.10!

Boot into your Ubuntu system, or if you cant boot with a LiveCD or LiveUSB.

You should install boot-repair in order to restore your GRUB settings easily.
Open a terminal and type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

Then press enter.

After that type:

sudo apt-get install -y boot-repair && (sudo boot-repair &)

Then type

boot-repair

in the terminal to launch boot-repair.

Then click recommended repair and do what it ask from you.

Source: https://help.ubuntu.com/community/Boot-Repair


Can I upgrade my version of Ubuntu from the terminal?

The following terminal command will update your Ubuntu version to the next available release. Press CTRL+ALT+T to open a terminal window or use the Unity application browser and search for "Terminal".

sudo apt-get dist-upgrade  #Upgrade to newest version
do-release-upgrade         #Alias of above
do-release-upgrade -d      #Upgrade to the newest development version

Source


High power drain on idle, low power drain if cpu has load

The issue indeed was caused by the inability of my old watt meter to accurately measure the power drain of my new PSU at low loads. I got a new watt meter and it now reports 69W on the login screen and around 72-75W at an idle desktop. This finally makes sense.


I had the same issue, and here's how I solved it:

Adding it via drag and drop from /usr/share/applications using nautilus was always giving me the duplicated unity launcher icons.

I launched the application from a terminal window and used the "Lock to launcher" right click option on its panel icon, which seemed to work as expected once I dropped into the launcher from nautilus.

The problem was the desktop file from /usr/share/applications has some extra features which the drag-and-drop-generated shortcut(located in ~/.local/share/applications) was missing, like "New Window" and "New file" right click menu options, which I didn't want to lose. So I tried to see what's different between them, and the only significant difference I could see was this attribute:

  StartupWMClass=Sublime_text

Once I added that to the .desktop file from /usr/share/applications it started working. I then deleted the generated shortcut from ~/.local/share/applications and it seems to work.

I hope this helps you as well.


Android studio is exiting afer few seconds of start

Did you noticed this:

Note: If you are running a 64-bit version of Ubuntu, you need to
install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

From: https://developer.android.com/studio/install.html

Maybe you're missing these libs or your Adnroid Studio is using wrong JDK.


I don't know of any app that does that but with uGet you can just copy the url and it well auto-detect the download thus creating a download process automatically.

http://uGetdm.com

Turn on the Clipboard Monitor.


Why when I use Mkusb to create a live usb the available Ram on the usb image is less than my actual total Ram?

General description of what is happening

As noted in comments, 19.04 has passed the end of life date, so I think we should test not only that version but also another version (that is still supported).

Cloned USB boot drives made with dd, mkusb and any other cloning tool will be identical. If there is a difference, it is not a cloning tool, or there is some write error (maybe due to faulty hardware). The block size selected by dd with bs can change the speed of cloning, but does not change the result of the cloning.
According to my experience, Ubuntu live (live-only) systems allocate approximately half of the available RAM to the root file system /
A persistent live drive made with mkusb version 12 alias mkusb-dus uses an overlay method, where the size of the partition for persistence decides the size of the root file system.

So when the partition for persistence is

greater than half of the RAM, the root file system will increase compared to a live system,
smaller than half of the RAM, the root file system will decrease compared to a live system.

The amount of RAM for other purposes (which is free before it is used by the programs, that you start) will depend on how much that is used for the overlay system. The following test results describe what happens in different cases.

Test results

I found no unexpected behaviour when testing Lubuntu 19.04. For that reason I am rather sure that those results can also represent Lubuntu 18.04.x LTS.

I also tested Lubuntu 19.10, which has a modified mechanism in the package casper, and can be expected to behave in a different way. These results should also represent Focal Fossa to be released as Lubuntu 20.04 LTS.

Summary

The main difference is the free memory in case #3 in both versions (19.04 and 19.10), and the reason is that the boot option toram was used in that case. It means that the [whole] image of the iso file is copied to RAM. Otherwise there is no significant difference in the usage of RAM.

Details

Target computer A laptop with Intel i5 generation 3 CPU and 4 GB RAM
Explanation of the list above:

'cloned live' - a live drive created by cloning from the iso file
a persistent live drive made with mkusb (and 67% selected for persistence)

'persistent' - the menu option 'Start Lubuntu - persistent live'
'live toram' - the menu option 'Start Lubuntu - live-only to RAM
'try Lubuntu' - the menu option 'Start Lubuntu' which matches the standard alternative of a cloned drive

the remaining part of the list is output from free -h

'total' - total amount of RAM
'used' - RAM used by programs (in this case after boot and opening a terminal window)
'free' - RAM not yet used
'shared' - RAM shared
'buff/cache' - RAM used for buffering (e.g. during writing) which has low priority.
'available' - RAM available for running new programs

Shellscript

The following shellscript was used to collect data from each of the run case.

echo "lsb_release -a ########################################" >> /media/lubuntu/KEEP_ME/result.txt
      lsb_release -a >> /media/lubuntu/KEEP_ME/result.txt
echo "cat /proc/cmdline ##########" >> /media/lubuntu/KEEP_ME/result.txt
      cat /proc/cmdline >> /media/lubuntu/KEEP_ME/result.txt
echo "sudo lsblk -o name,fstype,label,mountpoint,size,model ##########" >> /media/lubuntu/KEEP_ME/result.txt
      sudo lsblk -o name,fstype,label,mountpoint,size,model >> /media/lubuntu/KEEP_ME/result.txt
echo "df -h ##########" >> /media/lubuntu/KEEP_ME/result.txt
      df -h >> /media/lubuntu/KEEP_ME/result.txt
echo "free -h ##########" >> /media/lubuntu/KEEP_ME/result.txt
      free -h >> /media/lubuntu/KEEP_ME/result.txt

The following output lists can be used by you, if you want to compare your results with mine in order to discuss differences.

Output for Lubuntu 19.04

lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco
cat /proc/cmdline ##########
file=/cdrom/preseed/lubuntu.seed boot=casper initrd=/casper/initrd quiet splash --- debian-installer/language=sv keyboard-configuration/layoutcode?=se
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT               SIZE MODEL
loop0  squashfs                     /rofs                    1,5G
sda    iso9660  Lubuntu 19.04 amd64 /cdrom                  14,8G SS3
├─sda1 iso9660  Lubuntu 19.04 amd64                          1,6G
└─sda2 vfat     Lubuntu 19.04 amd64                          3,7M
sdb                                                           15G Transcend_16GB
└─sdb1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME    15G
sr0                                                         1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                           11M AutoRun_Disk
zram0                               [SWAP]                 478,2M
zram1                               [SWAP]                 478,2M
zram2                               [SWAP]                 478,2M
zram3                               [SWAP]                 478,2M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1,9G     0  1,9G   0% /dev
tmpfs           383M  1,4M  382M   1% /run
/dev/sda        1,6G  1,6G     0 100% /cdrom
/dev/loop0      1,5G  1,5G     0 100% /rofs
/cow            1,9G   32M  1,9G   2% /
tmpfs           1,9G  6,3M  1,9G   1% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           1,9G     0  1,9G   0% /sys/fs/cgroup
tmpfs           1,9G     0  1,9G   0% /tmp
tmpfs           383M  8,0K  383M   1% /run/user/999
/dev/sdb1        15G  3,4G   12G  23% /media/lubuntu/KEEP_ME
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3,7Gi       339Mi       2,7Gi        63Mi       742Mi       3,1Gi
Swap:         1,9Gi          0B       1,9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash persistent ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT                 SIZE MODEL
loop0  squashfs                     /rofs                      1.5G
sda                                                           14.6G Extreme
├─sda1 ntfs     usbdata             /media/lubuntu/usbdata     4.2G
├─sda2                                                           1M
├─sda3 vfat     usbboot                                        244M
├─sda4 iso9660  Lubuntu 19.04 amd64 /cdrom                     1.6G
└─sda5 ext4     casper-rw           /media/lubuntu/casper-rw   8.6G
sdb                                                             15G Transcend_16GB
└─sdb1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME      15G
sr0                                                           1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                             11M AutoRun_Disk
zram0                               [SWAP]                   478.2M
zram1                               [SWAP]                   478.2M
zram2                               [SWAP]                   478.2M
zram3                               [SWAP]                   478.2M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           383M  1.4M  382M   1% /run
/dev/sda4       1.6G  1.6G     0 100% /cdrom
/dev/loop0      1.5G  1.5G     0 100% /rofs
/cow            8.5G   61M  8.0G   1% /
tmpfs           1.9G  6.3M  1.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           383M  8.0K  383M   1% /run/user/999
/dev/sdb1        15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sda5       8.5G   61M  8.0G   1% /media/lubuntu/casper-rw
/dev/sda1       4.3G   23M  4.3G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       344Mi       2.7Gi        31Mi       710Mi       3.1Gi
Swap:         1.9Gi          0B       1.9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash toram nopersistent ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT                           SIZE MODEL
loop0  squashfs                     /rofs                                1.5G
sda                                                                     14.6G Extreme
├─sda1 ntfs     usbdata             /media/lubuntu/usbdata               4.2G
├─sda2                                                                     1M
├─sda3 vfat     usbboot                                                  244M
├─sda4 iso9660  Lubuntu 19.04 amd64 /media/lubuntu/Lubuntu 19.04 amd64   1.6G
└─sda5 ext4     casper-rw           /media/lubuntu/casper-rw             8.6G
sdb                                                                       15G Transcend_16GB
└─sdb1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME                15G
sr0                                                                     1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                                       11M AutoRun_Disk
zram0                               [SWAP]                             478.2M
zram1                               [SWAP]                             478.2M
zram2                               [SWAP]                             478.2M
zram3                               [SWAP]                             478.2M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           383M  1.4M  382M   1% /run
/dev/shm        1.7G  1.6G   79M  96% /cdrom
/dev/loop0      1.5G  1.5G     0 100% /rofs
/cow            1.9G   26M  1.9G   2% /
tmpfs           1.9G  6.3M  1.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           383M  8.0K  383M   1% /run/user/999
/dev/sdb1        15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sda5       8.5G   75M  8.0G   1% /media/lubuntu/casper-rw
/dev/sda4       1.6G  1.6G     0 100% /media/lubuntu/Lubuntu 19.04 amd64
/dev/sda1       4.3G   23M  4.3G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       344Mi       1.3Gi       1.6Gi       2.1Gi       1.6Gi
Swap:         1.9Gi          0B       1.9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper quiet splash ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT                 SIZE MODEL
loop0  squashfs                     /rofs                      1.5G
sda                                                           14.6G Extreme
├─sda1 ntfs     usbdata             /media/lubuntu/usbdata     4.2G
├─sda2                                                           1M
├─sda3 vfat     usbboot                                        244M
├─sda4 iso9660  Lubuntu 19.04 amd64 /cdrom                     1.6G
└─sda5 ext4     casper-rw           /media/lubuntu/casper-rw   8.6G
sdb                                                             15G Transcend_16GB
└─sdb1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME      15G
sr0                                                           1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                             11M AutoRun_Disk
zram0                               [SWAP]                   478.2M
zram1                               [SWAP]                   478.2M
zram2                               [SWAP]                   478.2M
zram3                               [SWAP]                   478.2M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           383M  1.4M  382M   1% /run
/dev/sda4       1.6G  1.6G     0 100% /cdrom
/dev/loop0      1.5G  1.5G     0 100% /rofs
/cow            1.9G   24M  1.9G   2% /
tmpfs           1.9G  6.3M  1.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           383M  8.0K  383M   1% /run/user/999
/dev/sdb1        15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sda5       8.5G   75M  8.0G   1% /media/lubuntu/casper-rw
/dev/sda1       4.3G   23M  4.3G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       344Mi       2.7Gi        54Mi       719Mi       3.1Gi
Swap:         1.9Gi          0B       1.9Gi

Output for Lubuntu 19.10

lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan
cat /proc/cmdline ##########
file=/cdrom/preseed/lubuntu.seed initrd=/casper/initrd quiet splash ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT               SIZE MODEL
loop0  squashfs                     /rofs                    1.5G
sdb    iso9660  Lubuntu 19.10 amd64                         14.8G SS3
├─sdb1 iso9660  Lubuntu 19.10 amd64 /cdrom                   1.6G
├─sdb2 vfat     Lubuntu 19.10 amd64                          3.9M
└─sdb3 ext4     casper-rw           /var/crash              13.2G
sdc                                                           15G Transcend_16GB
└─sdc1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME    15G
sr0                                                         1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                           11M AutoRun_Disk
zram0                               [SWAP]                 477.3M
zram1                               [SWAP]                 477.3M
zram2                               [SWAP]                 477.3M
zram3                               [SWAP]                 477.3M
df -h ##########
Filesystem                    Size  Used Avail Use% Mounted on
udev                          1.9G     0  1.9G   0% /dev
tmpfs                         382M  6.2M  376M   2% /run
/dev/sdb1                     1.6G  1.6G     0 100% /cdrom
/dev/loop0                    1.5G  1.5G     0 100% /rofs
/cow                          1.9G   17M  1.9G   1% /
/dev/disk/by-label/casper-rw   13G   41M   13G   1% /var/log
tmpfs                         1.9G  6.7M  1.9G   1% /dev/shm
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
tmpfs                         1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs                         1.9G     0  1.9G   0% /tmp
tmpfs                         382M  8.0K  382M   1% /run/user/999
/dev/sdc1                      15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       337Mi       2.7Gi        50Mi       745Mi       3.1Gi
Swap:         1.9Gi          0B       1.9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed quiet splash persistent ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT                 SIZE MODEL
loop0  squashfs                     /rofs                      1.5G
sdb                                                           14.6G Extreme
├─sdb1 ntfs     usbdata             /media/lubuntu/usbdata     4.2G
├─sdb2                                                           1M
├─sdb3 vfat     usbboot                                        244M
├─sdb4 iso9660  Lubuntu 19.10 amd64 /cdrom                     1.6G
└─sdb5 ext4     casper-rw           /media/lubuntu/casper-rw   8.6G
sdc                                                             15G Transcend_16GB
└─sdc1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME      15G
sr0                                                           1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                             11M AutoRun_Disk
zram0                               [SWAP]                   477.3M
zram1                               [SWAP]                   477.3M
zram2                               [SWAP]                   477.3M
zram3                               [SWAP]                   477.3M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           382M  1.4M  381M   1% /run
/dev/sdb4       1.6G  1.6G     0 100% /cdrom
/dev/loop0      1.5G  1.5G     0 100% /rofs
/cow            8.5G   60M  8.0G   1% /
tmpfs           1.9G  6.3M  1.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           382M  8.0K  382M   1% /run/user/999
/dev/sdc1        15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sdb5       8.5G   60M  8.0G   1% /media/lubuntu/casper-rw
/dev/sdb1       4.3G   23M  4.2G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       335Mi       2.7Gi        23Mi       733Mi       3.1Gi
Swap:         1.9Gi          0B       1.9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed quiet splash toram nopersistent ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT                           SIZE MODEL
loop0  squashfs                     /rofs                                1.5G
sdb                                                                     14.6G Extreme
├─sdb1 ntfs     usbdata             /media/lubuntu/usbdata               4.2G
├─sdb2                                                                     1M
├─sdb3 vfat     usbboot                                                  244M
├─sdb4 iso9660  Lubuntu 19.10 amd64 /media/lubuntu/Lubuntu 19.10 amd64   1.6G
└─sdb5 ext4     casper-rw           /media/lubuntu/casper-rw             8.6G
sdc                                                                       15G Transcend_16GB
└─sdc1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME                15G
sr0                                                                     1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                                       11M AutoRun_Disk
zram0                               [SWAP]                             477.3M
zram1                               [SWAP]                             477.3M
zram2                               [SWAP]                             477.3M
zram3                               [SWAP]                             477.3M
df -h ##########
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           382M  1.4M  381M   1% /run
/dev/shm        1.7G  1.6G   80M  96% /cdrom
/dev/loop0      1.5G  1.5G     0 100% /rofs
/cow            1.9G   25M  1.9G   2% /
tmpfs           1.9G  6.3M  1.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           382M  8.0K  382M   1% /run/user/999
/dev/sdc1        15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sdb5       8.5G   74M  8.0G   1% /media/lubuntu/casper-rw
/dev/sdb4       1.6G  1.6G     0 100% /media/lubuntu/Lubuntu 19.10 amd64
/dev/sdb1       4.3G   23M  4.2G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       339Mi       1.3Gi       1.6Gi       2.1Gi       1.6Gi
Swap:         1.9Gi          0B       1.9Gi
lsb_release -a ########################################
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan
cat /proc/cmdline ##########
BOOT_IMAGE=(hd0,gpt4)/casper/vmlinuz file=/cdrom/preseed/lubuntu.seed quiet splash ---
sudo lsblk -o name,fstype,label,mountpoint,size,model ##########
NAME   FSTYPE   LABEL               MOUNTPOINT               SIZE MODEL
loop0  squashfs                     /rofs                    1.5G
sdb                                                         14.6G Extreme
├─sdb1 ntfs     usbdata             /media/lubuntu/usbdata   4.2G
├─sdb2                                                         1M
├─sdb3 vfat     usbboot                                      244M
├─sdb4 iso9660  Lubuntu 19.10 amd64 /cdrom                   1.6G
└─sdb5 ext4     casper-rw           /var/crash               8.6G
sdc                                                           15G Transcend_16GB
└─sdc1 vfat     KEEP_ME             /media/lubuntu/KEEP_ME    15G
sr0                                                         1024M TSSTcorp_CDDVDW_SN-208AB
sr1                                                           11M AutoRun_Disk
zram0                               [SWAP]                 477.3M
zram1                               [SWAP]                 477.3M
zram2                               [SWAP]                 477.3M
zram3                               [SWAP]                 477.3M
df -h ##########
Filesystem                    Size  Used Avail Use% Mounted on
udev                          1.9G     0  1.9G   0% /dev
tmpfs                         382M  6.2M  376M   2% /run
/dev/sdb4                     1.6G  1.6G     0 100% /cdrom
/dev/loop0                    1.5G  1.5G     0 100% /rofs
/cow                          1.9G   17M  1.9G   1% /
/dev/disk/by-label/casper-rw  8.5G   74M  8.0G   1% /var/log
tmpfs                         1.9G  6.3M  1.9G   1% /dev/shm
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
tmpfs                         1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs                         1.9G     0  1.9G   0% /tmp
tmpfs                         382M  8.0K  382M   1% /run/user/999
/dev/sdc1                      15G  3.4G   12G  23% /media/lubuntu/KEEP_ME
/dev/sdb1                     4.3G   23M  4.2G   1% /media/lubuntu/usbdata
free -h ##########
              total        used        free      shared  buff/cache   available
Mem:          3.7Gi       340Mi       2.7Gi        45Mi       741Mi       3.1Gi
Swap:         1.9Gi          0B       1.9Gi


Ubuntu 16.04 desktop (and several previous versions have as well) comes with Remmina Remote Desktop Client pre-installed, and it supports connecting directly to RDP clients, such as windows. I have used to connect to Windows 7 machines without any difficulty.

You could try it out from the livedisk version of Ubuntu Desktop if you want to verify it will work for you.


Preventing Déjà Dup from attempting a backup when out of my network

If the hostname for your NAS isn't reachable, Déjà Dup knows to wait.  If you are specifying the server by IP, try specifying it by hostname.

And Déjà Dup should use FTP login credentials just fine.  Have you had troubles doing that?


How do I set up xrdp session that reuses an existing session?

I had this same problem, and I just found an easy solution.  I originally just installed xrdp using the standard proceedure:

apt-get install xrdp

After that, its all about your xrdp.ini file, which is located here:

/etc/xrdp/xrdp.ini

To open and edit the xrdp's configuration file use:

sudo nano /etc/xrdp/xrdp.ini

by default the first xrdp session handling script looks like this:

[xrdp1]
name=sesman-vnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

The important line is port=-1, this makes xrdp always look for a free port to connect.  If you set a fixed port here, the xrdp will always go back and connect to the same session.  I changed mine so it looks like this:

[xrdp1]
name=customsessionname
lib=libvnc.so
username=myusername
password=ask
ip=127.0.0.1
port=5912

Thats it, I think you could get away with just changing the port=-1 to port=5912.  My xrdp always re-connects to existing session always using the same port.


I've experienced the same thing so I decided to turn off the suspend mode and the power off. It wont solve the problem, but it will bypass it and thus will be at least functional and less prone to data loss.


cannot see wifi network after instaling driver

Try to restart your Network manager with:

sudo systemctl restart network-manager

This usually does the job.


How I can install Gimp 2.8 and Gimp 2.9 on the same computer?

You can always just build it from the git repo (git://git.gnome.org/gimp), but if you really want bleeding edge tech all the time rather than something stable and well-documented, you may want to try gentoo or arch.  Either way, you'd want branch master, so:

$ git clone git://git.gnome.org/gimp
$ cd gimp
$ git checkout master

and follow the instructions in INSTALL.  You can just run the binaries from their location in that folder, no need to actually 'install' them to the root bin and lib directories.

If you want two conflicting versions of the same software accessible to aptitude, though, you will have to do some mucking about with package building.


Try to reinstall unity by running the below command on terminal,

sudo apt-get install --reinstall unity

After that logout and login back to take effect.


Mount Blackberry Pearl as USB Mass Storage Device

You'll need to configure your Blackberry to enable the mass-storage device capability.  Note - you can only make the SD card visible to linux.

On your Blackberry go to Options --> Media Card and enable Mass Storage.

source

If this menu option is not available try
Options --> Advanced Options --> Media Card and switch Mass Storage Support to On

source

Then plug in your Blackberry via USB to Ubuntu.  Nautilus (File Manager) should mount the SD card automatically.


How to install Ubuntu Server in an XFS file system?

Installing Ubuntu on XFS is possible,
but:

/boot/efi should be FAT (any of FAT8, FAT16, FAT32)¹
/ should be EXT4²
individual specific directories can be mounted on XFS where needed.³

However: putting everything on XFS doesn't make sense at the time of this writing. (Who knows what the future and grub3 will bring...)
Note 1: Source, Section 5
13.3
Note 2: Source, Section 1.1
Note 3: Source, Section "Use Cases"


Flicker recording impress presentation with kazam

Solved.
The initial problem was kazam. I switched to simplescreenrecorder and everything is fine.
The problem in the update is something to do with the audio. I switched audio off in SSR and the video is recording fine. It's a PITA to record the narration separately but I have a solution. If I find at solution to SSR not recording properly with the sound on I'll post it.


Web Server Upgrade from 14.04 to 20.04 ( can't load web page error: Unable to load Database Driver: mysqli)

Based on the persistent error, the issue (in my mind) comes down to one of a few cases:

php-mysql is not installed, or is not the correct version for PHP 7.4
The php-mysqlnd helper package is not installed (this generally comes with php-mysql, so should not require attention)
Apache has not been restarted since updating PHP
The mysqli extension is commented out in its ini file

So, let's do some testing by creating a dummy PHP file in your web root that calls the phpinfo() function:

Open Terminal (if it's not already open)
Create a dummy PHP file in the web root:
sudo vi /var/www/testing.php

Notes:• Feel free to use any other editor that you prefer. The use of vi is more about muscle memory than an implicit endorsement for the editor.• Be sure to change /var/www to the actual document root location for http://localhost
Paste this into the new file:
<?php phpinfo(); ?>

Save the file
Open your browser and access http://localhost/testing.php. This should give you a PHP information page that looks something like this:

Scroll down (or use the Find function) to locate the section titled mysqli. It should look something like this:

Now comes the "fun" part.
If you see a blank page when visiting testing.php ...
⇢ PHP is not configured correctly. For simplicity's sake, remove and re-install:
sudo apt install --reinstall php libapache2-mod-php php-mysql

Then restart Apache:
sudo service apache2 restart

If you see the PHP Info page, but nothing for mysqli ...
⇢ mysqli is either not installed or not configured correctly.

Confirm that mysqli for PHP 7.4 is installed by opening a terminal (or using the current one) and typing sudo apt install php7.4-mysql (Note that we are specifically calling the package for 7.4 here. This should not be necessary, but we want to be 100% certain it's the correct version for your PHP installation)
If everything is installed properly, you will see a message like this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.4-mysql is already the newest version (7.4.3-4ubuntu2.4).
0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.

Confirm that the mysqli.ini file exists and is configured correctly by opening a terminal (or using the one that's currently open), navigating to the conf.d directory for PHP and Apache, and listing MySQL-related files:
cd /etc/php/7.4/apache2/conf.d
ll *mysql*

You should see something like this:
lrwxrwxrwx 1 root root 39  5月  9  2020 10-mysqlnd.ini -> /etc/php/7.4/mods-available/mysqlnd.ini
lrwxrwxrwx 1 root root 38  5月  9  2020 20-mysqli.ini -> /etc/php/7.4/mods-available/mysqli.ini
lrwxrwxrwx 1 root root 41  5月  9  2020 20-pdo_mysql.ini -> /etc/php/7.4/mods-available/pdo_mysql.ini

If you do not see these files, then php-mysql was not correctly installed. Let's try again:
sudo apt install --reinstall php-mysql

Open the 20-mysqli.ini file and ensure the contents of the file matches this:
; configuration for php mysql module
; priority=20
extension=mysqli.so

Restart Apache:
sudo service apache2 restart

If everything matches, open the mysqlnd.ini file. This file must be loaded before mysqli, so it will probably be prefixed with 10- in the directory. Ensure the extension=mysqlnd.so line does not have a ; in front of it.

If everything so far has matched your configuration ...
⇢ The problem is most likely in the application code itself and may need to be examined by a developer familiar with the system to make the changes necessary to work with the newer technology stack.
Rarely do I see Apache installations require this much effort unless you're migrating something with really obscure requirements. Most LAMP stacks are painfully simple, as a lot of people have made the tools a lot easier to use over the last decade or so.
Hopefully something here will help you resolve the issue.


Control loading of kernel module automatically

Just blacklist the kernel driver:

echo "blacklist usb-storage" | sudo tee -a /etc/modprobe.d/blacklist.conf

After that, nobody can use a USB flash drive in your system.

You'll have to manually "insmod" your driver with sudo to use USB devices again or if you want to restore the initial behaviour remove the module from the blacklist file.


No sound on VLC and default movie player

Re-installing a package is a good start, but if often doesn't do enough to bring back all the defaults.  Try starting the package more fresh with these steps:

$ sudo apt-get remove --purge alsa-base pulseaudio indicator-sound
$ sudo apt-get install alsa-base pulseaudio indicator-sound
$ sudo alsa force-reload
$ killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*; rm ~/.config/pulse

You may have to reboot.


From the package-specific README (/usr/share/doc/vim-youcompleteme/README.Debian):

vim-youcompleteme
-----------------

A code completion plugin for Vim. This package designed to work with
vim-addon-manager. To use this addon install vim-addon-manager package first
and use this command:

  $ vam install youcompleteme

vim-addon-manager is recommended by when vim-youcompleteme, so there's a good chance it is already installed. If not:

sudo apt-get install vim-addon-manager

And then run the command given in the README. vim-syntastic is only available for 14.10, from the results in the package index, but given that it explicitly depends on vim-addon-manager, I'd say something similar applies to it as well.


Ubuntu 16.04/14.04 + Pro-Ject DS2 Ultra external DAC doesn't work

I am using a JRiver Id as my music server which initially failed to recognise the DS2 Ultra as a USB DAC. I eventually was given a firmware update by Henley Audio which after installing allowed the Id to recognise the DAC. However the DAC is unable to control the jitter when outputting 44.1 files at 44.1 via JRiver from the Id and also from my MBP. As a fix for this issue I am outputting 44.1 files at 88.2 which seems to eliminate the Jitter. Outputting 44.1 files at 44.1 via a chord Hugo 2 and Hegel HD30 show none of the jitter issues of the DS2 Ultra. Even though Project insist they cannot replicate the jitter issue my belief is that the firmware is not fully up to scratch yet with the DS2 ultra.


Xubuntu 13.10 new app windows open with buttons at top of frame concealed

Had a similar problem and I slid the "Window tweaks" slider all the way to the left -- solved my problem! Now new windows open just where I closed them last time. Thanks!


Use sed instead of grep:

sed -e '/username|url|query/,$p' testlog


how to permanently change the grub default boot path

i solved it by using boot-repair https://sourceforge.net/p/boot-repair-cd/home/Home/.
Burn this into a disk/usb, boot it from there, and it'll automatically repair the boot problems.
Then just restart the computer.


Just clicked "Restore Defaults" in Unity Tweak Tool and lost my launcher and panel

Just run the following commands

unity-tweak-tool reset every setting to the default value,

unity-tweak-tool --reset-unity
Reset the compiz configuration

dconf reset -f /org/compiz/
Restart unity

setsid unity


You need to install gstreamer0.10-plugins-bad, and possibly remove your ~/.gstreamer-0.10/ folder, which is in your user's directory


Can't change the owner back to the root (can't use sudo command) in WSL Ubuntu

The answer was as follow:

access root user by issuing this command in windows command line (CMD):

wsl -u root

change ownership of /etc/sudoers file to the root:

chown root:root /etc/sudoers

Thanks to @Terrance for him help.


I assume you want to boot an OS (Ubuntu) from USB. In this scenario all the data is loaded into your system memory and whenever you restart the computer all your local data will be lost! But there is a workaround, if you create a Persistent Live USB. The persistence allows you to keep your preferences and data even after reboot so you can install applications and save your data on the live system, it will be saved on the USB.

A Persistent Live USB should be 4GB or bigger, the OS will take up 1-2GB of space and the rest will be used as persistent storage on your USB.

There is a very nice and easy GUI application for windows that i suggest you to use in order to create a Live Persistent USB. The application called YUMI – Multiboot USB Creator.


Using a file to input variables in csh scripting

I’d use sed to replace the values from the file, add set and run eval on the whole thing:

eval `sed 's/z=/set redsh=/;s/NH=/abun=/;s/.*: \(.*\), \(.*\)/xc=\1 yc=\2/' tmp.txt`

Example run

% unset redsh abun xc yc
% cat tmp.txt
z=0.016728
NH=5.7E20
Center for spectra: 2:00:14.906, +31:25:45.826
% eval `sed 's/z=/set redsh=/;s/NH=/abun=/;s/.*: \(.*\), \(.*\)/xc=\1 yc=\2/' tmp.txt`
% set
abun    5.7E20
…
redsh   0.016728
…
xc      2:00:14.906
yc      +31:25:45.826

Note however that: You shouldn't use the C shell. Use the Bourne shell.


Answering my own question...

Turns out there is a file /etc/systemd/network/50-cloud-init-eth0.link

It contained

[Match]
MACAddress=b8:27:eb:5c:8f:cc

[Link]
Name=eth0

When I changed eth0 to br0, all works as expected.


For nvidia-prime to work, remove bumblebee and bumblebee-nvidia with a --purge first. Reinstall nvidia driver with nvidia prime. nvidia-prime uses the implementation of Nvidia's Optimus technology but in this case, the nvidia driver always stays on regardless of system load and the intel driver is only used as a sink. The advantage of this is better framerates than bumblebee but of course more battery consumption and heat as well. With kernel 3.12 the automatic switching like in Windows would be implemented.


The server name is www.linkedin.com and linkedin.com is a redirection. So I would prefer to use directive as the follow in /etc/hosts:

127.0.0.1 www.linkedin.com linkedin.com

Also you should empty the browser cache. (Why?) You could use also 0.0.0.0 instead the loopback interface, I think there is no difference in this case.


Qualcomm Atheros Device [168c:0042] (rev 30) ubuntu 16.04

Your lsmod suggests that the driver module isn't loading automagically as expected. Let's give it a little push. From the terminal:

sudo -i
echo ath10k_pci  >>  /etc/modules
exit

Reboot and test.


13.10, second monitor: how do I make the "Display: HDMI1" box go away?

Ah. I found it. A zombie-like stray copy of xfce4-display-settings was stuck somehow. I found it (via ps axf) and killed it, and the thing went away.


How to list chapters of a textbook PDF file in qpdfview?

Check

View -> Docks -> Outlines

It will display Chapters panel on the left side of qpdfview app.

View -> Docks -> Bookmarks will display Bookmarks panel there


for me it worked without sec=nltmssp:

//localip/share /mnt/share cifs username=user,password=xxx,nounix 0 0


Ubuntu 13.10 64bit does not detect intel graphic card!

Launch "Software & Updates" and select "Additional Drivers". Wait few seconds until your system lists the list of available drivers. Check whether your Intel driver is listed. If it is listed, then you should be able to select it.


Which zfs command/systemd unit to depend on to ensure that a mountpoint is available?

System Defaults

There is a lot of magic here, but on Ubuntu 18.04 the answer generally seems to be zfs.target, which is listed as WantedBy all of the various zfs-*.services (mount, modprobe, etc.). You will see this if you peruse through

more /lib/systemd/system/zfs* | less

You may notice that there is also a zfs-import.target which is satisfied after zpool import has run, but before filesystems are mounted.

In my case, though, there are other steps that need to happen first (encrypted block device mapping, for example) so these will not work out of the box for me.

Specific Mount Points

For specific mount points I would recommend not relying on the general zfs.target, but rather add your own service (perhaps with Wants=zfs.target) that checks the status of the specific mounts your system relies upon. For example, if you rely on /blah/my/zfs/mount being mounted, just create a service for that which can check the zfs mount status before returning, perhaps with

zfs get mounted blah/my/zfs/mount | grep yes

Example

/etc/systemd/system/my-zfs-mount.service

[Unit]
Description=ZFS mount blah/my/zfs/mount
Wants=zfs.target

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/sbin/zfs get mounted blah/my/zfs/mount | grep yes

[Install]
WantedBy=multi-user.target

And then your other services can depend on this one.


There is some other program which is running at port 80.

You need to edit /etc/apache2/ports.conf file as follows

replace the line which says

Listen 80

to

Listen 33333

Your apache will be listening for incoming connections at port 33333 now. You can give any port number instead of 33333. Make sure that the port number which you choose is between 1025 and 65535. The ports below 1024 are used by commonly available applications.


How do I access an external drive mounted on a machine on my own network?

Here is an easy GUI solution:
On the server, where we have attached the USB drive open Nautilus and browse to the mount point of the USB drive (usually found in /media/). In the right click context menu on this folder open Sharing Options, tick Share this folder, give a sensible name for the share, and Create Share

On the remote, i.e. your laptop, open Nautilus to browse the Network for the share as named above. On mouse double-click this will be mounted as a network drive on your laptop, and it will appear as an icon on the desktop.

To mount a samba share as non root user in your home directory to have access from all applications you may want to have a look at smbnetfs.
In case you did not set your USB-drive to auto-mount you will be able to mount it remotely by using SSH (after having installed openssh-server  on your desktop).


How to remove Firefox & temp file for Firefox in Ubuntu?

If you have Synaptic installed simply type in the search-field Firefox and mark it for complete removal (this action will include removal of your hidden files and translation files if installed).

Then open the Softwarecenter and type Firefox click for installation, this action will give you the latest Firefox (19 at this moment) installed.

For eventual translations of FF re-open Synaptic and search for firefox-locale-xx (xx is the language of your choise) . Use this only when translation is required.

Synaptic is a very handy program so if you don't have it first install it via the Softwarecenter.

Succes !


Laptop screen turns off automatically while using Ubuntu 14.04

There are 2 places you can adjust these setings: the Brightness and lock dialog and the power dialog.

In the power settings dialog, change the option "suspend when inactive for" to  "don't suspend".

In the brightness and lock dialog, change the option "Turn screen off when inactive for:" to "never". Also make sure "Lock" is OFF


For the record, I have been in touch with StarTech. They couldn't understand why the card isn't working on my computer. I tried it with another computer and it worked fine, under both kernels 4.15 and 4.9. So my problem doesn't seem to come from ubuntu.


try to install PulseAudio Volume Control (you may find it on Ubuntu Software Center) and control the volume from there. I had the same problem once before on 13.04 and solved it this way :)


From https://bugs.launchpad.net/subdownloader/+bug/790753 I had a solution:

In the file /usr/share/subdownloader/gui/main.py:
Comment line 1143, uncomment the four next lines.

Patch:

--- /usr/share/subdownloader/gui/main.py.orig   2016-01-15 20:04:50.880252934 +0100
+++ /usr/share/subdownloader/gui/main.py    2016-01-15 20:05:04.380514034 +0100
@@ -1140,11 +1140,11 @@
                    if not skip_all:
                         log.debug("Downloading subtitle '%s'" % destinationPath)
            #print {sub.getIdFileOnline():destinationPath}
-                        osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz' %sub.getIdFileOnline(), destinationPath)
-                        #if self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath}):
-                            #success_downloaded += 1
-                        #else:
-                            #QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") %sub.getFileName())
+                        #osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz' %sub.getIdFileOnline(), destinationPath)
+                        if self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath}):
+                            success_downloaded += 1
+                        else:
+                            QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") %sub.getFileName())
                 except Exception, e:
                     traceback.print_exc(e)
                     QMessageBox.about(self.window,_("Error"),_("Unable to download subtitle %s") % sub.getFileName())


Can I Install Ubuntu as Dual Boot Without Partitioning the Hard Drive on Which I will Install it?

You certainly need a separate partition to install, if you don't want your data on the selected partition wiped.  When installed Ubuntu will be able to mount the other partitions and read data of them.

You don't need linux or other non-native windows tools to recover free space for a partition.  Use Windows tool for partition, then when you boot with the Ubuntu Installation media (CD or USB), Ubuntu will recognize the partition and prompt you to select whether to install on the free partition or wipe over the Windows partition.
This is an outline, can't give exact directions because I dual-booted my computers starting with Windows 7, not 10.  Win7 has the Disk Management tool built in.
From what I read Win10 has the same tool - Check this page for the built-in tool and additional 9 options. It's a very plain task, I suggest use the built-in Microsoft tool. To find the tool type "Partition" or "Disk Management" at Windows Search.

Do not bother formatting the freed space or anything, just leave the free space.  Ubuntu Installation will take it from there.


Trying to install Proprietory Nvidia Graphics Drivers

I installed cuda on ubuntu 12.04 as package as shown on NVIDIA website.

The graphic samples where not working saying:

hasan@ubt:~$ glxinfo | grep renderer
Xlib:  extension "GLX" missing on display ":0".
Xlib:  extension "GLX" missing on display ":0".

The link http://forum.ubuntuusers.de/topic/kubuntu-und-nvidia-mit-proprietaere-treiber/2/#post-5901377 helped me.

essentially:

sudo apt-get purge nvidia-319-updates nvidia-settings-319-updates nvidia-prime
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install xserver-xorg-lts-raring
sudo apt-get install nvidia-319-updates nvidia-prime
sudo reboot

Check with glxinfo | grep renderer. It showed on my Laptop:

OpenGL renderer string: GeForce GT 650M/PCIe/SSE2

The Cuda graphic demos worked!


Mount HW RAID 10 created on Windows 10 to Ubuntu 16.04 LTS

Did you try to mount the disk with

sudo mount -t ntfs-3g -o rw,users,umask=000 /dev/sdb2 /mnt/wind_D

Raid10 needs 4 disks. Since your device has 4 bays, be sure that you have input 4 disks into it! A good description can be found on What is Raid10?

Regarding the partition table:
The scsi controller of your vantec makes the disks looks like one disk from outside, in case you have configured as raid10. Be sure that you set up the raid10 the right way, usually a software has been shipped within your device to make this settings.

Hence, in my mind it makes less sense to rewrite the partition table with

sudo gdisk /dev/sdb

(type l to list the partions, and w to write the table to disk if it's correct)


Menus are being placed below windows' titlebars

In "System Settings > Appearance > Behaviour > Show the menus for a window" there are two options:

In the menu bar
In the window's title bar


Script to put filenames from the working directory into a text file so commands can be run on them

I found a better solution.

Skip making a text file and just made a script to execute multiple files in a folder

#!/bin/bash

for file in *.i*
do
  [[ "${file##*.}" =~ fchk ]] && continue
  qchem "$file" "${file%.*}".out
done

clear
echo "DONE!"


Try Utility instead as category. Utilities is not a registered application category.


Error after upgrading Bugzilla from 4.0 to 4.0.2

chmod 777 /var/www/bugzilla/data/template/template/en/default

for all changes to be written
chmod 777 /var/www/bugzilla/data/params


Copying certain files by partially matching their names to a list within a text file

Iterate over the lines with _ as the IFS, get the desired first portion containing digits, and the copy the files starting with those digits:

shopt -s nullglob
while IFS=_ read -r i _; do [[ $i =~ ^[0-9]{5}$ ]] && echo cp -it dest/ "${i}"*; done <file.txt

Expanded:

#!/bin/bash
shopt -s nullglob  ##Expands to null string if no match while doing glob expansion,
                   ##rather than the literal
while IFS=_ read -r i _; do  ##Iterate over the lines of file.txt,
                              ##with `_` as the `IFS` i.e. word splitting
                              ##happens on each `_` only, variable `i`
                              ##will contain the digits at start; `_` is a
                              ##throwaway variable containing the rest
    [[ $i =~ ^[0-9]{5}$ ]] \ ##Check if the variable contains only 5 digits
      && echo cp -it /destination/ "${i}"*  ##if so, copy the relevant files starting with those digits
done <file.txt

Replace file.txt with the actual source file, and /destination/ with your actual destination directory. Here echo is included to do the dry-run; if satisfied with the commands to be run, just get rid of echo:

shopt -s nullglob
while IFS=_ read -r i _; do [[ $i =~ ^[0-9]{5}$ ]] && cp -it dest/ "${i}"*; done <file.txt


Can't remove/purge a package due to a post-removal script error

You can manually edit file /var/lib/dpkg/info/fusiondirectory.postrm to fix removal error.
Stop apache if it still running an then open that file with root privileges and find there section:

if [ -x /usr/sbin/apache2 ]; then
    if [ -x /usr/sbin/invoke-rc.d ]; then
        invoke-rc.d apache2 reload
    else
        /etc/init.d/apache2 reload
    fi
fi

Comment it and then try

sudo apt-get install -f

to fix errors or just

sudo apt-get remove fusiondirectory

to finally remove fusiondirectory.


Newly compiled kernel not booting up (vanilla kernel 3.12.14)

Found it!!!
It was the drivers for my hard disk controller, SATA AHCI was not added while configuring kernel before compilation. Now I added, recompiled and viola! new installed kernel booted up. :)


Is there any way to stop Chromium (or Google Chrome) from auto-completing searches in the address bar?

Click on the menu (the icon with three lines in the top right of the browser)
Click "Settings"
Click the "Show Advanced Settings" link at the bottom of the page.
Uncheck the box for "Use a prediction service to help complete searches and URLs typed in the address bar or the app launcher search box".


Which Unity section? There are at least few.
I suppose that you need com.canonical.unity.panel to edit whitelist. Interesting thing is that "lenses" and "runner" are in desktop.unity so I can be wrong.

Anyway if I'm right, you use Ubuntu 13.04 and you're looking for com.canonical.unity.panel - it was deleted. You can get it back again by upgrading with "timekiller" repositories added.

sudo add-apt-repository ppa:timekiller/unity-systrayfix
sudo apt-get update
sudo apt-get upgrade

It's from http://www.webupd8.org/2013/05/how-to-get-systray-whitelist-back-in.html .


Can't login after suspend on Ubuntu 17.10

CrashPlan Solution
The problem for me was CrashPlan keeping too many files open while I was away.
After rebooting, I looked in /etc/log/syslog and found "No space left on device" errors around the time of my login failure.  If you use CrashPlan and find similar messages, then this might work for you too.  Messages like:
Dec 11 13:01:43 myDesktop systemd[1]: anacron.service: Failed to add inotify watch descriptor for control group /system.slice/anacron.service: No space left on device
Dec 11 13:36:15 myDesktop gdm-password]: AccountsService: Failed to monitor logind session changes: No space left on device
Dec 11 13:36:40 myDesktop systemd[1]: apt-daily.service: Failed to add inotify watch descriptor for control group /system.slice/apt-daily.service: No space left on device

The instructions on the CrashPlan site worked for me (please read before trying on your system):
https://support.code42.com/CrashPlan/4/Troubleshooting/Linux_real-time_file_watching_errors
Basically, as root I added this line at the end of /etc/sysctl.conf
fs.inotify.max_user_watches=1048576

I'm grateful to this bug on launchpad for sending me to the CrashPlan solution:
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1726996


How may I delete files in the trash without having sufficient access rights?

I have no idea about how you managed to get those folders in your user's trash folder without moving them there on purpose, however: your user's trash folder is located in ~/.local/share;

You may manually empty the trash just by removing the whole folder (it will be recreated when a new file / folder is moved to the trash):

sudo rm -rf ~/.local/share/Trash


Add space from extended file system to ext4

First, boot into Windows and use Windows tools to shrink the big windows partition /dev/sdb6. This is because Windows often does not like it when its partition size is changed without its knowledge.

It looks like you still have 10 GB of Space in /dev/sdb7, but almost no space in /dev/sdb2.

Boot from a Live USB/DVD of Ubuntu and use the Try Ubuntu without installing, and then open gparted to move or shrink the other partitions.

Make sure all the partitions are unmounted. With the live USB/DVD the internal drives should be unmounted by default, unless you clicked on the drive icons in the launcher to mount them.
Move /dev/dsb7 to the left and optionally increase the size if you want. Make sure you have some free unallocated space to the right of /dev/sdb7 inside /dev/sdb1.
Shrink /dev/sdb1 so that all the unallocated space inside /dev/sdb1 is now unallocated space in between /dev/sdb1 and /dev/sdb2.
Resize /dev/sdb2 to fill the unallocated space.

Hope this helps


Does it makes sense to use brew on ubuntu?

I am a user of both macOS and Ubuntu and use both Homebrew (on macOS) and APT (on Ubuntu).
The purpose of both tools is similar. The difference is that APT1 is native, required and fully integrated part of Ubuntu while Homebrew is a 3rd party addition.2 And the most important difference from a user’s perspective is that they use different command syntax, although the tasks are quite similar.
If you are used to Homebrew, you can install it on your Ubuntu. However, if someone is a pure Ubuntu user, I’d absolutely encourage them to use their native tool – APT.
If you’re going to teach using a package system, you should learn the right syntax with the target tool first. It will be a little more work for you at the beginning3 but you can then teach the appropriate tool for the target system. The students should be able to operate the corresponding tool on their computers anyway. For example, if Ubuntu users try to find advice online, they will be definitely directed at APT.
And if you don’t know how to translate a particular Homebrew command to the APT syntax, don’t hesitate to ask!

1 apt-get is one of its parts and nowadays you can use just the apt command mostly.
2 Homebrew is a 3rd party addition on both macOS and Ubuntu in fact.
3 Not that much if you know the principles of a package manager already.


Import S/MIME certificate (*.p12) in thunderbird

The tab is there but the theme of your Thunderbird installation doesn't highlight the tabs properly:

Compare with my Thunderbird installation which highlights tabs properly:


apt-get no longer works after manually deleting folders of a previously installed application

OK, this was really, REALLY nasty because there's a dependency nest in there that just won't go away with the usual round of apt-get purge, apt-get -f install, etc.  The only way around this one (I recreated your problem in a VM and tested) is just to put a directory there for apt to get rid of in the first place.

root@yourbox:/# mkdir -p /usr/share/postgresql/8.4/tsearch_data
root@yourbox:/# apt-get purge postgresql-8.4
root@yourbox:/# apt-get autoremove

With an empty directory there for apt to remove, both the initial purge of the parent package and the autoremoval of the child packages completed without errors in my VM.


How to check 'NVIDIA GeForce GT 820M' is installed, lspci not showing the model?

Check the nvidia's propietary driver from Start menu-> Preferences->Software & Updates. Cheers


Chrome Flash sound gets broken and only a system restart fixes it

Try restarting pulseaudio by sending a regular SIGTERM signal to it (it will recover). In the terminal run:

killall pulseaudio

That tends to fix the problem for me.

One more option is going to chrome://plugins (location bar), and disable "pepperflash".


Will Thunderbird 5 appear in the official 11.04 repositories?

Mozilla is still supporting Thunderbird 3.1.x, so that's what's currently shipping in 11.04 so it will remain that way until it has been end-of-lifed by the Thunderbird team.

(I suspect it won't take them long to follow Firefox and at that point you'll receive both the latest Firefox and Thunderbird on every Ubuntu release at the same time but it's not quite there yet, though that is the final goal).

In the meantime for users that want it, they can snag the latest Thunderbird from a PPA:

How do I install the latest stable version of Thunderbird?


12.04 dell 14z inspiron 5423 ultrabook sound (noise)

The problem probably lies in the fact that the sound card is currently not supported by the ALSA Intel HDA module (as of v1.0.24). You can retrieve the model of your card using the command

$ cat /proc/asound/card0/codec* | grep Codec

which in my case returns

Codec: IDT92HD91BXX
Codec: Intel PantherPoint HDMI

(the first being the interesting one). The list of supported cards can be found at [www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt], and it appears that the latest are 92HD83*.

However, after some investigation done with the excellent HDA Analyzer tool, I discovered that the problem can be solved by setting one of the GPIOs:

(I would have posted an image here, but I do not have enough reputation for it).

The tool can be used to export a python script which reproduces the modifications done through the GUI. Here are the script contents (slightly modified by me):

#!/usr/bin/env python

# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)

import os
import struct
from fcntl import ioctl
from time import sleep

def __ioctl_val(val):
  # workaround for OverFlow bug in python 2.4
  if val & 0x80000000:
    return -((val^0xffffffff)+1)
  return val

IOCTL_INFO = __ioctl_val(0x80dc4801)
IOCTL_PVERSION = __ioctl_val(0x80044810)
IOCTL_VERB_WRITE = __ioctl_val(0xc0084811)

def set(nid, verb, param):
  verb = (nid << 24) | (verb << 8) | param
  res = ioctl(FD, IOCTL_VERB_WRITE, struct.pack('II', verb, 0))

attempts = 0
while((not os.path.exists("/dev/snd/hwC0D0")) and attempts < 50):
  attempts += 1
  sleep(0.1)

FD = os.open("/dev/snd/hwC0D0", os.O_RDONLY)
info = struct.pack('Ii64s80si64s', 0, 0, '', '', 0, '')
res = ioctl(FD, IOCTL_INFO, info)
name = struct.unpack('Ii64s80si64s', res)[3]
if not name.startswith('HDA Codec'):
  raise IOError, "unknown HDA hwdep interface"
res = ioctl(FD, IOCTL_PVERSION, struct.pack('I', 0))
version = struct.unpack('I', res)
if version < 0x00010000:        # 1.0.0
  raise IOError, "unknown HDA hwdep version"

# initialization sequence starts here...

set(0x01, 0x716,   0x02) # 0x01071602 (SET_GPIO_MASK)

os.close(FD)

In order to execute the script at boot time, first save it to /usr/local/sbin/fix-idt-codec and then create the init script /etc/init/fix-idt-codec.conf:

# fix-idt-codec - Fixes issues with snd-hda-intel
#
# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)

description     "Fix Intel HDA IDT Codec issues"

start on runlevel [2345]

task

exec /usr/local/sbin/fix-idt-codec

Now reboot, and the problem should be fixed.

For the sake of completeness, there is an additional issue some people documented in this thread: the white noise reappears after a suspend/resume cycle (and, curiously, disappears when you plug in earphones). To fix it you can add a file named 20_fix-idt-codec to /etc/pm/sleep.d with the following contents:

#!/bin/sh

# This scripts eliminates the noise produced on resume
# by Intel IDT 92HD91BXX cards controlled by the hda-intel driver
# (ALSA v1.0.24)
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin
HELPER=/usr/local/sbin/fix-idt-codec

if [ ! -f $CODEC ]; then
        exit 0
fi

case "${1}" in
        resume|thaw)
                if [ -f $HELPER ]; then
                    python $HELPER
                fi
                ;;
esac

I hope this helps. I found the following links quite useful during the debugging:

Help to debug Intel HDA - [www.alsa-project.org/main/index.php/Help_To_Debug_Intel_HDA]
Matrix:Module-hda-intel - [www.alsa-project.org/main/index.php/Matrix:Module-hda-intel]
Audio debugging techniques - [voices.canonical.com/david.henningsson/2011/12/08/audio-debugging-techniques/]
HdaIntelSoundHowto - [help.ubuntu.com/community/HdaIntelSoundHowto]


Try MuseScore. It's also in your package manager:

sudo apt install musescore

Or install it via snapcraft.io. Using terminal:

sudo snap install musescore


If your old drive/partition is encrypted with cryptsetup/LUKS, then this command should decrypt it (or at least tell you if it's a LUKS device or not):

cryptsetup open /dev/<partition> name

and then mounting the decrypted partition with

mount /dev/mapper/name /newmountpoint

See man cryptsetup for more info.

It's also possible that the decrypted volume (here the /dev/mapper/name part) could have something other than a single formatted filesystem. It could have multiple partitions ("volumes") LVM style, or even look like a full disk with separate partitions, and a MBR or GPT, but I don't think Ubuntu normally does "full disk encryption" like that.

And like the comment said, if you can just boot from the drive there's a (good?) chance it'll work, and let you copy/backup the decrypted data.


Turned out not to be too difficult in the end. For future travelers, these files need to be created—start out by basing them on the generic ones in the same directories:

debian.master/config/amd64/config.flavour.<flavour>
debian.master/control.d/<flavour>.inclusion-list
debian.master/control.d/vars.<flavour>

And then the following two files need minor edits to specify building only the amd64 arch and just the new flavour name (instead of generic lowlatency):

debian.master/etc/kernelconfig
debian.master/rules.d/amd64.mk

With these changes, you can:

fakeroot debian/rules genconfigs
fakeroot debian/rules binary skipabi=true skipmodule=true skipretpoline=true skipdbg=true

And you'll get a suite of working kernel packages with x.y.z-<flavour> release name.


How can I export ALL notes from Gnote to HTML through command line?

Ok, nobody helped me, so I did it by myself :)

Check this out for instructions on how to install it and use use it.
Hope it will be useful!

Install Gnote Exporter to TXT:
https://github.com/rhoconlinux/gnote-massive-export-to-txt

This is the final result. All the notes exported to txt.

This is how a text note looks like after the export.

Cheers!


Not every repository offers packages from every component. For example, the first repo in your list, http://archive.ubuntu.com/ubuntu/dists/focal/, offers packages from main, multiverse, restricted and universe (by-hash is something different). But you're asking this repo for a component partner, which it doesn't offer, so

(...) repository (...) doesn't have the component 'partner' (component misspelt in sources.list?)

You'll want to go through your list of repositories. For each, you'll want to check which components the repo offers (from the directory structure, from the repo's description etc.) and which component contains the packages you're interested in. Then edit your sources.list accordingly.


Try it with your grub option set to acpi_enforce_resources=lax
From the documentation:
acpi_enforce_resources= [ACPI]
        { strict | lax | no }
        Check for resource conflicts between native drivers
        and ACPI OperationRegions (SystemIO and SystemMemory
        only). IO ports and memory declared in ACPI might be
        used by the ACPI subsystem in arbitrary AML code and
        can interfere with legacy drivers.
        strict (default): access to resources claimed by ACPI
        is denied; legacy drivers trying to access reserved
        resources will fail to bind to device using them.
        lax: access to resources claimed by ACPI is allowed;
        legacy drivers trying to access reserved resources
        will bind successfully but a warning message is logged.
        no: ACPI OperationRegions are not marked as reserved,
        no further checks are performed.


cdc_acm not displaying device name for Bluetooth dongle

As far as I know, the cdc-acm is for serial<->usb adapters (includes usb modems or any other device that uses USB as a bridge for a TTL or RS232 serial port).

For a bluetooth dongle on ubuntu 16.04 you are probably looking for "bluetoothctl".


Ubuntu will reinstall Grub and it will automatically detect Windows loader on Windows partition. I've just reinstalled my Ubuntu from 32-bit to 64-bit, having Win7 on another partition:

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1             2048 1011320831 1011318784 482,2G 83 Linux
/dev/sda2  *    1011320832 1231505407  220184576   105G  7 HPFS/NTFS/exFAT
/dev/sda3       1231505408 1241991167   10485760     5G  c W95 FAT32 (LBA)
/dev/sda4       1242009598 1250263039    8253442     4G  5 Extended
/dev/sda5       1242009600 1250263039    8253440     4G 82 Linux swap / Solaris

You just need to select "Manual" while installing Ubuntu and make sure that "/" (Mount point) is set for your Linux partition and Windows partition is set to "not used". Grub should be installed on /dev/sda. Good luck!


Syncthing is available on Android and Ubuntu. I use it to sync some folders like music from my main computer to some devices without connecting them via cable.


How do we turn down the insane brightness on Ubuntu 17.10?

Looks like there is no true solution.

Best alternatives are to use @Rober Riedl's comment and switch to gdm with /etc/gdm3/custom.conf:WaylandEnable=false, or wait and upgrade to 18.04, which will leave wayland because of its many problems.

I also installed some nighttime dimmers to somewhat reduce the brightness, but they're far from properly addressing this problem, too.


Dell Ultrabook 14z 5423 System-Installation

This is most likely the result of a BIOS setting. Try this:

Reboot your machine and enter the BIOS Setup
Navigate to "Settings" ⇢ "System Configuration" ⇢ "SATA Operation"
If the value is "RAID On", then change it to "AHCI"
Save and reboot

Some Dell notebooks are pre-configured to support Intel's "Rapid Restore Technology" by default, which can confuse the installer into thinking there is a RAID device when one does not exist. Using AHCI mode ensures each device is seen independently.
Hope this helps.


Problem while installing random in Python

This mean that there no package with name random .

Also random module should be present by default . Cause this code works fine on machine with python2

  import random
  num = random.randint(10,20)
  print (num)

And I am too getting the same error when I type this command

pip install random


Using TV as a monitor: can't change from 720 x 480 resolution

The TV's resolution IS 720 * 480. I guess that because it is just 22'', it is an outdated TV.
It says it is a MS Telematic 52" likely because it is a fake. Fake electronics, when connected to any computer. reports wrong brands and models.


Ok, some playing around after reading the stuff Charles pointed to and I went into the advanced menu and found 4 versions of the linux kernel listed
4.13.0-16
4.13.0-19
4.13.0-21
4.13.0-25

Using the latest 4.13.0-25 the system boots fine. I checked my GRUB configuration and the default "Ubuntu 17.10" option still pointed to "-19"! So there have been two updates and GRUB hasn't been updated for either. Anyway, this has fixed my problem now, thanks Charles for pointing me in the right direction.

I do wonder if this is a general problem, or if it is related to my use of "Grub Customizer". Either way it might help someone else who is stuck.


I include some shortcuts in my .profile but I want these to be activated at login time .. see below

Here's a useful link. http://linux-training.be/security/ch04.html
There are different kinds of profiles.

If for yourself only, you can just make changes under ~/.profile (not /etc/profile which is typically edited via sudo to impact all user accounts). Shell will load both /etc/profile and ~/.profile. changes in ~/.profile are more for personal changes.
Please do source ~/.profile after changes. Without this command, new changes will not be loaded, unless you reboot/re-login to your account.
Different shell loads different profile. The answer here is pretty comprehensive.


This question is more geared towards Cpanel then Ubuntu.  Also Cpanel doesn't support Ubuntu.

Interworx has support for Ubuntu and does something similar though.
http://www.interworx.com/

If you want to set a static ip then just edit this file

sudo nano /etc/network/interfaces

Not sure what your file will look exactly like, but you need to have it look similar to this.

auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx(enter your ip here)
        netmask xxx.xxx.xxx.xxx
        gateway xxx.xxx.xxx.xxx(enter gateway ip here,usually the address of the router)

ISPConfig has tutorials on this as well.
https://www.howtoforge.com/perfect-server-ubuntu-14.04-apache2-php-mysql-pureftpd-bind-dovecot-ispconfig-3

What is a static IP(basically)
If you want to use a static IP locally then you can just set it to what ever you like as long as it isn't used about another device.  For example change the value to be
192.168.1.200

Now after you set it to that IP it will never change as opposed to DHCP which will dynamically assign the IP based on what ever logic your router has in place.

If you want an external static IP then you will need to purchase one from your ISP.

If you cannot purchase a static IP for what ever reason you can still get around this by using a service and program to help with this process.  You can use a service like something here - http://dyn.com/dns/

After you change the IP in that file make sure you reset the service that reads in the config file you altered.

sudo service networking restart


Is it possible to set the number of entries HUD returns?

It seems from my investigation that this is not (yet) possible in Unity's HUD.


Running script on ubuntu startup to launch Mycroft AI

On bootup? Are you sure? Or just when you logon. Different answers for each so you might want to expand on your need. Generally, for bootup, you create an init.d script or run it from /etc/rc.local. For login, there is a gui startup app where you can put the Mycroft script so it starts every time you login.

To find the Startup application, Select "Show Applications" then in search box, you put "Startup". It should have a "rocket" icon. Select the application, then use the "Add" button to fill in the fields. When you logon, that application runs. It can be a program or an executable script.

For scripts or programs you want to run as root at bootup, create /etc/rc.local as root (or edit it if it exists). Then add your program or script. Remember to redirect output and error to a file and/or run it with "nohup" in background so it doesn't hang your system if there is an issue. Note, best to use full pathnames for all objects. Scripts should be in "root-protected" directories like /root and not be even readable by users. Commands in scripts should have full path names for security. Using nohup insures that when the rc.local script finishes, the program or script is not terminated.

Ex:

nohup /root/myscript >/root.myscript.out 2>&1 & # so program has its own error file

nohup /bin/ps -ef & # Output goes to nohup.out.


Just as a follow up, and solution for anyone looking:

Uninstalling Firefox that came with the installation bundle using the terminal command

  sudo apt remove firefox

and then installing the snap version using command

  snap install firefox

has fixed the problem I was having.

Many thanks to all who replied


closing chrome from terminal might not save profile details properly. You can install wmctrl to close chrome tab with title as below:
    wmctrl -c  window-title


How to enable Unity 3D support in 12.04 using open-source drivers for RadeonHD cards?

I was having same problem with an integrated Radeon 4250 (RS880) and solved it after installing also the xserver-xorg-video-ati package.

I read in the info about the package that:

"Users of Rage, Mach, or Radeon boards may remove this package only if
they use Driver "r128", "mach64", or "radeon" in /etc/X11/xorg.conf
instead of relying on autodetection."

So it seems I was using autodetection.

Now I get 3D acceleration (and Unity 3D) although I noticed the mouse cursor is not smooth at the login screen (it freezes for a fraction of a second each one second).


Where can I find the output log from a custom crontab task

For see  log entry about cron service excute this command on ubuntu 18.04+:

journalctl -u cron.service

In Ubuntu 16.04 see this questions: 16.04: How do I make cron create cron.log and monitor it in real time?


Solution

Change directory into the vmware module source directory. [1]

cd /usr/lib/vmware/modules/source

Untar the vmnet modules. [1]

sudo tar -xvf vmnet.tar

Open vmnet-only/driver.c with your favorite text editor.

sudo gedit vmnet-only/driver.c

Around line 267, change the following [2]

if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
    ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
}
return ret;

to

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
    ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
}
return ret;
#else
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
    ret = VNetFileOpIoctl(filp->f_path.dentry->d_inode, filp, iocmd, ioarg);
}
return ret;
#endif

Around line 1194, change the following [2]

if (filp && filp->f_dentry) {
    inode = filp->f_dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;

to

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
if (filp && filp->f_dentry) {
    inode = filp->f_dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;
#else
if (filp && filp->f_path.dentry) {
    inode = filp->f_path.dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;
#endif

Save this file and then open file vmnet-only/userif.c

sudo gedit vmnet-only/userif.c

Around line 526, change the following [2]

return skb_copy_datagram_iovec(skb, 0, &iov, len);

to

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
return skb_copy_datagram_iovec(skb, 0, &iov, len);
#else
struct iov_iter to;
iov_iter_init(&to, READ, &iov, 1, len);
return skb_copy_datagram_iter(skb, 0, &to, len);
#endif

Save this file and then re-tar the modules. [1]

sudo tar -uvf vmnet.tar vmnet-only

Delete the previous working directory. [1]

sudo rm -r vmnet-only

Run the GUI (Workstation or Player) again and let it to build the modules.

References

[1] : An answer from nonsleepr.
[2] : A write-up from Robert Gadsdon.


Zesty is already EOL as per https://wiki.ubuntu.com/Releases
My suggestion would be to upgrade to latest supported version of Ubuntu

Also you might take a look here:
https://lists.ubuntu.com/archives/ubuntu-announce/2018-January/000227.html


Why are some storage devices shown on 'Places' instead of the 'Devices' tab?

Devices that have been bookmarked show under "Places" instead of "Devices".


Conversion of Outlook data to xml in mono

http://mono-project.com/Main_Page

There is a cross platform Distropackage for older ubuntu like 12.04.
Since there is debian packages for Ubuntu older release.

I did not get info what version of Ubuntu you are using to convert Mono files from c#,
I have not had time to test this out to check if it runs in Ubuntu 14.04 LTS.
How ever i know that old dependencies should work from 12.04

I personally use codelight when needing migrate things between platforms.
http://www.sysads.co.uk/2014/05/install-codelite-5-4-ubuntu-debian-linux-mint/

That one works for sure.
Or you can get this also.
http://www.sysads.co.uk/2014/05/install-premake4-ubuntu-14-04-13-10/
or
This one i use daily in my work. It definetley will resolve your need and some.
http://www.unixmen.com/install-codeblocks-ide-ubuntuelementaryosdebian/

Let us know if this did not resolve things for you.


"intel_rapl: no valid rapl domains" message upon boot

This was a change introduced in October 2013 to support Intel RAPL power capping driver in the Linux kernel. This message is non-obstructive, and when it appears it doesn't affect the performance or functionality of the system, since it's only a power management module.

If your virtualization software supports this driver (and the host supports advanced power features) then the message disappears.

You can check the source tree of the module to check what it does.


What's your gpg --version?

--no-symkey-cache was added in gpg 2.2.7.

Ubuntu 18.04 only has gpg 2.2.4. You'll need Ubuntu 18.10 or later. Or upgrade gpg manually.


They just use & install different desktops, Lubuntu uses LXDE, Ubuntu uses Unity (last I'd read) and some different default programs are installed, but can install & run the same programs.

They both use the same installer & methods.


Why isn't apport being fixed and is there a better solution than disabling it?

The apport error reporting system works fine. Most people misunderstand what it's trying to tell them. Disabling apport is NOT a good solution.

First, if you receive a "Ubuntu has experienced an internal error", or some such, you have an option to send in an error report, or not. Most important here is that you click the Continue button, and NOT click the x (close) button. Otherwise you'll keep getting the same report after every reboot. It's also important that you click on the Details button to try and review/understand what you can about the crash.

Second, in terminal type ls -alt /var/crash and you'll see a list of recently crashed applications or system programs. If you see the same name more than once, then that application/program is a big problem. So, fix the problem that causes the crashes. Temporarily disable your Startup Applications. Note if the problem occurs when running a particular application. Got a ton of indicator apps running in the top panel? Disable them and see if the problem is gone. Etc.


How to remove "Messaging Menu and Unity Launcher integration" from Thunderbird?

This extension is included in Thunderbird's package itself. You would need to run:

sudo rm /usr/lib/thunderbird-addons/extensions/messagingmenu@mozilla.com.xpi

This will remove the extension's installer. When you do so it should (in theory) allow you to remove it from your Thunderbird profile.


Setting permission to /etc:

Since the permission of your /etc directory is drw-rw----, you will not be able to drop down to root privilege to set the right permissions. So you'll have to get a Live Ubuntu media with which you can boot and correct the problems.

Boot to a live session, open a terminal and mount the target root partition:

sudo -i
mount /dev/sdXY /mnt

(replace sdXY with that of target device, the device for /; assuming you don't have a separate partition for /etc.)
Make permission changes:

chmod 755 /mnt/etc

(assuming the permissions for the contents in /etc is okay.)

reboot

P.S. I tried to replicate this by running sudo chmod 644 /etc and was able to recover with the steps stated above. However, I encountered additional issues with Unity plugins. The following AU Q&A helped to solve some:

Unity doesn't load, no Launcher, no Dash appears!


Ubuntu won't start after nVidia driver installation GF8600GTS Ubuntu 16.04

I found this solution to be my Go-To solution on NVIDIA. Tell me if this works for you: http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux


I haven't found out how to find what process is grabbing a keystroke, but I found out what process was grabbing alt-tab. It is ukui-window-switch, which I never heard of before. I found a core file of this program in my home directory. Suspecting that it had something to do with alt-tab, I hit alt-tab; konsole acted as if I had just typed tab. I then ran ukui-window-switch, and all the windows in all the workspaces showed up in the middle of the screen when I hit alt-tab. I killed ukui-window-switch, and alt-tab went back to being just tab. I set alt-tab in Task Switcher and now it works normally.