Decoding Key Values from /dev/input/eventx in C

You will have to obtain the keymaps and use it to translate those codes you read from the file descriptor to the ASCII characters you want to log.

On Ubuntu, you can obtain the keymap with the command dumpkeys (run as root) or the command xmodmap -pke. For some reason, I don't quite understand yet, the output of xmodmap seems to have an offset. You can correct this offset easily, but I'm not aware of what is the reason behind it. Maybe it has to do with the xmodmap being originally written for Sun Microsystems and X11 using different keycodes (as it seems to be suggested here), but I'm just guessing out loud..


How can I batch convert images to b/w while preserving the folder structure

We can use convert command to convert images to black & white:

convert -colorspace GRAY image.png b-w_image.png

Where image.png is the input image and b-w_image.png is output imgage.

Combining this command with find we can create a bash one liner to convert all the images found under parent directory.

How-to:
Open terminal by hitting Ctrl+Alt+T, cd to parent/main directory and run the following command:

for img in $(find . -iname '*.png'); do echo -n "Converting $img"; convert -colorspace GRAY $img $img && echo ' [Done]'; done

It will convert and overwrite all the images under parent directory. I will suggest to test it on some temporary images and if you're satisfied with the results than run it on actual images.


smbmount uses mount.cifs underneath, which can not do NetBIOS lookups, only DNS lookups. The names displayed by smbclient are NetBIOS names.

You should be able to specify the IP to use to smbmount, e.g.:

sudo smbmount //192.168.1.2/Expansion_Drive /home/ashish/wdtvlive/ -o guest,rw

or, alternatively (some servers require the netbios name):

sudo smbmount //WDTVLIVE/Expansion_Drive /home/ashish/wdtvlive/ -o guest,rw,ip=192.168.1.2


Way of receiving alerts on login attempts, whether successful or not?

Well you could use cron with a silly little script to check /var/log/auth.log every 10 minutes. If you set it up correctly, cron will email output wherever you like so we just need a script to run:

#!/bin/bash
cat /var/log/auth.log | perl -MDate::Parse -ne '
  print if /login|ssh/ && /^(\S+\s+\d+\s+\d+:\d+:\d+)\s/ && str2time($1) > time-600'

This is based around this answer on SO by F. Hauri.

That's just looking for items with login or ssh in. You might want to add more or just exclude some. But on my system here's what it generates:

Aug 29 10:19:50 bert sudo:      oli : TTY=pts/10 ; PWD=/home/oli ; USER=root ; COMMAND=/bin/login
Aug 29 10:19:52 bert login[15544]: pam_unix(login:session): session opened for user oli by oli(uid=0)
Aug 29 10:19:54 bert login[15544]: pam_unix(login:session): session closed for user oli
Aug 29 10:20:11 bert sshd[15614]: Accepted publickey for oli from ::1 port 41663 ssh2: RSA XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Aug 29 10:20:11 bert sshd[15614]: pam_unix(sshd:session): session opened for user oli by (uid=0)

Save that script as something like /usr/local/sbin/checkauth (and chmod u+x it) and then you can add a root crontab line with sudo crontab -e:

*/10 * * * * /usr/local/sbin/checkauth

Stick a MAILTO="email@example.com" line at the top of the cron file too and (provided there's a mailserver installed — install postfix if not) you'll get emails of the output, iff there is any output.


How to disable permanently WiFi Broadcom in Ubuntu 19.10

You can blacklist Broadcom kernel modules.

Run in a terminal sudo nano /etc/modprobe.d/blacklist-broadcom.conf

Add there

blacklist b43
blacklist bcma
blacklist bcma-pci-bridge

Save by Ctrl+O and exit by Ctrl+X.

Run sudo update-initramfs -u and reboot.


Not sure, but the motherboard could be unsupported as mine is. I would use UNetbootin to make an install usb and see if that works.


Go to the Help menu > Install new software. Add this update site:

http://pydev.org/updates

Select "PyDev for Eclipse" and follow the installation instructions.

Here is more detailed


Try out Wine.
Search it in the Software Center. (It may get buggy with some .exe files, so there's a probability that it'll crash)


Which Compiz plugins can I safely disable?

You can delete all the Compiz configuration files on your Home Folder, so that Compiz will recreate them using the defualt values. Go to your home folder and delete then the following folders and files:

~/.cache/compizconfig-1
~/.compiz-1
~/.config/compiz-1
~/.gconf/apps/compiz-1
~/.gconf/apps/compizconfig-1

If you log out and log in again you should have just the default plugins enabled.


You might be able to find an option to manage the fan in your laptop's BIOS. Most laptops (especially consumer laptops) will not allow you to do that, and some may only allow you to force the fan to run at full speed.

tlp does not manage fan control, and besides, most laptops do not expose fan control abilities or even give fan speed readings to the OS.


Just add the module to /etc/modules to make sure it's autoloaded at boot.
Use the following command

echo r8168 | sudo tee -a /etc/modules

or edit /etc/modules with your favorite text editor and add r8168 to the bottom.

After adding the module, the initial ramdisk should be updated with this driver, run:

sudo update-initramfs -u


Is there a way to lock an encrypted drive from the command line?

Yes, you are using LUKS . You need to know the name of the name of the partition, where it is mounted, and crypt name, it is in /dev/mapper

To mount (decrypt)

cryptsetup luksOpen /dev/sdxy name_of_crypt
mount /dev/mapper/name_of_crypt /mount_point

To unmount (encrypt)

umount /mount_point
cryptsetup luksClose name_of_crypt

You may need to run those commands as root, ie sudo, so my advice is to configure sudo to run cryptsetup without a password.

Note: scripting mount / unmount of the encrypted data sort of defeats the purpose of encrypting in the first place. I would leave it as is ;)

See How to script a mount command involving a dm-crypt / luks volume but , IMO, the answer in that question is insecure as you password is now in plain text. You could use expect to automate as well

https://www.lifewire.com/linus-unix-command-expect-2201096


As far I can read from ArchWiki - you need to install zathura-pdf-mupdf plugin.

Currently there is a PPA named ppa:spvkgn/zathura-mupdf.

After contacting PPA owner we have package for Ubuntu 18.04 LTS (Bionic Beaver).

So if you have followed my previous method, then you can delete the pin/lock file and install binary packages from the repository as usual:

sudo rm /etc/apt/preferences.d/pin-zathura

sudo add-apt-repository ppa:spvkgn/zathura-mupdf

sudo apt-get install zathura zathura-pdf-mupdf

and enjoy!


As an alternate, if your primary concern is with performance, take a look at FreeNX.

Freenx is both fast and secure.

https://help.ubuntu.com/community/FreeNX

http://alandoyle.com/tutorials/setup-freenx-under-ubuntu/

https://launchpad.net/~freenx-team/+archive/ppa

To forward an entire session, you can also use Xephyr. Xephyr is an X session within your desktop.

See: http://ubuntuforums.org/showthread.php?p=3816948#post3816948

And if you are using Windows clients, you can connect with Putty and use Xming as a X client.


Error while installing Oracle JDK 9 Ubuntu 17.10

I tried to download Oracle Java 9 manually from the official Oracle website at: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html and the link to download jdk-9.0.4_linux-x64_bin.tar.gz is working. Your other alternative is to install openjdk-9-jdk from the default Ubuntu 17.10 repositories.

Install Oracle Java JDK the manual way

If you have problems getting Java 9 to work properly with React JavaScript library, don't give up because you can have multiple versions of Java installed alongside each other and set the Java version from the terminal by following the instructions in How to set default Java version?.


you have to wait until they release trusty version (14.04) if you want to use apt, otherwise you can compile the source file. Look at this link for instructions:
http://www.openfoam.org/download/source.php

This link also provides information for installing from source file
http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.3.0/Ubuntu#Ubuntu_14.04


You can either:

Open the Dash by clicking the Ubuntu icon in the upper-left, type "terminal", and select the Terminal application from the results that appear.
Hit the keyboard shortcut Ctrl-Alt+T.


Cloned dual-boot SSD to larger SSD. Deleted Ubuntu partition. Now laptop starts with "Minimal BASH-like editing"

When the Lenovo logo pops up on screen, press F1 to enter the BIOS.
Go to Startup > Boot
You should see a list of Boot Priority Order. In my case, I had ubuntu as first in line. Using the '+' or '-' key, re-order the boot sequence by making the Windows Boot Manager the first on the list.
Press F10 to save and exit. Reboot and your computer should load with the windows bootloader


Installation fails on Grub (Read only EFI partition?)

First make sure that hibernation is disabled - so boot into Windows, open command prompt as administrator and execute : powercfg /h off. Shutdown the PC completely - do NOT reboot.

Then install GRUB boot loader to your Ubuntu installation in EFI mode.
Boot from the Ubuntu installation media, open a terminal and execute:

sudo mount /dev/sda8 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sda
update-grub

Note : sda = disk | sda1 = efi partition | sda8 = system partition |    (taken from 'paste2' output)

Boot into BIOS - change the boot order in UEFI settings - select Ubuntu to be the default system.


How to make installed software visit the folder I created in root path?

thanks to @user535733 's comment, I got the root cause: the software I installed is a snap version , see the picture below

solution:

move my project file ( or sqlite file ) to the origin folder ( e.g. user home folder ) and continue to use the snap version.

uninstall the snap version from "software center", and then re-install the normal version.

$ sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser-testing
$ sudo apt update
$ apt install sqlitebrowser


How to list the last modified files in a specific directory recursively

To find the last 5 modified files from a certain directory recursively, from that directory run:

find . -type f -printf '%T@ %p\n' | sort -k1,1nr | head -5

%T@ with -printf predicate of find will get modification time since epoch for the files, %p will print the file names
sort -k1,1nr will reverse numerically sort the result according to the epoch time
head -5 will get us the last modified five file names

If you just want to search only in the current directory (not recursively), use stat:

stat -c '%Y %n' * | sort -k1,1nr | head -5

Or find:

find . -maxdepth 1 -type f -printf '%T@ %p\n' | sort -k1,1nr | head -5

Check man find and man stat to get more idea.


Some xfs mount options in pressed don't work(Ubuntu Server 20.04 LTS)

I believe the options supported by partman-xfs are limited to what is listed in this source file
noatime
relatime
nodev
nosuid
noexec
ro
sync
usrquota
grpquota

This is the /lib/partman/mountoptions/$filesystem file checked by get_mountoptions
A possible work around is to use late_command.  For example
d-i preseed/late_command string \
    sed -i -e '/xfs/ s/noatime/noatime,pquota/' /target/etc/fstab ;


Ubuntu 20.04 Installation stuck, dual boot with Win10 in the same SSD

You need to boot up from graphical safe mode. It is a graphical problem at this time. You should try under the ubuntu (graphic safe) option . It will work fine  i tried so much laptops but its stuck. But graphical safe mode will solve everything


Nautilus isn't displaying thumbnails for my NEF files (photo raw)

By default, Ubuntu doesn’t display thumbnails for NEF files. But you can try (as explained in this blog post) installing UFraw.

sudo apt-get install ufraw

And if itś not already existing, create a thumbnailer file /usr/share/thumbnailers/ufraw.thumbnailer, with content :

[Thumbnailer Entry]
Exec=/usr/bin/ufraw-batch --embedded-image --out-type=png --size=%s %u --overwrite --silent --output=%o
MimeType=image/x-3fr;image/x-adobe-dng;image/x-arw;image/x-bay;image/x-canon-cr2;image/x-canon-crw;image/x-cap;image/x-cr2;image/x-crw;image/x-dcr;image/x-dcraw;image/x-dcs;image/x-dng;image/x-drf;image/x-eip;image/x-erf;image/x-fff;image/x-fuji-raf;image/x-iiq;image/x-k25;image/x-kdc;image/x-mef;image/x-minolta-mrw;image/x-mos;image/x-mrw;image/x-nef;image/x-nikon-nef;image/x-nrw;image/x-olympus-orf;image/x-orf;image/x-panasonic-raw;image/x-pef;image/x-pentax-pef;image/x-ptx;image/x-pxn;image/x-r3d;image/x-raf;image/x-raw;image/x-rw2;image/x-rwl;image/x-rwz;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-sr2;image/x-srf;image/x-x3f;

This file basically say to exec ufraw-batch (with the good parameters) on any file with the specified mimetypes (including image/x-nef).


cd rom copy How can I copy music direcly to my computer and not a cd

To convert your CD-AUDIO discs to MP3 with Rhythmbox or Sound Juicer, you will need to install either gstreamer0.10-plugins-ugly or gstreamer1.0-plugins-ugly, depending on which version of the GStreamer API the app is using, to be able to have the MP3 option for encoding appear and work when configuring Rhythmbox or Sound Juicer.


How to install latest Mate DE 1.14 in Ubuntu Mate 16.04?

Currently it doesn't have .deb versions. You will have to download the package in another form and install it manually.
I am copying the original answer from here:Linux Mint forum

  Ok.. We have now Mate 1.14 released, but we don't have (jet) the debs
  in repos. But there is not a problem.. We can install it by hand, by
  compiling it.

  Note: This is just an example how to install the one package! To have
  entire desktop You must install entire suite!Just repeat the steps for every package and you're done.

  --- Before we begin -> sit down, make a coffee, calm down and make a SYSTEM BACKUP just in any case!
  --- I am not responsible for any damage done to your machine/system! All You do, You do at your own risk! If You don't know what you're doing, don't do that! Better wait for the packages in the ppa!
  --- Ok.. Download the package here (and/or all packages you need/want):
  http://pub.mate-desktop.org/releases/1.14/mate-desktop-1.14.0.tar.xz

  Or here:
  http://linux.softpedia.com/get/Desktop-Environment/Window-Managers/MATE-84165.shtml#download

  Entire release is here (recommended download source):
  http://pub.mate-desktop.org/releases/1.14/

  And here: http://wiki.mate-desktop.org/status:1.14

  Then unpack (one at a time) and install all the necessary
  dependencies:

  Code: Select all and then type sudo apt-get install gtk+-2.0

  Next go to the already unpacked directory, RPM in it and choose "open
  in terminal".

  Now type a command:

  Code: Select all and then type ./configure

  Then:

  Code: Select all  and then type make

  And at the end:

  Code: Select all and then type sudo make install

  Wait a moment, until it installs and do the machine reboot.

  If by the "./configure" some errors/infos about missing dependencies
  appears, then just simply install them and do the ./configure again.
  All should be ok now.

  If terminal shows something up about missing or wrong "dconf" version
  then do:

  Code: Select all and then type sudo apt-get install libdconf-dev

  And try again ;) This helped me and the installation ended without any
  other problems.

  That same installation schema apply for all other downloaded packages.

  Enjoy! :)


The icon for the store, and the icon in the package are separate:

You need to change the icon out within your click package, there should be a icon within the package, and a reference to it in the .desktop file as shown:

(Picture of a webapp package within the Ubuntu SDK)

So replace the .png file and if the name changes be sure to change the name where it says "Icon="


That is a hardware related matter, and can't be controlled by any OS. You could find something helpful in your BIOS, nothing much more.


How can I get rid of the yellow tint in the image from my Macbook's camera

Copying the calibration files from the Bootcamp install worked for me. Quoting from https://github.com/patjak/bcwc_pcie/wiki/Extracting-the-sensor-calibration-files :

Note: I've only tested this on 1871_01XX.dat. Use at your own risk and
report any errors.
When using the set files (sensor calibration settings) the colors look
much better. I only know how to extract them from the windows bootcamp
driver. These are the steps you can follow:

Download driver package from https://support.apple.com/kb/DL1837

Extract the \BootCamp\Drivers\Apple\AppleCamera64.exe file

Run: unrar x AppleCamera64.exe You should now have the AppleCamera.sys file which is the driver containing the set files.

Run the following commands:
dd bs=1 skip=1663920 count=33060 if=AppleCamera.sys of=9112_01XX.dat
dd bs=1 skip=1644880 count=19040 if=AppleCamera.sys of=1771_01XX.dat
dd bs=1 skip=1606800 count=19040 if=AppleCamera.sys of=1871_01XX.dat
dd bs=1 skip=1625840 count=19040 if=AppleCamera.sys of=1874_01XX.dat

You should now have the four .dat files with the follow md5sum
checksums:
a1831db76ebd83e45a016f8c94039406  1771_01XX.dat
017996a51c95c6e11bc62683ad1f356b  1871_01XX.dat
3c3cdc590e628fe3d472472ca4d74357  1874_01XX.dat
479ae9b2b7ab018d63843d777a3886d1  9112_01XX.dat

Copy the .dat files into your facetimehd firmware directory (eg.
/lib/firmware/facetimehd/)

Reload the driver
Check that you don't get the "Direct firmware load for facetimehd..." error.

You should now have correct colors.


Notepad++ Bookmark Lines, Advanced Search and Replace, Alternative Software Native to Ubuntu 19.04

For those in need of Notepad++

sudo snap install notepad-plus-plus

I now prefer to use KATE as I'm using Kubuntu.

It doesn't have the bookmarks option but you can do archive similar results by using regular expressions easily.

Other advance users should probable give VIM a try.

Intermediate users should go with ATOM, SUBLIME, or Microsoft Visual Studio.


Ubuntu 14.04 - Software Center - Edit->Software Sources disabled

I figured everything out.

For some reason, my System Settings process was called gnome-control-center. Since it seemed buggy, I removed it:

sudo apt-get remove --purge gnome-control-center

... expecting to then reinstall it to see if it would behave better.

After the uninstall I tried to access it from the top right system button and guess what... It DID show up with all the configuration buttons!

I have two guesses:

The distro upgrader changed the System Settings program but didn't update the name entry for the menu, because the package was there the whole time;

OR

At some forgotten point I installed gnome packages and screwed up Ubuntu's evolution. Then the distro upgrader didn't recognize it or or opted out to leave my choice of using a gnome tool instead of, maybe, "unity control center"?

Anyway. There is the info for anyone crossing this issue. I have seen other people in the same situation around the web. I hope this helps someone.

Editor's Addition (by Anwar)

It's the installation of gnome packages and not removing them cleanly. gnome-control-center is GNOME3 sessions part and not meant to be used in Unity.


Try type then

sudo apt-get -f install ubuntu-desktop


How to get Bus and Device relationship for a /dev/ttyUSB

Since I don't have your hardware I can't give you an exact answer.

I'd suggest that you go to the device in question, for example:

ls -l /dev/ttyUSB0

and obtain the major and minor node numbers. Let's say they are 116, 7

Then go to:

ls -l /sys/dev/char/116:7

(char, because a tty is a character device, if you were tracing down a disk device you would specify block instead of char)

In the output from the command you will see something a little like:

lrwxrwxrwx 1 root root 0 Sep  6 00:17 116:7 -> ../../devices//sys/devices/pci0000:00/0000:00:13.5/pci0000:00/0000:00:13.5/usb1/1-3/1-3:1.1/sound/card1/pcmC1D0c

The directory /sys/devices/pci0000:00/0000:00:13.5/usb1/1-3/ and its subdirectories have much information on the device. As an example, /sys/devices/pci0000:00/0000:00:13.5/usb1/1-3/busnum and /sys/devices/pci0000:00/0000:00:13.5/usb1/1-3/devnum. On my system these match the bus and device number mentioned in the device hotplug entries in /var/log/syslog.

Something else that works on my system for /dev/video0:

find /sys/dev -lname '*video0' -exec cat {}/device/busnum {}/device/devnum \; 2>/dev/null


Can a c++ compiler and includes be in one drive (system drive) and the code files themselves (.cpp) be at another?

Don't specify absolute paths in the include directive! If you want to include header files from other locations than the default paths you can use the pre-procecessor’s -I flag, multiple times if necessary. Pretty much all modern C and C++ compilers have embedded pre-processors, so you can simply specify the flag in the normal compiler command line:

cc [options...] -I/your/header/search-path -I/another/header/search-path [more options...] [source files...]

For more info see the GCC manual section on “Options for Directory Search” or equivalent sections of your C or C++ compiler’s manual.

make-based build systems will typically pass pre-processor, C compiler, and C++ compiler flags via the CPPFLAGS, CFLAGS, and/or CXXFLAGS environment variables respectively:

CPPFLAGS="$CPPFLAGS -I/your/header/search/path" make

If your project uses a different build system please consult its documentation.

You can ask more specific questions about compiler and build system instrumentation over on Stack Overflow as they’d likely be off topic here.


How to capture lines between two strings from a file, but only the last occurrence?

Just use Python. I don't really have time, but I'd start with this:

#!/usr/bin/env python

start = "Transfer started at"
end = "Transfer completed successfully"
buffer = ""
log = False

for line in open('logfile.log'):
  if line.startswith(start):
    buffer = line
    log = True
  elif line.startswith(end):
    buffer += line
    log = False
  elif log:
    buffer += line

open('output.log', 'w').write(buffer)

if log == True:
  print("End string was not found")


Installation of python3-distutils did resolve the issue.


gnome-terminal "cannot open location" error

That's strange.
With debian, it works fine… Did you try to give the full path to the gnome-terminal executable (i.e. /usr/bin/gnome-terminal)?
If it doesn't work, Alt+F2 call seems to be broken.


What is different symbolic link with hard link after unlik?

First of all, are you sure you've got the output of the programs around the right way?  I get a failure for the symlink version and a success for the hard link version.

Second, passing numeric constants as the flags argument for open is unportable and makes your code difficult to read.  The relevant flags are defined in <fcntl.h>, and the constant you are using is O_WRONLY.

If you pass a symlink as the first argument to open, it is equivalent to passing the name the symlink points to.  In your example, the symlink points to a non-existent file, causing the system call to fail.  If you would like the call to create the file, you will need to pass O_WRONLY|O_CREAT as flags.  This will result in the file foo being created.

For the hard link case, the name bar links to foo's file contents rather than the name.  Unlinking foo doesn't change this fact, so bar continues to exist and can be opened without O_CREAT.


Cannot launch an application, 'No such file or directory' but it exists

The usual case for this is trying to run a 32-bit binary on a 64-bit system.
This should show you if that is the case:

file /home/pst007x/Applications/ClipGrab/clipgrab /bin/bash

If it shows clipgrab to be 32-bit and /bin/bash to be 64-bit, the solution should be to install 32-bit libraries. You do this by installing the ia32-libs package


Libreoffice impress presentation, draw and base not available

For those of you who haven't resorted to the PPA and just want to install the missing pieces, Open Software Center, type libreoffice in the search box and select the missing components and install them. In my case, base is the only one I don't have installed. Example below:

If you've already unnecessarily installed the PPA you can revert to the distribution version vis the use of ppa-purge
ppa-purge provides a bash shell script capable of automatically down‐
       grading all packages in a given PPA back to the ubuntu versions.

       You  have  to  run it using root privileges

For further details in it's use please see the man page with the command
man ppa-purge


What is the default root login password for ubntu desktop iso

Ubuntu does not set the password for root on installation. Instead, run

sudo -i

and enter the password of the user which is logged in. You are now root. If you want to use su command to become root type

passwd root

after you have gained root privileges with "sudo -i". After the root password is set you should be able to run "su".


Installing acroread without browser plugin

If you are only concerned about disabling acroread plugins for your browser then (assuming you use firefox) Firefox --> Edit --> Preferences --> (search for pdf) and change value in front of it through the dropdown.


Restore name of windows partition to devices list in home folder

This problem solved itself after about a dozen cold restarts of computer over a period of more than a day.  Have no explanation for why.


No USB tethering possible with Galaxy S3

I've solved the problem using :

https://play.google.com/store/apps/details?id=com.tetherunlocker

Open the app, click on "unlock tethering", wait for the video completion, and magically tether works, try it and le me know.


Powerline installed without vim bindings

For those here from Google, add the following to ~/.vimrc if you have installed powerline from your distribution (sudo apt-get install powerline).

set rtp+=/usr/share/vim/addons/
set laststatus=2
set t_Co=256


You need to install ubuntu-restricted-extras package.

Install it using

sudo apt-get install ubuntu-restricted-extras


Dual boot with Windows 7 Ubuntu not booting

You have a nVidia card and need nomodeset for every boot, install or boot after install until you get nVidia driver installed using system Settings.

It looks like Boot-Repair or Ubuntu was installed in UEFI mode, but Windows is in BIOS boot mode with MBR partitioning and UEFI does not work with MBR. But your video card seems a older than UEFI systems. If UEFI involved make sure you get Boot-Repair to un-install grub-efi and install grub-pc for BIOS boot.

My computer boots to a black screen, what options do I have to fix it?


Safe to remove /usr/src/linux-headers after purging older linux images?

Those are header files are contained in the linux-headers-* and linux-headers-*-generic packages. It should be safe to remove them through apt-get. Maybe apt-get autoremove will already suggest that to you. Please do not remove them manually!


How can I help someone (like granny) over SSH who is behind a NAT router?

If your own computer can accept SSH connections, there is a way to use the technique that Pavlos G. linked to without an extra computer.

You first need an underprivileged* user that your friend will connect as:

sudo adduser reverse --shell /bin/false

Tell your friend to start the tunnel:

ssh -N -R 62222:localhost:22 reverse@lekensteyns-server

Then, on your own computer (lekensteyns-server), start the reverse connection:

ssh -p 62222 localhost

* I don't know enough about security to be able to advise on creating a suitably underprivileged user. That's probably something that should be covered in a separate question.


You shell environment will be updated when you restart it.  If you are using a terminal window, just close it and open a new one.  Some times logging out and logging back in well fix these issues that persist.


How do I troubleshoot a Broadcom wireless card (BCM43224 , 14e4:4353)?

The link you referred to says this device is Special Case #1 if you are running Ubuntu 14.04 and UNKNOWN if 15.04. In the footnotes, for Special Case #1, it says:

  Uses bcma and brcmsmac driver combination. Required firmware is
  installed by default in the package linux-firmware.

Which version are you running?

lsb_release -d

Which driver are you running?

lsmod | grep -e wl -e brcmsmac -e b43

Once we have more details, I will propose a solution.

The other link you gave us says that b43 works for 3.1+. That means kernel versions 3.1 and newer. Find out your kernel version with:

uname -r

For all Ubuntu versions that have not reached end-of-life, the kernel version is likely 3.13 and newer.


The .NET framework 3.5 or 4 doesn't run under wine (source). Right now (March 2011) there are some big profile bugs that are not likely to be solved soon. You can try to run this program with Mono, but very likely the only realistic way to run it on linux is through virtualization.


Thinkpad X41 Tablet Wacom stylus stopped working on Lubuntu 14.10

I finally got it to work with the following workaround:

I just removed the whole folder /lib/udev/rules.d/69-wacom.rules/
(Actually I moved it to my Desktop just in case I need it again.)

Then I added the following file (named 69-xserver-xorg-input-wacom.rules) instead of the removed folder (I have copied the file from the ubuntu installed on my lenovo X61 Tablet):

/lib/udev/rules.d/69-xserver-xorg-input-wacom.rules

# udev rules for wacom tablets.
# These rules were compiled for the Debian GNU/Linux distribution,
# but others may, and indeed are encouraged to, use them also.
#
# Should you do so, PLEASE CO-ORDINATE ANY CHANGES OR ADDITIONS
# of new devices with Ron <ron@debian.org> so that we can try
# to present users with a standard set of device nodes which
# they can rely on across the board.

# Catch the serial tablets and tell X that's what they are
ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="WACf*", ENV{NAME}="Serial Wacom Tablet"
ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="FUJ*", ENV{NAME}="Serial Wacom Tablet"
ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="WACf*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="FUJ*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"

KERNEL!="event[0-9]*", GOTO="wacom_end"

# Port specific link for users of multiple tablets of the same type.
# The ID_PATH variable is set by the "path_id" script in an earlier rule file.
ATTRS{idVendor}=="056a", ENV{ID_PATH}=="?*", SYMLINK="input/by-path/$env{ID_PATH}-wacom"

# Multiple interface support for stylus and touch devices.
DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="00", ENV{WACOM_TYPE}="stylus"
DRIVERS=="wacom", ATTRS{bInterfaceNumber}=="01", ENV{WACOM_TYPE}="touch"

# Type-named links for multiple tablets.  If you want to use multiple
# tablets of the _same_ type, you will probably need to use the links
# from /dev/input/by-path to identify which is plugged into what usb
# port.  For different tablet types though, just pick your links from
# the list below.
#
# We override SYMLINK for tabletpc devices because the by-path link
# is not required with such devices, there will only ever be one.
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0000", SYMLINK+="input/tablet-penpartner"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0003", SYMLINK+="input/tablet-cintiq_partner"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0010", SYMLINK+="input/tablet-graphire"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0011", SYMLINK+="input/tablet-graphire2-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0012", SYMLINK+="input/tablet-graphire2-5x7"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0013", SYMLINK+="input/tablet-graphire3"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0014", SYMLINK+="input/tablet-graphire3-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0015", SYMLINK+="input/tablet-graphire4-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0016", SYMLINK+="input/tablet-graphire4-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0017", SYMLINK+="input/tablet-bamboofun-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0018", SYMLINK+="input/tablet-bamboofun-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0019", SYMLINK+="input/tablet-bamboo1-medium"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0020", SYMLINK+="input/tablet-intuos-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0021", SYMLINK+="input/tablet-intuos-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0022", SYMLINK+="input/tablet-intuos-9x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0023", SYMLINK+="input/tablet-intuos-12x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0024", SYMLINK+="input/tablet-intuos-12x18"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0030", SYMLINK+="input/tablet-pl400"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0031", SYMLINK+="input/tablet-pl500"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0032", SYMLINK+="input/tablet-pl600"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0033", SYMLINK+="input/tablet-pl600sx"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0034", SYMLINK+="input/tablet-pl550"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0035", SYMLINK+="input/tablet-pl800"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0037", SYMLINK+="input/tablet-pl700"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0038", SYMLINK+="input/tablet-pl510"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0039", SYMLINK+="input/tablet-dtu710"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="003f", SYMLINK+="input/tablet-cintiq21ux"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0041", SYMLINK+="input/tablet-intuos2-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0042", SYMLINK+="input/tablet-intuos2-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0043", SYMLINK+="input/tablet-intuos2-9x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0044", SYMLINK+="input/tablet-intuos2-12x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0045", SYMLINK+="input/tablet-intuos2-12x18"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0047", SYMLINK+="input/tablet-intuos2-6x8a"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0060", SYMLINK+="input/tablet-volito"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0061", SYMLINK+="input/tablet-penstation2"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0062", SYMLINK+="input/tablet-volito2-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0063", SYMLINK+="input/tablet-volito2-2x3"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0064", SYMLINK+="input/tablet-penpartner2"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0065", SYMLINK+="input/tablet-bamboo"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0069", SYMLINK+="input/tablet-bamboo1"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0081", SYMLINK+="input/tablet-graphire_bt-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0090",  SYMLINK="input/tablet-tpc90"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0093",  SYMLINK="input/tablet-tpc93-$env{WACOM_TYPE}"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="009a",  SYMLINK="input/tablet-tpc9a-$env{WACOM_TYPE}"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b0", SYMLINK+="input/tablet-intuos3-4x5"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b1", SYMLINK+="input/tablet-intuos3-6x8"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b2", SYMLINK+="input/tablet-intuos3-9x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b3", SYMLINK+="input/tablet-intuos3-12x12"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b4", SYMLINK+="input/tablet-intuos3-12x19"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b5", SYMLINK+="input/tablet-intuos3-6x11"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b7", SYMLINK+="input/tablet-intuos3-4x6"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b8", SYMLINK+="input/tablet-intuos4-4x6"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00b9", SYMLINK+="input/tablet-intuos4-6x9"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00ba", SYMLINK+="input/tablet-intuos4-8x13"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00bb", SYMLINK+="input/tablet-intuos4-12x19"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00c0", SYMLINK+="input/tablet-dtf521"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00c4", SYMLINK+="input/tablet-dtf720"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00c5", SYMLINK+="input/tablet-cintiq20wsx"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00c6", SYMLINK+="input/tablet-cintiq12wx"
ATTRS{idVendor}=="056a", ATTRS{idProduct}=="00c7", ENV{WACOM_TYPE}!="touch", SYMLINK+="input/tablet-dtu1931"

# Convenience links for the common case of a single tablet.  We could do just this:
#ATTRS{idVendor}=="056a", SYMLINK+="input/wacom-$env{WACOM_TYPE}"
# but for legacy reasons, we keep the input/wacom link as the generic stylus device.
ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}!="touch", SYMLINK+="input/wacom"
ATTRS{idVendor}=="056a", ENV{WACOM_TYPE}=="touch", SYMLINK+="input/wacom-touch"

# Check and repossess the device if a module other than the wacom one
# is already bound to it.
#
# We probably don't need this one in the Real World anymore ...
# See the old wacom-tools package if we actually do need to resurrect the
# check_driver script for this again.
#ATTRS{idVendor}=="056a", ACTION=="add", RUN+="check_driver wacom $devpath $env{ID_BUS}"

LABEL="wacom_end"


Unrecognized Service ssh when building from source

You installed the openssh binaries, but not its Upstart service (the glue connecting ubuntu and openssh service).

You also probably installed the files with different paths than used in Ubuntu so getting service file (/etc/init.d/ssh) from Ubuntu wont solve the problem completely (but can give you some guide).

Regardless what makes you install openssh from source, it is almost never a good idea and you would better be with updating your Ubuntu to latest 16.04.


The applet stops responding after a while. It's a known bug. Network manager is fine.

Kill and (re)start the nm-applet, you don't even need root access:

killall nm-applet

then alt+f2 and start nm-applet. It should be working again fine for a while.


Why does Ubuntu create dublicates of a partition in /media?

Hmm, I can't answer you completly why this happens. But I can tell you that you are not using the right folder for what you are doing. These folders are used by the systems automatically e.g. the /media/ folder is used for automatic mounts of CDROMs etc.
I would recommend you using only your /home/user/ for such things. E.g. create a /home/user/Multimedia that one won't be changed by the system automatically.

You could read up the Ubuntu structure here
http://ubuntuforums.org/showthread.php?t=2037324


Using an external HD w/ Ubuntu as a repository?

/var/cache/apt/archives is just a cache. You can safely copy all your old cache to the new one. While installing, if a package is there, it should be picked from there instead of downloading it.


Sort alphabets and numbers first before the minus sign in LibreOffice Calc

To me, the way Calc does it seems like normal alphabetical order for roman script - spaces and punctuation should be before numbers and letters. However, I understand that there are cases in which you might want a custom order.
This can be done with a helper column. For example, if your data starts in cell A1, then put this in cell B1 and drag down to fill.
=SUBSTITUTE(A1;"-";"z")

Then select columns A and B, go to Data -> Sort and sort by column B. When done, delete column B.
If this is not good enough then you will need to write a macro function that inputs a string and returns a sort key. An example is at https://ask.libreoffice.org/en/question/52352/sort-with-custom-alphabet/.


As this is one file, and as you have ssh access, this should work. It should also work most Unix systems, including Mac. I believe a Windows interface is also available.

With ssh, you can normally access the remote machine by using this command:

ssh username@ip_address

or, sometimes, this:

ssh ip_address -l username

To copy a file from one machine to another, you need to use the scp command. This works like the cp (copy) command, but works through SSH.

Just for clarification, the cp command works like this:

cp '/SOURCE/FILE' '/DESTINATION/FILE`

So, to use the scp command, use this:

scp 'username@ip_address:/SOURCE/FILE' '/DESTINATION/FILE`

So in your case, I think it would be something like this:

scp 'username@ip_address:/home/mirk/ozone_dispersion_ENW4_2012091400.kmz 'WHICH/FOLDER/YOU/WANT/TO/PUT/IT/IN/ozone_dispersion_ENW4_2012091400.kmz'

You should then have it on your computer, and then be able to open it using Google earth, or some other .kmz reading program - some are listed here.

I hope this solves your problem.


Ubuntu 16.04 Screen lock suddenly not working

You don't need to install 3rd party package
You can re-enable lock screen directly from the terminal.
To see if Lock screen is disabled:
gsettings get org.gnome.desktop.lockdown disable-lock-screen
false

If result is true then use:
gsettings set org.gnome.desktop.lockdown disable-lock-screen false


No internet access via IPv4, IPv6 works fine

Since the issue occured again and again after several days, I decieded to keep a look on iptables. It seemed like every few days or so, my system is replacing the default rules for something wihtout proper destination.
Each time this happens , I used iptables -F to recreate the default settings and everything works fine now :-)


Movies lag in full screen, although flash works fine

I'm having the exact same problem, although I have a AMD HD5870 (with catalyst control panel) and a 32-bit system (Ubuntu 12.04).

I already disabled Sync to VBlank in Compiz config manager, but this did not do anything for my lag.

EDIT

After re-enabling the Sync to Vblank in compiz-config and logging out and in, the video playback was great. I suggest you try the same.


Relaxing/removing UFW limit for some IPs

Eventually figured it out:

ufw insert 1 allow in from nnn.nnn.nnn.nnn

where nn.nn.nn.nn should be replaced by the adequate IP of course.


These triangles are not part of the Unicode standard, they are shipped by the Powerline font at some private Unicode codepoint.

You should consult with Powerline's developers to see if they can improve the exact look.

gnome-terminal renders some of the line drawing and similar characters (the U+2500 .. U+259F range) manually, rather than taking them from the font. This is done so that they align better with each other. It's been suggested to extend this behavior with a few other glyphs as well. It probably would have been already done if these triangles were standard, official Unicode characters. Alas, currently it would have to somehow first autodetect if powerline is actually being used, which is a truly nontrivial task, too much hassle for 2 or 4 glyphs.

See https://bugzilla.gnome.org/show_bug.cgi?id=682635 for this discussion.

The best would be if you could get the Unicode consortium assign official codepoints to these glyphs. Unfortunately I don't know where/how this should be requested. Maybe first ask the Powerline guys whether they have already attempted this.

UPDATE: I've created a patch for VTE (the terminal emulator widget behind gnome-terminal and others), see at the link above.


My micro SD cards size decreased after making it boot-able?

I don't have enough reputation to display the image.

However,
install  https://apps.ubuntu.com/cat/applications/precise/gnome-disk-utility/

open disk utility, go to the removable device which is causing the trouble, select the partition unmount the partition with a stop button just below the memory map box.Delete the partition by clicking(-).unmount and delete the other partitions also ,without which the problem mightn't arise. Create a new partiton by clicking (gear) symbol.Select the type of file system you want , in my case its FAT.thats it.


You don't have to use a partition or hdd for swap.

Just create a swap file using dd or fallocate.

Create a file of filled with zeros 1GB in this case:

 dd if=/dev/zero of=/mnt/swap.img bs=1M count=1024

Preferred method: use fallocate instead of dd

  NOTE: fallocate is much faster than dd because it quickly allocates blocks and mark them as uninitialized, no I/O to the blocks.

fallocate -l 1024M /mnt/swap.img

Format the file to create a swap device

mkswap /mnt/swap.img

Adding the swap to the running system:

swapon /mnt/swap.img

Make it permanent, edit /etc/fstab and add the following entry:

/mnt/swap.img  none  swap  sw  0 0

More information: https://help.ubuntu.com/community/SwapFaq


If your interested in creating icons packs you should look here. Another good resource is  http://gnome-look.org/


Error with Qtcreator when running project "error: Unknown module(s) in QT: qml quickwidgets svg quick"

Found the solution, install qtdeclarative5-dev package:

sudo apt-get install qtdeclarative5-dev

What's the development package for Qt5 in 14.04


How to change internal IP address from DHCP to static?

You want to go by the classical interfaces file configuration, /etc/network/interfaces.

Edit the file:

sudo su
nano /etc/network/interfaces

Its content is invariably the following lines:

auto lo
iface lo inet loopback

And then the ethernet device, eth0 in this case, with the following lines:

Ip by dhcp:

auto eth0
iface eth0 inet dhcp

To switch to static IP, knowing the parameters in use by ifconfig, you must place similar lines to these:

    auto eth0
    iface eth0 inet static
    address 192.168.10.5
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.10.1

Of course you should change the values for your network.


How to install Brother MFC-9120CN Scaner?

Download brscan3 and scan-key-tool here:

brscan3 32bit 0.2.11-4

brscan3 64bit 0.2.11-4

scan-key-tool 32bit 0.2.3-0

scan-key-tool 64bit 0.2.3-0

And follow installation instructions here:

Scanner driver install

Scan-key-tool install


How much free space do i need to install Fedora 16 using Virtual Box on Ubuntu 11.10?

I think you need 6.5 or 7 gigabytes minimum for installing fedora 16


Is there a checksum utility equivalent to Hashtab for Windows?

You don't say what window manager or file manager you're using.

If you're using Gnome and Nautilus you can install nautilus-gtkhash  package. This adds a "Digests" tab to the Properties dialog for a file.

NOTE: You will have to restart Nautilus with nautilus -q before the tab will appear.


I tried to reset unity got some strange output. What to do?

From the looks of things, it seems like your 3D support is not enabled.

Somethings you can try are:

Reboot the system.
Run jockey-gtk and install the drivers for your card.
Ensure you have all updates installed.


KVM connection to a remote server (Ubuntu 18.04)

The error message tells you that you need openssh-askpass, or more precisely something that provides the executable /usr/bin/ssh-askpass.

You already have installed ssh-askpass-gnome, but on your headless server, where it does not belong (and probably pulled in lots of dependencies for graphical applications which you would not want there).

You have to install it on your desktop client instead:

sudo apt install ssh-askpass-gnome


I don't know the reason for your problem. But from what it looks like, it seems to be a kernel crash(panic) and not a GRUB issue.
I haven't done any Linux kernel crash dump analysis as yet. But I did find a post that explains how to do it:
http://www.dedoimedo.com/computers/crash-analyze.html
Hope that this helps you to find out the problem.


The system is most likely asking you for one of two things:
1) Your wireless WPA password
2) Your username password

Without knowing exactly where it is asking you for the password it is hard to ascertain which password it is asking for.

Either way make sure that you are issuing the correct password.


You want cron, which is the age old unix daemon for running scheduled jobs.  Gnome-schedule only runs in your gui session as you, and so won't be able to run commands with sudo since you aren't there to type the password.

Insert a file in /etc/cron.d/ to schedule a job to be automatically run as root at specified times.  To shutdown at 10:30 pm each evening, the line would be:

30 22 * * * root shutdown -h now


Dual boot installation on hybrid (ssd + hdd) storage

Option 1 seems to be the best.

Both Ubuntu and Windows should be fine with 128GB each.

For the shared HDD, if you are going to use the same partition for both OS, that is fine but you will have to make sure that partition is formatted as NTFS.

If you will be using 2 separate partitions for Windows and Ubuntu, you can partition the Windows partition as NTFS and Ubuntu partition as EXT4. However, this will mean that you can't access the Ubuntu partition form Windows. But with this, you can keep Windows Fast Startup on even though it won't have much effect if you are using an SSD.

Anyway whatever method you chose, make sure that the partition you will use for Ubuntu is automounted. This can be done by editing the fstab file.

Good luck.


You mixed up the numeric userid's.

First of all check the current configuration: grep -E [0-9]{4}  /etc/passwd You might want to check if the username (1st field) has the correct homedir (6th field).

If the passwd file is as expected: Check the output for id for every account and compare it with ls -ln /home.

Probably the easiest way to change it is as follows:

Log off from your desktop
Strike Alt+F1 and log in

sudo -i
cd /home
chown -R userid2:userid2 userid2
chown -R userid3:userid3 userid3
...
Strike Alt+F2
Check if you can log in without errors
Strike Alt+F7
Check if you can log in to your desktop without problems

You might want to wait with your first user (the one with admin privileges), to make sure if the procedure works as expected. Prevent locking yourself out.


the problem could be in your ip tables.
turn fire wall off.
flush the ip tables

  sudo iptables -F

try again without a firewall. If all works well try firewalld.

I had a similar problem and switched to firewalld. Its found in the Ubuntu Software and it works great. All the services can be added in the GUI.
Smpts, imaps, http, https, dhcp, dns. I would use the drop zone, nothing out, only in and drops every attempt to get in to your OS.

  sudo systemctl enable firewalld
  firewall-cmd --set-default-zone=drop

add the desired services in the gui (permanent, every start-up) then

  sudo systemctl restart firewalld.service

you can add transmission/or other service using runtime (temporary until next reboot) and NEVER go into the file system to change anything


How to install BURG on Ubuntu 13.04 with Windows 8 dual boot?

Follow these steps to install burg

Add to repository and install from there:

sudo add-apt-repository ppa:n-muench/burg
sudo apt-get update
sudo apt-get install burg burg-themes

While installing select ok (press Tab to select ok) for each message. and select sda for grub install devices message. You can use Space to select the option.
Update burg boot loader

sudo update-burg

Reboot your system.

Here are some hot keys to customize Burg:

t – Open theme selection menu
f – Toggle between folding mode
n – Jump to the next item with the same class
w – Jump to the next Windows item
u – Jump to the next Ubuntu item
e – Edit the command of current boot item
c – Open a terminal window
2 – Open two terminal windows
h – Display help dialog (only available in sora theme)
i – Display about dialog (only available in sora theme)
q – Return to old grub menu
F5/ctrl-x – Finish edit
F6 – Switch window in dual terminal mode
F7 – List the folded boot items
F8 – Toggle between graphic and text mode
F9 – shutdown
F10 – reboot
ESC – quit from the current popup menu or dialogue

It should work for you also.. :)


Can't change default browser in Lubuntu 19.04

Ideally you'd just follow the manual, ie.

https://manual.lubuntu.me/3/3.2/3.2.17/alternative_configurator.html

however it doesn't work for browser due to a known issue (Task 53 for the Lubuntu Team).

On the bug https://bugs.launchpad.net/ubuntu/+source/lxqt-session/+bug/1824654 there is a workaround, which is :-

  WORKAROUND

  Remove $BROWSER from the /etc/xdg/xdg-Lubuntu/lxqt/session.conf
  Remove $BROWSER from the $HOME/.config/lxqt/session.conf
  Get rid of the environment variable with unset BROWSER
  Follow these rules for switching browsers:

  Do NOT use $BROWSER, which can be set as a "Default Application" or an "Environment Variable" in lxqt-config-session
  ("Session Settings")
  To switch between chromium, firefox, or opera as default browsers, you can use the in-application mechanism
  For browsers without an in-application mechanism:

  Find the desktop file in /usr/share/applications associated with the browser, e.g. chromium-browser.desktop
  Run xdg-settings set default-web-browser browser.desktop

Please note I've just copy/pasted the work around from the 1824654 bug report.  The T53 task can be found at https://phab.lubuntu.me/T53 though it may require login permissions

All information here was provided by @wxl


Boot-repair: Can't boot ubuntu in uefi mode

It's not clear if you've installed Ubuntu in BIOS/CSM/legacy mode or if you're saying you haven't yet installed it but that you can boot the installer in BIOS mode.

If you want to boot the installer, either to install directly or to run Boot Repair, you must find your EFI's built-in boot manager. In most cases, this can be accessed by hitting a function key early in the boot process, but which one is completely non-standardized. (Some computers also use some other key, like Esc.) When it comes up, it will usually have two options for external media, one of which includes the string "UEFI" and the other of which does not. Select the "UEFI" option to boot in that mode and the other one to boot in BIOS/CSM/legacy mode.

In some cases, you may need to enter the firmware setup utility to disable its "fast start" feature (or words to that effect; again there's no standardization) in order for the boot manager to become available.

Also, note that only the 64-bit version of Ubuntu has an EFI boot loader. The 32-bit (x86) version lacks an EFI boot loader and so is not bootable in EFI mode unless you add an EFI boot loader of your own -- and installing the 32-bit Ubuntu on a system with a 64-bit EFI adds another layer of trickiness, so I do not recommend going that route.

Secure Boot should not be an issue, but sometimes it is, so disabling Secure Boot may be worth doing if you try other things and still can't get it to work.

As a general rule, you should not perform a BIOS/CSM/legacy-mode install of Ubuntu on a computer that already has Windows booting in EFI/UEFI mode. If you've already installed in this way, you pretty much must get the Ubuntu installer booted again in EFI mode, either to run Boot Repair or to re-install Ubuntu. The other option is to install an EFI boot loader in some other way. For instance, you could use the USB flash drive version of my rEFInd boot manager to boot Ubuntu in EFI mode, then either switch from the BIOS-mode GRUB (grub-pc) to EFI-mode GRUB (grub-efi) or install rEFInd to the hard disk via the Debian package or PPA.


Ubuntu Studio 16.04.2 focusrite 2i4 on jack

I was kindly helped in the following forum:

http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Scarlett-2i4-Focusrite-UbuntuStudio-16-04-td7633424.html

in qjackctl you should go to Setup/Advanced, in "output device" and "input device" you should see your soundcard. e.g. "USB, 0" Apply changes and restart jack.

cheers!

Jorge.


On 16.04, ifconfig-style interface-alias is lost when dhclient fails to get a lease

So I found out:

When dhclient times out on eth0, it checks /var/lib/dhcp/dhclient.eth0.lease for a recorded lease that is still valid (i.e., "expire" is in the future). If it finds such a lease, it runs dhclient-script (and puts reason=TIMEOUT and the lease's settings in the env.)

The relevant section of dhclient-script is

TIMEOUT)
    if [ -n "$alias_ip_address" ]; then
        # flush alias IP
        ip -4 addr flush dev ${interface} label ${interface}:0
    fi

    # set IP from recorded lease
    ip -4 addr add ${new_ip_address}${new_subnet_mask:+/$new_subnet_mask} \
        ${new_broadcast_address:+broadcast $new_broadcast_address} \
        dev ${interface} label ${interface}

    if [ -n "$new_interface_mtu" ]; then
        # set MTU
        ip link set dev ${interface} mtu ${new_interface_mtu}
    fi

    # if there is no router recorded in the lease or the 1st router answers pings
    if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}"; then
        # if we have $new_rfc3442_classless_static_routes then we have to
        # ignore $new_routers entirely
        if [ ! "$new_rfc3442_classless_static_routes" ]; then
                if [ -n "$alias_ip_address" ] &&
                   [ "$new_ip_address" != "$alias_ip_address" ]; then
                    # separate alias IP given => set up the alias IP & add host route to it
                    ip -4 addr add ${alias_ip_address}${alias_subnet_mask:+/$alias_subnet_mask} \
                        dev ${interface} label ${interface}:0
                    ip -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
                fi

                # set if_metric if IF_METRIC is set or there's more than one router
                if_metric="$IF_METRIC"
                if [ "${new_routers%% *}" != "${new_routers}" ]; then
                    if_metric=${if_metric:-1}
                fi

                # set default route
                for router in $new_routers; do
                    ip -4 route add default via ${router} dev ${interface} \
                        ${if_metric:+metric $if_metric} >/dev/null 2>&1

                    if [ -n "$if_metric" ]; then
                        if_metric=$((if_metric+1))
                    fi
                done
        fi

        # update /etc/resolv.conf
        make_resolv_conf
    else
        # flush all IPs from interface
        ip -4 addr flush dev ${interface}
        exit_with_hooks 2
    fi

So it first tries to ping the router in the lease and fails, then advances to "# flush all IPs from interface" and calls "ip -4 addr flush dev eth0", which also tears down eth0:1.

The second question, what changed: we are using a new DHCP server with much longer lease-times. Previously they were set to about an hour, so one hour after the last connection to the LAN this problem wouldn't show (dhclient cannot find a valid recorded lease), whereas now it was 12h.


First, openssh would need to be installed on both systems. You will need sudo privileges to install.

sudo apt-get install openssh-server

Second, obtain the current IP addresses of both machines.

ifconfig -a

Third, from Machine A, where the files you want to copy are located:

scp /mypathtofiles/filename username@xxx.xxx.xxx.xxx:/mypathtoplacefiles

Substitute, xxx.xxx.xxx.xxx with the target system's IP address.

Note: scp -r may be used to recursively copy directories. It is recommended to review the man scp for additional information.


cannot log in to ubuntu 14.04 following installation

No, you are not stuck with Windows 10. When you log in at the console login prompt, you will not see the password echoed, even with stars. That is the way it's been with *nix forever, or at least since I've been around.

Have you tried a live boot distro? These permit you to try out the distribution without writing to your hard disk. It may help to diagnose your installation problem. Looks like your hardware is on the older side of life, you could try an earlier version of Ubuntu. I found 10.04 to be a solid distro on my Pentium desktop.


Wine is available for Ubuntu 15.10 (also called wily).

To download simply open your terminal and type the following.
sudo apt-get install wine

and wine will be installed on your system. The above command will itself download all the dependencies required.
Winetricks comes with the wine package; installing wine will install it too.
Points to be noted

Using sudo apt-get install wine will install the stable version of wine, which I think is wine-1.6.2
Now, if you still want wine 1.7, which is unstable, then you will have to add the wine PPA. The information on how to do so can be found in installing wine 1.7
If you try to run sudo apt-get install wine1.7 without adding the PPA, you will see some errors.
After adding the PPA, you will be able to run sudo apt-get install wine1.7 winetricks too (most probably).


The folder you want to do that in is bin. The next build of Desura will fix libs to use your system libs over the ones packaged with the game so this issue doesnt happen.


Ubuntu 15.10: Suspend problem (Inspiron 7000)

I seemed to have solved the suspend problem by getting into the BIOS at boot time (Setup) and disabling three USB-related settings.

It is likely that just one of the three is sufficient for Suspend to work, but I haven't tried to figure out which one.

s1b


Some useful commands

Ctrl + A: Beginning of line
Ctrl + E: End of line
↑: Previous command
↓: Next command
Crtl + C: Cancel command
Crtl + →: Forward one word
Crtl + ←: Backward one word
Crtl + D: Delete current character
Crtl + W: Delete the last word
Crtl + T: Swap current character with the previous character
Crtl + K: Cut everything after the cursor
Crtl + U: Cut everything before the cursor
Crtl + Y: Paste the last cut text
Crtl + _: Undo
Crtl + S: Stop writing output to the screen
Crtl + Q: Start writing output to the screen
Crtl + L: Clear the screen


There's no point of doing this since the program is in 32-bit and your system is in 64-bit, the speed you may gain is lost in that it's a 32-bit program.
I don't think this program is designed for your hardware, it's probably intended for a 32-bit CPU and a 32-bit operating system.


Ubuntu Live 12.04.3 x64 Skip installation screen

First you need a Computer (let say we use Windows) and a Text editor (here i use Notepad++)

1 Browse your LiveUSB and find folder name isolinux or syslinux

2 Find file named sysylinux.cfg or isolinux.cfg create a backup of it,and open it on the ext editor

3 Copy this code in to it (you can modify it as you like but becareful)

default live
label live
  say Booting an Ubuntu Live session...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

4 Save it,and reboot.If something happen when booting you already have the backup.


I have the same problem and I use a "simple hack" to solve this issue:

To listen to your headphones only, go to Sound Preferences --> Output and from the "Connector" dropdown Choose "Analog Headphones". When you want the sound back to your speaker go back and select the option "Analog Speakers".

(yes, I know it's stupid, but at least I can listen to my headphones without disturbing other persons in the room)


Can't run x-executable through gui/shell

You've written a terminal program, not a GUI program, there's no graphical interface loaded at all by your program.  So it "not running" from the GUI doesn't mean it isn't actually running.

If you run it form the GUI, you need to run it as "Run from Terminal".  Otherwise it won't show any output ever.

However, you should probably instead be running from the terminal, navigating to the directory you saved the output in (the main file), then run it as you did.


There's an application called cheese which can do this. IIRC it's installed by default. If not, you can install it manually using the software center or by typing sudo apt-get install cheese into a terminal window.


66 Celsius (~150 degrees) is at the top of the range that I think it should be running, unless you're doing a lot of processor intensive stuff. My i5 idles at around 110-115 degrees.

The reason that I asked about the age and model of the computer, is because if it's in a dusty environment, the cooling fan can have reduced efficiency, or stop working all together. Also, the thermal paste that is in between the processors and it's cooling mechanism needs reapplication if it's old and not conducting as much heat away from the processors as it did when it was new. If you're not willing/able to remove the bottom cover from the laptop to check/clean the cooling fan, at least take a vacuum cleaner with an exhaust port, and with the machine powered off, blow air into the laptop via the vents to try and force out any dust.

Software wise, I'd remove laptop tools and tlp, and try this.

First, make sure that intel-microcode is installed. This will make sure that the processors are up to the latest revision. After installation and reboot, in terminal, you can type dmesg|grep microcode to see its operation in updating the processors.

Then I'd install thermald to see if that helps regulate the temperature better. It comes with a default config file that should work on most machines, but I wrote my own custom config file tailored to my Toshiba i5 laptop. You'll want to read up a little on thermald by typing man thermald and man thermal-conf.xml, in terminal. You can run thermald manually in --no-daemon mode to watch if it's doing the right thing, or as a basis for writing your own custom config file.

Let us know if this helps. Cheers, Al


You may want to read about apparmor for Ubuntu and selinux for rpm based distros like Centos.

https://wiki.ubuntu.com/AppArmor

http://selinuxproject.org/page/Main_Page


That ISO contains an UDF file system and it can be mounted using Furius ISO Mount. You can install it in Ubuntu from Software Center or from Terminal:

sudo apt-get install furiusisomount

When mounting the image, choose the loop method.

You will need root privileges.

After you're done with mounting you'll stumble on the next issue. Isn't that game a Windows only application? I guess you know how to use Wine.


What is the best audio and video recorder similar to Windows Media Encoder?

recordmydesktop is buggy & inconsistant at best. Secondly, if I understand correctly, the op is not wanting to record a screencast, but external video. IF a screencast is what the op wants, ffmpeg is the most consistant & quality option. Heres a vid with instructions (for Arch, but same instruction in Ubuntu) http://youtu.be/BuKo0l3ZfEE

As for the best video editing/recording options? Kdenlive & Openshot for editing.
But the best way I found for recording webcam video is to open Kamerka (webcam app) in full screen while recording the screencast with ffmpeg as instructed in the video. I do this all the time & it works great.

Audio? Audacity is the clear winner here.

If you record the audio with the video, you can use kdenlive to extract the audio, then open that in audacity for any editing as the easiest way I know to get a seperate audio version that matches the video


download apps (in Windows) from apps.ubuntu.com

You can use Cube. It is an offline package management system and runs in both Linux and Microsoft Windows.

Cube Running in Windows XP

Download it in Cube Launchpad Page , and check the CubeTutorial.pdf first to know how it works and how to run it in Linux and Windows. Still under development and currently in its 1.0.7 BETA Version. I hope that this will solve your problem.


If you're doing this for ISO/IEC 27001 perhaps you should consider setting up a central syslog server and having all your client machines forward their logs onto this computer.

Ubuntu uses Rsyslog and their wiki has several examples of possible configurations. The failover sample is probably most relevant.


Seems like blacklisting the sound module did the trick. Boots in about 30 seconds to desktop. Thanks a lot =) – Christian Aug 2 '11 at 18:20


When Power Manager isn't handling something, what handles it?

Xubuntu uses XFCE desktop environment as default. So the power manger is more likely a xfce application which is called xfce4-power. You can read the official documentation of the specific preference for this app in here: http://docs.xfce.org/xfce/xfce4-power-manager/preferences#display

If you checked "Handle display power management" the box, you could deal with below three display options.

  Check Handle display power management to allow Power Manager to manage
  the laptop's display.

  The three options — Blank after, Put to sleep after and Switch off
  after — are theoretically in ascending order of power saving
  potential. However, not all laptop hardware is capable of making a
  distinction among these three modes and there is no direct indication
  on a laptop if the display is actually being turned off, suspended or
  just blanked. You may have to experiment to see which, if any, of
  these options yields the most power savings.

  Power Manager does assume that each of these options will work at the
  hardware level and so it attempts to prevent an illogical
  configuration; e.g., a Blank after period greater than a Put to sleep
  after one. In a setup like the one shown in the screenshot above, if
  you drag the On battery Put to sleep after slider down to, say, 5
  minutes, the Blank after slider will automatically move to one minute
  less. Likewise, if you try to reduce the Switch off after period to
  less than the other two, it will move the other two sliders to one
  minute and two minutes less, respectively.


Xubuntu: Locale settings in /etc/default/locale are overridden by regional format settings

Manually editing /etc/default/locale is usually not a good idea on an *ubuntu desktop.

If you want that the changes affect all users on the system, you can create a file in the /etc/profile.d/ folder, for instance like this:

$ cat /etc/profile.d/locale-tweak.sh
export LC_NUMERIC=en_GB.UTF-8
export LC_TIME=en_GB.UTF-8

Otherwise, to affect your own user only, you can put those export commands in your ~/.profile file instead.


assign static ip address on the server, or based on MAC address?

DHCP

Pros

Single, unified file and machine to administer to change IPs
You can simulate 'static IPs' by assigning specific IPs to specific MAC addresses
Moving the clients to another networks works better

No subnet issues
No clashing IPs

Have more complicated configurations

Push routes from DHCP server
Push router and gateway information from DHCP server
Easier multi-subnet routing
More room to grow in the future

Cons

None that I can see

Local Static IP

Pros

If you don't have a DHCP server already set up, you can skip that hastle
Quick and dirty

Cons

Not having a centralized location for configurations, you could more easily create bad configurations

Clashing IPs

Harder to move to another network


Bind GNOME-Shell activities overview to custom mouse button

Copied from a Bohemian Blog post (dead now, Wayback Machine link) in case it dies:
Gnome 3: Activate Overlay and More by Mouse Button
I would like to activate the “Gnome 3/Shell Overlay” with the click of an otherwise-unused mouse button. As I posted earlier, Gnome 3 does not currently have any ability to assign actions/functions to mouse buttons. But there is a way to make it work using xdotool and xbindkeys. Thanks to AlphaLux (see comment below) I was able to replace my earlier easystroke solution with xbindkeys.
There’s also a program called easystroke that employs mouse gestures for executing shortcuts. The only reason I know this is because someone smarter than myself described the solution on the Ubuntu Forums. So, to “stinkeye” of the magical land of “Woop Woop”, I bequeath a laurel . . . and hearty handshake for answering this question about keyboard and mouse shortcuts in Gnome 3. Though I am including two solutions below, I recommend the xbindkeys solution.
First, descriptions of what  xdotool, xbindkeys and easystroke do:

xdotool

This tool is invisible. You will not directly use it. But it will give you the ability to compose a commandline instruction for telling your computer that a button or group of buttons have been pressed. There is more to it than that, but for our purposes that’s all that matters.

xbindkeys

This tool allows you to use bind keyboard and mouse keys to shell commands.

easystroke

This tool allows you to use “mouse gestures” to submit commands to your computer. Mouse gestures are akin to the “touch gestures” that are an important part of newer touch interface computer systems like Apple’s iOS and even OSX via their ever-growing touchpads as well as Android, Windows Phone 7, etc. etc. The instructions below will be using this program to merely press a mouse button. I won’t be talking about gestures today.
Making a Mouse Button Make Things Happen with xbindkeys
As described above my only motivation for this functionality is to summon the Gnome Shell Overview. The directions below will describe how to do that. Feel free to substitute your own functionality as you see fit. Hopefully the instructions will be written in a clear enough way as to make that easy to do.

AssignKeyboard Input to the Desired Functionality

System Settings > Keyboard > Shortcuts
In my case I set Show the activities overview to the Menu key, because I use the Super/Windows key for Third- and Fourth-level switching.

Install xdotool and xbindkeys

You’ll have to figure out the best/easiest way to do this for your flavor of Linux. If you are running Ubuntu you can install them via the Software Center or:
sudo apt-get install xbindkeys xdotool

Determine Mouse Button Identity with xev

Open a terminal and enter this command
xev

Xev will create a small, empty window. Hover your mouse over this window and click the various buttons on your mouse. After you click xev will tell you the identity of that button. Now that you know their identities we can use xbindkeys to associate them with shell commands.

Configure xbindkeys

Open a terminal and enter this command:
gedit ~/.xbindkeysrc

and press Enter. This will open the xbindkeys configuration file in Gedit. It should be a blank file. Add the following to the document and save.
# Gnome Shell Mouse Button 8 to Overview
"xdotool key Menu"
release + b:8

The above configuration sets the mouse button 8 to activate the Gnome Shell Overview. The first line is a comment to help you remember what this setting does. The second line defines the shell command to be enacted within double quotes. The third line defines the button action, in this case upon the release of the mouse button 8 the command will be executed.

Set xbindkeys to autostart on login

From the Gnome Shell Overview > Applications list, look for “Startup Applications” and start it. After the application window appears click the Addbutton. You can title the entry whatever you want, but “xbindkeys” is nice and concise. Most importantly though, enter the following into the Command input:
xbindkeys &

Once correctly entered, click OK and then Close. Now xbindkeys will automatically start upon logging in.
Making a Mouse Button Make Things Happen with easystroke

Install xdotool and easystroke

You’ll have to figure out the best/easiest way to do this for your flavor of Linux. If you are running Ubuntu you can install them via the Software Center or:
sudo apt-get install easystroke xdotool

Easystroke Preferences

Start Easystroke. Go to the Preferences tab. Under the Behavior section, click the Gesture Button button. Move your cursor to the empty gray space in the resulting window and click the mouse button that you would like to associate to activating the Gnome Shell Activities Overlay (or whatever you are trying to do at the click of a mouse button). Once you click you should see a change in the settings at the bottom of the small window. In my case I have a Logitech laser mouse and I am using “Button 8”. Also under the Appearance section check the option “Autostart Easystroke”.

Create New Easystroke Action

Go to the Actions tab. Click the Add Action button. Name the action “Overlay via Mouse”. The Type should be “Command” and the Detailswill be:
xdotool key Menu

Associate Mouse Button to Easystroke Action

In Easystroke highlight your new “Action” by clicking on it. Click the Record Stroke button. Move your cursor to the small resulting window and click the desired mouse button. Click the Yes button to confirm your mouse button input. Click the Hide button when you are finished.
Again, unless you specifically want to use mouse gestures, I think xbindkeys is a better, more responsive solution than easystroke. You should be able to test this fancy new functionality immediately. If not, try logging out and logging back in. Enjoy.


how can i recover to my last folder crushed by the installation of new ubuntu

If you formatted your HDD, it's not possible to get the system back. Maybe some parts of the project could be recovered using TestDisk or other recovery software, but I highly doubt that.


If your talking about xorg.conf then it should be in /etc/X11 but according to the official page "Most systems don't ship with an X config file any more, but sometimes you need one"

From Ubuntu forum it states:

The correct place is /etc/X11/xorg.conf, but the file doesn't exist by
default in Ubuntu (things are mostly automatically detected instead).

If you need to configure something in that file, just create it and it will be used

Source:

https://wiki.ubuntu.com/X/Config

https://ubuntuforums.org/showthread.php?t=1618251


VisionTek Flashdrive issue with mounting

This flash drive seems to show all the signs of not working, and will probably never work.

Typically, flash drives will always present a disk of some sort: either formatted, or an "Unallocated" partition type. If neither of these exist, it means that the drive is refusing to expose a workable filesystem or block storage device. If there was any underlying block device, fdisk would have been able to detect it (unless you weren't root?). This by itself heavily implies a hardware or firmware failure on the part of your drive.

Your best course of action would be to contact your drive's manufacturer and request a replacement.


There are a number of parameters that can be adjusted within MySQL's configuration file that will allow you to improve the performance of the server over time. For initial set-up you may find Percona's my.cnf generating tool useful. This tool will help generate a my.cnf file that will be much more optimised for your specific server capabilities and your requirements.
Do not replace your existing my.cnf file with Percona's one if you have already loaded data into the database. Some of the changes that will be in the file will be incompatible as they alter how data is stored on the hard disk and you'll be unable to start MySQL.

Source


On the Windows machine I add the network drive \ip-address\folder, I
  get user/password prompt and enter my Ubuntu ID and password, but it
  just says "Access is denied".

There are two passwords on a machine acting as a Linux Samba server. One is the local login name and its associated password that you use to log into the operating system itself.

The other is the samba password for that local login user that you use across the network. You need to add yourself to the samba password database with this command:

sudo smbpasswd -a myUbuntuID


I have not had this problem but try just unplugging if it is not doing any work.

sudo umount /mnt/share


Display Scaling, or how to make the display not go past the edges of my screen

I found the answer for my issue after more digging.
Using code xrandr --output HDMI1 --transform 1.05,0,-35,0,1.05,-19,0,0,1 has gotten me almost exactly where I can see everything.
I found the answer here at this URL: Overscanning picture problem using HDMI with Intel Graphics


how do i install ubuntu from a copied version of original ubuntu 11.10?

You never need to buy an Ubuntu disk. While they are burnt at the right speed with the correct files, you shouldn't need to worry about that. Rather, just head on over to the download page on Ubuntu's site and download an ISO and burn it to a disk...they have guides even for if you need help.

http://www.ubuntu.com/download/ubuntu/download


How do I copy and paste files from one directory to another using the mouse?

It seems that Ubuntu 12.10 does not have this function.

Yes, it does. In exactly the same way. Example image:

It shows both cut (move) and copy as options. Paste is added/highlighted when you have something to paste:

The only reservations I have with this:

You need to have permissions to use the location you want to move/copy files to. If you do not you need to have the admin of that system open that location for that user.

  Is there a workaround?

No and not needed either.


sendmail that delivers all mail to a directory, storing it separately

I don't know if this applies to your use case, but I guess you want to configure postfix to use the Maildir format instead of a single file. For my Mail server I followed the Debian Wiki Article: http://wiki.debian.org/Postfix#Maildir


Can I run different versions of Ubuntu in a tab on my Chromebook

Your question is not clear.

What do you mean by tab in 'run different versions of Ubuntu in a tab'.

It is apparent that your question is about installing two different desktop environment not different version. If I am right, your answer is YES.

How?

If you have unity, simply you can install xfce Desktop Enviroment by this commands:

sudo apt-get install xubuntu-desktop

Then, in login page, you have option to choose to login to which environment.


import Certificate in Pdgin for Microsoft Lync 2013

Just found that posting here and decided to leave some answers as no input was given:

The proxy in the name isn't a proxy on your PC, it is a reverse proxy which seemed to be used in the lync implementation on your side
Pidgin on Lync 2013 works fine with TLS-DSK enabled
Make sure that you use the correct user agent, Lync has a policy which can block clients which aren't in a list configured by the admin


I would recommend Hewlett Packard printers, most of the printers from this manufacturer work nicely on Ubuntu. The HP Photosmart D7200 series works flawlessly for me on 10.10


How to configure vim to start automatically when my PC boots?

Yes, but I don't see using it without a terminal (unless you use gVim). You can add it to .bashrc in your home directory ( or .bash_profile under some circumstances ).

See https://help.ubuntu.com/community/AddingProgramToSessionStartup for instructions on adding startup applications in Ubuntu. The command would be one of the following:

gvim #vim GUI version

gnome-terminal --command 'vim' #execute ONLY vim in a terminal

gnome-terminal #start a terminal, and vim will load if it's in .bashrc

Replace "gnome-terminal" and "--command" with your favored terminal emulator and syntax for running commands on startup, respectively.


Why must GRUB be installed to a drive rather than a partition, and how does the BIOS find it?

In BIOS mode, the computer system looks for a bootloader in the very head end of the computer, which is pointed to by /dev/sdx, while /dev/sdxn points to the head end of partition n in drive x.

If you have a bootloader in very head end of the computer (MBR), you can chainload to the head end of a partition (PBR), and in this case it can be useful to install a (second) bootloader there.

If you do not want to overwrite the head end of a partition (MBR), you can write to the head end of partition (PBR) without chainloading. Later on you can run sudo update-grub in the main operating system and get grub menuentries for the new (dual- or multi-boot) operating system.


Ubuntu 17.10 - fails to pick up bluetooth devices after upgrading

I experienced this issue on Ubuntu 17.10 with kernel 4.13.0-16-generic.

I have Bluetooth adapter "8087:0a2b Intel Corp.," and I receive the same error in your output:

$ dmesg | grep -i Blue

Ubuntu Bluetooth 8087 0a2b Intel Failed to disable LE scan status 0x0c

Here is a workaround that resolved the issue for me.

Edit iwlwifi.conf

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

Add the following line to the end of this file and save:

options iwlwifi bt_coex_active=0

Then reboot.

This may be a regression kernel 4.13, per Bug #1729389. If you think  this bug affects you, you should mark yourself as impacted, so it gets addressed.

An alternative solution, suggested in the same bug report, may be to downgrade to kernel 4.10, but the above is probably easier to try first.


hit power button at "tty1-6" the system shutdown immediately?

You have an error in your setting ...

set HandlePowerKey=ingore;

should be

set HandlePowerKey=ignore;

After I changed it in /etc/systemd/logind.conf and then rebooted tty1 through tty6 do no longer shutdown my machine. When I press the poweroff button it I get ^@ next to the login.

This is on a notebook and with 16.04.

Please confirm if this is a typo in the question are actually what caused this

The manual has a couple of things to say about this:

HandlePowerKey=,
HandleSuspendKey=,
HandleHibernateKey=,
HandleLidSwitch=,
HandleLidSwitchDocked=

  Controls how logind shall handle the system power and sleep keys and the lid switch to trigger actions such as system power-off or suspend. Can be one of "ignore", "poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep", and "lock". If "ignore", logind will never handle these keys. If "lock", all running sessions will be screen-locked; otherwise, the specified action will be taken in the respective event. Only input devices with the "power-switch" udev tag will be watched for key/lid switch events. HandlePowerKey= defaults to "poweroff". HandleSuspendKey= and HandleLidSwitch= default to "suspend". HandleLidSwitchDocked= defaults to "ignore". HandleHibernateKey= defaults to "hibernate". If the system is inserted in a docking station, or if more than one display is connected, the action specified by HandleLidSwitchDocked= occurs; otherwise the HandleLidSwitch= action occurs.

  A different application may disable logind's handling of system power and sleep keys and the lid switch by taking a low-level inhibitor lock ("handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch"). This is most commonly used by graphical desktop environments to take over suspend and hibernation handling, and to use their own configuration mechanisms. If a low-level inhibitor lock is taken, logind will not take any action when that key or switch is triggered and the Handle*= settings are irrelevant.

"HandlePowerKey= defaults to "poweroff"": So a wrongly set value would cause a poweroff.


accidentally mv’ed all contents of / to a different directory

Boot from a live-USB.

Open a terminal as root (with sudo -s).

Find the storage device affected, on which you were working, with fdisk -l. I'll call it /dev/sdx1, but of course you should substitute the final part (sdx1) with the correct device partition.

Mount it with mount /dev/sdx1 /mnt.

Issue mv /mnt/destination/* /mnt.

Dismount it with umount /dev/sdx1.

Shutdown, remove USB, boot normally.
You should have it all fixed.


Can't install anything in Software Center

Since the install button won't work, instead select the software you want to install by clicking on File on the top menu, and click "Install", and see if it will work.


How to start just the panel to show list of open windows?

Finally I got it done as follows
Remember this is a cloud box and I am looking for a programmatic way of starting just the panel. I have decided on the xfce panel as it is light weight and very easy to customize.

sudo apt-get install xfce4-panel

make sure you have "task-list" in the panel.

Configuring xfce panel is very simple. To set the default settings for every user one just needs to edit /xdg/xfce4/panel/panel.xml. Its a simple self explanatory xml file.


How do I compare equality of two files in Ubuntu?

You can use diff with -q option. From diff's manpage:

-q, --brief
       report only when files differ

Example usage:
$ diff -q a b
Files a and b differ

If the files are identical, there will be no output. However, if you want to report if they are identical as well, you can use -s option with -q.
From the same manpage:

-s, --report-identical-files
       report when two files are the same

Example usage:
$ diff -qs a b
Files a and b are identical


Go with Lubuntu 14.04. It is supported till April 2019. I have 3G RAM on an old HP laptop with an AMD Turion T-58 processor. It's bit slow on Unity Desktop but still workable.

The RAM upgrade will increase responsiveness by reducing swapping memory to disk.

If you just need a server then it will work well.


How to Transfer a zip file into ubuntu server?

It sounds like you've sshed in to the remote computer and you're trying to scp from a local file. That won't work. The remote shell session has no concept of your local filesystem.

You need to push the file from something running in Windows. WinSCP is a good client. You feed it your SSH details and it'll give you decent enough file access on the remote server. Or you can use a SFTP (like Filezilla) client, again working over SSH.


Will replacing Windows 8.1 with Ubuntu limit processor fearures?

Linux should support hyperthreading and virtualization (in probably all mainstream AMD/Intel processors):

Virtualization - You can use various programs to virtualize, such as VirtualBox, Gnome Boxes etc
Hyperhtreading - it working should show twice the amount of CPUs in system monitor, to check in more detail this post may help

You should be able to test to some extent whether these features work on your machine in the Live environment on the Install disc, so you don't have to install to see if it works. You hardware should be supported anyway.

Note their are varying drivers available for hardware (e.g. some CPU drivers support 'governors' that allow changing the frequency to increase speed or decrease power usage - this can easily be changed with this panel indicator).

Also, you can dual boot with windows 8 if you want, instructions to help with this are here.


I have tested the above link.

The configuration you are using din't work for me  but

Gateway: 83.170.84.216 worked for me.

Also in the "Advanced ..." check the "Use Point-to-Point encryption (MPPE)" option.


How to install PostgreSQL on Ubuntu 13.04?

You need to run something to resolve the postgresql-common conflict in short with the following (read only the bottom if you just want it to work and don't care why)

The long winded reason. Basically the 3rd party postgresql-common (build 141+) says it Breaks: logrotate (>= 3.8). The included ubuntu postgresql-common package (build 140) does not have this problem. postgresql-9.2 only requires a build of 135 or greater of postgresql-common. By running the following commands. This will specify a repository to get postgresql-common from, which in this case the ubuntu provided package of build 140 of postgresql-common while using the 3rd party apt repo to install Postgresql-9.2

Follow these instructions installing the precise sources repo:

  Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example, replace squeeze with the actual distribution you are using:

  deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main

  (You may determine the codename of your distribution by running lsb_release -c.)
  Import the repository key from http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc, update the package lists, and start installing packages:

  wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -

Commands to run if you once you have the apt

sudo apt-get update
sudo apt-get install postgresql-common -t raring
sudo apt-get install postgresql-9.2


How can I fix my KDE theme after upgrading to Kubuntu 13.04?

I was able to fix this problem by reverting all desktop theme settings, installing the kdeartwork-theme-window  package, and logging in again.


12.04 and Windows 7 Dual-boot won't connect with ethernet

Run the following command

sudo mii-tool

It will show the MII status of your interface. Here are sample outputs:

sudo mii-tool
eth0: negotiated 1000baseT-HD flow-control, link ok

sudo mii-tool
no MII interfaces found

If you have the first output then its Ok, you can now go to the last section to reload your driver. Basically mii-tool uses the MII unit of the NIC card to auto negotiate but most of the time it fails because of the NIC card problem or cable problem. Check your cable properly if you have the second output.

If that does not solve your problem you can reload the kernel module (driver):

check the driver in use:

sudo lshw -C network | grep "configuration"

You will see the output having the drivers name:

  configuration: autonegotiation=on broadcast=yes driver=r8169
  driverversion=2.3LK-NAPI duplex=full

Now unload the module and load again:

sudo modprobe --remove r8169
sudo modprobe r8169

Now you might need to restart the network-manager.


Strange duplication of variables when including into bashrc file

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

This command does not just set or overwrite LD_LIBRARY_PATH, but rather takes the existing variable and expands it with :/usr/local/lib

Take a look at .bash_profile and /etc/profile, whether the variable is also set there. You could also set:

export LD_LIBRARY_PATH=:/usr/local/lib

in bashrc.


I took a moment searching the problem in the internet, one of the proposed solutions :

sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt update
sudo apt install brightness-controller

Normally, after this, you will have the brightness controller. You can find it under Settings>Power menu or search it in Dash.


Will Ubuntu 16.04 LTS have a 4.5.2 kernel update?

Ubuntu 16.04 will never have a 4.5.2 kernel update.

Ubuntu does not update with mainline kernel versions.

Canonical Kernel Team backports bug fixes and some support of new hardware from upstream kernels to Ubuntu kernels.

Important fixes get into Ubuntu kernels 4.4.0-xx from 4.4, 4.5, etc mainline kernels.

You can see the source of Ubuntu 16.04 kernel HERE.

It is possible that the fix you need has been already backported.


Cannot upgrade from Kubuntu 13.10 to 14.04

The only good way to solve this issue is to check the error at the bottom of either "/var/log/dist-upgrade/apt.log" or "/var/log/dist-upgrade/main.log" and see which package is causing you trouble. In my case, it was xserver-xorg-video-all. I removed it and the upgrade continued just fine.


Are you running out of space physically on your hard disk?


Can a Windows computer access Pulse sound server on an Ubuntu computer?

Please take a look at this section of PulseAudio FAQ.

Regards


My Ubuntu is a slower than Windows, what could be causing this lack of performance?

Unity is running in software emulated 3D mode, because your graphical processor is unsupported. This is why ypur system is slow. The only thing you can do is to install Ubuntu 12.04, as it still has unity 2D. Also I found a site for you, which shows you how to install a working driver for your GPU. Link

SiS and Via GPU-s are poorly supported under linux, usually there is no 3d, and you need some extra work to get them working. (I have Via Unichrome in my laptop and SiS 730S in my old pc.)


Can I install Ubuntu on Lenovo Ideapad G505s laptop?

I am using Lenovo G580 and everything work out the box. Try it. Love it? Install it.


Here is your solution :

#! /bin/bash

mkdir dir
for ((i=1;i<=25;i++)); do
    printf 'x=%s\ny=4\n' "$i"
    for ((j=50;j<=70;j++));do
        t=$(bc <<< "scale=1; $j/10")
        printf 'z=%s.1f\nw=4\n' "$t" > dir/diles_$i\_$t.txt
    done
done

Explanation :

Bash works only with integer, so you can't do your loop with a float / decimal (you see that I just use a division by 10 below)
We use bc command, which convert integers operation (a division for example) in order to get float; scale operator show how many decimal we want to have (here, 1 is suffisant in order to not have many 0, like bc -l do)
we need to add a \\ in the filename because it didn't take care of the i to name files ifnot

Also, I pointed that your 1st printf command just print result like that in the terminal, probably you would add them inside each file (instead of terminal display), so you must use the code below in this case :

#! /bin/bash

mkdir dir
for ((i=1;i<=25;i++)); do
    for ((j=50;j<=70;j++));do
        t=$(bc <<< "scale=1; $j/10")
        printf 'x=%s\ny=4\n' "$i" > dir/diles_$i\_$t.txt
        printf 'z=%s.1f\nw=4\n' "$t" >> dir/diles_$i\_$t.txt
    done
done

NB : the >> operator or the 2nd printf command is important here (1st printf didn't care, depends only if you want to take care of previous data - >> -, or not - >), because if you use just a > operand, you would erase all previous data (so output of the 1st printf would be removed)

Sources :

How do I use floating point division in Bash
How to pass results of bc to a variable


What to write instead of \x20 in path name in Bash?

If the path is My\x20Book with the backslash, an attempt to grep it will have to escape the backslash both from grep, and from bash, and that can be done by using backslashes twice for each level:

$ echo 'My\x20Book' | grep My\\\\x20Book
My\x20Book

The shell reduces each \\ to \, so grep receives My\\x20Book, and then grep reduces \\ to \, so that it finally matches just My\x20Book.

To protect from the shell, you can quote the backslash, and eliminate the outer set of backslashes:

$ echo 'My\x20Book' | grep 'My\\x20Book'
My\x20Book

To protect from grep, you can tell it use fixed strings and not regular expressions, and now use just a single backslash:

$ echo 'My\x20Book' | grep -F 'My\x20Book'
My\x20Book

By the way, since you're using find, you can just use its filtering ability directly:

$ touch 'My\x20Book'
$ find . -name 'My\\x20Book'
./My\x20Book


I had to add the repo again. Then run:
sudo apt install ppa-purge && sudo ppa-purge ppa:otto-kesselgulasch/gimp
sudo apt-get install gimp

After that gimp was able to install and start normally.