Why four tasks named kslowd eat CPU time?

There seem to be several bug reports about this in the 2.6.35 kernel (the one that's included in Ubuntu 10.10).

Edit:

These are (some of?) the kernel bugs involved:

https://bugzilla.kernel.org/show_bug.cgi?id=16265
https://bugzilla.kernel.org/show_bug.cgi?id=18802
http://bugs.freedesktop.org/show_bug.cgi?id=29536

It seems like there is a workaround, but it doesn't always work (automatically).

You can try to see if the following helps:

sudo -c sh "echo N > /sys/module/drm_kms_helper/parameters/poll"


How do I download Ubuntu One files to my mac?

I'm currently maintaining an open source Ubuntu One client for OS X. Check it out on Github.


Try pressing 'shift' or 'escape' immediately after starting the VM to show the GRUB menu. Then choose the 'recovery' option. From there you should be able to choose 'free up disk space' or 'root shell', and from the root shell you can resize the partition and filesystem.

Alternatively, boot the VM from a recovery ISO image.


virtual machine loses internet connection if anything happens to host internet connection

This problem is very familiar as it seems and I have experimented a little and it turns out that you can change the network adapter while the VM is running here:

and then change only the Attached to: option to NAT or Bridged Adapter (mine was on Bridged adapter so i changed it to NAT).

and click OK. And then change it again to which it was before and again click on OK to accept it.
Now go back to your VM terminal and run this command
sudo /etc/init.d/networking restart

Update:
for Ubuntu 18|20 run
sudo apply netplan

to restart Networking
And the internet connection will work without reseting the VM.


Wubi downloaded and installed 64bit 12.10 on my 32bit netbook

I'm not sure if your best shot is to install it by Wubi. You should try to download the 32-bit ISO from the Ubuntu site (via Torrent or alternate) and then mount it on a virtual drive, burn it on a disc or mount it via USB. This should get the installation work properly. Have a nice day!


Yes, if all the files were installed to a directory inside your $HOME, then simply delete that directory.


Unable to run node commands with new user

node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:

$ node -v

To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:

sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config

Replace  your-username in the above command with your own username.


The scroll feature in the Unity launcher is not about restoring or minimizing windows. It is for scrolling through the open windows for that application. If the app only has one window, then that's the only one that will open up, when scrolling. If it has multiple windows open, scrolling on that apps icon will cycle focus through the open windows.


I don't know you're level of experience, or knowledge of Linux, so if it seems I'm being simple, don't take it personally.
In my opinion, the best way to keep a certain distro (that is not a rolling release) is to make sure the / (root directory) and /home (home directory), this way when a new version comes out, I can install the new version on the same drives/partitions, formatting the root partition, and NOT formatting the home partition. This way you can install it, and you still have all you files and settings, you just need to install your apps again, which is the only real downside.

Now if you used the Ubuntu update tool, when you left, and let it go by itself, there may have been issues which you were not there to see, and correct. You should always stay when doing something as important as  upgrading your entire OS.


Cannot access basic functionality Ubuntu 16.04

Try installing the VBoxGuestAdditions by going to Devices (while the VM is running) and selecting "Install Guest Additions..." and then installing as if this was from a disk.
This seems to be the answer to most graphical issues in VBox.


Check this out. It was helpful for me! Click me


Clear boot messages and open terminal on TTY1

Ok, I figured it out.

For some reason getty@tty1.service was disabled in systemd

So all I had to do was

# systemctl enable getty@tty1.service


Skype keeps microphone open after call ends

Quick update: I confirm that the behavior persists after every Skype call, even after updating Skype with the signed package from Microsoft (which should remove the package and reinstall it).
I asked the same question on Microsoft Answers, where it got a useless answer by a "Microsoft Agent" after 3 weeks and was locked shortly after, before I even noticed the answer, so I did not have the occasion to reply. 5 people clicked on "I have the same question" though.
TL;DR: sketchy microphone handling under Skype for Linux confirmed. Microsoft dodges the question.


interface name mismatch bionic ubuntu 18.04

There was a problem with the kernel parameters passed at the boot time
acpi = off. I used this option specifically to overcome kernel panic issue listed here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772038. After removing the parameter and only keeping the nolapic has solved both the kernel panic and interface naming issue.


It's likely you have File Manager running on startup which has a different set of icons in Ubuntu. If you open the app Advanced Settings, and uncheck 'Have file manager handle the desktop' disabled this might help.


Install HP 5740 office-jet all-in-one on ubuntu 15.04

I'm using Ubuntu 14.04 and I download and install the newer Hplip driver from this page
http://hplipopensource.com/hplip-web/models/officejet/officejet_5740_series.html

Everything works for me (I do not test fax) with a wireless connection.

hplip version is 3.15.7 and
XSanne recognize the scanner immediately

Fred


Unique id for combination of Latitude - Longitude

You haven't been very specific in the details, so I will presume that your file contains only the data that you have mentioned, and the formatting is consistent. I will also presume that your file is white-space delimited.

Hence, the input file looks something like this.

1°2'3" 4°5'6"
2°3'4" 5°6'7"

or this

1.23 4.56
2.34 5.67

In that case, then run this command

awk '{print $1,$2,$1$2}' /path/to/input.csv > output.csv

which will produce this

1°2'3" 4°5'6" 1°2'3"4°5'6"
2°3'4" 5°6'7" 2°3'4"5°6'7"

or this

1.23 4.56 1.234.56
2.34 5.67 2.345.67

If your file potentially contains duplicates, you can remove them with the following command instead.

awk '{print $1,$2,$1$2}' /path/to/input.csv | sort | uniq > output.csv


Intel seems to have a Firmware for their card available at https://www.intel.com/content/www/us/en/support/articles/000005511/network-and-i-o/wireless-networking.html

The guy at Ubuntu 14.04 Intel 7260 AC Wireless driver does not work properly has the same question as you. You seem not to be the onlyone with issues related to that card. But they should be corrected already.


Your nodes should be in states ready when you bootstrap Juju On MAAS. Make sure your nodes aren't in the state deployed before bootstrapping


Is it possible to save Ubuntu configuration?

If you are willing to read a little bit, ansible could be your friend here. You could build a simple playbook to deploy your packages automatically, distribute configuration files, and change system settings. Cloud-init could also be of use here, however I do not have experience with that tool. A simple ansible playbook that would just deploy your packages would look like(considering all are available in default repos):
- hosts: target_host
  become: true
  vars_files:
    - /path/to/vars/file/if/needed
  tasks:
    - name: Install Dependencies
      apt:
        pkg:
        - php=version
        - mysql
        - java-default
        - composer
        - npm
        - elasticsearch

You can also do a system backup with something like clonezilla or Veeam (the free veeam product for Linux does not require a reboot, and allows you to build bootable media for restores), though at that point you are going to have to worry about the underlying hardware matching that of your existing VM.
Basically, I do not believe there is a simple answer to throw at this. It may also be worth checking with your hosting provider to see if they have cloning functionality / image creating functionality (I know this is easy to accomplish in azure).


Has Windows 10 update wiped my linux partition?

When using dd to erase a USB on /dev/sdd I accidentally used /dev/sdb and wiped out the first 1 MB of my second hard disk. This erased the MBR (Master Boot Record) and partition table.

TestDisk can be downloaded here and has versions for Windows and Linux. It goes through every byte of your hard drive to analyze what partition type it is and rebuilds the partition tables. I used TestDisk to successfully recover all my data.

From the website, TestDisk can:

Fix partition table, recover deleted partition
Recover FAT32 boot sector from its backup
Rebuild FAT12/FAT16/FAT32 boot sector
Fix FAT tables
Rebuild NTFS boot sector
Recover NTFS boot sector from its backup
Fix MFT using MFT mirror
Locate ext2/ext3/ext4 Backup SuperBlock
Undelete files from FAT, exFAT, NTFS and ext2 filesystem
Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.


Respondus Lockdown Browser required, can only use a Linux system

The cached version of that page is mentioned here in the comments.

And here is another page which might be useful.

Perhaps it is a good idea to start a signature campaign asking the Respondus company to support Linux, as well as Virtual machine usage.
Only supporting Windows and Mac and no Virtual machine by them, is basically locking countless of Linux using people out.


First Boot Not Happening [ 7.471657] Adding 4041724k swap on /dev/sda7 Priority :-1 extents: 1 across :4041724k FS

We discussed about the problem in this chat room.I thought that something weired happened during the installation process.So i asked him to reinstall Ubuntu on the same /dev/sda6partition.He does it and it works for him.

Steps:

Boot Ubuntu live disk and choose Install Ubuntu option on startup.

After that choose "something else" option,so that you can be able to install Ubuntu on a partition where we wants.

Choose /dev/sda6 and format it to ext4 filesystem.

Then install Ubuntu on the same formatted partition.

After the installation completed, remove your installation medium and boot from your HDD.

Grub will appears and prompts you to choose the Os's on startup.


Ubuntu 15 desktop files outside main area

I fixed it by going to Settings > Displays and I realized the 2 screens were not aligned. I just drag and dropped the left screen to be aligned with the right one and everything is back to normal.

Align displays


How to store the array length in a variable in bash scripting language

Your syntax is basically correct. (You don't need any of the ; there but that's not a problem.)

It seems that somehow your script is not really executed, because:

echo ${#nonexistentarray[@]}

This will always print a number that's 0 (if the array doesn't exist) or higher (if the array or the variable exists).

So in your script, if these two lines are really executed:

lastIdex=${#usersArr[@]};
echo "$lastIndex";

....... ok... There's a typo there: you're setting the value in lastIdex but then printing lastIndex... So probably that's your problem.


right click menus, dropdown menus have no shadows and borders

OK, so kde changed some files and they were the culprits. Deleting

  ~/.config/gtk-3.0/settings.ini

brought back the menu shadows/borders.


sudo ~/.dropbox-dist/dropboxd not working on cron job

Generally speaking, crontab is not aware of environment variables.
You should indicate the full path. In this example it may be:

/home/youruser/.dropbox-dist/dropboxd

sudo may need a password, so it may not achieve what you expect in a cron job.
It may just be an example, but I am puzzled by the fact that you need to run the Dropbox deamon every minute.


Try for stop fan

sudo echo 0 | sudo tee /sys/class/thermal/cooling_device*/cur_state

or

sudo echo 1 | sudo tee /sys/class/thermal/cooling_device*/cur_state

for start fan


Picasa 3.9 login fails with 2-factor authentication

Only solutions that works for me is downgrade to Picasa 3.8
See more info in answer to other question


You might be running into the issue where curtin reorders the UEFI boot order during the installation.  It makes the current boot method the first in the boot order.  There is an option to disable this.
Including this snippet in the storage section of the user-data file will disable the UEFI reorder.
  storage:
    grub:
      reorder_uefi: False

I've run into this booting from PXE.  After install, I end up booting from PXE again instead of booting from the hard drive.  I'm  not sure why you would end up in the UEFI shell.


Windows Executables (.exe) files can be run on Linux using wine, a windows emulator software. Nautilus has probably set "open with"-setting for .exe files to use wine, so that you can double click them. The dash has probably the same feature.

For it to work similar from the launcher, you must imitate that behaviour with a command like wine start /Unix "/path/to/file.exe" in a .Desktop file

Create a .dektop file in ~/.local/share/applications with following content:

[Desktop Entry]
Comment=Run Name of your Program
Terminal=false
Name=Name of your Program
Exec=wine start /Unix "/path/to/file.exe"
Type=Application
Icon=/path/to/logo.png

Of course replace the necessary bits.

Alternative:

Install alacarte and do the same with a simple GUI.

sudo apt-get install alacarte

Now you should be able to see that entry in the dash (maybe you need to refresh the dash one or two times). You can then copy-paste it to the Launcher.


How to find multiple files with specific pattern using or in find command

You can use

! \( -name '.bashrc' -o -name '.profile' \)

Ex.

$ find /etc/skel ! \( -name '.bashrc' -o -name '.profile' \)
/etc/skel
/etc/skel/.mkshrc
/etc/skel/examples.desktop
/etc/skel/.kshrc
/etc/skel/.bash_logout

The quotes aren't actually necessary in this case but you should get in the habit of using them in the case that the search pattern contains glob characters.


Gnome-terminal- how do i open a new winodow asking to authentificate as root?

gnome-terminal -e "sudo bash" will open a new terminal window asking for root password.


Appropriate Partition size for dual booting Ubuntu 13.04 with Windows XP MCE

XP does not have any internal tools for partitioning, so use gparted from liveCD to shrink it, but reboot XP immediately to let it run chkdsk.

XP supposedly will work in 10 to 15GB, but you need to have about 30% free space in the NTFS partition for Windows to work well. At 10% free it just about stops working and defrag may take forever.

How much space is used in your XP isntall? And can you houseclean some data?

Ubuntu can install in 10GB, some have installed in 5 or 6GB but have to continuously houseclean. If installing Lubuntu or Xubuntu less space is needed and if an older computer Lubuntu may be a better choice. You also need swap equal to RAM if you have 2GB or less of RAM. If you only have 512GB or RAM then you need swap to be 2X RAM and cannot really run full Ubuntu and have to use Lubuntu.


using nmap for information regarding web host

The nmap tool will help you to draw a map of the services available from the outside world to your server. As such, it won't help you to protect your server but will tell you where to pay attention. The more open ports you have, the more potential problems you may have.

An open source tool like OpenVAS will be certainly more helpfull to you. OpenVAS is vulnerability scanner that will not only show which ports are open on your server(s) but also try various kind of well-know attacks on these services and report what he found, with link to official security news explaining what the vulnerability is and how to overcome it.

Running this tool on your server will certainly help you to understand how it is possible that your server is regularly hacked.

To secure the servers I'm responsible for, I follow these guidelines :

Reducing the number of open ports
Reducing the number of installed software to what is stricly necessary
Removing unwanted users and groups
Be sure that each users has a good password or are locked in case of system accounts
For each application running, review the security guidelines available in their official documentation
Performing software update when available
Enabling a valid logging and auditing mechanism to be able to determine how the hacking was done

An successful attack can be a combination of multiple factors : e.g. : weak password allowing unwanted FTP access, bad FTP configuration allowing to go the web root, bad permissions on filesystem allowing to write in the web root.

At your place, I would review all my users password, my FTP setup, my web server setup, the permissions in use and also I would have a look to the log files to see if I can find back a trace of the commands that were run to try understand where the weakness really lay.
A tool like OpenVAS will help you to figure out what is possible to do on your server you'd never thinked about.


Can not install Ubuntu 11.10 through USB Stick

If the original poster still has a problem with this, try the solution  posted for this user, it explains how to mount the ISO correctly onto a USB within XP, that may have been the issue and so the .exe runs in XP but because it isn't correcly mounted the boot doesn't work:
Possible fix


How to open pdf files with document viewer on Ubuntu 13.10

It is a bug that reported here https://answers.launchpad.net/ubuntu/+source/evince/+question/208999

And not solved, but someone suggest to install another pdf viewer(see comment #14):

  For now , try to use another pdf viewer . I suggest acroread (the
  native acrobat reader in linux).

  Enable partners repo . From terminal give :

   gksudo software-properties-gtk

  go to "Other Software" section and check "Canonical Partners" , close
  the window and run in terminal

   sudo apt-get update
   sudo apt-get install acroread


It's not just you.

For Ubuntu 17.10, (artful aardvark) there doesn't appear to be a way of installing using the package repositories. As you can see from https://launchpad.net/ubuntu/artful/+source/sagemath

  There is no current release of this source package in The Artful Aardvark. You can still report bugs, make translations, and so on, but they might not be used until the package is published.

I'm not entirely sure about the reason, but it appears that they had difficulties with upgrading sagemath from version 7.4 (the version that was present in zesty (17.04), to 8.1 (the version that would have been present in artful), possibly due to dependency issues. It appears that they're trying to get it into 18.04. See these links for some more details:

https://answers.launchpad.net/ubuntu/+source/sagemath/+question/660257

https://launchpad.net/ubuntu/+source/sagemath/+changelog#detail_sagemath_8.0-8.1~build1

https://trac.sagemath.org/ticket/24084

PPA

The traditionally recommended PPA (say here or here) also won't work as they state that:

  UPDATE 2017: Sagemath is now in Debian and there is no longer a need to maintain this PPA.

which is true, except that in this case Ubuntu doesn't perfectly follow Debian...

How to install, then?

You can usually download sagemath binaries from sagemath.org itself, instead. Some installation details are here and the Linux binaries are available via a mirror here.

If you go to the above binary download link you will (in turn) be prompted to choose a mirror close to you (to speed up downloading), your processor architecture (probably 64-bit if you're unsure) and then your operating system. The last step is tricky, since Ubuntu 17.10 is not actually one of the options. However, selecting the Ubuntu 16.04 option or the latest Debian one might work (I have no access to an Ubuntu 17.10 system, so I haven't tested this)...

If that doesn't work, then complain at the bug tracker or build from source.


How do I move a window past the screen edge

In versions  prior to 18,the simplest way to do this is to set Workspace Switcher: System Settings > Behaviour tab

This will allow screens to 'wrap' into the adjacent workspace.

In version 18:

To use workspaces, click Activities on above the vertical bar (dock), then move your move to the right of your screen to show the workspaces in used plus one empty one.

You can then move apps from one workspace to another by simply dragging and dropping the apps onto the other workspace. This workspace now contains the apps you have dropped, and a new empty workspace appears at the bottom of the workspace selector.

(for version 18, acknowledgements to https://websiteforstudents.com/what-are-workspaces-and-how-to-use-them-on-ubuntu-18-04-beta/)


Ubuntu 14.04 LTS live USB boot error (gfxboot.c32:not a valid COM32R image)

As Filip Sohajek mentioned, you need to hit Tab.

Then you will see a set of options (live, live install, etc). Select the one that you like typing its name and pressing Enter.


I have reported this as a bug in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1258960 and the problem was fixed in kernel 3.13.


SCP transferred file does not appear on local machine

I recommend that you first change directory to your desired destination directory.
It looks like you are using windows, so do this:

cd \Users\Asgeir\Documents\SFTP

Then execute your sftp command, but instead of typing out the whole path of the destination directory, us a dot (period) instead. That tells the command to use the current directory (the one we just changed to in the last step).

sudo scp -P 443 asgeir@my_ip:/home/asgeir/nodejs/first_test_app/server.js  .

Now your file should be where you intend. I do this trick often when I find myself on a windows machine, especially because the windows convention of having back-slash directory delimiters and white-spaced file names to be awkward.

Happy Computing!


Unexpected Arabic messages below mouse pointer in LibreOffice - a virus?

As @Braiam helpfully pointed out - using a different user I didn't have the issue anymore. I digged a little deeper and it seems I had set unity-tweak-tool to use the Dhikr1_cursor for the cursors theme.

It came as part of a theme called Sabily which I probably installed along with a bundle of other themes. The part causing the weird behavior is intentional and called the "Islamic cursor". Getting scared over this seems kinda hilarious in retrospect.


bash: ./WorldOfGoo.bin: permission denied

Make the file WorldOfGoo.bin executable first, using the following command in terminal:

chmod +x WorldOfGoo.bin


How can I set up an automatic core dump in an Upstart script?

Try making a separate wrapper bash script with the commands between script and end script and pass that to an exec option in the same upstart file.

Chance are that whatever ulimit -c 10000 does disappears by the time upstart calls ./myapp.

Also note that it isn't quite correct to name your file "upstart script". It is a configuration file. It may happen to contain executable lines but its main purpose is to store configuration and not executable commands.

Addendum: I followd the same logic above, but instead of create another script, I had the idea of do ulimit -c 10000 && ./myapp and it worked! upstart accepted the &&


How to run Geckodriver from an external request in an Ubuntu server

I think it's not about permission, but DISPLAY variable. The thing is Firefox couldn't find the screen and that's probably why it throws an exception. You might try to check by echo $DISPLAY in your ssh session and it is likely to be blank. The solution is setting DISPLAY to something.

export DISPLAY=:0.0

This tells X server to use the first monitor.

More information regarding DISPLAY


Disable unnecessary startup services and applications

Go to the dock and search for Startup Applications. The GUI is very simple and you can remove programs from the list to stop them from automatically starting. Only remove programs that you know are not essential.


Probing for device to install to failed on Ubuntu 18;04 Server Installer with AMD X570 motherboard

I am guessing that the server installer isn't updated as often as the desktop installer.  So, I used the desktop installer to get Ubuntu on my server, then used tasksel to switch to Ubuntu server.  I hope this helps someone else who runs into this problem in the future.


Specific install instructions for a retina macbook pro

There isn't any mayor differences between installing Ubuntu in a Mac or a PC. The installer will do everything. Issues may arise later (like Wireless card not working) but that should be asked in a specific question targetting that specific piece of hardware/software.


What's the right way to run a program as a service?

Either use Upstart (see http://upstart.ubuntu.com/cookbook/) or create a script in /etc/init.d (see e.g. here). The former is more modern and flexible, but the latter is easier.


Download doesn't work in Firefox recently

I also experienced exactly the same problem with downloading. I solved it by:

going to the menu  Edit>Preferences>General, then select "Save file to Downloads" and [Close].
After that you can try to download something to the default directory at least once. If it works, then go to the same dialog and set it back  to the other option, i.e. "Always aske me...".

I would guess there is something broken in the settings registry of Firefox, and by forcing this setting change, the respective entry gets fixed.


Is there a deb package to install Firefox ESR?

It has a PPA here, but it is not launched yet, so we have to install it manually:

I suppose that you have a 32bit edition on Ubuntu, and you are using English language:

Let's download it:

wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/10.0.2esr/linux-i686/en-US/firefox-10.0.2esr.tar.bz2

We will extract it to /opt:

sudo tar -xvjf firefox-10.0.2.tar.bz2 -C /opt

Let's move away the normal Firefox link:

sudo mv /usr/bin/firefox /usr/bin/firefox-old

Linking the new Firefox:

sudo ln -s /opt/firefox/firefox /usr/bin/firefox

That's it. Enjoy!

Note: if you want to upgrade afterwards, launch it with gksudo firefox, and choose Help > About Firefox menu, and see if any updates are available. If yes, apply them.


Files (Nautilus) in 19.10 - drag-n-drop on desktop doesn't work

Since Ubuntu 19.04, Nautilus doesn't handle desktop icon management, rather it is handled by a GNOME Shell Extension called 'Desktop Icons' (package name: gnome-shell-extension-desktop-icons). The extension doesn't support the drag-and-drop feature yet.

However, you can replace Nautilus with Nemo as your file manager and get the traditional desktop icon management back. Follow this Q&A to replace Nautilus by Nemo: Make nemo the default file browser.

You should disable/remove the Desktop Icons extension to avoid any potential incompatibility. You may also have to add Nemo manually to the list of (auto-) startup programs.


Meltdown and Spectre protection for Ubuntu 14.04.5 (Kernel 4.4)?

The mitigation fixes for these two specific sets of attacks are not limited to the kernel, however if you are up to date with security patches from Ubuntu, then yes, you already have the patches. You also need updated intel-microcode package for example, for some of the fix. There was also a Firefox update for mitigation of Spectre attacks in the browser.

You can see the publishing history for 4.4 kernel updates on launchpad.net as well.


policykit also work on server, I'd suggest to modify (as root) the following file:

/usr/share/polkit-1/actions/org.freedesktop.login1.policy

Look at actions like this one:

action id="org.freedesktop.login1.power-off"

And replace allow_any, allow_inactive, and allow_active values by yes to allow non root users to perform a power off without any authentication.


How to make umount wait, until a device is not busy?

I think the following script will do the job. It should be run with sudo (superuser permissions).

There is a function doer with a while loop, that checks with mountpoint if a device is mounted at the specified mount point, and if it is, tries to unmount it with umount. When the logical variable busy is false, the while loop is finished and the script can start 'doing some things'.

#!/bin/bash

function doer() {

busy=true
while $busy
do
 if mountpoint -q "$1"
 then
  umount "$1" 2> /dev/null
  if [ $? -eq 0 ]
  then
   busy=false  # umount successful
  else
   echo -n '.'  # output to show that the script is alive
   sleep 5      # 5 seconds for testing, modify to 300 seconds later on
  fi
 else
  busy=false  # not mounted
 fi
done
}

########################

# main

########################

doer /media/hdd1
doer /media/hdd2

echo ''
echo 'doing something1'
echo 'doing something2'


Should I use PyQt or PySide for a new Qt project?

Both PyQt4 and PySide have very similar mappings to the Qt API.  There are, however, some differences, my opinions on which are described below:

Maintenance

They are both well maintained.  The PySide produces a lot more regular releases at the moment: I think it's more closely linked to Qt than PyQt4 and as a newer project has a more active community at the moment.  However, that is just my impression and it may be wrong.

PyQt4 has the option of commercial support available (I don't know whether this is true for PySide or not).

Licence

PyQt4 is released under either a commercial licence or the GPL; PySide is released under the LGPL.  For commercial applications, this is a significant difference.

APIs and Python versions

PyQt4 supports two different APIs.  API version 1 is the default for python 2.x applications and API version 2 is the default for python 3.x applications.

PySide only supports one API, which is roughly equivalent to PyQt4's API version 2.  API version 2 (or the PySide API) is much nicer to work with than PyQt4's API version 1.  In API version 1 you have a lot of code that casts python strings to QtCore.QStrings and back again.  In API version 2 (and PySide) you just use python strings throughout.  See below for a simple way of switching between PyQt4 and PySide if you want to play with both.

Most code I write seems to work equally well in PyQt4 and PySide.  Historically, I had always used PyQt4 for python GUIs but most new stuff I write now uses PySide (mainly due to the more flexible licensing).  I'd certainly recommend you try both and see how you find them.  If you use QtVariant.py (below), switching between them is trivial and when you make a decision there will only be one file that needs updating.

Documentation

The documentation for both PyQt4 and PySide are auto-generated from the main Qt documentation.  In my opinion, the PySide documentation is a better representation of what you actually use, but in practice I tend to just use the Qt documentation anyway (it's quite easy to mentally translate the C++ documentation to python).

External Libraries

If you're using external libraries, some do not work with PySide yet.  There aren't many that you need to work with PySide to be honest, but a couple of years ago I wrote some code that used twisted (with the Qt reactor) and matplotlib and that forced me down the line of using PyQt4 rather than PySide.  I think it's quite likely that these libraries will have been updated to support both by now, but I haven't checked.

Making Code work with either PyQt4 or PySide

Assuming you're using python 2.x, you can fairly easily make your code compatible with both PySide and PyQt4 by making a QtVariant.py and using:

from QtVariant import QtGui, QtCore

or whatever.  The QtVariant.py that I use looks like this:

import sys
import os

default_variant = 'PySide'

env_api = os.environ.get('QT_API', 'pyqt')
if '--pyside' in sys.argv:
    variant = 'PySide'
elif '--pyqt4' in sys.argv:
    variant = 'PyQt4'
elif env_api == 'pyside':
    variant = 'PySide'
elif env_api == 'pyqt':
    variant = 'PyQt4'
else:
    variant = default_variant

if variant == 'PySide':
    from PySide import QtGui, QtCore
    # This will be passed on to new versions of matplotlib
    os.environ['QT_API'] = 'pyside'
    def QtLoadUI(uifile):
        from PySide import QtUiTools
        loader = QtUiTools.QUiLoader()
        uif = QtCore.QFile(uifile)
        uif.open(QtCore.QFile.ReadOnly)
        result = loader.load(uif)
        uif.close()
        return result
elif variant == 'PyQt4':
    import sip
    api2_classes = [
            'QData', 'QDateTime', 'QString', 'QTextStream',
            'QTime', 'QUrl', 'QVariant',
            ]
    for cl in api2_classes:
        sip.setapi(cl, 2)
    from PyQt4 import QtGui, QtCore
    QtCore.Signal = QtCore.pyqtSignal
    QtCore.QString = str
    os.environ['QT_API'] = 'pyqt'
    def QtLoadUI(uifile):
        from PyQt4 import uic
        return uic.loadUi(uifile)
else:
    raise ImportError("Python Variant not specified")

__all__ = [QtGui, QtCore, QtLoadUI, variant]


Installing Ubuntu 13.04 on Ideapad u510 after deleting all partitions

Solved.

The hdd did not work because the sata cable was not properly connected to the board.  I must have ripped it out while replacing the hdd.  I did not mention that I replaced it to see if maybe that is the problem.  The little plug was just halfway connected, that is why the system could see /dev/sdb but not access it.

So basically the only important thing is to disable intel rapid start in bios setup.  After that, the ssd and hdd are just two regular devices and ubuntu can be installed and used as usual.


DNSCrypt stopped working on UBUNTU 14.04

May be you should use the packages from my PPA :

https://launchpad.net/~anton+/+archive/ubuntu/dnscryptenter link description here

Explanations on how to use it are in more recent webupd8 article :

Encrypt DNS Traffic In Ubuntu With DNSCrypt [Ubuntu PPA]


ubuntu 12.04 slows down while installing updates or using software center

If a window becomes gray, it means that it is busy.

You have some options to "fix" this:

You can try to play around with nice levels: sudo snice 19 software-center while starting the update.
Add more RAM to your system.
Migrate to SSD.


Turn off the instant search option on Google. There are a few possibilities why it isn't working, and they are covered on Google support here: https://support.google.com/websearch/answer/186645?hl=en


dotnet core error starting application with supervisor

In your configuration file:

Change the command argumento to:

  command=/bin/bash -c "dotnet /home/username/path/application/website.dll"

Add the directory parameter to use a working folder

  directory=/home/username/path/application

Its work


Install the mdadm package and the array should show up as /dev/md127 and you should be able to open it in the gui.


Dual boot with2 SSDs, where do I install the bootloader?

/dev/sda is an acceptable location for the boot loader.


You can't.

Juju in AWS uses EC2 security groups. Though the security groups can be made to allow ICMP with the EC2 API or Console, there are no hooks anywhere in the Juju code to do so. The only hooks that exist are for TCP and UDP.

If you have access to the EC2 console, you can find the relevant security group and allow ICMP there.

Or, if you have the credentials configured for the ec2-api-tools, you can use a command like:

ec2-authorize <group> -P icmp -t -1:-1 -s 0.0.0.0/0

In Juju bug 833064, they mention an intent to switch to machine-level firewalling (iptables on the instance) rather than continuing to limit themselves to the platform's firewalling capabilities and APIs.


The Interface of Ubuntu 16 is loading at startup on Ubuntu 20

One way to do this would be to reset the desktop to its factory settings. Open Terminal and type this:
dconf reset -f /org/gnome/

Be sure to that directly on the device, as this will not work correctly if you're SSHing into the machine.

Note: This will reset Gnome to the defaults for Ubuntu 20.04 (or whatever version you're currently running). If you had any modifications to the desktop, you'll need to re-do them.


Change power options for Ubuntu Server via terminal

I found my solution in this answer here. In /etc/systemd/logind.conf, I edited the lines

#HandlePowerKey=poweroff
...
#HandleLidSwitch=hibernate

to

HandlePowerKey=ignore
...
HandleLidSwitch=ignore

And then reboot the system.

The laptop shutting down overnight was actually something else. I used a power socket in a weird place for the server, to prevent the plug from being accidentally pulled. The socket turned out to be controlled by the same button that I use to switch the lights on and off. When I switched the lights off at night, I denied power to the server. In the morning, I would turn on the light, check the server, found out that it turned off again and boot it (without a problem because the power would work again after switching on the lights).


How do I create a desktop file out of a terminal command?

Just create a new text file, paste this into the file, and save the file as WoW.desktop. Read this post for more info.

[Desktop Entry]
Version=1.0
Name=WoW
Comment=WorldofWarcraft
Exec=wine /home/maciej/434_mini -opengl
Terminal=true
Type=Application
Categories=Games,Applications


Source:

http://askubuntu.com/questions/457597/cpu-turbo-boost-modify-temperature-limit-under-14-04

Please consider reading that article answer.

Intel Overheating:

http://www.webupd8.org/2014/04/prevent-your-laptop-from-overheating.html

This worked for me

Good luck!


Can we execute a shell script by clicking

Try this.  Right click on the file, choose Properties, and then click on the Permissions Tab, and check Allow executing file as program.


What does it mean to make Tox "portable"?

When you hover the mouse over that text, it says that config files will be saved in $(PWD) where you run tox rather than in $HOME/.config. For example, if my qtox executable is on Desktop, the configs will be on Desktop.

This makes it easier to transport qTox as it will put everything in one place (folder).


Problem in installing Ubuntu 16.04.1 using virtual box

The solution is to disable the Hyper-V platform. My English level is not good enough to explain in detail how to do it, but look at the Windows features and you will find the option


How to install ubuntu-device-flash in Ubuntu 14.04?

Add this ppa:

sudo add-apt-repository ppa:snappy-dev/tools

Update (thanks Joaquin):

sudo apt-get update

Then try the install again:

sudo apt-get install ubuntu-device-flash


Upgraded to 10.10 but desktop shell did not change

Unity is going to be the default in 11.04 (currently unreleased), not 10.10.

To install Unity from within the 10.10 Desktop version take a look at this question.


Where does Compiz store its configuration in Ubuntu 12.10?

All the settings related to Unity and Compiz are stored in the directory~/.config/dconf/ as a binary file user.

If you are looking to modifying the settings using the configuration file, you can't quite achieve that as it is stored as a binary file and is not human-readable. If tweaking the settings is your motive, I would suggest you use a configuration tool like Unsettings for that.


Asus X202e VivoBook, dual boot. How to get around UEFI and have Win8 & Ubuntu?

I managed to fix everything and am currently installing Windows 7 on my lovely ASUS laptop as I speak!

I booted into my BIOS using F2
I went into the "Security" tab and disabled Secure Boot State
I went into the "Boot" tab and disable Fast Boot
I enabled Launch CSM and Launch PXEOpRom
I went into the "Advanced" tab and went into the "USB" settings, I changed both settings to "Enabled".
I created a Windows 7 USB using these two links:

a. UEFI Bootable USB Flash Drive - Create in Windows

b. UEFI (Unified Extensible Firmware Interface) - Install Windows 7 with - Windows 7 Help Forums7. I am installing Windows 7 now!


Strange error messages in /var/log/apport.log

Hey so I am not 100% sure what is causing the errors but it looks like your XFCE experienced an issue where it crashed. In the logs we see the signal 5 (signal man page) for the pid 7103, and then another pid starts up 7107. For pid 7107 the error looks like it originated from /usr/bin/xfsettingsd, that had two other crashes but the log just logged it as: this executable already crashed 2 times, ignoring. It looks like XFCE tried to start another instance but 7107 did not stop entirely and so it was not able to start again.

I'm not 100% on this so if someone knows more about this then me, please correct me.


Ubuntu 14.04 LTS randomly freezes (graphics/unity only)

This may be the cause of your problems: Nvidia-Prime Freeze

Theese two things have worked for me so far; either:

Disable touchpad in: System settings -> Mouse & Touchpad -> "off" and use a regular USB mouse.
Install nvidia-prime sudo apt-get install nvidia-prime, find "Nvidia Settings" in dash, and under "Prime Profiles" choose "Intel(Power saving mode)"

The latter disables your dedicated graphics card, but works well for all the day-to-day tasks. Also, this  made my computer a lot quieter (and surely less power consuming) which is comfortable when you are just browsing the web anyway...

Hope this helps :)


Ubuntu installed in Windows but want to format Windows

If you did a Wubi install of Ubuntu, Ubuntu is installed inside the Windows partition.

If you wipe that Windows partition (eg, by formatting  it), you will also delete Ubuntu.


Ubuntu installation stuck after first reboot on encryption password screen

If it is saying that it set up the crypt successfully, then it's probably not the encryption that's broken, but the OS boot. There is likely a process not starting correctly, causing the system to hang. Press Esc or F10 to see the verbose output of the OS booting after entering your key and getting the successfully unlocked message. The last process listed before the system stops doing anything, or any errors you might see at the end of startup, might be the cause. You may need recovery mode or a new install to fix it.


Do tmux sessions automatically close after a while?

If it is anything like screen, the session that you started like that ends when your command ran through. (As it would as well if you exit your shell)


How to remove Ubuntu on Virtualbox but keep the files?

The thing virtualbox is good in is having more than one instances.

So ... create the NEW instance and do not remove the old one. Add a second adapter set to host-only on both guests and you can copy files over from old to new until you are satisfied.

And then remove the old instance.

Also for future reference: when your virtualbox setup is good enough for you make a backup of it each time you start something you are unsure of (like update, upgrades, install software, messing with configurations).


How can I free some space in /var/cache/archives/

First, As it appears your root directory ( partition ) / is 100% full. So you will need to free some space. Please boot into the recovery mode as described in the linked answer below and follow these steps one by one and check your disk space until you can see some free space:

Clean the apt cache:

sudo apt clean

Empty the /tmp directory:

sudo find /tmp/{*,.??*} -exec rm -rf {} \;

Delete old log files:

sudo find /var/log -type f -name "*.gz" -delete

Remove old kernels:

sudo apt autoremove --purge

List large files ( 1 GB or more ) and delete the least important ones:

sudo du -hca --time / | grep -E "^[0-9\.]*[G]"

Then, you can follow the instructions in this answer to fix the issue preventing Ubuntu from booting into the desktop.

Best of luck


Reformat USB flash drive marked "Read Only"

At least a SanDisk USB flash device turns into persistent "Read only"-mode when it has detected internal trouble that might be a cause for imminent failure.

There is only one remedy:
Backup any data immediately and
Replace the flash memory as soon as possible to avoid trouble.

I have experienced this just recently, the very first flash device EVER to die for me; a SanDisk Ultra, USB 3.0.


Anyone have Canon MF4890dw with cndrvcups 2.80 working on ubuntu 14.04?

I contacted Masayuki Sakura at Canon, the maintainer listed in the Debian package. His reply:

  We were able to reproduce the same kind of problem as the issue you
  reported. ... could you install
  32-bit version of libstdc++6 with the following command and perform
  print test.

  # apt-get install libstdc++6:i386

  By the way, I have checked our user's guide and readme file, but this
  notification is not described. We will add this notification to the
  next version of the driver.

Indeed, this solved the issue.

Thank you to Masayuki for his prompt customer support.


How to permanently disable monitor power saver using the command line?

This will work.  Open terminal in the /etc/xdg/autostart directory.
Issue this command:

sudo -H gedit nodpms.desktop

Hit enter, you will have to input your password.
Gedit will open, copy and pasted the following code in and then save.

[Desktop Entry]
Type=Application
Exec=xset -dpms
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=nodpms
Name=nodpms
Comment[en_US]=
Comment=

Issue this in the still open terminal:

sudo -H gedit noscreenblank.desktop

Hit enter, you will have to input your password.
Gedit will open, copy and pasted the following code in and then save.

Exec=xset s off
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=noscreenblank
Name=noscreenblank
Comment[en_US]=
Comment=

Close the terminal.
Open the file browser and navigate to the etc/xdg/autostart directory.
Ensure that the files, nodpms.desktop and noscreenblank.desktop are there.  If so, close everything and then reboot.

After reboot you can run an xset q command in terminal and see that dpms and screen blanking are turned off.


The first thing to try in case of a failing network connection that does not lie outside the system is to restart the Network Manager service.

On pre-systemd machines (like 14.04) the command is sudo service NetworkManager restart.

On systemd machines you would do either systemctl restart NetworkManager or systemctl restart network-manager.


How can I show the Unity launcher with the mouse?

A change has been made this month to reveal the launcher on left edge now (after a one second timeout).

You can revert to the previous behavior of launcher reveal only in the top left corner launching the unity-preferences application.


Trackpoint device not available on Lenovo Carbon X1 5th generation

I run Xubuntu and was able to workaround the problem by:

disabling the trackpad in the BIOS (I only use the track point)
editing /etc/default/grub to have the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash psmouse.proto=bare"

More information can be found here on the Arch wiki.


DNS Resolution fails with UFW & OpenVPN (ProtonVPN Server)

Here's my guess:

By default, the VPN tunnel will usually supply its own DNS resolver as part of it's DHCP config. In the case of ProtonVPN, I believe these are internal 10.x.x.x addresses.  I think what's happening is that whatever DNS servers are being supplied are not part of your UFW whitelist for port 53, so when you connect to ProtonVPN, the DNS server is changed to one that isn't on your whitelist, and the traffic cant get out.

I've never done it before, but it looks like you can override the DNS config by adding:

script-security 2
push "dhcp-option DNS 1.1.1.1"

To your OpenVPN configuration file for ProtonVPN.


How to set LC_TIME variable to en_DK while keeping en_US the system default for other variables?

Here is what I would do:

check which locales are enabled:

grep -v '^#' /etc/locale.gen

You should at least get (Or something similar):

en_US.UTF-8 UTF-8

Enable it if it's not and disable unnecessary locales by commenting those lines.
generate locales:

sudo locale-gen

set default locales:

sudo localectl set-locale LANG=en_US.utf8 LC_TIME=en_DK.UTF-8

check All important files like: .profile, .bashrc and other startup files to make sure nothing is overwriting our configurations.

it should work.


Are there any applications like SAP available for Ubuntu?

I use this: http://www.manager.io/

Works well, simple but good for small businesses


Is DisplayPort 1.2 properly supported in 16.04?

I don't have a similar setup, but would urge You to try again. Proprietary nvidia drivers are released quite regularly, so there is a good chance that the Your original issue may have been fixed by now.

Link to most recently released nvidia driver

If simply using the "Try Ubuntu" option on a Live CD/USB does not work (using the bundled open source nouveau driver), then I would try to install Ubuntu on a separate disk first, in order to preserve Your Windows installation.


This has been suggested, first on UbuntuForums, then BrainStorm and finally on GnomeLive.

BrainStorm says "This idea was marked as implemented the 29 January 12" but I honestly can't find any way of doing this in Nautilus 3.2.x so assume this was either incorrectly marked as implemented, it was implemented against the old 2.x version (and not carried forward) or I'm being an idiot and can't see how to turn it on.


SOLVED - Microsoft Designer Mouse not connecting to Ubuntu 15.10

Microsoft Designer Mouse needs to have Bluetooth 4 to work, I bought this mouse a month ago and had to return it, because I had version < 4.

You can find your bluetooth version with command hciconfig -a | grep HCI

See the (0xY) where Y is:

0 Bluetooth Core Specification 1.0b
1 Bluetooth Core Specification 1.1
2 Bluetooth Core Specification 1.2
3 Bluetooth Core Specification 2.0 + EDR
4 Bluetooth Core Specification 2.1 + EDR
5 Bluetooth Core Specification 3.0 + HS
6 Bluetooth Core Specification 4.0
7 Bluetooth Core Specification 4.1
8 Bluetooth Core Specification 4.2
9 - 255 Reserved

Source of this specification ...

So you need at least HCI Version: ... (0x6) ... to make it work.


12.04 installation leaves me with a blank screen, changing boot options doesn't help

Check all the comments on this thread. I am the person who posted the question. If any of this seems familiar, then I'll do my best to help walk you through any steps.
My main guess to focus on would be the step where you boot into recovery mode with grub, then select safe graphical boot. But check it all, just in case.

Can't install Ubuntu since 10.10

This boot repair may help too
https://help.ubuntu.com/community/Boot-Repair


From your booted Ubuntu system, try opening a terminal (ctrl alt & T), then use the following commands to install grub to the internal drive :

sudo grub-install /dev/sdX
sudo update-grub

Replacing sdX with the actual drive, which will probably be sda, but use disk utility to double check if you are unsure.

When the process finishes, reboot without the USB, grub should load and give you the option to select windows or ubuntu.


The numbers that come after --set=root can be found if you plug in your USB containing the Windows OS, open terminal, and run blkid. You'll then see the name of your USB device, along with its universally unique identifier (UUID).

Next, explore your USB files and find where your EFI image is; it is most likely in the directory in the code that you already posted. Keep note of where it is because you'll need it.

Then, boot into the Grub command and type the following:

insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root (insert your uuid here)
chainloader /your/efi/boot/file
boot

I hope I've helped. This works for me when I need to boot Linux via USB.


Issue related with unmet dependencies after installing new libraries

I believe I found a way in order to answer my own questions:

1) It appears I can't have both - experimental and buggy stable version of those libraries. So I had to choose. I can live without Simple Scan and Xsane, since scangearmp still works with my scanner! The solution is to get rid of the experimental libs.

2) Again, the solution is to get rid of the experimental libs, by following:

  # #Re-install the downloaded packages as root

# dpkg -i libjpeg62-turbo_1.4.80-115-gfb907b2-1_amd64.deb
# dpkg -i libsane-common_1.0.26~git20151121-1_all.deb
# dpkg -i libsane_1.0.26~git20151121-1_amd64.deb

  # #Now remove the experimental libraries completely

# dpkg -P libsane
# dpkg -P libsane-common
# dpkg -P libjpeg62-turbo

Start "Ubuntu Software Center" and let Ubuntu do the repair of missing libraries, by clicking Ok. Alternatively, you may install and uninstall Simple Scan, or Xsane and we're done - all libraries are now fixed, and everything's back to normal!


To remove send mail completely you have to use:

apt-get purge sendmail*

(Note the * at the end.)

Thanks to this post here on Ubuntu forum:
http://ubuntuforums.org/showthread.php?t=916606


I am part of a group, but I cannot create files

To check that you are in the www-data group run groups in the terminal. If www-data does not appear in the list, logout and back in to make the change take effect.


Bluetooth stopped working after Windows Update with dualboot

I had a similar problem on my desktop PC with an Asus B450-I, except bluetoothctl power on would just hang forever (bluetoothctl would get stuck on Waiting to connect to bluetoothd...). Also, all my audio input and output devices were gone, except for a "Dummy output". Tried disabling and re-enabling Bluetooth in BIOS, rebooting, turning of Fast Boot etc without luck.
Although I don't understand how I ended up here in the first place, turns out the problem was that my kernel had been upgraded to 5.8. Reverting to 5.4 brought back Bluetooth and audio. I accomplished this by booting into 5.4 (so I wouldn't delete a running kernel) using the Advanced options for Ubuntu option in GRUB and doing sudo apt purge linux-image-5.8.0-36-generic linux-modules-5.8.0-36-generic. (You should probably do something like sudo apt list --installed "*linux-image*" to check what version(s) you have installed.)


It means the package is  no longer in the repository. You either search for it online and download the .deb and install it manually, or search some third party ppa that provides the package for 13.10.
I had a look myself and doesn't seem to be one, the most similar I can find is uget and multiget, also a graphical front-end downloader, you can try them:

sudo apt-get install uget
sudo apt-get install multiget

Good luck!


keypad mouse movement too slow on ubuntu 18.04

On Ubuntu 20.10, I did steps 1 and 2 without success.
Then, I changed the max speed (the 4th number) to 100 and it worked.
That was way too fast so I changed it to 5 and it was good.
To summarize, I did:

Activate mouse keys in Universal access
Install xkbset
sudo apt-get install xkbset
Use xkbset with max speed 100
xkbset 60 20 10 10 100 10
Use xkbset with desired speed
xkbset 60 20 10 10 5 2


Assuming the computers on your network are Windows PCs, the easiest way to share files and folders from Lubuntu would be to configure samba (an open-source implementation of Windows sharing protocols).

There's a step-by-step guide here: How to Create a Network Share Via Samba Via CLI (Command-line interface/Linux Terminal) - Uncomplicated, Simple and Brief Way!
...which might look a little intimidating at first, but it's definitely doable and could be a great learning experience as you get started with Linux. That wiki is a little old though, so I've updated a little bit. A more modern (but less explanatory) guide is available in the Server Guide: https://help.ubuntu.com/14.04/serverguide/samba-fileserver.html

Essentially, you'll need to:

Install Samba

sudo apt-get update && sudo apt-get install samba

Create the directory to share - and I would put it either in your user's home folder or in the /srv folder (you can make this if it's not there). You can make that folder in PCManFM (the file manager) by clicking File > Create New... Folder and give it a name. If you'd rather do that in the command line, it would be something like:

mkdir /home/*linux-username*/*folder-to-share*

(replace *linux-username* with your Linux username and *folder-to-share* with the name of the desired folder)

Make a backup of your configuration file in case things go wrong:

sudo cp /etc/samba/smb.conf ~

Edit the configuration file using this command:

sudo nano /etc/samba/smb.conf

Or, if you'd rather use a graphical text editor, you could use leafpad:

    sudo leafpad /etc/samba/smb.conf

Most of the configuration can be left alone (try not to delete anything in the file, especially the # symbols along the left edge of the page, unless you'd like to enable that option) - but you'll want to add at the bottom of the page or so:

[share]
    comment = Ubuntu File Server Share
    path = /home/linux-username/folder-to-share
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

Note: /home/linux-username/folder-to-share should be the same as the folder you created in step 2.

Note 2: If you are NOT okay with guests on your share, delete the line "guest ok = yes".

Note 3: Spacing is important here. Make sure you have exactly one space on each side of the = character.

You might need to add yourself as a samba user:

sudo smbpasswd -a *username*

You will need to restart samba for this to take effect:

sudo restart smbd

sudo restart nmbd


SSH allow windows AD groups(with Special charactors)

You can do this in two ways. One is to let the SSH configuration filter, and the other is to use pam_access.

Using SSH configuration

To /etc/ssh/sshd_config, add a AllowGroups line:

AllowGroups Domain Admin

From the manpage:

AllowGroups
    This keyword can be followed by a list of group name patterns,
    separated by spaces.  If specified, login is allowed only for
    users whose primary group or supplementary group list matches one
    of the patterns.

Domain Admin here doesn't match Domain Admin the group name, but two separate groups Domain and Admin. You'll have to use something like Domain*Admin and *it_admin, since neither  (space) nor (#) are usually valid characters in Linux groups. To be on the safer side, use ? instead of *: Domain?Admin and ?it_admin, so that only one character is allowed by the wildcard. You can also add a pattern-based DenyGroups section. See the PATTERNS section in man ssh_config.

Using pam_access

Add lines to /etc/security/access.conf of the form:

- : ALL EXCEPT (Domain) (Admin) : ALL

There are plenty of comments in that file which document how to use it. man pam_access is quite bare, so most information would come from those comments. pam_access is more powerful in that it can control non-SSH logins as well (TTYs, GUI, etc.). This particular line, for example, should deny any user who does not have Domain or Admin as a group from logging in at all (unless other lines allow them).

Both approaches are pretty flexible, and I don't know the pros and cons, so no recommendations.


How to disable "extra packages can be installed" popup in Kubuntu 15.04?

I found an answer to this on the Kubuntu forum.

In KDE you can turn off "Restricted codec availability" under

'System Settings' -> Notifications -> 'Other Notifications'.

It works for me (Kubuntu 15.04 with kubuntu-ppa backports).


How to copy folder as root in Lubuntu 14.04 terminal?

first change the directory where the file is located

cd <location of b43>

in your case

cd Desktop

and you can copy the folder by

sudo cp -a b43  /lib/firmware


ext4 Filesystem Corrupt - Bad Drive. Fsck Failing. How to Recover?

If you feel more comfortable using Windows, there's http://www.ext2fsd.com/, or ext file system for Windows.
If you install that and then mount the drive in a Windows computer, you should be able to read the partitions and remaining data.
Otherwise, boot from a livecd and try to copy remaining data to another location (other drive, network, whatever).
Also try to check the disk with diagnostic tools (bios tools? hirens? ubcd?) to see if the drive is actually failing, or just the file system on it. There's a tiny little chance you can save the drive

But seriously, just like you know that every living thing will die one day, you know that hard drives give up too. Some sooner, others later. You just can't tell. Either make sure you have a backup, redundant RAID or just live with the loss.
If it's all downloaded media, chances are you can download it again and it's not worth the trouble.


New software needs testing before it can be pulled into a distribution and 2.32.0 was only released right at the end of September, not giving it anywhere near enough time for testing.

Stability is all the more important in a mission-critical applications like Evolution, Firefox and OpenOffice.

This is just how things go sometimes.


Laptop Ubuntu 20.04: integrated keyboard does not function after closing the lid, touchscreen and mousepad works

Check https://ubuntuforums.org/showthread.php?t=2224316...
It worked for me on 20.04...
I added i8042.direct instead of i8042.dumbkbd to the end of the boot command in the boot menu to check if this works...
Then I permanently added it to the booting command.
If you, like me, are not using grub, but rather systemd, you should edit a file called something like
/boot/efi/loader/entries/whatever-name-does-it-have.conf

adding.


Cannot switch between windows of the same application

This was my problem too. Alt+<key above tab> didn't work to switch windows in the current application.

In addition, when i pressed and held down the super key to see the unity shortcuts, normally one would see this:

I'm assuming that is for a US keyboard? I stole the screenshot from another post, and on my danish keyboard it now shows Alt + Onehalf.

But when I had this problem, I did not see the line pointed to by the red arrow!!!

So check if you see a keyboard shortcut for "Switch windows of current application". If you don't this is for you:

The fix was as hinted at above to change the XKBMODEL setting in /etc/default/keyboard where I changed from XKBMODEL="microsoft4000" to XKBMODEL="pc105".

I did that and ran sudo dpkg-reconfigure keyboard-configuration. Not sure this last step was required.

Then I needed to reboot.

Now it works.


Is there a way to connect ASUS ZenScreen MB16AC in Linux on machine with only mini dp and usb 3.0 ports?

I have been looking for an adapter mini-dp to type c but could not find any (just the other way around)

Even if such cables exist, and they likely do somewhere, you will still have the problem of getting power to the display.  It appears from the product description I found ( https://www.asus.com/us/Monitors/MB16AC/overview/ ) the only way to get power into the display is with the USB-C port.  A mini-DP to USB-C/DP cable is unlikely to provide any power to the USB-C port.  Something that can take a DisplayPort video stream and power and put that onto a USB-C cable is not likely to be cheap.

So in the end I tried my high quality usb to type c cable with my MB16AC monitor

A quality USB-A to USB-C cable should have the stylized "SS" symbol, USB trident, and the number 10 showing on the connector.  The USB trident shows it meets the USB spec, the "SS" and number 10 means it's rated for 10 Gbps.  If your cable does not have this then that might be why it's not working.

Note: I've installed latest displaylink drivers from Asus website and restarted my machine (for Linux 64bit)

Then perhaps you need to seek more assistance from ASUS on this.  My best guess is that the cable is not as "quality" as it appears.


Try this:

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

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop
sudo /etc/init.d/proftpd stop
sudo /opt/lampp/lampp start


How to install software into the home partition?

User's home folder is for user's documents, all installed software in a typical Linux distribution goes into /usr and is available to all users.

If you need to install some program into user's home folder (say, to make it available to that user only), the most straight-forward thing would be to download a source tarball and compile it with a custom prefix:

./configure --prefix=/home/jack/myprogram
make
make install

of course, the actual commands to compile will depend on the software you're installing.

However, I have a feeling your desire to install programs in your home folder is guided by some misunderstanding. This is by no means a recommended or normal way to install software.


Two finger touchscreen gestures on ubuntu 13?

Try this:

sudo killall ginn

and then run ginn again.


Like many MIDI applications, Swami requires the JACK Audio Connection Kit to be installed and running in order to operate.

Installing and configuring JACK is beyond the scope of this question. A good place to start learning about it is the documentation for Ubuntu Studio.


Sound disappeared after changing PCM volume in Xubuntu 15.10

I still do not understand why there was a problem, but reinstallation of alsa worked for me.

sudo apt-get remove alsa-utils
sudo apt-get install alsa-utils


Just run

sudo apt-get install build-essential

in the terminal to install all common packages required for compiling native C/C++ software. This is a metapackage, installing several actual packages you will need (including gcc/g++).

Alternatively, you can install this by clicking this link to install via software centre: build-essential


Try setting the "Share This Printer" option within the CUPS settings of the printer.
This made my printers available after upgrading to 15.04.
I hope this solves the problem for you.


Hiding files in Nautilus using .hidden does not work

Depending on what those files do for Windows, that might be the reason.  If you're NOT dual booting and/or you know that they're not system files that your Windows installation would need, you can try to put them in a .hidden folder to see if that works


There is a chance that your ISP does Carrier-grade NAT. In some of these cases you will never be able to host a service because of the NAT part that is not under your control but the ISP. I have found that some providers detect if customers have port forwarding active and try to host services on their boxes, after some time (a few days) of leaving your router configured properly you may be able to connect remotely.

If the is the first time you are trying to configure something with this connection/router ask your ISP what their policy is. Or use IPv6 if it is available.


btrfs-convert was a part of "btrfs-tools" package, which in Bionic will be provided as "btrfs-progs".

However if you check the list of "btrfs-progs" files, you would find out that the man page of btrfs-convert has been included but not the binary itself.

There is also a bug report: btrfs-convert executable is not included in btrfs-progs

Also it might be dropped because of: btrfs-progs: please stop shipping btrfs-convert

You have to compile it from source I guess.


Open a Terminal and run:
gsettings set org.gnome.nautilus.preferences always-use-location-entry false
If you want to use the editable location bar temporarily,you can press Ctrl+L.To return back to breadcrumbs just press esc.


Swap between monitor display modes using shortcut

It was helpful for me to do a similar thing using arandr

sudo apt install arandr
arandr

using the tool, you can configure a setup, then Layout > Save as... and name it to a run script like 'home_monitors_layout.sh' etc.

Then you can edit the script, or use the generated layout commands and plug it into the other answer provided here instead of manually configuring left/right/center/etc. layout


How to read "service --status-all" results

The output of service --status-all lists the state of services controlled by System V.

The + indicates the service is running, - indicates a stopped service. You can see this by running service SERVICENAME status for a + and - service.

Some services are managed by Upstart. You can check the status of all Upstart services with sudo initctl list. Any service managed by Upstart will also show in the list provided by service --status-all but will be marked with a ?.

Reference: man service


Start a new instance of pluma or gedit when one is open already

OS: Ubuntu 18.04.1

$ gedit --version
gedit - Version 3.28.1
$

I opened gedit from the launcher, pasted part of man gedit into it, and then opened gnome-terminal and ran gedit -s & exit. This opened gedit in a new window.

From man gedit:

-s, --standalone
          Run gedit in standalone mode.

Edit: I don't have pluma installed but man pluma doesn't list the -s option. It does have

--new-window
       Create a new toplevel window in an existing instance of pluma.

--new-document
       Create a new document in an existing instance of pluma, on the
       last Pluma window that had focus.

similar to gedit's

--new-window
       Create a new toplevel window in an existing instance of gedit.

--new-document
       Create a new document in an existing instance of gedit.


According to Wine, Login in on Skype for Wine does not work. You must edit your Skype.desktop file:

[Desktop Entry]
Name=Skype 7 Wine
Exec=env WINEPREFIX="/home/.../.wine" wine C:\\\\Program\\ Files\\ \\(x86\\)\\\\Skype\\\\Phone\\\\Skype.exe /username:"username" /password:"password"
Type=Application
StartupNotify=true
Comment=Launch Skype 7 Wine
Path=/home/.../.wine/dosdevices/c:/Program Files (x86)/Skype/
Icon=4F0B_SkypeIcon.0

www.Winehq.org Skype for Linux


Wine sound is played way too fast and crackles horribly

Since this is the first result returned by Google, I'd thought I share my experience here.
For those who look for a quick fix, put the following in your ~/.bashrc or /etc/profile for system-wide change:

alias wine='PULSE_LATENCY_MSEC=60 wine'

This is the same fix that's used for Skype and PulseAudio 4.0 and above, which is behaving the same way as wine. Hope this helps!

Edit (12.01.2016):

You can enable this variable globally by adding this line to ~/.bashrc and logging out/rebooting

export PULSE_LATENCY_MSEC=60

If you're experiencing audio issues in other applications after this, simply delete the line and logout or reboot. If you want to test it temporarily, open a new terminal and paste that line. Now every application that you invoke from this terminal will have the variable set and PulseAudio will set the latency.

More information on this problem and the 'fix': http://arunraghavan.net/2013/08/pulseaudio-4-0-and-skype/


How can I elevate nautilus privileges to move or copy a folder as root?

As far as I can say, based on what I know and have experienced:

sudo is used for command line applications/commands and gksudo is useful when you try to run a program using the Run Application dialog window by pressing Alt+F2.

I have read that gksudo is just the graphic version of sudo.

Anyway, you can both drop sudo nautilus and/or gksu nautilus in a terminal for the purpose to do what you wish, having the same effect both commands. But if you want to omit the terminal and you wish to run it directly with the "Run Application" dialog window, just press Alt+F2 and write gksu nautilus, after which you will be prompted to enter your password, then the nautilus file browser will open with root privileges.

Additionally, you can achieve to open files/folders as root with a single click by using the "Open as Administrator" option via right click. Which in any case will open a new nautilus instance for the given folder and will open files as root, this may also open/run applications as root but I haven't tested it yet.

You can get the "Open as Administration" option in your contextual menu by installing nautilus-gksu via command line: sudo apt-get install nautilus-gksu or by using synaptic as shown in the next image:

Good luck!


Lazy Calculation result of bash functions in alias

Just use single quotes around the alias declaration command so that the command substitution (pwd) does not take place while declaring (and will expand only when the alias is called):

alias clone='gnome-terminal --working-directory=`pwd` & disown'

Also start using command substitution syntax $() instead of older and problematic ``:

alias clone='gnome-terminal --working-directory="$(pwd)" & disown'

Also note that gnome-terminal is designed in such a manner that whenever you do

gnome-terminal

it would open a new window with the same PID as the original one. This is because its the same process by design, exiting one won't kill the other(s).  So you don't need the disown and backgrounding (&), just:

alias clone='gnome-terminal --working-directory="$(pwd)"'

would do.

Moreover, as pointed out by @Digital Trauma, gnome-terminal always starts off at current working directory, so --working-directory is not needed as you are setting it as pwd. So you can just do:

alias clone='gnome-terminal'


To remove the repository, open Software & Updates → Other Software, click on the repository of Chrome, and click on Remove.

To remove Google Chrome as well as its configuration files, enter the command:
sudo apt purge google-chrome-stable

You may want also to run sudo apt autoremove to remove any unused dependencies.


How do I create EFI boot partition after it has been created by ubuntu installer in a system running Windows 8.1 pro

You need to correctly identify your EFI System Partition (ESP) and flag it as such in the installer. You do this in the dialog that asks for the filesystem type, IIRC. At one time, the Ubuntu installer called the ESP the "EFI boot partition," but I believe that name has been changed to "EFI System Partition" in the latest (development?) versions of the Ubuntu installer. Note that when you flag the partition in this way, you don't need to explicitly set the mount point to /boot/efi; the installer does that automatically.

It sounds like /dev/sda2 is your ESP, and you've simply set it as a normal FAT partition mounted to /boot/efi rather than setting it as an ESP.


if you are trying to install Ubuntu alongside Windows 8 then you may have some problems if you laptop was shipped with Windows 8 preinstalled as Microsoft are trying to lock their customers out of installing alternative operating systems.

You best option is to boot from disk, to do this you will need to go into you BIOS and set the boot order to CD or USB (whichever you are using), the save settings and exit, you will then go into the setup for Ubuntu, you will need to select install alongside Windows and then you will be given the option to set the partition size.

that is the easiest option, i can not remember if it showed up my windows partition when i installed ubuntu as i done it so long ago.

if you have problems try booting into Windows and then removing the partition you have created and put it back with your windows partition then go to boot into Ubuntu live CD and set your partition that way it is much easier


Have to manually launch unity after upgrade

Had the same problem with the online upgrade. I used Startup Applications to add unity which did the job. Eventually I did a clean install because I was unsure if anything else was missed.


why does a device on the network seem to always have the same ip upon reboot, even though they're dhcp?

When a DHCP server offers an IP address to a requesting device, the IP address comes with a "lease": a length of time for which it is valid. If the same device (ie same MAC address) does another request in that time period, it will get the same reply. If you turn off or reboot a device the DHCP server doesn't know that.

If the requesting device is still powered on when the lease expires, it is supposed to request another IP address, though I suspect many devices don't! (Leases typically last a long time.)

DHCP servers though may well issue the same IP address to a device even after the lease has expired, but they will always have a (possibly configurable) timeout value for this too or their internal device vs. IP table would grow indefinitely.

Even if the requesting device has been forgotten by the DHCP server it might still get the same IP address eg if the server's algorithm allocates the lowest unallocated IP address.


That sounds like a similar problem I had when I updated my kernel.
The fix is described in detail here.

The proposed solution - fixing the problem on my computer

First, make a copy of your xorg.conf

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK

You may need also to install linux headers first.

sudo apt-get install linux-headers-generic

Install fglrx with hardware acceleration

sudo apt-get install fglrx xvba-va-driver libva-glx1 libva-egl1 vainfo

Generate a fresh xorg.conf before rebooting

sudo amdconfig --initial

As a result, my problem was solved and the "Sleep Mode" works without problems.


XFCE4-Terminal, error loading libraries libpcre

Reinstall the faulty library with:

sudo apt-get install --reinstall libpcre2-8-0


How to open Node.js command line in ubuntu?

The binary for node.js provided by the nodejs package is called nodejs. So, run:

nodejs
#or
/usr/bin/nodejs


Configuring MAAS with vmware esxi nodes and virsh

Instead of

esx://root@10.238.254.251/?no_verify=1

try to use

esx://root@10.238.254.251/system?no_verify=1


Using ClassicMenu Indicator from Launcher

Got it:

$ classicmenu-indicator --help
Usage: classicmenu-indicator [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -m, --show-menu       Show menu at mouse pointer location. This requires an
                        already running instance of ClassicMenu Indicator
  -i, --ignore-running  Start a new instance of ClassicMenu Indicator, even if
                        there alread is onerunning

So:

Right-Click panel → Panel → Panel Preferences... → Items → Launcher →  (edit) → General → ClassicMenu Indicator →  (edit) → Command: classicmenu-indicator -m

in addition to the Classicmenu-indicator in the Notification Area, which then can be set to ☑ Hidden there.


Guest Ubuntu cannot connect to the internet on VirtualBox, bridged

The question is simple,

Ubuntu 12.10
Sun Virtual Box can not get network connection if set up to use bridged adaptor.
I have the same issue.  NAT connection work fine.
I need Bridged or go back to ubuntu 10.10 where this all worked...

Thanks


You can find out if the missing clock is due to the broken locale by fixing the locale.

Open Language Support, select the Regional Formats tab, switch to some other option but the one you want, and finally switch to the desired option ("Português (Brasil)"?).

Plus log out and log in again.


Unfortunately, at this moment the version of Calibre that is in the 20.04 repos is version 4.99 which does not work with Python 3.  To make 4.99 work you would have to patch a file yourself as shown in the bug https://bugs.launchpad.net/ubuntu/+source/calibre/+bug/1898904 or you could download it from a different repository.  Either way, Canonical has not patched 4.99 to work with 20.04 yet in the official repositories.
Also, quoted from Calibre themselves:

Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install
described below.

You can download it from https://calibre-ebook.com/download_linux
You can also run the command from that site to install it (which is actually easier to install with):
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin

I have added the above command to a script called install_calibre so that I can run it anytime to update my calibre version to the newest at any time.
Hope this helps!


Thunderbird: restore single email account coming from folder backup

Thunderbird configuration folder
All Thunderbird configuration, including stored and cached email messages, live in a folder named like "avc2zu39.default-release" in a hidden ".thunderbird" folder in your home folder. The first part of the name is a unique random string of characters for safety against automated hackers. All stored and cached mail is under the "Mail" folder of that account. You will find subfolders for all your IMAP accounts, and a folder "Local Folders" containing locally stored mail, i.e. mail that you may have dragged there from IMAP accounts for backup, and eventually mail downloaded from POP accounts.
Thunderbird mbox format
By default, Thunderbird used the mbox format to store mail. mbox files are formatted text files, and in the thunderbird storage, these files are named after the folder name you see in Thunderbird, without extension. They are paired with a file with the same name, but the .msf extension. These are index files. If you delete them, Thunderbird will recreate them the next time it is opened.
IMAP accounts are cached only
IMAP accounts are not designed to "live" on disk. Thunderbird makes a local copy of the mail headers and, depending of your settings, also the mail content to cache the content, i.e., be able to interact with it quickly. It then constantly synchronizes your updates with the IMAP server. What mail is kept locally, and for how long depends on your Thunderbird settings.
Recovering (some of) your IMAP mail from backup
So chances are that (part of) your mail of your IMAP account which is closed, still lives in the "Mail/yourmaildomain.com folder in your backup. The safest would be to create a folder "Old_IMAP" in Thunderbird under "Local Accounts. Then close Thunderbird. Under "Local Folders", you will find that folder as a file "Old_IMAP" and a folder "Old_IMAP.sbd". Now, copy the mbox files of your backup of your IMAP account to that "Old_IMAP.sbd". Next time you start Thunderbird, you should find folders in that "Old_IMAP" folder, named according to the mbox files you added there, and containing whatever of your IMAP account that was locally cached at the time of backup.


I never use dpkg, I just open the .deb file and that's it, but please follow the instructions bellow instead.

For the other questions on how to install it via apt and keep it update I'm glad you ask since that is very important.

Run the following commands:

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get -y install google-chrome-stable

From now on it will show on the update manager each time there's a new version


Upon further reading one solution that pops up quite often is this-

Rename the isolinux folder to syslinux
In the same folder, rename the files isolinux.bin and isolinux.cfgto syslinux.bin and syslinux.cfg, respectively.

Give installation a shot after these changes.


How to open this strange wmv (wmv3) movie in Ubuntu?

This file is encumbered with Digital Rights Management (DRM) and thus cannot be played on Ubuntu.

MPlayer reports:

DRM License URL: http://www.microsoft.com/isapi/redir.dll?prd=wmdrm&pver=2&os=win&sbp=newclient
This file has been encumbered with DRM encryption, it will not play in MPlayer!

And mediainfo has the same story:

[...]
Encryption                               : http://www.microsoft.com/isapi/redir.dll?prd=wmdrm&pver=2&os=win&sbp=newclient
Encoded date                             : UTC 2016-02-11 00:07:28.422
MediaFoundationVersion                   : 2.112
[...]
Language                                 : English (US)
Encryption                               : Encrypted

ffprobe shows:

[asf @ 0x655d00] Ext DRM protected stream detected, decoding will likely fail!
[asf @ 0x655d00] DRM protected stream detected, decoding will likely fail!

Unfortunately this leaves your file completely unplayable under Linux....


In my Ubuntu MATE, go to Applications > Accessories > Passwords and Keys

You can also load it from shell: seahorse.

Then delete the "default" keyring.

Then reopen Chrome/ium again. It should prompt for password. Enter your password and check "remember". It worked for me.


This worked for me on Ubuntu 14.04
sudo service network-manager restart


Is there a way to force kalarm to start minimized in the notification area?

You can use Alltray to send any application to the notification area. It's in the archives/repositories.


Ambiance Theme was deleted /missing from Ubuntu 13.10. How to re-intall default theme?

You need to install the packages light-themes and dmz-cursor-theme for the ambiance theme.


I am finding the same error on a Dell inspiron 3000. Currently trying to dual boot with Windows 10 using uefi. I'll let you know if I find a workaround.

Edit**
I found this error didn't happen if you uncheck the options to download updates and restricted extras. Hopefully it works for you also.

I also find that uefi doesn't give me the option to boot into linux. So I choose "legacy" from the bios to install ubuntu, and then also choose it from the bios when I want to use ubuntu. I'm sure it's not the recommended way to get dual boot happening, but it works for me.


How do I correctly set ownership of a cifs mount?

As @terdon points out you need execute permissions to traverse a directory. Check the permissions on the mount point /media/some_mount in your example.
I'll use /mnt for my example

$ ll /mnt
total 20
drwxr-xr-x  5 root root 4096 Oct 24 01:42 ./

You'll note that while only the owner (root in my example) has write permissions and both the group (root in my example) and everyone else has read and execute permissions meaning anyone can see the contents of and traverse the directory. chmod is the key to setting permissions. After determining how the permissions are currently set, adjust them according to your requirements. For details on how to do this see the man chmod page. If you need further guidance, drop me a comment and I'll do what I can to help.


Terminal rows are misaligned when using TMUX over SSH

I had a similar problem and managed to resolve it with the advice from this blog post: http://blog.bigsmoke.us/2018/06/15/garbled-screen-in-tmux-on-ubuntu-18.04-in-konsole

Add the following to your ~/.tmux.conf:

set -as terminal-overrides ',*:indn@'

The blog talks about a bug in Konsole but for me the issue happened in other terminals too, including over SSH, and this fixed it.


Recovering Journal - Can't start my Ubuntu

Update:
I managed to do a live boot from a USB and delete a lot of files from my Ubuntu installation and that fixed it. It seems that the first port I tried booting the USB from wasn't working.


How to fix a black screen after faulty NVIDIA display driver install on 20.04

This is more of a post to help others who may be as confused as I was. The computer appears to crashed after installing a NVIDIA driver.
Pre
The laptop has NVIDIA display and USB-C + HDMI ports. The screens are mismatched sizes. Looks crazy!
Option1: The laptop has mini zoomed in screen and text or
Option 2: The external screens have giant zoomed in text. Working from home, nobody sees this, so I can use Linux, otherwise I might look like quite the fool with the 'Norms' at work.
Crash
I decide to installed the NVIDIA proprietary driver to see if I could resolve this issue. A warning appeared and after a reboot the display driver daemon stopped loading. (day 1 - friday)
Red Herrings
After researching (friday night), I thought that I could only get to grub. All the suggested posts cntrl + alt + functions keys did not seem to load a recovery option as described with this screen driver failure scenario,  or perhaps it's 20.04 ...I thought.
(Sat morning) After much research, I thought that it might be the fn key was locked on the laptop and maybe I should hold down cntrl + alt + fn + f2 . I finally got to a place where the boot process stopped without a complete failure. Alternatively, it's always been working and it me and the fact that the display driver is not loading. It just appears as if everything has failed.
The load process ended with many green [OK] lines appearing and just appears to have hung. I begun trying random key combinations as there must be some logical key combination that could get me to "level up"
Finally
After the Green [OK]s had finished loading
I tried cntrl + alt + fn + f4
Finally!! a login command prompt.
Now I can try all those posts about uninstalling and installing the screen drivers via the command line
Handy Commands
sudo ubuntu-drivers list
sudo ubuntu-drivers devices  Lists recommended drivers
sudo ubuntu-drivers autoinstall (This command stack tracked for me so did the below command as it was the recommended)
sudo apt install nvidia-driver-440
sudo reboot
Bingo!!
I still don't have a solution around the multi screens I am trying to run. Weird external zooming Maybe one day I will be paid to code screen drivers.


mysql installation issue - Ubuntu 18.04 bionic

The socket error usually points to the service not being started, and the error you got later ( inactive (dead) ) also points to that direction.

The most probably cause is an invalid option in your configuration file (as indicated by Reason: Invalid argument).

Try to backup /etc/my.cnf via

mv /etc/my.cnf /etc/my.cnf.bak

and then restart the service via

systemctl restart mysql

If that works, then move back the config file and restart the service after commenting lines one by one until you figure out which one causes the break.


cannot execute filename.o file in cygwin with gcc

posture_algo.o is a file containing object code. The executable your script creates is posture.exe, so you should be running:

chmod +x  posture.exe
./posture.exe


How to disable logging the flash drive in log files?

Run this in every minutes with root user to clear the logs for a given port:

#!/bin/bash

tmpfile="$(mktemp)"

sync; sync; sync
fgrep -iIR "] usb 2-3: " /var/log/* 2>/dev/null | fgrep -i " and address " | awk '{ print $NF }' | sort -u | while read i; do
    egrep -iIR "] usb-storage: waiting|] usb-storage: device |usb-storage: device found at $i| scsi$i : SCSI emulation for|] scsi $i:|] sd $i:" /var/log/* 2>/dev/null
    grep -iIR "] sd $i:0:0:0: \[*.*\] Write P" /var/log/* 2>/dev/null | sed 's/\[//g; s/\]//g' | awk '{print $9}' | sort -u | while read ONEDEV; do grep -iIR "$ONEDEV: " /var/log/* 2>/dev/null; done
    fgrep -iIR "] usb 2-3: " /var/log/* 2>/dev/null
    done > "$tmpfile"

    while read ONELINE; do
        FILENAME="`echo "$ONELINE" | cut -d : -f 1`"
        STRING="`echo "$ONELINE" | sed 's/:/\n/' | fgrep -v "/var/log" | sed 's/\[/\\\[/g' | sed 's/\]/\\\\]/g' | sed 's/\//\\\\\\//g'`"
        echo "$FILENAME XXX $STRING"
        sed -i "/$STRING/d" "$FILENAME"
    done < "$tmpfile"
    rm "$tmpfile"

dmesg -c > /dev/null


Unable to update Xubuntu from 14.04 to 16.04 using Update Manager

Try this:

First: You need to update the system.

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean

Now edit the file /etc/update-manager/release-upgrades and change the value of Prompt from normal to lts, continue running:

nano /etc/update-manager/release-upgrades

Ctrl+O Save File

Ctrl+X Close nano

Reboot your system to finish installing updates, and to upgrade to new available version:

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
do-release-upgrade -d

Software Updater will show up and search for the new LTS release

However, Ubuntu 16.04 is available now.

Press the button Upgrade to start upgrading to Ubuntu 16.04.

The Software Updater will ask you to confirm still you want to upgrade, press Start Upgrade to begin installing Ubuntu 16.04.

Now, the Software Updater will prepare to start setting up new software channels, and after a few minutes, the software updater will notify you the details the number of packages are going to be removed, and number of packages are going to be installed, press Start upgrade to continue.

Ended the dist-upgrade, reboot your system and:

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean


Open new Chrome tab into an existing window from terminal?

This alias works for me in 18.04:

alias gct='wmctrl -a " - Google Chrome" && sleep 0.5 && xdotool key ctrl+t'

It requires you to have wmctrl and xdotool installed. Both are in the software center.
wmctrl -a " - Google Chrome" will raise a window into focus if that window has - Google Chrome in its window title. (You can see that for yourself by running wmctrl -l or wmctrl -lx.)
xdotool key ctrl+t simply issues the same key sequence that you would issue to open a new tab in Google Chrome.

You may want to convert the alias into a script which does something if Google Chrome isn't running and then alias that script or even assign a shortcut key to it so you don't need to use the terminal for this purpose.


How to move a LAMP setup to a new Ubuntu server?

Your new server might not have the same hardware.

So install LAMPP server on the new system.

Shutdown the mysql service.
sudo /etc/init.d/mysql stop

Then copy /var/lib/mysql from the old system over to the new system.

Then copy /var/www from the old system to the new system.

Start up mysql again.
sudo /etc/init.d/mysql start

Note:

Most of the time copying /var/lib/mysql from one system to another system will work.

In anycase if that din work for you,then do mysqldump on the old server and run the resulting sql on the new server with mysqlimport.
mysqldump --all-databases > db_name.sql
mysqlimport db_name.sql


It seems that it was the local settings on my account that went haywire!
Creating a new user and mooving my nonhidden files(no configurations etc) to the new homedir, and chainging ownership solved this anoying problem.
After some cleanup and updates everything is back to normal.
Even usb support in virtualbox works now, that didnt before.
Installing skype from cannonical also works!


How to copy files from multiple directories, adding the parent folder's name to the filename?

Copying files from a source- into a target directory, adding the containg folder's name to the file

The script below will copy files recursively from a source directory into a flat directory, adding the name of the (direct) superior directory to the file's name. The directory's name will be inserted before possible extension on the file, exacvtly like your example.

The script

#!/usr/bin/env python3
import os
import sys
import shutil

for root, dirs, files in os.walk(sys.argv[1]):
    for f in files:
        # split off the superior directory's name
        dirname = root.split("/")[-1]
        # define file+path, possible extension position
        src = os.path.join(root, f); spl = f.rfind(".")
        # defining new filename
        newname = f[:spl]+"_"+dirname + f[spl:] if spl != -1 else f+"_"+dirname
        # copy the file into the new directory
        shutil.copyfile(src, os.path.join(sys.argv[2], newname))

How to use

Copy the script intyo an empty file, save it as copyandrename.py
Run it with the source- and target directories as arguments:

python3 /path/to/copyandrename.py <source_directory> <target_directory>

My test command was e.g.

python3 '/home/jacob/Bureaublad/pscript_4.py' '/home/jacob/Bureaublad/testmap' '/home/jacob/Bureaublad/target'

As always, please test on a sample first!


In what file does gnome-calendar store calendar events?

Gnome Calendar integrates with Evolution. It uses the data structures of Evolution to store your calendar.
A calender is stored in icalendar format in a calendar.ics file, located in a dedicated folder in ~/.local/share/evolution/calendar/. The name of the folder is a random string of 40 letters and numbers.
The calendar is named and registered to the Calendar (or Evolution) application through a text configuration file under ~/.config/evolution/sources/. These configuration files have the extension .source. The file name is the same 40 character string as the folder name where the calendar is stored.


fsck

boot to a Ubuntu Live DVD/USB
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Memtest

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Rambox

To try and cure the Rambox problem, uninstall the snap version, and install this .deb version here.

AMD

You're behind with your AMD video driver for your [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition]. You have version 19.0.1, and the latest is 19.20, and can be downloaded here.

BIOS

Note: Perform a backup before updating the BIOS

Note: Confirm that I have the correct web page for your hardware.

You have BIOS version F6. Version F8 can be downloaded from https://www.gigabyte.com/us/Motherboard/GA-Z87-HD3-rev-1x/support#support-dl-bios

Update #1:

The fsck solved some inode problems.

memtest passed with 0 errors.


sudo tcpdump -i eth0 proto \\icmp

If you wanna monitor an interface other that eth0, provide it's name in place of eth0.


Why LiveUSB wouldn't boot on Asus eeepc 1015cx netbook?

Did you try using USB installer provided at pendrivelinux( http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ ) to make your usb disk. You can find the tutorial here. Also you may have to change your boot options.


Available build targets can be found easily with

cd /path/to/gnome-build-meta
find elements/ -name *.bst


All required information about details for installation you have on docs page from phpmyadmin: https://docs.phpmyadmin.net/en/latest/setup.html
If you not need the newest version you can install it from ubuntu repository, for example as described here: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04


I wouldn't do it. It will be safer to save your data & do a clean install. There's no guarantee that the config files will match & that could create conflicts.


The mpstat output is showing you the averages since boot (not "now") when you run it without an interval setting.  You can adjust your call to:

root@datax:~# mpstat -P ALL 1

this should provide you more of the 'now' information


How To run Gedit and Subl commands in the background?

Opening gedit in background should allow you to use the terminal

  gedit &

Hope you know this .


Can I disable two-finger scrolling mode on touchpad?

Open "System Settings", go to "Mouse & Touchpad", go to the Touchpad section, and then disable "Two-Fingers scrolling":