Ubuntu 12.04 nomodeset fixes boot problem but causes screen resolution to get stuck

I guess that is the wrong repository to use (if the FLOSS driver "nouveau" does not work),
start by removing the packages you have installed and repository you have added to avoid conflicts.

Please try with the steps explained in this blog post at the last section "Setting up Nvidia Optimus"

this will install the latest Nvidia proprietary drivers :

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

If you are sure you have optimus features or a second integrated graphics cards like Intel you can proceed with Bumblebe installation as following :

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia


Ubuntu host. Windows XP VM. Internet Access for VM via host

These settings are from VirtualBox, but usually they works om VMWare too.

Open the VM Settings, select Network and then check if:

your adapter is enabled (Enable Network Adapter is checked)
Attached to value is Bridged Adapter
in Advanced, Adapter Type is PCnet-FAST III (Arm79C973)

Then restart.


running hbase shell command through shell script

Updating the 5th line in your script to the below line should solve the problem:

echo "get 'VIZVR_profile','md5_hash'" | hbase shell

Explain

When you execute the following command:

echo "get 'VIZVR_profile','md5_hash'" | "hbase shell"

The echo command is piped into the following command "hbase shell"

The problem here, is that there is no command named "hbase shell"

The command is hbase with parameter shell

Removing the quote should solve the problem (assuming that hbase is in your path).

Note: You might need to replace hbase in the 5th line the script with full/path/to/hbase


It's a bug in Ubuntu backup (deja-dup). https://bugs.launchpad.net/ubuntu/+source/deja-dup/+bug/1313034

You can adjust the rights of the folders.
Open a terminal and copy these commands:

sudo chown "$USER:$USER" ~/.cache/dconf ~/.gvfs
sudo chown -R "$USER:$USER" ~/.dbus


I found a workaround:

To pause:

sudo chmod -x /usr/sbin/ddclient

To reenable:

sudo chmod +x /usr/sbin/ddclient


I found some article where it is said that drivers for M2XX works perfectly even for M3XX. Anyways, having the same card tried

sudo apt-get install fglrx-updates

and got it working.

Other methods including download of deb packages from http://amd.com wasn't working for me, tried packages fglrx-core (80MB cca) together with fglrx (50MB cca) and had black screen after reboot. I guess there might be some workaround for this method too.


Brother Scanner Error: Unable to connect to scanner

The problem may be related to the location of some of the installation files.
Oscar1919 (Brother MFC-L2700DW printer can print, can't scan) indicated that some of the installation files may be copied into the wrong folder. For 64-bit Linux, the instructions were to check that the folder /usr/lib/x86_64-linux-gnu/sane exists. In my case, this folder was indeed present, but it was empty. The subsequent instructions were, essentially to copy the files libsane-brother* from the /usr/lib64/sane/ folder to /usr/lib/x86_64-linux-gnu/sane. On my system, the three files to be copied were: libsane-brother2.so, libsane-brother2.so.1 and libsane-brother2.so.1.0.7.  Once these files were located in the /usr/lib/x86_64-linux-gnu/sane folder, Simple Scan sprung to life and scanned a test document.


How to prevent battery from charging while on UPS

At least some Dell laptops have a key that you can hit to disable battery charging.  I think it was Fn-F2 or so.  The key has a little blue battery icon on it.


I've changed tds version in /etc/freetds/freetds.conf from 8.0 (it worked before php 7.1 upgrade) to 7.0 a typical MSSQL server. Now it works.

Complete config

/etc/odbcinst.ini

[freetds]
Description     = MS SQL database access with Free TDS
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1

/etc/odbc.ini

[mssql_db1_freetds]
Description             = MSSQL Server
Driver                  = freetds
Database                = Db1
ServerName              = mssql_db1_freetds
TDS_Version             = 7.0

[mssql_db2_freetds]
Description             = MSSQL Server
Driver                  = freetds
Database                = Db2
ServerName              = mssql_db2_freetds
TDS_Version             = 7.0

/etc/freetds/freetds.conf

[global]
        # TDS protocol version
;       tds version = 4.2

        # Whether to write a TDSDUMP file for diagnostic purposes
        # (setting this to /tmp is insecure on a multi-user system)
;       dump file = /tmp/freetds.log
;       debug flags = 0xffff

        # Command and connection timeouts
        timeout = 600
        connect timeout = 600

[mssql_db1_freetds]
    host = 192.168.0.20
    port = 1433
    timeout = 600
    connect timeout = 600
    tds version = 7.0
    text size = 20971520

[mssql_db2_freetds]
    host = 192.168.0.20
    port = 1433
    timeout = 600
    connect timeout = 600
    tds version = 7.0
    text size = 20971520


How to make it so I don't have to press "^" button twice to get the "^" symbol

This is fully defined by your keyboard layout. For the US keyboard, there are variants that also support dead keys. If one does not want it temporarily, it is simply a matter of switching to the variant without dead keys.

You can see whether such alternative layouts are also available for Scandinavian. In Settings, go to Region & Language. Clicking on the + button allows you to add keyboard layouts. Once multiple keyboard layouts are installed, you can switch between them with the hotkey Super+Space.


No unusual output in the terminal generally indicates that there isn't any package management problem.

In order to dig deeper install sosreport from the default Ubuntu repositories. If sosreport finds an error, it will save the error report in a separate .txt file.

sudo apt install sosreport

Then run sosreport.

sosreport

The output will be a .tar.xz archive located in the /tmp folder. Copy the archive to your home folder and extract the contents to read the results of the sosreport command. The .tar.xz archive may contain .txt files whose names are diagnostic commands that were run by the sosreport program and the contents of these files are the results of running the diagnostic commands.


Troubleshooting Ubuntu Server 17.04 Issues

I've reviewed your terminal output of free -h and swapon -s and cat /etc/fstab, and didn't find the encrypted swapfile that I was expecting to see, so your problem isn't there.

I do see a possible problem in your /etc/fstab. Edit this file with:

In terminal...

gksudo gedit /etc/fstab

Change this:

# /boot/efi was on /dev/sda1 during installation
UUID=DE7B-3E50  /boot/efi       vfat    umask=0077      0       1

To this:

# /boot/efi was on /dev/sda1 during installation
# UUID=DE7B-3E50  /boot/efi       vfat    umask=0077      0       1
UUID=DE7B-3E50  /boot/efi       vfat    defaults      0       1

(duplicate the 2nd line, comment out the 2nd line, and make the edit to the new 3rd line... this way you can easily go back if you need/want to).

Reboot the server and monitor for freezes.

Troubleshooting tip:

After rebooting the server, log into the server and type tail -f /var/log/syslog and keep that output in the foreground. It'll show you the current/last entries made into syslog, and may give some clue as to where the problem is when the system freezes (if it still does).


I found my notes on this.

Edit /etc/default/grub and add the line

GRUB_DISABLE_OS_PROBER=true

Exit, saving changes, then run

sudo update-grub

From the grub wiki (item 16)

  This entry is used to prevent GRUB from adding the results of
  os-prober to the menu. A value of "true" disables the os-prober check
  of other partitions for operating systems, including Windows, Linux,
  OSX and Hurd, during execution of the update-grub command.  This will
  keep grub from looking for other OS'es.


Restore Python installation to default plus apt package dependencies

I would start by listing the Python packages managed by apt-get (the following one-liner takes a few seconds to run, be patient):

$ for pyfile in `ls /usr/lib/python2.7/dist-packages`; do dpkg -S "/usr/lib/python2.7/dist-packages/${pyfile}" | sed 's/:.*//g'; done | sort -u

Note: if necessary, replace 2.7 with whatever python version you're interested in.

Next, uninstall the packages you installed manually. If you are unsure which ones you installed, you can get the list of all packages installed manually using the following command (see this question):

$ comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Then uninstall the Python packages you installed manually, for example:

$ sudo apt-get remove python-tk python-scipy

Next, you want to know which packages you installed using pip:

$ ls -ltd /usr/local/lib/python2.7/dist-packages/*

This command lists the contents of pip's install directory sorted by last modification date, making it easier to find the packages you installed yourself. For example, I installed Google's gcloud tool which installs a bunch of pip packages that I don't want to uninstall, but looking through the list it's easy to see that they were all installed at the same exact time, so I know which ones I should leave, and which ones I can uninstall. Before you uninstall any pip package, you should take a snapshot of the list of packages installed:

$ sudo pip freeze > $HOME/pip_freeze_snapshot.txt

Then just uninstall the packages you want, for example:

$ sudo pip uninstall py pytest

Finally, don't forget that some pip packages may have been installed in your user directory. Perhaps you're fine with that, but if not, you can list them:

$ ls -ltd $HOME/.local/lib/python2.7/site-packages/*

If you want to get rid of all these packages you can just delete this directory. Otherwise, just uninstall the individual packages, for example:

$ pip uninstall tensorflow

Don't forget to check for other python versions (e.g., 3.5).


Confused over NVIDIA graphic card is installed or not?

As mentioned in the comments: apt-cache search only shows available packages.

The second lspci output shows that you have an Nvidia GeForce 820M and it's currently using the nouveau driver (Kernel driver in use: nouveau). You can use ubuntu-drivers to show applicable packages or it's GUI frontend named additional drivers (can also be started from command line with /usr/bin/python3 /usr/bin/software-properties-gtk --open-tab=4) and install the package you like.


The fact that you got set up the initialization partition, it maybe that you partition is not mounted.  Below are the steps to do so:

Boot your computer up with Ubuntu CD
Go through all the process until you reach "Disk Partition"
Select Manual Partition
Mount your appropriate Linux partitions


Installing Ubuntu in a external hard drive and NOT placing GRUB of my C: hard drive

Bug Alert!
There is a bug (bug number: 1396379) in the Ubuntu installer that installs the grub bootloader on the first ESP it finds. See https://ubuntuforums.org/showthread.php?t=2182302 for discussions on this.
To workaround this bug you will need to take a few extra steps.
Workaround

When you boot from the LiveUSB in UEFI mode, use the Try Ubuntu
without Installing option.
Open the Gparted application when the Ubuntu desktop starts.
Select the Windows (first) drive within Gparted at the top right
corner(1):

The NVME drive in this picture does not have Windows. However, it has an EFI System Partition (ESP).

Highlight the ESP in the bottom list of partitions as shown above (2). Right click on the highlighted partition and select Manage Flags from the context menu. You will see:

You should see two flags, boot and esp checked. Uncheck those two flags. Click Close button to exit the Manage Flag window. Click the green "Apply" ✅ button if it is clickable.
You will need to restore those check marks once Ubuntu is installed using the same above process so that Windows can boot from the first drive.
Close Gparted.
This is the end of the workaround.
Original Answer
See How do I install Ubuntu to a USB key? (without using Startup Disk Creator)
Even though it is for USB key, the same principle applies for the USB Hard drive. Pay extra attention to the second answer. The relevant parts are noted below:
During install choose "Something Else"

Partition and format the USB drive
After having chosen Something else the graphical partition manager GParted will guide us through the partitioning process:

At this point take extra care that the boot loader Grub indeed will
be installed to the USB drive (/sda in the picture, but yours will be different) and not to anywhere else

See the bottom of the image above, and make your selection where it says: Device for bootloader installation. The bootloader is another name for the GRUB. It should be installed in the MBR of the external USB hard drive and not in one of its partition.
You will need at least one ext4 partition with a mount point root (/). In the example above an additional /home (also ext4) partition was created. If in the future you need to reinstall Ubuntu, by unticking Format box you can keep the data in /home partition. You will also want a small swap partition of 4GB size (not shown in the picture) with no mount point, in its own Linux/Swap format to be used as virtual memory.
hope this helps


Partial answer after looking at the related question, for SSH logins, sshd_config has the option for PermitRootLogin: yes/no.

create /etc/pam.d/telnet
 with the contents

auth    required        pam_listfile.so item=user sense=deny file=/etc     /ftpusers onerr=succeed

# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so.

# Standard pam includes
@include common-account
@include common-session
@include common-auth
auth    required        pam_securetty.so

My example uses the same deny list as my ftpd


When you declare apps in your snapcraft.yaml, it results in a binary wrapper being generated upon install and placed into /snap/bin/, named after your package and app name (note that if the app is a service, this wrapper is instead a systemd .service file).

That wrapper contains most of the environment under which the application will run. The two environment variables that are most relevant to this question are SNAP_DATA and SNAP_USER_DATA. You can find more information about these in the documentation, but I'll describe them here as well:

SNAP_DATA is a system-wide writable area (in /var/snap/). This might be used to host logs for services, for instance.
SNAP_USER_DATA is a user-specific writable area in the home directory of the user running the application (specifically /home/<user>/snap/). This might be used for user-specific configuration files, etc.

Both of these directories are very important to the upgrade/rollback functionality, since both of them are versioned. That is, each revision of a given snap has its own copy of these directories. Let me explain with an example.

Say you install revision 1 of the "foo" snap. That will create two directories:

/var/snap/foo/1 (SNAP_DATA)
/home/<user>/snap/foo/1 (SNAP_USER_DATA)

Now say "foo" uses both of these. Maybe it has a service that hosts a database in SNAP_DATA, and a binary that uses config files in SNAP_USER_DATA.

Now revision 2 of "foo" is released, and it's automatically updated. The first thing that happens is that /var/snap/foo/1 is copied into /var/snap/foo/2 and /home/<user>/snap/foo/1 is copied into /home/<user>/snap/foo/2. Then the new revision is fired up. It should notice that it's running on old data, and maybe it has some database migrations to run to the database in SNAP_DATA. It does that, and away it goes.

Now say those migrations fail for whatever reason, and this application needs to be rolled back. It begins using the old revision of the /snap/foo application, where SNAP_DATA was pointing to /var/snap/foo/1 and SNAP_USER_DATA was pointing to /home/<user>/snap/foo/1. This picks things up on the old version at the point before the migrations were run, since those operations were run on a copy of the data.

Long story short: don't use the home interface to store data you can be storing in SNAP_DATA or SNAP_USER_DATA, since they're an integral part of the upgrade/rollback strategy. Take advantage of them!

UPDATE for v2.0.10:

Two new data directories were also introduced:

SNAP_COMMON sits alongside SNAP_DATA, but is specifically unversioned. Every revision of the specific snap has access to this directory, so it's not copied upon upgrade/rollback etc. This might be used for particularly large, unversioned files (e.g. raw data that isn't really version-specific).
SNAP_USER_COMMON sits alongside SNAP_USER_DATA, but is again specifically unversioned. It might be used for storing non-version-specific data per user.

UPDATE for v2.15:

The files placed within /snap/bin are no longer wrappers that define the environment, but symlinks to /usr/bin/snap. So the way to determine the environment under which an application runs would be to use snap run --shell <snap>.<app>, for example:

$ sudo snap install hello-world
$ snap run --shell hello-world
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

$ env | grep SNAP
SNAP_USER_COMMON=/home/kyrofa/snap/hello-world/common
SNAP_REEXEC=
SNAP_LIBRARY_PATH=/var/lib/snapd/lib/gl:
SNAP_COMMON=/var/snap/hello-world/common
SNAP_USER_DATA=/home/kyrofa/snap/hello-world/27
SNAP_DATA=/var/snap/hello-world/27
SNAP_REVISION=27
SNAP_NAME=hello-world
SNAP_ARCH=amd64
SNAP_VERSION=6.3
SNAP=/snap/hello-world/27


Where does JAVA tar.gz file gets downloaded when it installed by oracle-java9-installer package?

Your question is not related to apt-get at all.

Oracle-java9-installer has an installation script that downloads java from Oracle site and installs it. It is very specific to this package.

But your answer is: the tarball is at /var/cache/oracle-jdk9-installer/


Does samba also have backdoor for ransomware attacks?

Short answer, yes, and Samba have released an update

Samba has recently released an update for this

There have only been a few documented cases of this happening on a Linux system, and I have not seen any Linux Samba ransomware exploits

http://thehackernews.com/2017/05/samba-rce-exploit.html has some more information

There appeared to more than money motivating the Wannacry virus, it was also about establishing awareness, this isn't going to stop other people from picking up from this trend and using other services you may have enabled, this can be done through 0day attacks

The best way to protect yourself is to limit the service and features that you actually need and use, the only reason Windows users are most susceptible is due to the environment, the system is left open for convenience and ease of use, if you don't need Samba, then don't use it, if you want to use it, if you are going to run dozens of services on your PC I would suggest familiarising yourself with Linux security and the structure behind it


Does Ubuntu keep a backup of /home folder?

No. Creating a backup is a task for the owner of the system or the owner of the data.

Using it in a virtual system you should regularly make backups of that system. It takes seconds to copy one.

You can even automate the backup from the main OS so you have a daily backup.


Xubuntu 16.04.2 - Terminal clear command

It's hard to know exactly without some more info but here are some things to check/try.

First, go to

Edit > Preferences > Advanced Tab > Encoding

and check the Default character encoding (mine is UTF-8, you may want to try ISO-8859-1 and see if that works)

If that doesn't help, try running the following:

$ echo $TERM

if you get back something other than xterm, run:

export TERM=xterm

and try again.  If that takes care of it you'll need to look into what is setting the TERM variable incorrectly: I'd start by looking in ~/.bashrc

If, however TERM is set correctly, you can run the following to see what clear is actually sending:

$ clear | od -bc

and compare your output to mine:

$ clear | od -bc
0000000 033 133 063 073 112 033 133 110 033 133 062 112
        033   [   3   ;   J 033   [   H 033   [   2   J
0000014

if they match you may want try clicking the Reset compatibility options to defaults button in Preferences > Compatibility tab.

Hope that helps


Problem compiling driver for usb31000sw usb-ethernet adapter

You can't have spaces in your directory names in this build directory tree. When you remove the space in the directory name /home/lars/Hämtningar/usbnet/Linux/Kernel 2.6.x_3.x (the space between "Kernel" and "2.6.x_3.x") it should work.

It's because the "make" command doesn't recognise the option "2.6.x_3.x". "Make" has to make (compile) "modules", but it tries to make "2.6.x_3.x" because of the spaces in the command.


How do I disable adobe flash "hardware acceleration" in terminal

Their are two ways you can disable hardware acceleration for flash, the terminal way is to create a file called /etc/adobe/mms.cfg and add the following line:

EnableLinuxHWVideoDecode=0

The 2nd method I would recommend is opening a youtube video and going into full screen, right-clicking Settings and unticking Enable Hardware Acceleration.

If by some chance it doesn't let you untick, use the tab key to move between the buttons and press Space to do it for you.


Change directory for mysql log_bin in ubuntu 18.04 LTS

I find how to fix it

vim etc/apparmor.d/usr.sbin.mysqld

/media/disk1/mysql/ r,
/media/disk1/mysql/** rw,

service apparmor restart
service mysql restart


How can I easily retab html files according to some sane default?

In vim:

:set softtabstop=0
:set expandtab
:set smarttab
:set shiftwidth=2
gg=G
:retab

EDIT: Explainations:

lines 1-3: sane default
line 4: indent with 2 spaces
line 5:

gg: top line
=: indent until...
G: ...end

line 6: insure that all tabs are converted to spaces


When I start my camera in video call on Skype 4.1. incoming video is flashing blue?

I've discovered a really crappy work-around, if you move the contacts window (or any window) over the part of the chat window showing YOUR video (the small thumbnail in the corner) the flickering stops.

Somehow the problem is related to showing both the video thumbnail and the remote video at the same time.

I've also tried upgrading xserver-xorg-video-intel from 2.9 to 2.15, changing between uxa and sna acceleration, and setting the XvPreferOverlay xorg option to true - none make a difference.

It doesn't happen with the fbdev driver - but it is unable to render more than 1fps full-screen video.


i686-w64-mingw32 gives error on ubuntu 16

You have to manually install packages from Ubuntu 14.04 LTS onto your current 16.04 LTS system with
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-binutils/mingw32-binutils_2.20-0.2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-runtime/mingw32-runtime_3.15.2-0ubuntu1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32/mingw32_4.2.1.dfsg-2ubuntu1_amd64.deb

sudo apt-get install ./mingw32*.deb

to get all i586-mingw32msvc* prefixed commands installed.


Can't connect to any networks with an Acer Aspire 6930 using an Intel 5100 wireless card

Try downloading the correct Unix drivers for that wireless card.  I have a similar problem with my Atheros wireless card in my notebook, which also has problems on Windows -- it can scan but can't connect even to open wireless networks.
Try downloading the drivers and firing up a sudo root terminal to install them.  Look on the notebook manufacturer website;  if not there, try a google search for Unix or Linux drivers for that card.  If all else fails, try assigning an IP address from outside of the router's DHCP pool, and adding the default gateway manually, then see if you can connect from there.


ubuntu 12.04.5 not able to install mysql server

I don't understand, how you got into that situation, but you could update your cache

sudo apt-get update

and then try to let apt-get resolve the problem:

sudo apt-get -f install

The -f flag fixes broken dependencies.


Video drivers for Intel onboard graphic in 18.04 and thinkpad t410

There's probably nothing wrong with it. It's just that it is a 8-9 year old chip (Q1 2010), which had low end graphics performance even then.

Temperature rise might be due to reduced cooler performance (e.g. dust), and having to decode video in software, not hardware. Most chips today try to perform video decoding in hardware, not software, and thus has lower power consumption as a result.

OBS requires OpenGL 3.2. Your GPU only offers OpenGL 2.1, which is probably why OBS does not run.

You may gain some performance by cleaning the coolers of the machine, but ultimately it's old.


It is not possible at this time. But it has been added as one of the possible features that could be added in the future in the apparmor roadmap.

An alternate solution is to "fix" the Firefox profile so that you no longer get denial messages from it.

You can update a profile using the aa-genprof utility using

sudo aa-genprof /etc/apparmor.d/usr.bin.firefox

and follow the prompts/answer the questions.

Alternately you can manually edit the file using a text editor

sudo nano /etc/apparmor.d/usr.bin.firefox

you can add new permissions to the profile by adding the path and access mode and then saving the file. If you do not wish to extend the profile permissions for an access that is being denied and you want to quiet the denied messages you can add a deny rule to the profile, this lets apparmor know that this is a known denial and you do not wish to extend permissions to include the object.

Eg. If you receive a message for

w access to /home/foo/file

You would add a profile rule of

deny /home/foo/file w,

Save the profile file and then load the revised profile into the kernel by doing

sudo /etc/init.d/apparmor restart

or, to reload just the specific Firefox profile, assuming that's the one you edited, run

sudo apparmor_parser -r /etc/apparmor.d/usr.bin.firefox


Open a terminal and run pavucontrol (should be preinstalled). There you will find the connected sound devices and you can change the active ones. It is very likely that the wrong device is selected. That works for me whenever my set-up changes (for example after removing the hdmi cable and the corresponding sound device).
If for a reason this doesn't work, try if you can change settings in the alsamixer


package mariadb-common error - E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt purge mariadb* -y | sudo apt purge mysql* -y
sudo apt autoremove -y | sudo apt autoclean -y
sudo rm -R /usr/share/Mariad* | sudo rm -R /usr/share/Mysq*
sudo apt-get install mariadb-server
sudo apt update


Sounds like you need a new battery if this is occurring on both Windows and Linux.


sudo apt-get update not working could not lock

seems like your apt is locked with another process. you can view which process is using apt with this command:

lsof /var/lib/dpkg/lock

to unlock it run this command:

sudo rm /var/lib/dpkg/lock


screen freeze after upgrading to 19.10 from 19.04

I am aware of a Linux kernel (DRM) bug that affects i3 and i5 (HD 620) graphics.
19.10 use a broken version... between 5.3.0 and 5.3.7, it is fixed in 5.3.8.
So you have to edit kernel parameters to set nomodeset to be able to change linux kernel version. And to edit grub, you may have to press shift or Esc while booting, select the version to boot, press E to edit it.
See https://askubuntu.com/a/1185715/1011886 to see how to test different versions of Linux.


dell inspiron 15 3552 ubuntu 18.04 lts installation

This is a very similar question like mine, I have a similar laptop, in my case, is a Dell Inspiron 15 5000 with the same problem. First, check if you have disabled the fast boot in the BIOS and then follow my answer in this question.


Allow unsigned repository installation in Ubuntu 18.04

The 'skilion' client was abandoned in 2018, and all development moved here: https://github.com/abraunegg/onedrive
To install the client correctly on Ubuntu you have 2 options:

If using Ubuntu 18.x and below - compile from source
If using Ubuntu 19.x and above - Use the Ubuntu PPA

Do not install the client from 'Universe' as this will install old versions of the client.
To compile from source:

Install the dependencies

sudo apt install build-essential libcurl4-openssl-dev libsqlite3-dev pkg-config git curl

Install the compiler

curl -fsS https://dlang.org/install.sh | bash -s dmd

Activate the compiler

source ~/dlang/dmd-2.093.1/activate

Clone the repo

git clone https://github.com/abraunegg/onedrive.git

Build the client

cd onedrive; ./configure; make clean; make;

Install

sudo make install

To install using the Ubuntu PPA

Add the Ubuntu PPA

sudo add-apt-repository ppa:yann1ck/onedrive
sudo apt-get update

Install 'onedrive' from the Ubuntu PPA

sudo apt install onedrive

For further details refer to:

Install Guide: https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md
Usage Guide: https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md

For issues or support, open an issue ticket on GitHub


for 12.04.3 LTS and later
During boot, press and hold Shift (for BIOS) or ESC (for UEFI). This will bring up the Grub2 menu from where we can select "Advanced options for Ubuntu".

After that we will be able to select the kernel we wish to boot in "Recovery mode":

This will lead us to the advanced options. By selecting "Enable networking" we gain access to our network and the internet for upgrades or downloads, and we will also mount our hard drives in read/write mode in case we need to edit files.

After the network has loaded, and fielsystems were mounted we will be presented again with the menu, from where we can choose "Drop to a root shell prompt":

Note that we are root in this shell. Hence no sudo is needed for administrative tasks. This also means we have full access to all files, and we may cause irreversible damage to our system if we made a mistake.
If we had not enabled read/write access with "Enable networking" the filesystem will be mounted read only, and we are unable to edit files.
In case we don't have access to a network, or this was not desired, we can remount our filesystem(s) giving write access with the following command:
mount -o rw,remount /

From the root shell type exit to go back to the menu.
for 12.04.0 LTS or earlier
During boot, press and hold Shift (for BIOS) or ESC (for UEFI).  This will bring up the Grub2 boot menu from where we can select "recovery mode" (usually the second boot entry).

This will lead to the Grub2 recovery menu:

"Drop to root shell prompt" gives you a command line root environment from where you can access your files as root (no sudo required). After having done your work on your files you can leave the command line shell by
exit

Choose "Resume normal boot" to proceed booting as usual.

Note: see this question for a solution when the Grub recovery menu does not load the shell.


What does it mean to add the Google repository to one's system?

Ubuntu itself comes with tens of thousands of software packages which you can install.  A default Ubuntu install will only include a set of default packages.  For the others, you download and install them using the package management system built into Ubuntu.  The part of this system that downloads packages from Ubuntu's servers is called APT.

In a default install APT is set to only download packages from Ubuntu's own servers, also referred to as Ubuntu's software repository.  While this contains a huge range of software, some software cannot legally be provided by Ubuntu because it has a proprietary license, so it isn't included in Ubuntu's sortware repository.  This includes the official Google-branded "Google Chrome".  While there is a non-Google branded version called "Chromium" that may be distributed as open source software, it is not Google's official version and does not have Google in the name.

Other companies can set up their own software repositories allowing Linux users to install their software even when the software isn't available through their own operating system's software repositories.  This is the case with Google, who provide software repositories for Ubuntu among other operating systems.  To use the official Google Chrome browser with Linux you have to obtain it from Google's software repositories.  Since Chrome needs regular updates for continued secure operation, this can't just be a once-off.

To use a software repository other than Ubuntu's own, you have to configure APT to use that repository in addition to the ones it knows about already.  This is traditionally done by editing /etc/apt/sources.list though there are alternative methods such as:

The PPA (personal package archives) system, an easy way for people to publish their APT software repositories on launchpad.net, also provides its own way to add those repositories to users' APT configuration.
In some cases the third party company will provide a setup script which basically just automates the process of adding their repository to your APT configuration so you don't have to do it manually.

Be careful of who you trust to add their repository to your system.

Ubuntu takes some level of responsibility for all of the software they provide, but third party repositories are not vetted by Ubuntu and their software is not checked for security issues.  You must only install third-party software if it's from a source you trust, and you can verify it genuinely came from that source.  Don't add lines to your sources.list or run scripts you see on online communities, go to the official source.


Spotify (here):

Can you start spotify from a terminal window and see if it outputs any error messages when this occurs? (Ctrl+Alt+T) to open terminal and then type spotify &

To close spottily: select it and press Alt+F4 or in a terminal type killall spotify.

Mouse restart (from here and here):

If you are stuck with no mouse movement on your laptop (touchpad) then press the key combinations Alt+F2 and type in

gksudo modprobe -r psmouse

Type in the password, press enter, and then press Alt+F2 again for entering the following

gksudo modprobe psmouse

Thats it. Your mouse pointer will start working again.

If you like to do it through the terminal, then type in gnome-terminal after pressing Alt+F2
When the terminal open up type the following

sudo modprobe -r psmouse
sudo modprobe psmouse

If your usb mouse is getting stuck, then use the following command after pressing Alt+F2

gksudo /etc/init.d/hotplug restart


Need more RAM?? Running VMmachine + ubuntu

Yes, you do need more RAM :)

You can try 32-bit version of Ubuntu in the VM (and, as a matter of fact, running 64-bit Win7 on 2Gb of RAM is not totally justified too, but it may be more difiicult to reinstall) See this answer for fancy graphs.

You can also try a lighter variety of Ubuntu, such as Lubuntu or Xubuntu.

You can also try allocating more RAM to your VM, 1Gb being a reasonable minimum.


some media keys like this below pic, may produce the keycode or may not.. and they may function while you press it under xev command..

so the easy way to get the keycode of these keys is to logon to tty and run showkey -k and press the required key..

Here based on the chat.. the keycodes when showkey -k command is used in tty are 163 for Previous Track and 165 for Next Track

  also the next/previous track give keycode 165 and 163

Sorry there is no Documentation for below:

keycode with showkey -k = xmodmap keycode - 8
keycode with xmodmap = showkey -k + 8

this means the keycodes we got with showkey -k 163 and 165 are equivalent to 171 and 173 with xmodmap

thus.. run xmodmap -pke and look for the keysymbols for keycodes 171 and 173..

later you can change whatever keysym you want to map.
for example:

xmodmap -e "keycode 171 = Home"
xmodmap -e "keycode 173 = End"

Further Reading:

https://askubuntu.com/a/1177739/739431
https://unix.stackexchange.com/a/52949

  keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
  keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev

Based on above unmodified keysym for the keycodes, you can run these below commands at every boot or simply add those to startup applications preferences

xmodmap -e "keycode 171 = Home XF86AudioPrev"
xmodmap -e "keycode 173 = End XF86AudioNext"

this means pressing the key alone gives Home/ End and pressing the key along with Shift modifier give track previous/ track next


Unable to get lm-sensors to report my fan speeds for Asus Z97-WS

Run sensors-detect. It will detect and update your modules.

I still had to find updated /etc/sensors3.conf entries for my chipset on my motherboard.

http://www.spinics.net/lists/lm-sensors/msg37631.html

However, my asus-isa-0000 also shows 0 speed, but my nct6779 now shows everything correctly.


I was facing the same problem. It turns out, the solution which is adding kernel arguments in /etc/default/grub didn't work because I was using RemoteFX 3D Video Adapter in my Ubuntu virtual machine. After I removed it, the display resolution from kernel arguments started to work.

Go to your VM Settings (make sure VM is turned off), click "RemoteFX Video Adapter" under Hardware, click Remove button. Also, I disabled my dedicated graphics adapter in my computer's host OS and use only integrated Intel one (don't know if this matters).


How to feed standard input and dump into file at the same time?

Swap the pipe around: first get the output through tee to save a copy in a file while also replicating it on its standard output again, then pipe that into your actual command.

I use cat here instead because it takes indefinite amounts of input and doesn't quit after the first line (plus additional newline, see here for an explanation of that) like read:

echo something | tee dump.txt | cat


What are the corresponding commands in Ubuntu?

The instructions can be used on Ubuntu (which, like the MinGW environment on Windows, uses bash as its shell) but you will have to change the paths to the include and lib directories. You execute them (without sudo) in a Terminal window after you have downloaded the source code, etc.


How to check if my system is infected with the "Turla" trojan?

I just did a write-up on Turla yesterday over at security.stackexchange.com, covering both Windows and Linux versions. You can find it here.

Good news, by reading it you can get a better idea of what the Turla family is capable of.
Bad news, "Although Linux variants from the Turla framework were known to exist, we haven't seen any in the wild yet." - Kaspersky Lab

That means that the only analysis done so far has been from malware captured in a honeypot, and that it is very hard to detect. If you are interested, I have highlighted some of the anti-detection methods it is known to use in my write-up.

I think you will find there really isn't much more you can do at the moment besides what you already found in the article.


Hybrid 7 IRC server: How can I set a server password?

Apparently mkpasswd generates a different hash each time it runs, rather confusing. Eventually figured it out

# mkpasswd -m md5 password
$1$lilSP/V0$bAHlfX24N2lcUS8BW/JDD.

...spaces in the name seem to be bad

Then in the config make sure you have

encrypted = yes;


Ubuntu Server unable to create directory in PHP

Make sure Apache has permissions to write to directory where you are trying to create a new directory.

F.e. if your script is calling mkdir('/var/www/subdir/newdir'), run the following:

Give apache ownership: sudo chown www-data:www-data /var/www/subdir
Make directory writable: sudo chmod 770 /var/www/subdir


Can I make OpenOffice.org recognize automatically the language I am writing in?

Judging from this brainstorm and this post on the OpenOffice.org forums, there is no support for automatic language detection in OO.o. However, an idea suggested on the brainstorm might be of use; if you change keyboard layouts to that of your target language, apparently OpenOffice.org will use that as the spell-check language.


How to pass file as argument in .desktop file for wine application

This is best I can so far (Notepad example)

[Desktop Entry]
Name=Notepad
Exec=sh -c "echo %f | sed 's/^\//z:\//' | xargs wine /home/zetah/.wine/drive_c/windows/notepad.exe"
Type=Application
Terminal=false
Categories=Wine
MimeType=text/plain

I expect better answers considering I'm beginner


Why do I have "Filesystem root" logo in desktop after instalation of ubuntu 18.04?

No, Filesystem Root is just a shortcut to the root directory on your computer. You haven't been hacked.


About installing ubuntu one on Fedora maybe you can try this tutorial http://www.pacificsimplicity.ca/blog/ubuntu-one-fedora-16-howto
There is an ubuntu one app for android. If you have problems download it from Google Play (now I think is not a problem anymore), you can allways download from other markets like aptoide


I found an answer here:

http://ubuntuforums.org/showthread.php?t=2226702

However, I only needed to do the following:

sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9
sudo apt-get dist-upgrade

edit /etc/fuse.conf and remove the # before user_allow_other, then connect.

The article goes on a bit further, but I stopped because I couldn't recognize my device in the lsusb command. But it seems to work :)


Why does apt-setup-udeb not get configured?

I had the same issue and I was installing Debian from an hard drive
At the beginning of the installation, for loading the data from the hard disk I had to mount it in the cdrom folder, by running the command:
mkdir cdrom && mount -t vfat /dev/sda1 /cdrom
Then the installation got stuck at Configure the package manager
This is my syslog, as you can see it's the same error
main-menu[218]: INFO: Menu item 'apt-setup-udeb' selected
apt-setup: /usr/lib/apt-setup/generators/50mirror backed up
main-menu[218]: INFO: Menu item 'apt-setup-udeb' succeeded but requested to be left unconfigured.
main-menu[218]: INFO: Falling back to the package description for brltty-udeb
main-menu[218]: INFO: Falling back to the package description for brltty-udeb
main-menu[218]: INFO: Menu item 'save-logs' selected

Solution
So, I think that there are two things that you can do:

Since you are using Ubuntu, you can do what user832809 said, and try to run d-i anna/choose_modules apt-cdrom-setup

If it is not working, if you are using Debian and/or if you mounted the hd with the installation image in the cdrom folder, unmount it with this command:
umount /cdrom

I hope it works, I spent a lot of time to figure this out


How to play music when app is not the active app?

<nik90> jhodapp: hey, I wanted to ask about the status of playlist support in media-hub.
<nik90> jhodapp: we have a couple of 3rd party music apps that are looking to add playlist support and can't do so without it
<w-flo> jhodapp, I wanted to ask the same :)
<jhodapp> nik90, it's at the top of my list to finish up most likely for our next iteration, so maybe starting on it in about 2 weeks

So music-app still uses a lifecycle exception, but some patience should help with this issue.


Here is where you can download the driver.  Make sure that you have the 32bit version of Ubuntu, because this a 32bit driver only.

Once downloaded follow the following:

A. RUNNING THE GUI INSTALLER SCRIPT IN THE TERMINAL

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

Extract the zip file
Use the following command to install the driver
#./lexmark-inkjet-[xx]-driver-[x.x.x]..i386.deb.sh
Follow the instruction in the installation screen.

B. RUNNING THE GUI INSTALLER SCRIPT

Do not attach the printer via USB to the Linux machine.
Extract the zip file.
lexmark-inkjet-[xx]-driver-[x.x.x].i386.deb.sh
Run the installer script file by double-clicking on the file icon and then click the "Run in Terminal" button or run the script file via command-line.
Follow the instructions in the installer screen.

Installation instructions Source:Lexmark


How to install additional package in anaconda3?

All conda commands must be run without super user privileges. That's why sudo conda command doesn't work.

You may have run conda installation bush file with super user privileges while installing. The user (raworm) running conda doesn't have write permissions to paths(/home/raworm/anaconda) it needs to modify in the environment, then conda can't do anything. To solve this problem you need to change permissions to paths (/home/raworm/anaconda).

To change permissions to paths (/home/user/anaconda) using:

sudo chown -R user /home/user/anaconda


I have found a good rSync line for the most part using various posts from around the net to come up with a good copy format. This is what I have ended up using:

sudo rsync -av --exclude=/dev/* --exclude=/lost+found/* --exclude=/mnt/* --exclude=/home/ --exclude=/media/* --exclude=/bakroot/ --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/var/run/* --exclude=/var/lock/* --exclude=/var/cache/apt/archives/* / /bakroot/

I excluded /home because I already have that backing up to another partition somewhere else.

Then to restore I just switch out drives and re-install grub using these commands:

1. Boot with any live CD
2. Get a root shell and make a folder (mkdir ubuntu)
3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)
4. chroot the mounted partition (chroot ubuntu)
5. grub-install /dev/hda [1]
5. Exit the shell
6. Reboot

So for the time this seems to work.


Does the installer use cached downloads?

The installer will re-use cached downloads.


How to make this "disable touchpad while typing" python script enable the touchpad faster?

Polling the inactive time at regular intervals as your current script does means that the touchpad will only be en-/disabled at a specific frequency. This leads to the following trade-off:

If the interval is too long, the time until the touchpad is enabled or disabled can be as long as the interval, in your case half a second.
Polling at a high frequency (e.g. every millisecond) would make the script react very fast, but leads to higher CPU load.

Conceptually, you can do the following:

Wait until a keyboard event occurs.
Disable the touchpad.
Based on the latest key event timestamp, the current system time and the delay after which you want to enable the touchpad again, you can calculate when you need to check for key events again and sleep until then. If after that time no additional key events have occured, enable the touchpad. Otherwise, calculate when you have to check again and repeat this step.

For example: A key was pressed at time 0ms. You want to enable the touchpad again after 350ms, so you know you can sleep 350ms. When you wake up, you see that another key was pressed at time 250ms. Based on that timestamp, the current system time (350ms) and the specified delay (350ms), you now know that you need to check 350ms after the last key event, i.e. at time 600ms, so you can sleep for 250ms again.

This way, you can make sure that the touchpad is immediately disabled when a key was pressed, and enabled again very close to 350ms after the last key was released without having to poll at a high frequency.

This script uses python-evdev to read key events. This has the advantage that we don't have to do any threading ourselves and we can easily wait for key events using a selector. The drawback is that the script needs read permissions on the keyboard's evdev device node so it has to be run as root (unless you want to add your user to the input group or change permissions by a udev rule).

Run sudo apt install python3-evdev to install python-evdev for python3. Change KEYBOARD_NAME, TOUCHPAD_NAME and DELAY to the desired values:

#!/bin/env python3

import subprocess
import time
import evdev
from evdev import ecodes
import selectors
from selectors import DefaultSelector, EVENT_READ

DELAY = 0.35 # time in seconds after which the touchpad will be enabled again

KEYBOARD_NAME = "SINO WEALTH USB KEYBOARD" # the name as shown by evtest
TOUCHPAD_NAME = "pointer:SINO WEALTH USB KEYBOARD" # the name as shown by xinput list

lastKeyPress = 0
touchpadDisabled = False
touchpadId = -1

ignoreKeycodes = [ecodes.KEY_LEFTCTRL, ecodes.KEY_LEFTSHIFT, ecodes.KEY_RIGHTSHIFT, ecodes.KEY_LEFTALT, ecodes.KEY_RIGHTCTRL, ecodes.KEY_RIGHTALT, ecodes.KEY_LEFTMETA]

def getKeyboard():
    for device in evdev.list_devices():
        evdevDevice = evdev.InputDevice(device)
        if evdevDevice.name == KEYBOARD_NAME:
            # If touchpad and keyboard have the same name, check if the device has an ESC key (which a touchpad probably doesn't have)
            caps = evdevDevice.capabilities()
            if ecodes.EV_KEY in caps:
                if ecodes.KEY_ESC in caps[ecodes.EV_KEY]:
                    return evdevDevice
        evdevDevice.close()
    raise OSError("Unable to find keyboard: " + KEYBOARD_NAME)

def updateLastKeypress(event):
    global lastKeyPress
    if event.type == ecodes.EV_KEY:
        if not event.code in ignoreKeycodes:
            lastKeyPress = event.timestamp()

def enableTouchpad(force=False):
    global touchpadDisabled, touchpadId
    if touchpadDisabled or force:
        process = subprocess.run(["xinput", "set-prop", str(touchpadId), "143", "1"])
        touchpadDisabled = False

def disableTouchpad(force=False):
    global touchpadDisabled, touchpadId
    if not touchpadDisabled or force:
        process = subprocess.run(["xinput", "set-prop", str(touchpadId), "143", "0"])
        touchpadDisabled = True

def main():
    global touchpadId
    keyboard = getKeyboard()
    touchpadId = subprocess.check_output(["xinput", "list" , "--id-only", TOUCHPAD_NAME]).decode("UTF-8").strip() # this will raise an exception if it fails since xinput will exit with non-zero status.
    selector = selectors.DefaultSelector()
    selector.register(keyboard, selectors.EVENT_READ)

    while True:
        enableTouchpad()
        for key, mask in selector.select(): # this is where we wait for key events. Execution blocks until an event is available.
            device = key.fileobj

            while True: # we will stay in this loop until we can enable the touchpad again
                try:
                    for event in device.read():
                        updateLastKeypress(event)
                except BlockingIOError: # this will be raised by device.read() if there is no more event to read
                    pass
                timeToSleep = (lastKeyPress + DELAY) - time.time()
                if timeToSleep <= 0.005: # you can set this to 0, but that may result in unnecessarily short (and imperceptible) sleep times.
                    # touchpad can be enabled again, so break loop.
                    break
                else:
                    # disable touchpad and wait until we need to check next. disableTouchpad() takes care of only invoking xinput if necessary.
                    disableTouchpad()
                    time.sleep(timeToSleep)

if __name__ == "__main__":
    try:
        main()
    except:
        # make sure the touchpad is enabled again when any error occurs
        enableTouchpad(force=True)
        raise


/etc/environment (or the user specific one -- $HOME/.pam_environment) is defined by pam_env PAM module, and in turn used by login, ssh and alike session startup programs to setup the startup environment for the user being logged-in.

/etc/environment does not understand any existing shell (or environment) variables, so $HOME in your case is being treated literally, no expansion is being done, hence the error.

You need to use absolute paths here e.g.:

ML="/home/foobar/ml"


I have looked up your Lenovo b575. Please make sure the PHYSICAL wifi switch on the front of the laptop is enabled.  Two thirds of the time when I am asked to help with wifi issues, it is that the user inadvertently turned off their laptop's physical wifi switch.


Getting MTP enabled devices to work with Ubuntu?

Since Ubuntu 13.04, storage access to external devices via MTP works out of the box via a GVFS-MTP module.

Related question: Are there any plans to improve mtp support on future Ubuntu releases?

For troubleshooting, see this answer.

For me, it was a problem of not having the latest libmtp files on my system. So I fixed the problem and made this write-up to help others.

Summary of the link: There was a bug in the libmtp bundled with older Ubuntu releases. This bug was already fixed in the latest source of libmtp.


The inotify kernel system is what you need.

Install inotify-tools:

sudo apt-get install inotify-tools

Set up a watch:

inotifywait /path/to/directory --recursive --monitor

Sit back and watch the output.

From man inotifywait:

-m, --monitor
   Instead of exiting  after  receiving  a  single  event,  execute
   indefinitely.   The default behaviour is to exit after the first
   event occurs.
-r, --recursive
   Watch all subdirectories of any directories passed as arguments.
   Watches will be set up recursively to an unlimited depth.   Sym‐
   bolic  links  are  not  traversed.  Newly created subdirectories
   will also be watched.

You can use the --event option to watch for specific events, like creation, modification, etc.


Error booting Ubuntu or every distro I try

I have adapted the answer from this question for the Ubuntu installer. It may get rid of the first error messages in your screenshot, which might in turn remove the later errors and allow you to boot.

Boot from your Ubuntu installer.
When you get to the GRUB boot menu, highlight "Try Ubuntu before installing" with the arrow keys and then press "e" to edit the boot entry.
Go to the line that begins with linux and add iommu=soft between quiet and splash, resulting in quiet iommu=soft splash
Press Ctrl-X or F10 to boot.

Please note that you will need to do this every time you try to boot your installer. If you manage to get Ubuntu installed you can permanently fix this by following the instructions in the linked answer.


SSD- Ubuntu 20.04 kernel panic mode on the 5th day,

Let's first check your Ubuntu file system for errors...

boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode

In the terminal app:

type sudo fsck -f /dev/nvme0n1
type sudo fsck -f /dev/nvme0n2
repeat the fsck command if there were errors
type reboot

Update #1:
Let's increase your /swapfile from 2G to 4G and see if that helps...
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 16G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile  none  swap  sw  0  0

---
reboot                    # reboot and verify operation

Update #2:
In reviewing new log files, nvme1 (Kingston) has a problem. It looks like it needs to be re-seated in its socket. Make sure it's pushed all the way in. Also need to check the firmware.


Ubuntu 20.04 primary display not recognized Nvidia graphics

Update, I fixed the issue via switching to the light dm display manager, and installing the PPA version of the Nvidia graphics driver, then following this tutorial: here


How to install Ubuntu Builder on Ubuntu 12.10

Open a terminal and run these commands  (it supports Ubuntu 12.10 and 12.04):

sudo add-apt-repository ppa:f-muriana/ubuntu-builder
sudo apt-get update
sudo apt-get install ubuntu-builder

If you have issues after installation, go here: https://code.google.com/p/ubuntu-builder/issues/list?can=1&q=&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles. There are a lot issues presented, some of them fixed.


How to uninstall Android Studio from Ubuntu 14.04 by using Terminal?

If you installed the .deb file then you can remove it using

sudo dpkg --remove android-studio

Or if you installed it via apt-get then you can remove it using

sudo apt-get remove android-studio

Have a read of How can I uninstall software? for more details.


Solved by using

sudo apt install xserver-xorg
sudo apt --resinstall install xorg

I also had to reset Xauthority privileges: https://www.youtube.com/watch?v=togIj3hfbDs


Get email notification for using 'sudo' by a specific user

After some experimentation, I found the answer.  To set options such as mail_always or root_pw for specific users, you can add a line like this to your sudoers file after opening with visudo:

Defaults:USER_NAME mail_always

Just make sure that this line is inserted near the top, where the other Defaults options are. In addition, if you want to specify the recipient of the emails:

Defaults mailto="youremail@domain.tld"


Install ubuntu 14.04 alone in Lenovo B575

Disclaimer: If you choose to do this, all data stored on your HDD will be lost. You should continue this only if you donot have any data, or you have taken Backups. Also there could be better ways of doing this, and do this only as a last resort. If you do this, you won't be abole to dual boot with newer versions of Windows anymore.

Upong googling a bit I found that UEFI implemented on Lenovo B757 model laptops are quite buggy. Also it came with Windows 7 pre installed usinh MBR patition table. Since you are not interested in Windows, you must change back to MBR and your problems should be solved.

I am assuming that you have a live CD/USB from which you installed Ubuntu. Load Ubuntu live environment from the CD. When you have booted into the desktop, press Ctrl + Alt + T to open a terminal. Type in:

sudo gparted

You have opened the Partitioning tool. make sure that your HDD is selected in the top right corner(if I remember correctly). If any of the listed partitions are mounted, then unmount them. Select Device->Create Partition Table. Choose ms-dos. Now you need to do the partitioning again from the same tool.

Finally when you are done, click Apply or the Green Tick Mark.

Exit gparted, install Ubuntu again. You are almost over, but don't forget this last step, or your system won't boot. Go to BIOS and choose Legacy instead of UEFI.

Now your system should boot!


Ubuntu 18.04 and nVidia. Stuck after boot

I found a solution on Ubuntu Forums.

These were the steps to solve the issue (post #3).

Turn on the laptop and press shift or esc during boot to show the GRUB menu
Press e and edit the line starting with linux adding nouveau.modeset=0
Press F10 to boot
Once logged in successfully, go to Activities (top left corner) > Drivers and install suggested nvidia driver.

After these steps everything works perfectly.

I have no idea why it worked. I understand that missing drivers where causing the issue, but can someone elaborate so I can completely understand why this solution actually worked?

The solution was proposed for Ubuntu 16.04. I had ubuntu 16.04 and worked like a charm on my laptop, but Ubuntu 18.04 introduced the same issue. Why?


Start With Normal Installation Procedure . as you done before
On these steps

Just Select Something Else

Then

Select Previous Ubuntu Installed Drive

Format it into ext4 and install in that ...

Hope this procedure will help you


Moto G not listed by Qt Creator / adb after upgrading to 15.10

I solved this by removing Ubuntu's android-tools-adb and restarting adb server from the Android SDK installation directory.


Can't log into Ubuntu 14.04. tried various solutions already

try to install

sudo apt-get install gdm

and

sudo apt-get install lightdm


Adobe Flash Player Issue In Chromium In Ubuntu

To fix this issue, use Pepper Flash Player, a safer and more stable version of Flash Player from Google.

Just run the following commands in terminal.

sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install

For More Detail : Source


Desktop application with file with environment variable

First, make sure that /appli/player/run.sh is executable and has an appropriate shebang line, so that it can be run directly (without /bin/bash). Then change the Exec line to

Exec=/bin/sh -c '. path/to/prod.env && /appli/player/run.sh start'

This will source the prod.env file, making its contents available in the environment in which /appli/player/run.sh start is executed.

You can replace /bin/sh with /bin/bash if you prefer, but sh is a lighter shell.


Trouble opening Ubuntu 14.04 after update on chromebook C720

I was just in the same predicament that you're in and I promised myself (sort of) that if I were to figure this out myself i'll help the rest with this issue, and I FIGURED IT OUT!

All you have to do is update your chroot or crouton with the following command line within the ChromeOS terminal:

sudo sh -e ~/Downloads/crouton -n -u <chrootname>

With chrootname being the name of your chroot (precise, trusty, etc.).
Based on your error, your chroot name is "precise", so you'll input this as the following command line:

sudo sh -e ~/Downloads/crouton -n precise -u

If you get some kind of error then it's more than likely that you've deleted your crouton file. Redownload that file here http://goo.gl/fd3zc if you did.
Then go back to the whole update crouton deal I just told you about. I hope this helps you dude!


There is an only way to fix this:
- Marlin should be able to draw the desktop
- Modify mimetypes in /usr/share/applications/defaults.list to call marlin instead of nautilus

Marlin won't be drawing the desktop as it's a file manager and not a
desktop drawer

BTW Elementary OS team has forked Marlin in a project known as Pantheon Files you can also check that out. Hope this helps


I tried this, and it worked:

Select the cells you want to copy (optional)
File / Export
File type: XHTML
Click on Selection checkbox (optional)
Choose filename and click Save button

The HTML file will contain both Link-Text and Link-URL


Will installing Ubuntu erase OS on chosen disk?

"Something else" is a manual configuration, so there are too many possibilities to give an accurate answer to this.

Generally speaking, installing to a partition with data on it will destroy that data.


Try booting into Ubuntu and run this command on a terminal:

sudo update-grub

It should detect all the installed systems in the laptop.
Then, reboot the computer. You can do it from the same terminal:

sudo shutdown -r now


Is the ubuntu OS the same version across Phones, Tablets, and PCs?

In fact, Windows 10 for PC and Windows 10 for phones are separate. They share appearance, apps and even name, but you cannot install Windows 10 for PC on a phone or vice versa.

The same applies to Ubuntu desktop and Ubuntu touch - you can run the same apps on both platforms,they share kernel, but they are intended for different devices.


When to run this command

When you run this command from /etc/rc.local, it is too early. Xrandr commands (just like commands to change keyboard and mousepad- settings) need to be run after login, with a little break.

If you run them too early, before the desktop is ready for it, they will either break, miss target or are overruled by local procedures.

To run it on login, with a little break:

If it is for one user, add the command:

/bin/bash -c "sleep 10 && xrandr --output HDMI1 --rotate right"

to Startup Applications: Add to Startup Applications: Dash > Startup Applications > Add.
If it is for all users, create a file:

[Desktop Entry]
Name=Set Screen Rotation
Exec=/bin/bash -c "sleep 10 && xrandr --output HDMI1 --rotate right"
Type=Application

save it as setscreen.desktop and copy it to /etc/xdg/autostart

Note

Possibly, you can play a little withe the value of 10 seconds, to optimize for your situation. If it is for a VM, you might need to set it longer, on a regular system, it could probably be shorter.


Remote Desktop for Ubuntu Server requires installing the desktop distro?

You should not need a GUI installed on the server (just the "skeleton" files installed with the package xserver-common), nor remote desktop, in order to use graphical package management tools. You can instead use ssh -X to connect to the server and run the application:

ssh -c blowfish -C -X username@hostname

You can leave off the -c blowfish and or -C, but if you do, your connection will likely be noticeably slower when running graphical programs. But if you were on a LAN with the machine, then I'd recommend leaving out -C and keeping -c blowfish.

(-c blowfish makes ssh use the blowfish cipher, which is as secure as the 128-bit AES cipher which is otherwise the default, but which tends to be computationally faster, decreasing latency. -C enables compression, if it's available, which increases speed on slow connections--including just about any connection over the Internet--by making it so that there is less data that needs to be transferred. However, -C is not usually helpful on very fast connections such as when the client and server are on the same local area network, because in that case the increased latency caused by performing the computational operations of data compression and decompression can more than cancel out the benefit of transferring a smaller volume of data. See the descriptions of the -c and -C options on the ssh(1) manpage, and Ciphers in the ssh_config(5) manpage, for more details about how to use those flags. And in general, if you are curious about how a command works, you can look at its manual page by issuing the command man command-name or online.)

Then you can install whatever graphical package management utility you want:

sudo apt-get update; sudo apt-get install software-center

Or: sudo apt-get update; sudo apt-get install synaptic

Or: sudo apt-get update; sudo apt-get install update-manager

(You can, of course, install more than one--after running sudo apt-get update, run a command like sudo apt-get install update-manager synaptic.)

Then run whichever utility you want to use, by typing its name (they all have the same executable names as package names...though that is not true for all software in Ubuntu) and pressing enter.

Since you're logged in with ssh -X, programs that you run on the remote server will display their windows and other graphical user interface element on the local (client) machine.

This will likely work out of the box when connecting from another Unix-like system. However, if the client is Windows, then you'll need to use an SSH client that supports X11 forwarding, and you'll need to have an X11 installed and running on the client machine. You can achieve this pretty easily with Cygwin (see the Cygwin/X User's Guide).

It is possible (and quite easy) to install GUI's on an Ubuntu Server system, though it is considered inadvisable to do so for a production system. You can do this yourself (assuming you have administrative rights on the system, and if you don't, then you cannot perform any package management at all!). See the Server GUI documentation. But please take note of the (good) reasons, explained on that page, for why you probably should not do this.


Try doing the forward port approach (works for more packages than just Gimp):

Add the precise main repositories to your system.

Create a file like /etc/apt/sources.list.d/precise-for-gimp.list containing

deb http://nl.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise main restricted
deb http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted

Replace the mirror (here nl.archive.ubuntu.com) with the one you would like to use.
Add a file with the appropriate pinning to allow downgrading of a certain set of packages, in e.g. /etc/apt/preferences.d/10-pin-gimp-to-precise:

Package: *gimp*
Pin: release a=precise-security
Pin-Priority: 1001

Package: *gimp*
Pin: release a=precise-updates
Pin-Priority: 1001

Run sudo apt-get update
Run sudo apt-get -s install gimp (-s to simulate only)
Check whether the output makes sense. If not, and it can't manage to satisfy the dependencies, then consider reverting the actions above. If it does work, then actually run the actions to be performed by re-running the previous command without the -s option.

This approach will provide you best flexibility and security-update support, as it's just using the repositories rather than a specific version. It may be a PITA to set up, though.


ubuntu 14.04 with windows 7 dual boot problem

You should perform boot repair on your system using the access to Ubuntu from USB.

Run following commands in terminal as root

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

this link will give you more methods and info on boot repair

this is the official site for  boot-repair


You have clam av installed. The problem is with google chrome.
First, open software center. Click on 'edit' and then 'software sources' to open the software sources window. Once that is open, check the box that says, "Community-maintained free and open-source software (universe)."

Now, all the universe packages should show up in software center just like all the other ones.

More information:

How do I enable the "Universe" repository from the command line?

update your system and you should now be able to install google-chrome-stable.

sudo apt-get update
sudo apt-get install libgconf2-4 libnss3-1d libxss1


Lenovo IdeaPad P400 Brightness not working - Ubuntu 16.04.3 LTS

I could not find a solution yet, but here is a  workaround that works pretty well. I took the steps belows to control brightness from the keyboard with brightness-indicator software:

Download and install Intel Graphics Update Tool for Linux

Run the tool to dowwload and upgrade drivers
Get and update latest mesa drivers

sudo add-apt-repository ppa:ubuntu-x-swat/updates
sudo apt update && sudo apt dist-upgrade

Create a new file

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

and paste the following

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        Option      "AccelMethod" "sna"
        Option      "TearFree" "true"
        Option      "DRI" "3"
        BusID       "PCI:0:2:0"
EndSection

Close and save the file
Modify and update grub

sudo gedit /etc/default/grub

and set

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Then run:

sudo update-grub

Install indicator-brightness

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

Create keyboardshortcut

Setting > keyboard > shortcuts > Custom shortcuts > '+'`

Name: Up brightness
Command: /opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --up

and

Name: Down brightness
Command: /opt/extras.ubuntu.com/indicator-brightness/indicator-brightness-adjust --down

Click on 'disable' to set the keyboard shortcut


Wake up monitor from standby and show the screen without blocking further standby [Ubuntu 16.04]

The only thing I could find on your situation was this webpage (Can't wake up monitor once dpms put it into sleep) from Archlinux. It's a long read but at the very bottom one poster recommends your script say this:
sleep 1 && xset dpms force standby && sleep 8 && xset dpms force on

Note this user tip implies it is based on having turned off DRI3 in /etc/X11/xorg.conf.d/20-intel.conf and using DRI2:
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option "DRI" "2"
EndSection

Please note this is the best I could come up with for your problem and felt compelled to post it because there have been no other answers. Since I can't reproduce your problem I have no idea if it will work for you as it has for others.
If it doesn't work I encourage you to google as much as you can using appropriate keywords.


My problem was that network-manager-openvpn-gnome was not installed, (weird because I though it would get installed automatically after installing network-manager-openvpn). I installed it and everything was fine.

So, to all people having the same problem make sure that

sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome

after installing, restart the networking service, e.g. by executing

sudo /etc/init.d/networking restart


I'm guessing you have about 125 folders? That would explain the differing number of files.
The difference in size can be caused by a number of factors, I guess Windows reported GiB's => 15GB*1024*1024*1024 = 16,106,127,360  and Linux is reporting in GB's => 16,2GB * 1000,000,000 = 16,200,000,000. The difference between 16.1 and 16.2 can easily be a rounding error in my example.

You can check #1 from the commandline:

$ find your_folder -type f | wc -l
$ find your_folder -type d | wc -l

The first line will report the number of files.
The second line will report the number of directories.

You can check #2 from the commandline:

$ du -sh your_folder
$ du -s -si your_folder

The first option will report in GiB, the second in GB.
https://en.wikipedia.org/wiki/Gibibyte


How to clone Ubuntu into same machine with new partion?

In my case I not have enough space for my Ubuntu system drive which is I frequently use.
So I want more space and want to back up to avoid anything wrong with my data.But I not have any other storage device to backup.

First Step:- By using Disk Utility , I delete My Scientific Linux drive. For get extra 30 GB space. and make partition 53.GB

second Step:- I restart Computer. And start BOSS Linux.
3rd Step:- RUN DD command into BOSS Linux to make clone of Ubuntu Drive.

Before restart PC I install GRUB loder into BOSS Linux.

Then Start Ubuntu 14.04 then One problem occurred their. 53GB drive only shows 20GB space.

Then I use Gparted utility to solve it. Again one problem occurred.
  solve it run command into terminal. $ e2fsck -f /dev/sda13
I try make re-size the drive and re-size successfully. After that I restart again my PC and start Ubuntu for check problem.  problem solved.
 Again start BOSS Linux to format old Ubuntu drive. Restart PC and select Ubuntu 14.04 and finally install Grub into Ubuntu.And it solve my problem without any other external or internal extra storage devices.
NOTE:- But its better and strongly recommend that keep back-up before do it. You can be able do it by using Live CD or boot repair disk.   For that I so much thankful of edward-torvalds and Helio without their valuable info, guidance, and reference it is impossible to solve it for me. Thanks.


There is currently no way to do this.  However, there is an open ticket to implement this behavior:
http://trac.yorba.org/ticket/3727


Screen brightness stuck on max setting, FN+down only brings it down one level

I had a lot of trouble with my Intel integrated graphics card also, until I made a very minor tweak.  In terminal, do:

sudo nano /etc/default/grub

Then go down to find these two lines:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

GRUB_CMDLINE_LINUX="acpi_osi=\"!Windows 2012\""

Notice the addition of backslashes (escape sequences) and quotes... try to copy that line in there exactly as it is above.  Also, were you performing, in terminal:

sudo update-grub

After every change you made?  If not, that may have something to do with why you never saw a change or difference.

EDIT:
Brightness controls stopped working after update on a Samsung QX412-S01AU

This user says that this fixed it for him, exactly as he wanted, for almost the same model laptop (Samsung vendor apparently only):

GRUB_CMDLINE_LINUX_DEFAULT="nosplash acpi_osi=Linux acpi_backlight=vendor"

In version 3.2.0-27 and perhaps a few versions after, you needed this (only try this if the above does NOT work):

GRUB_CMDLINE_LINUX_DEFAULT="nosplash acpi_osi="

After making the changes, do:

sudo update-grub

Of course, reboot once more, and test again, although... you may also want to un-do any changes you manually made to brightness setting files, hoping you made backups.  They could potentially contribute to this not being corrected as it was for the user above.


Is it possible to get the old Software Center back?

As an alternative, you could try Synaptic. It is also a package manager, but with a lot more functionalities.


Cloud server stuck on dpkg --configure -a

You're running into bug 634487.

The work arounds are:

use x86_64 instance type
stop instance, start as m1.small, dpkg --configure -a, stop, start as
t1.micro


How can I enable USB type C connectors on 15.10?

There are multiple parts to answer this question, first is does the linux kernel support USB Type-C; the answer is yes. The next thing to consider is, does the kernel you're currently using have that functionality yet? That's probably yes unless you're using a really old version of Ubuntu.

The next part is the important part: Does your USB host controller have a driver in the kernel? To find the answer you can type lspci -d ::0c03 -k you should find output like this:

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
    Subsystem: CLEVO/KAPOK Computer 8 Series/C220 Series Chipset Family USB xHCI
    Kernel driver in use: xhci_hcd
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
    Subsystem: CLEVO/KAPOK Computer 8 Series/C220 Series Chipset Family USB EHCI
    Kernel driver in use: ehci-pci

Intel chipsets usually have the best support, and most usb chipset makers claim to have linux support on their websites for their USB Type-C chipsets. If you need more specific information about your type of usb controller, you can ask a question with this information in it.

If you have a driver, then the next part is to see what happens when you plug something in in the kern.log file, type tail -f /var/log/kern.log and plug and unplug some usb type-c device. For a usb-2 device, this is the kind of output one would see:

Jun  3 14:29:24 delen kernel: [10007.452686] usb 3-2: new low-speed USB device number 4 using xhci_hcd
Jun  3 14:29:24 delen kernel: [10007.584351] usb 3-2: New USB device found, idVendor=13ee, idProduct=0001
Jun  3 14:29:24 delen kernel: [10007.584356] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun  3 14:29:24 delen kernel: [10007.584359] usb 3-2: Product: AND
Jun  3 14:29:24 delen kernel: [10007.584361] usb 3-2: Manufacturer: MOON
Jun  3 14:29:24 delen kernel: [10007.584363] usb 3-2: SerialNumber: @ɌAB
Jun  3 14:29:24 delen kernel: [10007.584567] usb 3-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
Jun  3 14:29:24 delen kernel: [10007.599137] hidraw: raw HID events driver (C) Jiri Kosina
Jun  3 14:29:24 delen kernel: [10007.604255] usbcore: registered new interface driver usbhid
Jun  3 14:29:24 delen kernel: [10007.604258] usbhid: USB HID core driver
Jun  3 14:29:24 delen kernel: [10007.606568] input: MOON AND  as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:13EE:0001.0001/input/input26
Jun  3 14:29:24 delen kernel: [10007.606725] hid-generic 0003:13EE:0001.0001: input,hidraw0: USB HID v1.00 Mouse [MOON AND ] on usb-0000:00:14.0-2/input0
Jun  3 14:29:27 delen kernel: [10010.189280] usb 3-2: USB disconnect, device number 4

If you see nothing happening, then you don't have a driver or it doesn't really work (or the thing you're trying to plug in is switch off or broken).

You can use the log information above to understand what might be happening, it documents things like device use switching (power vs. data vs. display) and can tell you a lot about why the mode you want isn't being used.

The last part of usb type-c is as a display port. I could only find information about Google Chromebooks which have this port and no information about if the functionality had made its way into the mailline kernel (google does not always push for upstream patches of it's kernel code).


You commented

I have sound!!! It worked with:
sudo gedit /etc/modprobe.d/alsa-base.conf

Add the following line to the end of this file:
options snd-hda-intel dmic_detect=0

[as suggested at] https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/

(In systems earlier than 19.10, you should use sudo -H gedit rather than sudo gedit)


Autorun program after connecting Arduino nano

NOTE: Answer is under construction, will be updated in steps.

General approach to run a script when a USB device is connected is to have a udev rule. UDev is a device manager system for Linux kernel, which has some userspace tools available. In particular, triggering a script upon device connection has been outlined in How to run custom scripts upon USB device plug-in? and in accepted answer on USB and Microcontroller communication problem.

Basic steps:

Launch udevadm monitor or dmesg -w.
Connect the arduino
Note the output from commands in step 1
Create  /etc/udev/rules.d/arduino.rules file. You will need ATTRS{idVendor} and ATTRS{product} at least to make it work, the script should be launched via RUN+="/full/path/to/script.py" parameter. There are examples online, for instance, strawlab/arduino-udev on github shows how UDev rules for Arduino Nano could look like


14.04 w/ Intel HD 4000 display crashes when changing resolution

For compiz flickering, install compiz-config-settings-manager:

sudo apt-get install compiz-config-settings-manager

to run:

ccsm &

Then, click on open-gl and set texture filter to fast and set the same as shown here (lighting off, sync to vblank on, texture compression off, framebuffer, vertex and always use buffer swapping all on.

Next, click on composite, disable slow animations, enable detect refresh rate, set refresh rate to ac freq, and force independent you can experiment with.

Now, disable copy to texture and maybe disable all animations unless you actually want any of those.

Finally, with mate, I believe you should have the mate plugin enabled as well.

For window decorations, enable the window decoration plugin.


After installing cinnamon ,can't change access ubuntu wallpapers

You need to click the "Add" button and add the individual files you wish to choose from.

Or, if you're feeling up to it, copy your favourite wallpapers to $HOME/.cinnamon/backgrounds and they'll be in the list when you open the Cinnamon background chooser/changer.

Or, even better, just make backgrounds a symbolic link to /usr/share/backgrounds/ and you'll have access to all your old Ubuntu wallpapers.


Permissions to view video file without being able to copy

Short answer: You can prevent users from moving the file, however you can't prevent them from copying the file while they're able to read (watch) it.

When you are moving a file, simply you are creating a new hard link to that data in another directory and at the same time you are removing its entry from its current directory.

So to prevent moving a file, you should remove the write access of others from its parent directory:

chmod 775 Directory

Now others can read (watch) the file however they can't move it. do not forget that the file itself should have a permission similar to this:

chmod 664 File

so others can't mess around its content.

For making a copy of a specific file, you just need to be able of read it, when you can read something you can make a copy of it.


I am unable to connect to wifi. Settings > Wi-Fi shows "No adapter found" in 18.04 UBUNTU. Using an hp pavilion g6 2313ax

Please note the error:

rt2800_probe_rt: Error - Invalid RT chipset

A search for the error returns this: https://ubuntuforums.org/showthread.php?t=2257359

  Ok so it didn't work on win7 either so I plugged it out and cleaned
  everything with vacuum cleaned, and it just worked!

And this: https://lists.opensuse.org/opensuse-bugs/2015-11/msg03170.html

  The problem appears likely either a BIOS or a hardware problem, so I
  would
      check BIOS setup (reset, or complete clear by removing CMOS battery) and
      proofing the WiFi adapter connection.

In this context, I believe that “...proofing the WiFi adapter connection” means to make sure that the contacts are clean and the card is securely seated in the PCI slot. Basically, that means exactly the same as the above post.

In short, I believe it is a hardware issue and not a driver or operating system issue.


Can I restore applications settings from a back up of Ubuntu on a fresh install Lubuntu? (same machine)

The question is a bit generic, so the answer is a bit generic, too: yes, probably.

Most applications save their settings either

in a hidden subdirectory of your home directory named after the application, e.g. ~/.thunderbird,
in a directory in ~/.config/, e.g. ~/.config/evolution, or
in a hidden file in your home directory, again named after the application, with an append rc, e.g. ~/.vimrc

If you locate the appropriate directory or file and copy it to your new home, the application will (usually) use those restored settings.

Update: Changing the hardware doesn't matter as long as the configuration is not specific to that hardware – most configs are not, though.

A different user name might cause problems if the config uses full paths – like /home/olduser/.something – instead of paths relative to the current user's home.

Also, on a new installation, the user id might differ, so make sure the files belong to your new user.

In a nutshell, changing the hardware and/or the user id might introduce some small problems, but nothing that can't rather easily be dealt with.


After upgrade to Xubuntu 20.04.1 white screen after login

Solution was run amdgpu-pro-uninstall and return back to stock drivers (i event didn't know that i was using proprietary drivers)


Receiving error: no alternatives for mozilla-flashplugin

my advice run from Terminal:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove (if necessary)

after install Ubuntu Tweak:

sudo apt-add-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

start Ubuntu Tweak going to Dash panel type ubuntu-tweak, once it opened click on a tab apps and then navigate to browser there you'll be presented with browser bundles available like Google Chrome offered in 3 ways stable, unstable and beta choose and tick the one you desire to run a stable release bundle or experience new features in beta or alfa release depends on you.

P.S.

You can also find a lot of interesting stuff in Ubuntu Tweak


Hi you need to configure hostapd

I have configure following in hostapd /etc/hostapd/hostapd.conf with WPA authentication options for wireless users

01 interface=wlan0

02 driver=nl80211

03 ssid=dontMessWithVincentValentine

04 hw_mode=g

05 channel=6

06 macaddr_acl=0

07 auth_algs=1

08 ignore_broadcast_ssid=0

09 wpa=3

10 wpa_passphrase=KeePGuessinG

11 wpa_key_mgmt=WPA-PSK

12 wpa_pairwise=TKIP

13 rsn_pairwise=CCMP

sudo hostapd /etc/hostapd/hostapd.conf

In graphical way u can try this link

http://www.howtogeek.com/116409/how-to-turn-your-ubuntu-laptop-into-a-wireless-access-point/


How does a complete computer idiot like me upgrade

If your Ubuntu version is really old, the best suggestion from me would be to download the latest Ubuntu (12.04) and freshly install it, rather than having to update packages, do some settings, make backup then finally upgrade. Plus you should know that when upgrading there is more chance of.....how can I say it........screwing up your PC (lots of files missing, bugs etc etc its a long list) and end up getting into a big mess and as you said it 'computer idiot' you won't be able to handle it.

Trust me its for your own good.
Download the latest Ubuntu from here >> http://www.ubuntu.com/download


Broadcom BCM4321 wireless doesn't work on battery

You could try finding out what driver your wireless card uses by running

lsmod | egrep "b43|wl|brcm80211"

and then running

sudo rmmod yourdriver
sudo modprobe yourdriver

Since your wireless card is the BCM4321, you're likely running the wl driver (a.k.a. Broadcom STA), so you would run

sudo rmmod wl
sudo modprobe wl


no video with support format and mime type found

I've just tested the link that you provided in your question and it works for me. After a quick check it seems that you just need to install a Flash player to watch such videos.

Open the Software Center and install flashplugin-installer.


Can we write pid into a file which store in systemd?

The way I'd approach this problem is this way:

ExecStart=/bin/bash -c 'echo $$ > /var/run/tset.pid; exec /usr/bin/java -jar /var/www/tset.com/*.jar'

There's a couple things that require attention:

what you're trying to do is to write .pid file which contains the PID of the process, and on Linux the "de facto" location is to put it into /var/run
The > operator is for redirecting stdout of echo, which will be the contents of $$ or the shell PID.
Why shell PID ? Well, that's because next thing we're using is exec command which will replace shell process with your java application. What was PID 1234 representing shell will now be 1234 representing java application.

Such approach, while seems convoluted, is actually more appropriate:

we know the PID instead of using ps or pgrep to find it, we don't have to apply complex parsing, nor we have a problem if there's multiple instances of the application running already ( which shouldn't be the case if you're using a systemd service to start it, but there's no harm in accounting for a possibility of that as well )
and with exec resources won't be wasted for starting multiple processes. When you have something like bash -c '/usr/bin/java -jar myapp.jar & pgrep -f myapp.jar > /var/run/myapp.pid ' that's 3 processes. In the above command suggested - we have one process replacing another.

Of course, this is just an example. Adjust how necessary to your case, and /var/run/tset.pid is chosen here just as an example - naming is up to you as well as location of the file, though I'd recommend using /var/run for consistency with other applications.

Side note:

The | echo $! > ${RUNNING_PID}" part wouldn't be appropriate for at least one reason: ${RUNNING_PID} is a variable, however it is not declared anywhere, so it would be a replaced by plank in shell. | is pointless - stdout of java application is connected to stdin of echo which in case where you want output of application sent to another application is appropriate, but echo does not read stdin - i.e. here it is pointless.

Of course, if the application itself ( i.e. the java application ) forks - i.e creates - another process the $$ won't help much, though to be perfectly fair if the application does indeed create multiple forks then it probably should be the job of the application itself to create and manage the .pid file and report main process pid.


How can I make bash update without restarting it after removing an alias?

When you remove an alias from the .bash_aliases it isn't removed from the bash aliases.

If you want to have only the aliases in the .bash_aliases you will need to clean all bash shell aliases, and afterwards loads the aliases from the .bash_aliases

Clear all Linux / UNIX bash shell aliases

If the -a option is given, then remove all alias definitions.

$ unalias -a

Assuming that all your aliases exists in ~/.bash_aliases (I suspect that you are using aliases from other sources as well...) you should execute unalias -a follows by the command to source ~/.bash_alises

Your code should look like this:

alias gali='gedit ~/.bash_aliases;sort ~/.bash_aliases -o ~/.bash_aliases;unalias -a; source ~/.bash_aliases'


How to apply Mac like 'labels' on nautilus?

Install the gnome-color-chooser package.

Open GNOME Color Chooser and switch to the Desktop tab.

Check beautify icon labels (needed for icon label settings!) and then set your label text and background colors:

Click Apply.


Switching between ethernet interfaces on Ubuntu 10.04 server

mediageek posted this as a comment. This may essentially be the answer, and it's the best we've got (so far), so here it is:

  You can configure a script in /etc/network/if-post-down.d/ folder
  (it exists in ubuntu 11.10 at least). I think these scripts are
  executed after ("post") a device is disconnected. I don't know the
  exact details for such a script, nor if it works in 10.04, hence I
  posted this as a comment.

– medigeek Apr 12 '12 at 8:57

To complete that, I believe it may be sufficient to do this:

Create a script called start-eth1 in /etc/network/if-post-down.d directory by running:

cd /etc/network/if-post-down.d
gksu gedit start-eth1

Give it these contents in the text editor (then save the file and quit the text editor):

#!/bin/sh
[ "$IFACE" = eth0 ] && ifup eth1

I believe that will check to see if the interface being disconnected is eth0, and if it is, then it will start eth1.
Make the script executable so it will be run:

sudo chmod +x start-eth1

Please understand that I'm not sure how well this will work (or even if it will work).

If anyone has more information about this please feel free to edit this to improve it, and/or post a new answer.


How do I remove 'Places' entries from the Nautilus sidebar?

Tested in Ubuntu 14.04

Those bookmarks are controlled by ~/.config/user-dirs.dirs and commenting out a lines configures the appearance of the list

As an example, to remove the Videos bookmark from the list change the line:

XDG_VIDEOS_DIR="$HOME/Videos"

to

#XDG_VIDEOS_DIR="$HOME/Videos"

Note:
After login the file ~/.config/user-dirs.dirs gets reverted to the original set by /etc/xdg/user-dirs.defaults. To prevent that make the file "read-only" either by right clicking and then properties > permissions or using the command

chmod -w ~/.config/user-dirs.dirs

If you need to edit the file again do the opposite via Nautilus or use the command

chmod +w ~/.config/user-dirs.dirs

If you want to apply this to all users in your system change the file vim /etc/xdg/user-dirs.conf and set the option enabled to False. You need root permissions or this.


Clementine cannot open files: Can not find 'kioslave' executable

Then remove Snap version and install deb-version instead by
snap remove clementine

sudo apt-add-repository universe
sudo apt-get install clementine

Note: when versions are equal, then deb-package is preferred way to install, IMO.


Xubuntu 13.10 unable to connect to router (with internet connectivity) via ethernet

what does ifconfig tell you?
It should give you what IP Address has been assigned to the Ethernet connection.


By default, the standard GNU version of echo delivered with Ubuntu, doesn't recognize escape sequences. Use the -e flag to enable that.

Compare the outputs:

serg@ubuntu(bash):[/home/xieerqi]$ echo "new\nline"
new\nline
serg@ubuntu(bash):[/home/xieerqi]$ echo -e "new\nline"
new
line

In general echo in scripts isn't recommended. For instance, mksh version of echo does allow interpreting the escapes.

For portability of scripts, use the printf function.

serg@ubuntu(bash):[/home/xieerqi]$ printf "new\nline\n"
new
line


Safely removing USB 3.0 drive freezes the system - why and how to fix?

This is known problem with latest 4.4.0-139-generic, 4.4.0-140-generic and 4.4.0-141-generic Linux kernels.
On launchpad it is known as bug 1803929 (currently confirmed by 17 users).

The temporary solution is to use 138 ( 4.4.0-138-generic ) kernel.

So I have deleted 139, 140 and 141 kernels by:

sudo apt-get purge linux-image-4.4.0-139-generic linux-headers-4.4.0-139-generic \
linux-image-4.4.0-140-generic linux-headers-4.4.0-140-generic \
linux-image-4.4.0-141-generic linux-headers-4.4.0-141-generic
sudo apt-get install amd64-microcode intel-microcode thermald
sudo apt-get autoremove

and wait for 142+ kernel with the fix.

Warning: do not upgrade kernel to 4.4.0-139-generic, 4.4.0-140-generic or 4.4.0-141-generic if you need to keep your data safe on USB 3.0 external disks. Subscribe to the bug 1803929 and after the confirmation of the fix - install newest kernel back with sudo apt-get install linux-image-generic linux-headers-generic .


How can I set "Global Keyobard Shortcuts" to the Snap foobar2000?

Thanks to how the snap has been prepared, this is easy to realize.

The snap package of Foobar defines several contextual actions for the launcher. Inspecting the launcher, /snap/foobar2000/242/usr/share/applications/foobar2000.desktop, you can see the command you can use to implement these global shortcut. This is the relevant section of the .desktop file.

[Desktop Action PlayPause]
Name=Play/Pause
Exec=foobar2000 -playpause

[Desktop Action Stop]
Name=Stop
Exec=foobar2000 -stop

[Desktop Action Next]
Name=Next
Exec=foobar2000 -next

[Desktop Action Prev]
Name=Prev
Exec=foobar2000 -prev

[Desktop Action Random]
Name=Random
Exec=foobar2000 -rand

[Desktop Action Config]
Name=Preferences
Exec=foobar2000 -config

The command which foobar2000 shows you that the executable is located in /snap/bin. To define your shortcut to start/pauze playing, use the command

/snap/bin/foobar2000 -playpause


Conversion of png with alpha channel to jpg (without causing background artifacts)

It looks like you are suffering from issues due to the alpha channel in your PNG.
You can remove this and replace with a background of you choice using the following command:

convert cat.png -background white -alpha remove cat.jpg


How do I get suspend working on an HP DV4T?

This page may help:
https://help.ubuntu.com/community/SwapFaq

Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.