Copy files from one home directory to another

I'm not sure what have you tried so far, so I'll try to explain a bit.

If you just want to move the files from one home directory to another, you could run

mv /path/to/old/hdd/home/$USER/stuff ~

which will copy your files. If you prefer not doing it via the command line, you could try nautilus (the file browser that opens when you open "Home" in Gnome).

If you don't know how to find your old partition, you should first of all mount it (which you can do easily from Nautilus), then navigate to home/username in the old hdd, where username is your username.

Now it might happen that when you copy the files, their ownership remains, which might bother you. Normally when you copy files to your home directory, they will change ownership and become "yours". If this is not the case, you could just create a target folder and chmod it to force all its content to inherit ownership:

mkdir target
chmod 2775 target

…and then copy files to the "target" directory.

Or, you could just chown $USER copied-files -R to gain ownership of the copied files.

UPDATE: If your home directory was encrypted, try the procedure described in this thread:

  Swapped hard disks between the two laptops
  Installed new system
  Created a user with the same username and password
  On completion I booted to recovery mode, set the old /home partition in fstab and moved the /var/lib/ecryptfs/ directory from the
  old system to the new (so to have the same old keys) (backup is
  advised of course)
  Booted the new system and everything worked like before

If you did not have /home on a separate partition, you could just

log out with your user on the new system
move your old home directory out of the way (using root)
copy the old home directory from the old HDD to the new one
log in with the user that has the same username and password (useradd it if it does not exist, or passwd your password temporarily back to what it was on the old system)
copy the files to some other folder that does not get encrypted (i.e. out of your home dir)
logout again
swap back to your new home directory (again with root)
move the files from the temporary place to your new home directory

Hope that helps.


How do I configure my MCE remote in Xenial?

This guide fixed my problem:

http://madaboutbrighton.net/articles/2015/remote-control-media-player-without-lirc-using-ir-keymap

Especially adding the following to: /etc/rc_maps.cfg

nuvoton-cir     rc-rc6-mce     rc6_mce


What are Ubuntu 10.04 LTS system requirements?

Some of the answers here might supply you with the answer you seek.


Vista to Ubuntu 12.04, no internet connectivity

Open terminal

Type:

lspci -k

in the terminal

Post the results and we'll try and help.


Downloading Ubuntu, why its shows "amd64"

AMD64 is the standard designation for Intel/AMD architecture 64-bit versions of the operating system.  It is AMD64 because AMD produced the first-marketed 64-bit CPU chips, and the competing Intel 64-bit hardware never really took off (Intel wound up copying the AMD instruction set, in the end, as I understand it).


Why the Onboard on-screen keyboard doesn't auto-show in google-chrome?

This question was about an older Ubuntu version, but in case someone is looking for an answer for Ubuntu 18.04 or the current development version Cosmic 18.10, this may help:

The new Gnome on-screen keyboard in Ubuntu 18.04 is this one:
https://help.gnome.org/misc/release-notes/3.28/

However, note that the description in these release notes is quite misleading  (and the description in the Ubuntu help is as well in a different way: It depends on whether you use the default X session or Wayland, and enabling it in Universal Access settings may or may not help).

Following is a (slightly edited for correctness, though there may still be mistakes based on confusion) copy of my recent comment on an earlier bug report. You can find further links including additional new bug reports there: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1760399

Auto-summon of the new OSK in Ubuntu 18.04 only works with application/toolkit support. Text widgets in alien (non-Gnome or non-Gtk?) toolkits don't summon the OSK (Chrome, Firefox, Qt, whatever other toolkits; I don't know if this is even standardized by freedesktop.org.
Because of alien toolkits there is always a need to summon on demand. Since Gnome 3.28 in Ubuntu 18.04, you can summon on a touch screen by swiping up from the bottom of the screen. However, this ONLY works in a Wayland session, not in X. I can confirm that it does. None of this is described in the Gnome 3.28 release notes or the Ubuntu 18.04 help. These are clearly documentation bugs.
Judging by the confusion in this bug report and the many questions on Askubuntu,com, it seems that the swiping up eluded even those users who have access to the feature because they use Wayland. Quite clearly this is not sufficiently discoverable, which IMHO is a bug. (Of course this is not helped by the buggy docs)
The Gnome extension to summon on-demand (https://extensions.gnome.org/extension/1061/on-screen-keyboard-button/) does NOT work with touch in Ubuntu 18.04 (Gnome 3.28) according to the author, and neither does it in Cosmic (3.30). It works with the mouse but this is awkward to say the least. The author will hopefully be able to look into it but it may take some time.
I don't know why for me in Gnome 3.30 (Cosmic) the auto-summon only works for Activities and Applications menus search boxes, and not elsewhere in Gnome as far as I can find. Hard to believe that this is a bug in every Gnome application, maybe a Gtk bug?


How to intall ungoogled-chromium on Ubuntu 18.04

From inside the folder containing the chromium-ungoogled .debs type:

sudo apt-get install libminizip1 libre2-4 ungoogled-chromium*.deb

Note: make sure all of the chromium-ungoogled .deb files are there, including the common one.


How to make a multiple launcher in xfce4-panel (Xubuntu)

if not already installed run sudo apt-get install xfce4-quicklauncher-plugin to install.

Right clicking on your panel will bring up panel menu > panel > add new items. In the add new items window scroll down and left click quicklauncher left click add. Then you can customize the quicklauncher.


Runing a java program, Oracle JDK installed

The problem generating the error
Java looks for your application in the path specified by your package directive.  In this case com.company.
You can compile that simple program by commenting out the package directive, compile it without the package, or create the path and call it by the full path.
$ mkdir -p com/company
$ mv Hello.class com/company/
$ java com/company/hello
hello, world

If you remove the line package com.company; by commenting it out it will work as you have already tried and expect.
If you have a large project with multiple folders for your class files you can use a jar manager program or the command line version jar to create a Hello.jar file.
Your IDE is providing the path and other details specified above.  You can manually create this environment for running your commands (as well as having multiple classes and packages in your archive) using the jar command.
Using the Jar command to create jar programs
You can create your Hello application to run as intended and have the type of path included using this method:
Create the path
$ mkdir -p com/company

Place your class files in the path of the package line:
$ mv Hello.class com/company

Create a manifest file to indicate the main class location
manifest.txt:
Manifest-Version: 1.0
Main-Class: com.company.Hello

Run the jar command to create the package
$    jar cfm test.jar manifest.txt com/
You will now have a new file created, called test.jar.  The second argument could have been named anything including Hello.jar or just hello.  The new file can be run in a number of ways:
$ java -jar test.jar
$ ./test.jar

If you have created the jar file by with the second argument being hello, you could run it with:
$ ./hello

You could also rename a java.jar file to any name after it's created and run it by that name.
Running a Java class is very restrictive in that it has to be run by the class name by which it was compiled.
To run a jar file as a command without the "-jar" argument you would have to change the permission bit (chmod +x Hello.jar).
Jar Command Details
The jar arguments in this example are:

    -c  Create a new archive
    -f  Specify the archive (jar filename)
    -m  Include manifest information from the specified manifest file

Jar is installed along as part of the JDK package.  You can get more details of using from the man pages (man jar) as well as a quick help by running it without an argument.


acpi=off is turning off your acpi while ubuntu is booting, and if you need it to boot Ubuntu it suggests that your acpi is not compatible with this version of Ubuntu. You can add this permanently to the grub installer after your installation is complete if it did not get added automatically.

As for the grub-efi-amd64-signed failed installation /target/ issue, from what I found with a quick search, your installation is missing some dependencies.

The resolution suggested is that you have your system connected to the internet during the install and that you enable the

download updates during the installation

in the prepare stage of the installer. If you still have problems after this, then you should check in the system log for further details which you can post on here.


Screen backlight is Disabled After Installing Nvidia GeForce 9600m GT Drivers

I have the same model and finally corrected a different driver/hardware failure involving the fingerprint reader. After a driver update the computer stopped recognizing the reader. I was just about to return to sony for service after trying to uninstall & revert the driver failed to fix it when I found this fix in amazon customer reviews:

  Power off and disconnect the battery overnight which will require the system to reload all system drivers when you reattach the battery and power it on.

It worked for me and it can't hurt to try for your issue!  I assume you have already used the hdmi output to hook up an external display to then open device manager and open the video display driver adapter and click on the 'uninstall driver' then restart the computer.  This should dislodge the last nvidia driver update that probably caused the display settings failure and reinstall the previous version assuming it worked fine before.

Hope you find this helpful and I'd send it back to sony for service if not. Even at this age they're asking @ $1000. for this laptop. I think it's a great computer so spending some on service & repair might be a good investment. Good Luck!


Windows Boot Partition was deleted after re installing Ubuntu 13.10 and can not boot into Windows

Found the answer!

The state of my system before the fix is described in the following Boot Repair file: http://paste.ubuntu.com/6784341/

I just followed the instructions in the answer for this post:
https://superuser.com/questions/460762/how-can-i-repair-the-windows-8-efi-bootloader

Note that you'll probably have a different configuration than the one showed in that post. Make sure that the volume you make active is not the same one as the one with your Windows OS in it or the System Recovery Information on it. For me it was Volume 1.

Also GParted did not show the volume I used with DISKPART. I think this is because there is a difference between Volumes and Partitions although Microsoft claims the term is interchangeable.

I was able to boot Windows by using the BIOS boot menu or the Grub menu. However my BIOS now has two separate Windows Boot Manager entries.


URL extensions.gnome.org for managing GNOME Extensions not working in any browser

You need to install chrome-gnome-shell package so that your browser can detect your running GNOME Shell version. To install it run

sudo apt install chrome-gnome-shell

Note: Installing GNOME Shell extensions doesn't work with the snap versions of the browser applications. Also since the 19.10 release, Ubuntu offers only the snap version of Chromium, the apt version of Chromium is not available in the standard repos.


How to bypass mounting of all participation during booting

Edit /etc/fstab and remove the auto word from the entries for your network filesystems. This will break mount -a (which is documented as mounting all the auto entries), and you will have to mount the network filesystems manually (mount /mountpoint)


How can I evaluate the community behind an Ubuntu package?

You can infer some things from the changelog. First off, let's have a look at the changelog in Ubuntu:

https://launchpad.net/ubuntu/+source/gridengine

If you click on the little expander things you'll see the Ubuntu changelog. In there for oneiric you'll see:

  gridengine (6.2u5-3ubuntu1) oneiric; urgency=low

  Resync with Debian:

  drop setting -Wno-error, it's already done in Debian package
  100-as-needed.diff: new patch, fixes FTBFS (LP: #770777).
  Rebuild gets rid of binary dependency on openssl0.9.8.

Ok so it looks like last person who touched this packaged synced with Debian, which is good. Now let's look at the Debian changelog:

http://packages.debian.org/changelogs/pool/main/g/gridengine/gridengine_6.2u5-3/changelog

It appears as though the package is actively maintained in Debian as well, so far so good.

Since someone is actively keeping the package in sync with Debian it's probably a good indication that the maintainer is responsive. What I recommend here is to file a bug against the ubuntu package, and then outline the steps of your problem and then go from there.

There are other things you can do to see how active a community is around the package. For example you can see if the people who touch it post regularly on the upstream mailing list, do they send patches upstream routinely, etc. Though for me personally the changelog is usually a good enough indicator.


I had the same thing happening to me, and I performed a new installation. That caused me problem with my manager, and now I have the same problem again after installing flutter and Android studio.

At this moment, I don't know what to do because I need the data in my laptop.

I think that Android Studio comes with the latest Java and that causes  problems.


Yes. See post #7 in your link.

Backup the config file (optional):

cp ~/.config/user-dirs.dirs ~/.config/user-dirs.dirs.bak

Edit the file by commenting out unnecessary entries:

vim ~/.config/user-dirs.dirs

Run update command:

xdg-user-dirs-update

DO NOT REMOVE XDG_DESKTOP_DIR


There's no need to install application files to your HDD - as any other program files they're very rarely written to. What you need to do is to make BOINC keep its data files on the SSD. From their website:

  What the installer does

  Puts the BOINC binaries (boinc, boinccmd and boincmgr) in /usr/bin .
  Creates a configuration directory /etc/boinc-client ...
  Creates the working directory /var/lib/boinc-client/ for BOINC data files and the slots and projects directories. Also creates links from this directory to the files in /etc/boinc-client

So what I would do is to install BOINC first, then move /var/lib/boinc-client/ to somewhere on your SSD (taking care to keep permissions) and create a symlink at /var/lib/boinc-client/ pointing to the new location

(alternatively you may check the configs in /etc/boinc-client and see if it's possible to change the data directory from there)

UPDATE: How to create a symlink:

make sure BOINC is not running
move the directory:

sudo mv /var/lib/boinc-client /home/boinc-working-dir

create the symlink:

sudo ln -s /home/boinc-working-dir /var/lib/boinc-client


Bash runs executable fine in 10.04 but not in 11.10 or 12.04

Looks like that your binary was built for 32-bit systems. Try installing the 32-bit C library:

sudo apt-get install libc6:i386

If it still does not want to run, use ldd to find out the library names. If libx11.so is missing, you probably need a package named like libx11. You can always use http://packages.ubuntu.com/ to find out the package name by searching for file name.


Install Ubuntu on Raspberry Pi 2 Model B

The login prompt appears before the boot process is complete, so you ended up with a screen like this in which the boot messages continue after the Ubuntu Server login prompt:

Sometimes when this happens you can wait until the boot messages stop and you get a blinking cursor, and then just press Enter and get a fresh login prompt. If that doesn't work, try to login again from a new virtual console.

Open a virtual console (tty) by using the keyboard shortcut Ctrl+Alt+F3.
At the login: prompt type your username and press Enter.
At the Password: prompt type your user password and press Enter.

If you still can't login, run the command: sudo reboot from the console, and maybe you will get a working login prompt the next time when the Raspberry Pi reboots.


Run xrandr -q and find the false display.

Then get the full name from

ls /sys/class/drm

It will look something like "card0-DSI-1".

Edit /etc/default/grub

and change

GRUB_CMDLINE_LINUX=

to include

"video=DSI-1:d"

or the equivalent of the card name you got from the ls command above and then finally run

sudo update-grub

and reboot.


Apparmor doesn't work with 3.1.5-pf kernel

The upstream kernel needs to be patched with an AppArmor compatibility patch to be able to work with the AppArmor userspace tools.


How can I make the Windows game Feltstars work on Ubuntu?

You may wish to look at this question for information on how you might be able to directly execute the program you already have under Ubuntu.

Looking at http://linuxowns.wordpress.com/2008/11/14/playing-poker-on-ubuntu/ I can see there  there is at least one native Ubuntu application. It mentions PokerTH.

You might want to take a look for games you might like in the Ubuntu Software Center.


deb package has no usr/lib after installation

Installation directories should be defined in the debian/[applicationname].install file. Check if you set the correct path (/usr/lib) for your scripts and it should work.


ThinkWiki is a good site for setting up Linux on Thinkpads.  There page on the stylus may be a good place to start.


How to install Hadoop on Ubuntu 12.04 32-bit?

While searching for solution to your problem, I came across the same problem on stackoverflow- Hadoop command not found.

Maybe this can help you.


How to natively install Adobe Reader in Ubuntu 16.04?

I have just found out that this answer to that same question suggests running sudo apt install libxml2:i386. This solved for me.

But I ended up uninstalling it because there were no commenting and highlighting features.

EDIT: I suggest everyone trying playOnLinux, it uses the version of Wine known to work for each software. (but still couldn't make powerpoint work, though)


I've had the same problem ever since upgrading to 11.10.  From my experience and what I've found googling, the regressions were introduced with 11.04 and not significantly improved with 11.10.

I haven't successfully found a solution for 11.10 but I have found documentation indicating that someone at canonical is aware of the existing regressions and have plans to improve behavior for 12.04 (which also implies there is no solution for 11.10):

http://design.canonical.com/2011/12/improving-the-multi-monitor-experience-in-ubuntu/
http://design.canonical.com/the-toolkit/unity-multi-monitor-interactions/
https://docs.google.com/document/d/1aHvJ-iIw-59bXTYBmIhQqEx0za2h9jpFE_RhZ2VOvJc/edit?authkey=CJO5wPkH&hl=en_GB&pli=1

In particular, see section 2.5 of the google doc (sorry there are no page numbers) which has a nice graphic of what should happen on disconnecting and reconnecting an external display and also section 3.11 which details a use case which perfectly matches mine (and sounds pretty close to yours, although you didn't explicitly mention a laptop).

Of course, a spec doesn't mean it will actually happen but it is promising that the spec has a working solution for every situation that I have encountered mostly targeted for 12.04 (with some more complete aspects targeted for 12.10).


Pycharm does not start because "No JDK found"

I had this issue today myself. I installed pycharm via getdeb repository so my installation folder is located at: /usr/share/pycharm/bin. In order to fix this issue steps are:

sudo gedit or sudo xed /usr/share/pycharm/bin/pycharm.sh
find Line: JDK=`update-alternatives --list java | grep java-8 | sed 's,jre/bin/java,,' and replace it with JDK = '/usr/lib/jvm/java-8-oracle/' or JDK = '/usr/lib/jvm/java-8-openjdk-amd64/' if you're using openjdk.
Save and exit, then try running pycharms again. You should be good to go.


I can not install openGLUT on ubuntu 16.04

OpenGLUT is obsolete and last updated in 2004. It's unlikely that it'll work on modern systems. Install FreeGLUT instead:

sudo apt install freeglut3-dev


lost right-click open with java - jar file

Open /usr/share/applications and look for a file named "OpenJDK Java 6 Runtime".
If it doesn't exists create a file named /usr/share/applications/openjdk-6-java.desktop
with the following contents:

[Desktop Entry]
Name=OpenJDK Java 6 Runtime
Comment=OpenJDK Java 6 Runtime
Exec=cautious-launcher %f /usr/lib/jvm/java-6-openjdk-i386/bin/java -jar
Terminal=false
Type=Application
Icon=openjdk-6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true

You should change the "/usr/lib/jvm/java-6-openjdk-i386/bin/java" part of Exec to the location of java on your system. Then reboot and the option should be there.


Can't test this myself as I do not use usbmount, but I am guessing the variable

FS_MOUNTOPTIONS="uid=1000,gid=1000,dmask=0077,fmask=0177"

needs to be modified.

According to the documentation:

# Filesystem type specific mount options: This variable contains a space
# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
#
# If a filesystem with a type listed here is mounted, the corresponding
# options are appended to those specificed in the MOUNTOPTIONS variable.
#
# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
# is mounted.
FS_MOUNTOPTIONS=""

The documentation is perhaps a little bit ambiguous, but it seems to suggest that you should use the following (as an example for the vfat filesystem):

FS_MOUNTOPTIONS="-fstype=vfat,uid=1000,gid=1000,dmask=0077,fmask=0177"

If needed, add more strings of the type "-fstype=xyz, options" to that line for each additional filesystem.


How can I run glmark2 on the dedicated GPU?

Launch the benchmark using the dGPU with the DRI_PRIME=1 option:

DRI_PRIME=1 glmark2


Can I use pkexec in a python script or a .desktop file?

First create a .policy action file in /usr/share/polkit-1/actions/. It's  conventional to name action files in a "vendor hierarchical" way, such as com.ubuntu.pkexec.gparted.policy or org.debian.apt.policy

Then paste the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">

<policyconfig>

  <action id="org.freedesktop.policykit.pkexec.run-[Short Program Name]">
    <description>Run [Full Program Name]</description>
    <message>Authentication is required to run [Full Program Name]</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">[Full Program Path]</annotate>
    <annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
  </action>

</policyconfig>

Replace [Short/Full Program Name/Path] with appropriate values, for example gedit, gedit Text Editor and /usr/bin/gedit.  <action id> value does not need to match the chosen filename (and a single file can contain multiple actions), but conventionally filename is the prefix for all its actions.

After saving the file the specific program would run with X and GUI and such.

Another fix seems to be:
Add the following line in /etc/pam.d/polkit-1:

  session optional pam_xauth.so


How can we copy and paste in GNOME Terminal in the same way as in PuTTY, i.e. select to copy, right click to paste?

you can do the double-click copy with a 3rd party app clipit

but the possible downside is it applies system wide not just gnome-terminal

sudo apt install clipit

when using Clipit:

Right click on clipit icon in tray
Preferences
Settings
check: Use Primary selections and Synchronize clipboards.

and you're good to go you can double click in terminal and it's in your clipboard


The best way to accomplish this will always be a matter of subjective opinion.  But in all cases more information will help making that determination.

What specific model is the old Dell
How much RAM does it have?
Is it capable of booting from USB (as aking1012 asked)
Does it have a DVD/CD or even a floppy drive if not
What video hardware is in the machine (less important Q)

A Wubi install should work though it is limited for later converting to a normal install.

Using a Live CD for more than a little exploration would be painfully slow.

Using a Live USB stick (made w/Startup Disk Creator and persistence) would work nicely but cannot do some system updates.

A full-on install to a sizeable USB stick (8-16 GB) or USB external hard drive would work very well but needs a knowledgeable installer (or good directions).  And your friend would have to either leave it connected all the time or use the machine's boot menu (probably F12) on startup.

I hope that helps.


Ubuntu 19.04 Lenovo 330s 15arr touchpad not working

I have found a workaround to solve touchpad problem.

  This helped me https://superuser.com/questions/1052023/ioapic0-not-in-ivrs-table and thanks to my friend who had 330s-15arr. I can confirm that it works.

  Note: I have tested it on Ubuntu 18.04 with custom 4.19 kernel.

Requirements: Must be on latest bios version 7WCN35WW. And ubuntu must be installed in UEFI mode.

First upgrade to latest mainline kernel (not needed you can try on stock kernel too) and edit the file /etc/default/grub by adding ivrs_ioapic[32]=00:14.0 to grub kernel boot parameter and run sudo update-grub then reboot and see if touchpad works, Make sure to remove other kernel parameters except quiet splash, if it doesn't work follow the rest steps.

Now what you have to do is. Build a kernel.

Follow below steps (Source)

  to fix touchpad(not that easy if you havent compiled a kernel yet,not that difficult either)

  download any kernel source from kernel.org (better choose the version that you are running presently or just the next updated version of it)
    *use the command uname -a to find the current kernel version
  extract the kernel source and find the file 17.4.xx/drivers/input/mouse/elan_i2c_core.c
  locate the line { "ELAN061C", 0 } edit that 61C to 61E and save that file
  compile and use your new kernel

  (this link may help if you are a newbie in kernel compiling.I simply followed it-https://medium.freecodecamp.org/building-and-installing-the-latest-linux-kernel-from-source-6d8df5345980)

After that, if you are lucky you don't have to do anything else.

Now if your touchpad doesn't work even after compiling the kernel then make sure ivrs_ioapic[32]=00:14.0 is added to grub kernel boot parameter and run sudo
update-grub then reboot.

If still touchpad does not work then check dmesg for errors and post as comment. Make sure to follow the kernel compiling guide by patience and correctly if you have to build you own kernel and you are doing it first time, before reporting errors.


How do I get .xcf files to open in GIMP instead of Inkscape by default?

Right click on the file go to properties, then "open" or "open with" (Haven't used GNOME in a while). Then choose GIMP as your standard and press ok.


Change Application Windows by scrolling in Ubuntu 18.04

This setting is not exposed to the user in Ubuntu 18.04 and up, but you can enable this behaviour with the command
gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'

To reset to the default behaviour (i.e., do-nothing), execute the command:
gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action


Unable to see ubuntu partition on windows

Ubuntu is most likely using ext3 or ext4 filesystem format. Windows can not recognize this format and will not interact will drives/partitions using ext* filesystem.

To access your files between both systems, you can create and additional fat32 partition on the drive and have it automatically mount in both OSes. AFAIK fat32 is the best filesystem format for interoperability between Linux and Windows.


How to create/simulate two audio lines/devices?

Using alsa, you can add in ~/.asoundrc

pcm.simulatedAudio {
  type file
  slave {
    pcm null
  }
  format "raw"
   file " | /path/to/script"
}

This will run the script sending the audio data in to stdin (if you dont want the audio you can pipe it in to /dev/null).


I need help to get crontab working in Xubuntu 16.04.6

xmodmap modifies the keycode mapping for the current session. So if you run it in crontab, it opens a session, modifies the mapping and closes the session again - and its effect is gone.

You should instead run the xmodmap commands in your profile $HOME/.profile (or in your $HOME/.xinitrc if you are starting the X session only at login).

man xmodmap says:

  It is usually run from the user's session startup script to configure
  the keyboard according to personal tastes.


Thanks to @chili555 I solved the problem: blacklisting the internal driver worked great.

First I identified the driver:

$ lspci -nnk | grep 0280 -A2
06:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)
Subsystem: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:1050]
Kernel driver in use: iwl3945

Then to blacklist, create this file1:

sudo nano /etc/modprobe.d/blacklist-iwl3945.conf

add the text in the file:

blacklist iwl3945

Save and exit, and reboot.

Now if I turn off the in-built card it doesn't affect the USB one.

1You can also just add this line to the file /etc/modprobe.d/blacklist.conf but creating a new file allows you to avoid editing system files


You need to go into your bios and change your boot order. So that it checks for your flash drive before booting from your had drive.


Can't unzip .zip files in Xubuntu 12.04 64-bit

go to the command line ctrl + alt + t, cd to the directory the file is contained in like so:

cd /path/to/dir

Then use the unzip command to extract the file into the current directory:

unzip file.zip

You can also unzip a file into a directory of choice by using the '-d' flag:

unzip file.zip -d /path/to/dir

I believe unzip comes pre-installed on 12.04 but if not type the following command into the terminal to install:

sudo apt-get install unzip

Hope this helps and let me know if you need any clarification.


As far as I know netinstall is recommended. And here are two sites may be of help to you.

https://wiki.ubuntu.com/ARM

https://wiki.ubuntu.com/ARM/RootfsFromScratch


Networking.service blocking boot for 5min after upgrade from 18.04 to 20.04

This answer worked for me: https://askubuntu.com/a/887458/395351
Edit /etc/network/interfaces and change "auto" for interfaces to "allow-hotplug"


Installation of drivers for Canon MG5300 series fails…

I found this "manual" which gave rudimentry steps for installing not using the "script".

This is how I pulled it off…

Downloaded the driver from here.

Uncompressed the folder cnijfilter-mg5300series-3.60-1-deb to my Desktop.

From the folder Packages installed the packages cnijfilter-common_3.60-1_amd64.deb and cnijfilter-mg5300series_3.60-1_amd64.deb in that order.  This was for the 64bit Ubuntu, the other two in the folder are for the 32 bit Ubuntu.

UPDATE: To find the MAC address: [a]use the wobble pointer (around the OK button) up to where it shows setup. [b] Press the function button under "setup" [c] wobble pointer left to "Device Settings" [d]Select "LAN settings" [e] select "Confirm LAN settings" [f] select WLAN setting list [g] wobble button down to MAC address.

Opened a terminal and ran these commands (where XX:XX:XX:XX:XX:XX is the MAC address of the printer.

sudo service cups restart
/usr/sbin/lpadmin -p MG5300LAN -m canonmg5300.ppd -v cnijnet:/XX:XX:XX:XX:XX:XX -E
/usr/sbin/lpadmin -d MG5300LAN

At this point the rudimentary steps ended, and I relied on the last hope of the ignorant, stumbling around ⋯ and it worked.

Opened from the Ubuntu main menu System>Administration>Printing

Selected the printer MG5300LAN and from the Printing window menu bar Selected Printer>Properties.

On the Setting sub·page that opened, to the right of "Device URI:" text box containing the MAC address et al, pressed the button named Change…

On the popup window "Change Device URI" I selected Network Printer and then Find Network Printer

After waiting a bit, Canon MG5300(MG5320LAN…)(Current) showed up.  Selected and applied.

Back on Printer Properties… popup·window, pressed button Print Test Page.  Waited for test page, breathing huge sigh of relief.

Note: This is the very first time I have installed a printer on Linux, heretofore using printers attached to a Windows system.


It appears this issues was caused by my logitech Webcam.
The Bug is described here and should be solved soon.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1018020

I just detached my Webcam and hope it is solved for good.

I am not able to change it to "solved". Hope someone will do it, I can not find the button.


in unity

under system preferences (click right top on the wheel)
choose universal access
in the first tab you can alter the text size

I am not sure if everything is correctly named because i use the dutch translation
but normaly you should get there


Correct protocol for requesting an update to a buggy package in ubuntu 14.04 LTS

Many thanks to muru for encouraging me not just to compile the source but to actually make a package. My understanding of the situation is that creating a package from source solves the problem I was worried about (breaking the package system) because (I think) the idea is that all the dependencies I need are dealt with by the system.

Here's exactly what I did in my case. As well as downloading dictionaries-common_1.22.6.tar.gz from launchpad I also downloaded the dsc file dictionaries-common_1.22.6.dsc, as muru suggested. I then followed the instructions here:

http://blog.riamaria.com/99/what-to-do-with-a-dsc-file-dpkg/

More precisely, the plan is to make a debian package

dictionaries-common_1.22.6_all.deb

and then install this on my system.

Before I began I had to install dpkg-dev so I can make packages.

I then ran

dpkg-source -x dictionaries-common_1.22.6.dsc

and this created a new directory dictionaries-common-1.22.6 which I cd'ed into. Within this directory I tried

dpkg-buildpackage -rfakeroot -b

but the first time I ran this command it failed with the error

dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 7) quilt (>= 0.40) docbook-dsssl jade w3m slice recode
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting

What's happening here is that I need to install some more packages on my system in order to build dictionaries-common. So I installed these packages using apt-get and then tried again. Of course this is not guaranteed to work -- perhaps the default versions of these packages in 14.04 wouldn't be enough. But I was lucky -- they were. The second time I tried the dpkg-buildpackage command it was successful. I was unable to sign the package as the package maintainer, unsurprisingly, because I am not the package maintainer and I don't know the package maintainer's secret key. But I don't think this bothers me.

The upshot was that now back in the directory where I was doing all this I had a new file

dictionaries-common_1.22.6_all.deb

which I successfully installed with

$ sudo dpkg -i dictionaries-common_1.22.6_all.deb

My error in emacs is gone!


There is no need for an uninstall. Create a backup of your important data and then do a fresh Ubuntu 18.04 install, this will overwrite your current operating system.


Is it possible to put documents in the launcher?

I didn't find a 'normal' way to do it, so I made a bash script do the job.

Well, here's the script:

#!/bin/bash
#This script adds to launcher a specific document that the user has selected
#After specifying the document and its icon DO NOT remove them from their original position in your disk

#THE ICON SHOULD NOT HAVE SPACES IN ITS PATH AND TO BE A PNG FILE
# VALID PATH EXAMPLE:
#  /usr/share/pixmaps/wallch.png
# INVALID PATH EXAMPLE:
# /home/alex/Pictures/MY PICS/pic.png

document=$(zenity --file-selection --title="Select the document")
if [[ "$document" == "" ]]; then
   exit #no document specified
fi

icon=$(zenity --file-selection --title="Select an icon for it")
if [[ "$icon" == "" ]]; then
   exit #no icon specified
fi
name=$(basename "$document")
desktop_name=$(echo $name | tr ' ' '_')

echo "
[Desktop Entry]
Name=$name
Comment=Open me
Exec=xdg-open \"$document\"
Icon=$icon
Terminal=0
Type=Application
Encoding=UTF-8
Categories=Utility;Application;" > ~/.local/share/applications/$desktop_name.desktop

echo "The file ~/.local/share/applications/$desktop_name.desktop has been created, pointing to $document"

To run the above script, copy and paste it into a file with Gedit, then save it as add_document_to_launcher.sh, right click on it → Properties → Permissions → Check allow executing file as program. Then (preferred way is to) open a terminal and run the script through there or double click on the file and choose 'Run'.

A dialog will pop-up asking you for the document, then another will pop-up asking you for an icon for this document. Select any icon you like BUT: It has to be PNG and its path not to contain spaces.

After this, a file will be created under ~/.local/share/applications with the extension .desktop.

If you open the DASH and search your document with its filename, it will be shown under 'Applications' (and not under Files & Folders). You can simply drag and drop your document on the launcher! That's it :)

EDIT: remember: after this, do not remove the document from its path or the icon you have selected!


How to make a SUCCESSFUL persistent Ubuntu live hard disk drive or USB

A Full install to USB should work on any computer that a persistent install works on as long as no proprietary drivers are installed.

The best tool for creating a persistent USB is mkusb.
It will build a drive with read only OS partition, casper-rw persistence partition, (not limited to 4GB), and if desired a NTFS data partition accessible to Linux and Windows.


How to merge images in a single PDF or image file

See the montage command from imagemagick (sudo apt-get install imagemagick).

montage -geometry 250x250+0+0 image1.png image2.png out.png

This will resize each image (to 250px with no deformation) and combine them with no margin.

More montage examples.

You can also use convert (example with wildcards):

convert -append pixpixp-*.jpg newpix.jpg


You could bind /mnt/optw to /opt like so:
sudo mount --bind /mnt/optw/ /opt/

This way /opt will be a reflection of /mnt/optw contents and permissions.

To access the contents of the two directories under /opt, mount with aufs like so:
sudo mount -t aufs -o br=/opt/:/mnt/optw/ none /opt/

This way, the two directories are merged and you'll be able to access their contents under /opt/.
Notice:
If you do not have aufs support available on your system, you can add support by installing aufs-tools like so:
sudo apt install aufs-tools

For further reading man aufs.


If the OS in question is Win7 edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:

client max protocol = NT1

If you don't have an smb.conf file add the following package:

  sudo apt install smbclient

Can you "see" the WIn7 box under Windows Network now?

Notes:

** If you have a Win10 machine in your network you will experience a paradox. With the NT1 setting you will "see" it but will be unable to connect to it because Win10 disabled NT1 ( aka SMB1 ). If you don't have the NT1 setting you will not be able to see the Win10 machine but will be able to access it like you did above ( smb://win10 ).

** In an all Linux network or one with macOS all of them will be visible ( or can easily be made visible ) and accessible regardless of the client max protocol setting because they don't have to use netbios for host discovery.


Nautilus cannot display what inside a mounted windows system partition

Try mounting it through the terminal by
creating a folder to mount to with

sudo mkdir /mnt/windows

finding the partition with

sudo fdisk-l

Then with the partition you want,

sudo mount -t ntfs (disk partition) /mnt/windows

Then in nautilus, go to /mnt/windows

If it still doesn't work, then try

sudo apt install --reinstall ntfs-3g


Understanding differences between "apt install" and "dpkg -i"

dpkg -i <deb_file> installs a locally stored package.

apt install cuda downloads and installs cuda package from Ubuntu repositories and PPAs if any are installed.

If you run sudo apt upgrade, it will check the repositories for new versions of installed packages and upgrade them.

It looks like the cuda-repo-ubuntu1804_10.0.130-1_amd64.deb sets a repository that will be checked for upgrades. You can look into /etc/apt/sources.list.d and see if there is a cuda repository file.

So if you run apt upgrade and there is a new version in that repository, it will get an upgrade.

The cuda name is taken from that repository.


Create new Gnome Classic theme and config system to offer all users

I think you should create a gtk3 theme (fallback compatible).

In the following Answer, fossfreedom explains how to search for gtk3 themes fallback compatibles.

I would recommend use "Ambiance" theme as template (Fallback Compatible too) to create your theme.

Here you have a useful Article about GTK3 theming.

Article's quote

  Let's face it, you cannot a make GTK3 only theme. You have to provide
  a GTK2 theme which matches the GTK3 theme. Otherwise there will be no
  integration between GTK2 and GTK3 apps and it will look really bad.
  And you may also provide a matching window theme, like metacity,
  mutter, xfwm etc. GTK2 and metacity theming are a pain, but you have
  to do it if you want people to use your theme.

Info and tool about GTK themes

Basic Tutorial GTK3
Tutorial GTK2 Themes
Info About Gtk3 theming
 GTK Theme Preferences (This little tool allows anyone to change some basic elements of a GTK theme easily (both GTK2 and GTK3) with a simple interface.)

Adding theme to System Settings > Appearance list

To add a theme to the System Setting > Appearance you should to edit and recompile the gnome-control-center source. (The theme's list is hardcoded)

NOTE: This example is in Ubuntu 12.04 with gnome-control-center-3.4.2 to add the MediterraneanDark theme to the Appearance list.

1) Download the tar.gz file of MediterraneanNight Series to your Download directory.

2) Extract the tar.gz file and copy the theme to the /usr/share/themes folder.Open a Terminal and type:

cd ~/Downloads
tar -xvzf MediterraneanNight-2.03.tar.gz
sudo cp -R ~/Downloads/MediterraneanDark/ /usr/share/themes/

3) Create and Edit the index.theme file for the MediterraneanDark theme.

sudo cp /usr/share/themes/Ambiance/index.theme /usr/share/themes/MediterraneanDark/
sudo sed -i 's/Ambiance/MediterraneanDark/g' /usr/share/themes/MediterraneanDark/index.theme

Content of the index.theme file:

4)  Install the necessary packages.

sudo apt-get install build-essential

5) Install build dependencies.

sudo apt-get build-dep gnome-control-center

6) Create a folder to download the source code.

mkdir ~/Downloads/src-center
cd ~/Downloads/src-center

7) Download the source code.

apt-get source gnome-control-center

8) Edit the Source Code.

gedit gnome-control-center-3.4.2/panels/background/cc-background-panel.c

Search for the lines 1232 and 1233 to edit them and add the theme.

Before:

After:

I changed from:

  static gchar *themes_id[] = { "Adwaita", "Ambiance", "Radiance",
  "HighContrast", "HighContrastInverse" }; static gchar *themes_name[] =
  { "Adwaita", "Ambiance", "Radiance", "High Contrast", "High Contrast
  Inverse" };

To:

  static gchar *themes_id[] = { "Adwaita", "Ambiance", "Radiance",
  "HighContrast", "HighContrastInverse", "MediterraneanDark" }; static
  gchar *themes_name[] = { "Adwaita", "Ambiance", "Radiance", "High
  Contrast", "High Contrast Inverse", "MediterraneanDark" };

9) Go to the gnome-control-center-3.4.2 folder to build the deb packages.

cd gnome-control-center-3.4.2/
dpkg-buildpackage -rfakeroot -uc -b

10) Install the deb packages.

cd ..
sudo dpkg -i *deb

11) Finally you can logout and Login to see the changes.

Hope it helps.


Unable to launch terminal after downloading Python 3.7.7 and Pycharm on 20.04

The default Python 3 version on Ubuntu 20.04 is 3.8. The apps/packages are compatible only with the default Python version and may fail if used the other versions. Since you have updated alternatives for python3 and configured it to use Python 3.7, you need to revert the changes.

Since you aren't able to use TTY mode for some reasons, and have Pycharm, you can use the in-built terminal of Pycharm too. To use that, press Alt+F2 and run bash /path/to/the/pycharm/script. Once launched, create a  new project and click on Terminal at the bottom of screen. To make Python 3.8 as the default Python 3 again, update the symbolic link using

sudo ln -sf /usr/bin/python3.8 /usr/bin/python3


Which ubuntu Version should I install In this Processor type ? AMD64 or x86_64

I have the same processor, and I am happy to say AMD64 is what you need.


make workspace 2x2 on Ubuntu 14.04.1 LTS

Right click on workspaces in the bottom right corner of the screen and select Preferences. There you can set "Show all workspaces in 2 rows" and you will get 2x2 layout.


You can get the default arp cache timeout by:

cat /proc/sys/net/ipv4/neigh/default/gc_stale_time

In my case it's 60. That means 60 seconds until the entry is removed. Every time the entry is used in the table, the timer for this entry resets to 60 seconds.

Additionally you can set it by:

echo 3600 >/proc/sys/net/ipv4/neigh/default/gc_stale_time

Or permantent in the config file /etc/sysctl.conf.


How to save data between live sessions while running ubuntu from a pendrive

Mkusb will make a Live Persistent install to USB that will retain all of your changes without the need of doing a Full install, Mkusb will do either a MSDOS or GPT install.

It will work on a 4GB or smaller USB drive, a Full install of Ubuntu requires an 8GB drive minimum.

Mkusb creates an iso9660 partition for the OS, a casper-rw partition to install programs and save files and a FAT32 partition that both Linux and Windows can use for data.

See: https://help.ubuntu.com/community/mkusb


nvidia: probe of 0000:01:00.0 failed with error -1

It seems that the graphics card was not detected properly.
Install the NVIDIA 352 drivers by using a different  method.

First uninstall (possibly partially) installed NVIDIA drivers software.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On login screen press Ctrl+Alt+F1 - enter user name and password - then execute :

sudo apt-get purge nvidia*
sudo reboot

Now Install the drivers 352.63 supporting NVIDIA GEFORCE GT 630.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On login screen press Ctrl+Alt+F1 - enter user name and password - then execute :

sudo apt-get update
sudo apt-get install nvidia-352
sudo reboot

Note : In case it doesn't work with nouveau.modeset=0 - retry it with the parameter nomodeset.


Well found a way to lower the hard drive temperature, had to stay up all night.

(Gave a +1 to Ringtail's comment ;) )

Open Dash and type disks. You will see the Disks Utility pop up. Open it.

Now select the Hard Drive you wish to work with and then, in the green circle above, there is a button, click on it and select Drive Settings...

Depending on the hard drive you will get more settings or less settings. In this case I got Standby Timeout and Automatic Acoustic Management. So I changed the Acoustic from the Default to the lowest one which is 128 (As seen in the image above).

The temperature did not change for at least 2 to 3 minutes, but then it suddenly lowered itself by 1 degree. I then waited 5 minutes, 10 minutes, and the more I waited, the lower it went. It literally went from 53 degrees to 39 degrees. That's 14 degrees lower than the one I was used to.

I then added, just for a bonus the Standby Timeout, cause I was actually not going to use the hard drive all the time, basically only about 50% of the time I was on the computer. That lowered the temperature 2 to 3 degrees more. He is an image of hddtemp:

So hey, did not know Disks had this feature. The curious part is this. After searching a lot for this, I came to know that many HDDs do not have Automatic Acoustic Management (AAM), mainly because of lawsuits and patents (Go figure). But one of this is the same one I have, a Seagate Barracuda which has been mentioned to not have AAM support. So I wonder how did this option help the drive if it was not supported in this case.

Another helpful hint was found in this link which also helped.

They mention there the use of powertop, terminal commands and kernel options. It covers a lot, but the ones I took and used were:

Sata Power Management

This are mentioned in relation to the /sys/class/scsi_host/host0/link_power_management_policy line I was asking about. It just so happens the host0 part depends on which Sata motherboard connection you connected the hard drive to. For laptops, most of the time is host0. In my case with 6 sata connections I get host0 through host6. should be noted that this features will work on a newer kernel (At least 2.6.x an above, but since we are all into the 3.x then it does not matter), have an Intel AHCI compatible chipset and use a SATA drive. If you meet all of this requirements then you can use the line above in the following way:

First check if you are using that host at Maximum Performance:

sudo cat /sys/class/scsi_host/host0/link_power_management_policy
if it says max_performance then do the following:

echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

Repeat for any other HDD that has that problem (Need to double check which HDD is connected in what SATA port to know which host it is). I also do not recommend using this on an SSD because... why?.. What heat can a SSD make.. none.

This is not permanent since when you reboot you will have to do it again. You can added in some runtime file to make sure it is always activated.

Nota that adding the Standby Timeout will make your HDD take a little bit longer to mount if in standby. Also lowering the AAM a lot will lower the speed of Read/Writes by a little bit. This depends if is worth it or not. In my case it is, to lower the temperature of it.

UPDATE: After about 12 hours of testing, the HDD is normal again. In standby it stays between 33 and 35 degrees. When in use it goes to 39 degrees max. Still, it is 10 degrees less than what it had when not in used and almost 15 when it was in used. Am really happy and relief about it. Also this is without the air conditioning unit turned on. Simply on normal room temperature.

UPDATE: With air conditioning on, the HDD is finally able to get to 30 degrees. Before it simply stayed in the 50+ range. An image of how happy I am:

UPDATE: With exactly a month of testing I can say that the temperature has stayed under 30. Right now am in 26 degrees which is very good (50% less than the "normal" temperature it had before).


change python version from 2.7.9 to 2.7.6 in ubuntu 14.04

A quick side-bar before we start breaking things... Is this really a problem? All 2.7.* versions should be compatible. The differences in release are basically just bug-fixes.

Update from comment: If you're seeing weird missing modules in virtualenvs, that's a common symptom of your system python version being updated. When you create a virtualenv, it copies the executable binary out to your virtualenv. If you replace the system version with a new version, any static bindings from the copy to other [python] system libraries might not align.

The quickest fix there is just re-creating the virtualenv. If you haven't already, this is a great opportunity to create a requirements.txt file in the root of your project. When you're recreated the base virtualenv you can just:

pip install -Ur requirements.txt

The same again to update packages.

The versions of the python2.7 package currently distributed show that Trusty only natively gets 2.7.6. The reason you have 2.7.9 is down to something you've done. Ie, it hasn't upgraded itself.

You've either:

Installed it somehow.

The how really matters here. If you've manually dragged a newer python2.7-minimal over, reverting to the older version is probably not too hard with sudo apt-get install python2.7-minimal==2.7.6-8ubuntu0.2 (at the time of writing) but if you've installed a PPA, you'll need to purge that.
Upgraded to Vivid which ships 2.7.9.

Check cat /etc/lsb-release. If you are, you're on an end of life system (dead, dangerous) so upgrade to Wily. That'll push you onto Python 2.7.10 but again, I don't consider that a problem in itself. If that really is for you, reinstalling 14.04 has just been added to your plans for the day.


Have you checked that your date/time is correct in BIOS? Also make sure that timedatectl is correct, change timezone if necessary. What ultimately fixed the issue for me was updating /etc/netplan/name-of-file.yaml configuration file with dhcp-identifier: mac.
network:
  ethernets:
    eth0:
      dhcp4: true
      dhcp-identifier: mac
  version: 2


Upgrade Persistent Flash Drive from 16.04 to 18.04

Persistent Flash Drive Upgrade

About the best we can do for a Persistent upgrade is reinstall program files and copy the existing home directory.
User installed programs are listed in synaptic, make a copy, they will need to be reinstalled.
The usual method of copying and syncing home folders is with rsync.

Unetbootin's Persistence file is casper-rw, it is the only thing that ever changes on a persistent USB.
Casper-rw can not be reused from version to version of 'buntu, as all user installed programs need to be reinstalled.
Casper-rw contains the standard set of folders for Ubuntu including the home folder.
The home folder contains all of the users private data, desktop, documents, downloads, pictures, Browser favorites, etc.
The home folder can be recycled from 'buntu version to 'buntu version.
The home folder can be located in it's own persistence file named home-rw.

Method to extract home-rw file from casper-rw file.

Create or copy a casper-rw file, size to suit home directory up to 4GB, rename to home-rw.

Locate the home-rw file in the root of the persistent USB, along side of the casper-rw file.

Make directories in which to mount the persistence files

sudo mkdir /media/casper
sudo mkdir /media/home

Mount the persistence files

sudo mount -o loop casper-rw /media/casper/
sudo mount -o loop home-rw /media/home/

Run

sudo rsync -Hva --progress /media/casper/upper/home/ubuntu /media/home/

Delete the home folder from casper-rw or rename it as backup.

Next version upgrade just copy the home-rw file to the new install before first booting of the USB.

Persistent installs that use persistent casper-rw partitions, (ie mkusb), can similarly be upgraded, make sure the path in rsync is correct.

Grsync

Rsync is a little bit scary like dd, a little ignorance can go a long way.
Grsync adds a GUI to rsync to make it a little less scary.
I usually use Grsync when working with home directories.


Ubuntu 12.04 thinks my wireless network is hidden (but it's not)

I was also having this problem with 12.04.  Here are the steps I took to fix the problem.

Had to install firmware-b43-installer and remove bcmwl-kernel-source.

sudo apt-get install firmware-b43-installer
sudo apt-get remove bcmwl-kernel-source

Reboot

At this point my wifi light became active and I could connect if I used the "connect to hidden network" and typed in the name and passcode.

Once I was connected to the wireless network I installed a package called WICD.  Now, I only installed this package ... I DID NOT configure anything or remove network-manager.

sudo apt-get install wicd

Reboot
After the reboot, it found my network and automatically connected.  I'm not sure why this worked, but I do know that some other packages were installed with wicd.  Maybe one of these packages fixed the problem?  Not sure, but again I DID NOT remove network-manager after installing WICD.

This has solved the problem for me .... hope this helps you.


You should remove the package then reinstall it. That might fix any problems you might have.

It's just a terminal emulator so not much to lose


Copy only directories and its contents while excluding outside files using rsync?

To exclude only files in top root directory, you have to add starting slash /, like:

rsync -avz --exclude '/*.jpg' source/ dest/

that will exclude all image files only in root and not in any other child directories


How to copy the contents of many folders to one?

To move the files do this:

find /my/files/path -iname "*.mp3" -exec mv {} /home/user/music \;

It works like this, the first /my/files/path is where you want to look. The part that says /home/user/music is where you want to move all files to. So let us say you have all music inside your home folder in /home/jon/music and want to move it to home/jon/newmusic then do this:

find /home/jon/music -iname "*.mp3" -exec mv {} /home/jon/newmusic \;

If it is on the same drive the origin and destination then it will do it really fast. If it is in another hard drive like /media/jon/backup/music then it will depend on hard drive speed.

If you prefer to copy instead of move the files, you must use cp:

find /home/jon/music -iname "*.mp3" -exec cp {} /home/jon/newmusic \;


Dualboot windows and Ubuntu but automatically boot in Ubuntu

The way Ubuntu should be set up by default in dual boot mode is that you will see a menu for some seconds to choose the OS from.

Shown here for 10.04 LTS and Windows XP but similar in later releases

If you don't see it, make it visible by pressing and holding the left SHIFT key while booting.

In case you look for a way to reboot into Windows see this question.
For a way to reduce the time until Grub loads the default entry see this question
To change the default boot entry have a look at this answer


Can Using Git over SSH be distinguished from normal SSH traffic?

I'd recommend using key based authentication along with a passphrase with SSH for security instead of the complicated iptables setup you are using. Just allow port 22 and your server will still be safe.

http://tombuntu.com/index.php/2008/02/20/public-key-authentication-for-ssh-made-easy/

It is going to be difficult to craft the firewall rules in such a way to guarantee your git commits are not going to shut down your access since the firewall can't tell the difference.


Here's my /etc/network/interfaces file for reference on getting a bridge setup for kvm.  Both the hypervisor and the vm's get their ipv4 addresses with dhcp and their ipv6 addresses with slaac.  The multicast_snooping line is only for ipv6.  This is all I had to do and it just worked with a wired connection.  Bridging is not possible on most wlan connections because most wlan drivers don't support it.  If it works on vmware, they're not using a standard bridge and I don't know if anyone has come up with a workaround for kvm.  I'm pretty sure you can use macvtap's with wlan but you can't use it for hypervisor to guest communication or for pxe booting from.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
    up echo -n 0 > /sys/devices/virtual/net/br0/bridge/multicast_snooping

Edit: Apparently there is a work around for bridging on wifi, see:

https://unix.stackexchange.com/a/159198/213946


Error processing packages when trying to install python-pygame

I had the same issue. For some reason you cannot install the pygame package directly using apt-get. I suggest you to go to pygame's website download section and download pygame-1.9.1release.tar.gz (or whatever is the stable release).

open your terminal and navigate to the downloaded folder. Unzip the file, assuming you are in the Downloads Directory

tar -xvf pygame-1.9.1release.tar.gz
cd pygame-1.9.1release   #navigate to the extracted directory

and run the following command in order to install the package.

sudo python Setup.py

This should install the pygame package for you.

Alternatively you can download the stable release of pygame from this link for AMD architecture and here for i386 as a deb package and install it with

sudo dpkg -i packagename


Disable locking the screen after resuming from suspend

Start gconf-editor (press ALT-F2, then type gconf-editor).

Seach down to Apps/gnome-power-manager, then click on "lock".

You have two choices : either untick "suspend", or tick "use_screensaver_settings" (of course, you'd then have to go to screensaver preferences and remove the "lock screen" option.

And :


chown -R skorlam:skorlam /media/skorlam/76386420-a1f6-46cf-9a78-c382383a4eb11/

Will do the trick!

What was wrong:

The problem was that you were giving a relative path to the chown command. As this will work when your working path is the right one, containing the path you want to work on all will work fine.

More about local and absolute paths can be found here.

In your case you were at /media/skorlam/76386420-a1f6-46cf-9a78-c382383a4eb11/Oracle and tried to work with this path 76386420-a1f6-46cf-9a78-c382383a4eb which of course does not exist in the current working directory.

I suggest always using the absolute path when doing file operations like rm cp mv chown chmod etc. to avoid conflicts.

The second thing I added to your command was skorlam:skorlam (the name again after the colon) this means that the files and directorys belong to you user as well as to your users group, chown syntax is chown [OPTIONS] user:group.


I had exactly same experience. Reboot, and retry and it worked. It took longer than I ecpected, but waited patiently.


How do I set up permissions for apache to run fastCGI programs?

So after some face palming the code snippet I was using seg faulted at getenv("SERVER_HOSTNAME") see

  "Request number %d running on host %s\n",
  ++count, getenv("SERVER_HOSTNAME"));

so I replaced that with (also fixed the html)

   "Request number %d running on host host\n",
    ++count);

and in the apache config I simplified it to

<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  FastCgiServer /var/www/fcgi/fhello.fcgi
  ScriptAlias /fhello.fcgi "/var/www/fcgi/fhello.fcgi"
</IfModule>

letting the server manage the connection.  I still haven't figured out the permissions issue I was getting above, but everything is working as I want it now.


Use OpenVPN only for one application/service

What you're asking for is split tunneling with OpenVPN for the torrent client Transmission and the complexity of that depends on the firewall rules you prefer. I'd have written the basics but since there were already really good detailed articles on how to setup a split tunneling credential with fallback and make only Transmission to follow that credential, I'm only giving some pointers assuming you already have a working OpenVPN config and proper DNS restriction (no leaks).

1. Install sudo apt install iptables resolvconf apt-utils while you may already have some of the programs. Now add a new user to your system that won't have any superuser ability whatsoever, sudo adduser --disabled-login zzz. zzz is the name of this new user. To avoid service permission headache add zzz to your group and yours to zzz.

sudo usermod -aG zzz <username>
sudo usermod -aG <group_username> zzz

2. Check ip route list and find the line that looks like 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.101. eth01 is the active network interface and 192.168.1.101 is the inet. Yours could be different. Watch out for these as you follow the upcoming scripts.

3. Flush iptables rules sudo iptables --flush. Append a rule that restricts the zzz user to use regular network interface, only works through the OpenVPN tunnel.

sudo iptables -A OUTPUT ! -o lo -m owner --uid-owner zzz -j DROP

Install sudo apt install iptables-persistent and press YES for any permission it asks for.

4. Create a new script file on openvpn config directory sudo nano /etc/openvpn/iptables.sh and add this script.

#! /bin/bash

export INTERFACE="tun0"
export VPNUSER="zzz" # watch out.
export LOCALIP="192.168.1.101"
export NETIF="eth0"

# Look up the first article on "iptables Script for vpn User" section for the script, I don't know if I'm allowed to paste that.
# The script simply  uses iptables built-in chains to redirect network traffic to VPN.

Make this script executable sudo chmod 755 /etc/openvpn/iptables.sh.
Create an IP routing script sudo nano /etc/openvpn/routing.sh and type

#! /bin/bash

VPNIF="tun0"
VPNUSER="zzz"

# Look up the first article on "Routing Rules Script for the Marked Packets" section for the script, I don't know if I'm allowed to paste that.
# The script simply puts some routing commands to block the traffic when VPN goes down.

Make this script executable sudo chmod 755 /etc/openvpn/routing.sh

5. Add the new zzz user value to the IP routing table sudo nano /etc/iproute2/rt_tables. Just add 200 zzz at the last line.
Additionally you can add a new kernel parameter config as sudo nano /etc/sysctl.d/zzz.conf and put

net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.eth0.rp_filter = 2

This may not be necessary since it's just hardening the security to kernel level.
Reload sysctl and systemd sudo sysctl --system, sudo systemctl daemon-reload. Now check if openvpn is running okay, systemctl status openvpn@openvpn.service and your openvpn end-IP as user zzz, sudo -u vpn -i -- curl ifconfig.co

If the curl shows the right VPN IP you're good to go for the next steps. You shouldn't be disconnected from the server.

6. Stop the transmission-daemon service, sudo systemctl stop transmission-daemon. Create a new directory and a systemd config at sudo mkdir -p /etc/systemd/system/transmission-daemon.service.d && sudo nano /etc/systemd/system/transmission-daemon.service.d/local.conf. Paste the config

[Unit]
After=sys-devices-virtual-net-tun0.device
Wants=sys-devices-virtual-net-tun0.device

[Service]
User=
User=zzz
Group=
Group=zzz

Type=simple

ExecStart=
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon

Restart=on-failure
RestartSec=5

This will allow transmission service to run only after openvpn service has run. Reload systemd sudo systemctl daemon-reload.

7. Adding proper user, group and permission to transmission

sudo chown -R zzz:zzz /etc/transmission-daemon/ && sudo chmod -R 775 /etc/transmission-daemon/
sudo chown -R zzz:zzz /var/lib/transmission-daemon/ && sudo chmod -R 775 /var/lib/transmission-daemon/

Do the same for all download folders of transmission like sudo chown -R zzz:zzz ~/Downloads && sudo chmod -R 775 ~/Download.
Add the changed directory to transmission settings sudo nano /etc/transmission-daemon/settings.json,

"download-dir": "/home/Downloads",
"umask": 002,

8. Finally turn on sudo systemctl start transmission-daemon.service. If you're using the Transmission Web GUI follow the nginx method. You can try checking if the torrent is working with the openvpn IP here.


How to execute web search by voice in ubuntu 14.04

Yes its possible. For this you have use Google Chrome browser
and keep Google as your default search engine, then you can use voice search.

just click on the "mike" icon to start voice search. it will look like this...

for the first time it will ask you to give permission just allow it.
Additionally you can select this feature in setting as show in image below:


Boot Issues: How to switch from USB to internal SSD (after installing from USB)

It is likely, as sudodus write in a comment, that your bootloader is on the USB drive.

This can often be fixed with boot-repair. The answer here will guide you how to use boot-repair to get the internal drive to boot properly.

You can read more about boot-repair here.


Can't answer phone calls on BQ ubuntu edition

It pretty clearly sounds like a bug. I guess you already installed all available updates. I personally cannot recreate it.

On this page, you will find links to the relevant launchpad sites:
https://wiki.ubuntu.com/Avengers
to report the bug.


Installer gets stuck with a grayed out forward button

I recently encountered the same problem installing Ubuntu on a friend’s computer. It seems that Ubiquity (the Ubuntu installer) for 10.10 is not very informative when things go wrong. Does your username contain uppercase letters? Try making sure all letters in your username are lower case.

For more details, see: How should I file a bug about Ubiquity?

Corresponding Bug Reports:

Username starting with upper letter marked as OK during install and the refused
Ubiquity should give visual feedback that username cannot contains capital letter(s)


Mouse clicks stop registering in some or all windows

Well, it's been several days since I removed a short USB cable extension I had connected from the computer's USB-2 port to the cable from the old passive USB hub, and through several reboots and suspends, I've had no more problems

I hope this might be helpful for others, as I've seen a bunch of very similar, or even duplicate, situations both here and elsewhere.  Mostly, they were older topics, and although I tried posting to get more information, I got no response.

I'm tempted to wait a while longer before accepting this as the final solution, but I'm afraid I'll forget, so I'll close it now.


Linux restrict user to specific folder in var/www

Let's call your new user testapp:

You have to remove read access for "other" of all files and folders. Issue the following commands:

chmod -R o-r /
chown -R :testapp /var/www/html/testapp
chmod -R g+rwx /var/www/html/testapp

Remove your new user from the www-data group, but remember when www-data cannot read files, it won't be readable on your website


Not able to connect to wifi with my usb wifi adapter

Networking in recent Ubuntu server versions is managed by netplan. Check to see the name of your netplan file:

ls /etc/netplan

I will assume that the name of the file you found is 01-netcfg.yaml. Substitute your details here if not 01-netcfg.yaml.

We will amend the file to specify your details:

sudo nano /etc/netplan/01-netcfg.yaml

Change the file to read:

network:
  version: 2
  renderer: networkd
  wifis:
    wlx-----:
      dhcp4: yes
      dhcp6: yes
      access-points:
        "network_ssid_name":
          password: "**********"

Please substitute your wireless interface name here instead of wlx----. Please note that the access point name and password are enclosed in quotation marks ". Spacing, indentation, etc. are crucial, please proofread carefully twice.

Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor nano. Follow with:

sudo netplan generate
sudo netplan apply

If you instead prefer a static IP address for the server, you can find the template here:

cat /usr/share/doc/netplan/examples/wireless.yaml


How to reset default permissions for /etc?

What I would do :

$ sudo su
chown -R root:root /etc
find /etc -type f -exec chmod 644 {} +
find /etc -type d -exec chmod 755 {} +
chmod 755 /etc/init.d/* /etc/rc.local /etc/network/* /etc/cron.*/*
chmod 400 /etc/ssh/ssh*key

Maybe it's not sufficient, but without any backup, that's a good start.


We have created a terminal tool to monitor CPU frequency/utilization/Temperature. It now also supports monitoring power on Intel CPUs newer than Sandy-Bridge.
You can see the power graph in watts on the bottom as well as on the side bar.
This only reads total CPU power, not per process and not including other components.


High Resolution graphics laptop misconfiguration (1920x1200 15,6 ")

It may be worth trying different resolutions your monitor is capable of. Simple press CTRL+ to reduce the resolution (increasing text size), cycling through each possibility your monitor and graphics hardware can do. Some resolutions may seem to appear more than once.

To go the other way enter CTRL-


The installation procedure for older versions of the JDK still applies if the version numbers are adjusted: https://askubuntu.com/a/55960/799387

On the other hand, you can install openjdk-9-jdk from the repositories as a substitute for Oracle Java: https://packages.ubuntu.com/artful/openjdk-9-jdk


Running Linux executables on NTFS partition marked with execute permission

Turned out to be that I am using a 32 bit version on 64 bit system.


My approach: Use deja-dup to back up and transfer my data, and aptik to back up and transfer my installed software.  I've used this several times.  Not flawless, but close.


Install ginn as an autostart program under Menu › Preferences › Startup Applications, thereby activating it after the next login.


55 * * * * ubuntu /home/ubuntu/scripts/dm-customer/etl-execution.sh

Why do you have Ubuntu there?

The format is, from man 5 crontab:

   The format of a cron command is similar to the V7 standard, with a num-
   ber  of upward-compatible extensions.  Each line has five time-and-date
   fields followed by a username (if this is the system crontab file), and
   followed  by  a  command.   Commands  are  executed by cron(8) when the
   'minute', 'hour', and 'month of the  year'  fields  match  the  current
   time, and at least one of the two 'day' fields ('day of month', or 'day
   of week') match the current time (see "Note" below).

Username shall only be included if it's the system crontab. If you're running crontab -e as your own user, it should not be included.

Try

55 * * * * /home/ubuntu/scripts/dm-customer/etl-execution.sh

and see if that works.


"No such file or directory" BUT the file actually exist! / Executable problems

Sounds like they don't have executable permissions. Use ls -l and look for the x in the permissions description at the start of each line.

If they don't have have executable permissions you can them using chmod a+x fileName


Bash script to tar a folder saves basepath

You must to go inside to that folder. Something like:

#!/bin/bash

if [ ! -d ~/backup ]; then
    mkdir ~/backup
fi

cd ~/folder

for i in *; do
    echo "~/folder/$i"
    if [ -d "$i" ]; then
        tar -zcf ~/backup/"$i".tar.gz "$i"
    fi
done

Also, is better to use quotes for variables when these variables refers to file names.


How to check version of flex and bison on ubuntu 14.04 LTS?

Use the --version option:

$ bison --version
bison (GNU Bison) 3.0.2
Geschrieben von Robert Corbett und Richard Stallman.

Copyright © 2013 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt keine Garantie; auch nicht für VERKAUFBARKEIT oder FÜR SPEZIELLE ZWECKE.

$ flex --version
flex 2.5.39


USB ports have completely stopped working

Maybe it will help you:
Open terminal, type:

sudo -H gedit /etc/default/grub

Change the line

GRUB_CMDLINE_LINUX=""

To

GRUB_CMDLINE_LINUX="acpi=force irqpoll"

Save and close the file.

sudo update-grub

Reboot.

Source on ubuntugeek.com


How to grep 2 or 3 lines, one containing the text I want, and the others just below it?

Just do a:

grep -A1 ERROR

The -A1 tells grep to include 1 line after the match. -B includes lines before the match, in case you need that too.


It sounds like your display language is not set correctly. Please go to System Settings -> Language Support, use that interface to change the language to something else but English, and then back to English. Then relogin, and also Firefox ought to be in English.


Acer aspire e1 wifi network disconnecting!

you can find the driver here.
To solve this problem try first to update your kernel version.
If this doesn't solve your problem then try to install the new driver.


So turns out ubuntu thought I had a second monitor I hadn't noticed and things were happening there but of course I couldn't see anything. Once I switched it to single display everything was visible. Sorry to take up everyone's time


How to type latin small letter c with cedilla

In 13.10 and above you can use right Alt+ , (i.e. right Alt + comma) in English (US International with dead keys) to get ç. Shift + Right Alt + comma = Ç

Right Alt + is useful for ¡¿áéúóí also.


How do I delete the Windows hibernate file on a read only device?

rm did not remove the files but shred did.

sudo mount -t ntfs-3g -ro remove_hiberfile /dev/sda2 /media/ubuntu
sudo mount -o remount,rw /dev/sda2

shred -vu hiberfil.sys
shred -vu pagefile.sys
shred -vu swapfile.sys


Is this the right way to enable power saving with Bumblebee?

There is no difference in the way power management is handled. Either way, bbswitch will be used by default. When installing bumblebee-nvidia too, you will just have a bunch of extra files which slows done kernel updates. If you do not need it, do not install it.

(kernel updates will be slown down because the nvidia kernel module needs to be built.)


I installed on 13.04 using these instructions with no problems: https://help.ubuntu.com/community/GoogleEarth


HDD initially invisible after startup for applications but not for Ubuntu itself

Looks like your disk is not mounted at boot, so you must click it in Ubuntu first to mount it before it will show in any applications.

You will need some information for it to auto-mount, first the name of the disk ie dev/sda or dev/sdb and also a location to mount the disk (I will use your home folder for this example,system default is /media)

First back up then open this file

sudo cp /etc/fstab /home/youruserhere

Editing for your users /home, then

gksu gedit /etc/fstab

Be careful with this file as it can quite easily cause you system to not boot.

Now we will add the disk to the file so it auto mount, at the bottom of the page add this

#device        mountpoint             fstype    options  dump   fsck

/dev/sd?    /home/yourname/mydisk    ext4    defaults    0    1

Edit the line device to match your disks name and edit the mount point to your liking, then save and reboot and your disk should be mounted at boot.

Thanks to @msys for his answer, please give him a upvote if this works for you.


How to create user with some permissions

If you need to run commands which require superuser privileges, then add newly created user into sudo group:

usermod -aG sudo user1

Then, if you want to run a privileged command, you could use it like this:

sudo ip route add

If you want to run some commands without password prompt:

sudo visudo

user1 ALL=(ALL) NOPASSWD: /usr/bin/apt-get,/sbin/shutdown

Exit saving changes: Ctrl+X -> Y -> Enter

Then sudo apt-get install gedit will not ask you about password.


Xubuntu freezes when trying to launch discord

I had the same problem, with the .deb downloaded from discord. I had no such problems with 18.04.
My biggest clue was that vlc was also crashing the same way. Can you watch video using vlc? If you check your logs (/var/log/Xorg.0.log or /var/log/kern.log) do you see anything about a gpu crash?
The solution for me was to edit /etc/default/grub and change the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

I'll let someone with more Ubuntu experience than me explain what that does. Apparently there's a bug in the latest video drivers for Intel GPUs.
Relevant post:
Apps launch but are not visible and desktop freezes


That is a known problem, you have to put -nostartup in the launch properties/ commandline or your map will not render. For more information see the winehq database, which is better for help with wine gaming than askubuntu ;)


BIOS CPU overclock not sticking with dual boot

This answer will assume you do not have the proper tools installed on your linux distribution and dual boot is not at cause, if this is incorrect, please edit the original question to explain how you determined this issue is specifically caused by dual booting and which tool you used to backup that claim.
Before starting, take note that you can break things with improper overclocking, if this happen, remember it is you own responsibility.
You should make sure cpuid and msr kernel modules are activated.
sudo modprobe msr cpuid

See manpage of modprobe for more details on this command.
Link provided as is, with no guarantee it will survive time, best to use man command from your terminal.
Install a Ryzen frequency control tool, I will use ZenStates-Linux for this example but you can search for other tools if you don't like this tool.
You will need to git clone the repository somewhere, path is up to you.
git clone https://github.com/r4m0n/ZenStates-Linux.git

Then verify current values.
sudo ./zenstates.py  -l

On a stock AMD Ryzen 1700x, you should see this. Value will vary with other processors.
Some P states may be enabled or disabled, depending on your motherboard configuration.
P0 - Enabled - FID = 88 - DID = 8 - VID = 20 - Ratio = 34.00 - vCore = 1.35000
P1 - Enabled - FID = 78 - DID = 8 - VID = 2C - Ratio = 30.00 - vCore = 1.27500
P2 - Enabled - FID = 84 - DID = C - VID = 68 - Ratio = 22.00 - vCore = 0.90000
P3 - Disabled
P4 - Disabled
P5 - Disabled
P6 - Disabled
P7 - Disabled
C6 State - Package - Enabled
C6 State - Core - Enabled

Definition of the values :
FID is Frequency ID in hexadecimal
VID is Voltage ID in hexadecimal
DID is Divisor ID in hexadecimal
Ratio is your CPU clock ratio, multiply it by 100Mhz to get the final clock.
vCore is the CPU base voltage for this P state.
When DID is equal to 8, the formula to get FID is CPU ratio × 4 = FID.
The result has to be converted to hexadecimal.
Since your target overclocking is 4Ghz (4000Mhz), FID would be a0.
VID goes from 30 (lowest) to 10 (highest) in hexadecimal.
You will need to experiment each values until you achieve the Vcore desired.
On next example, I will set P0 state to 4Ghz with a Vcore of 1,4.
sudo ./zenstates.py -p 0 -f 98 -d 8 -v 18

This new setting will be lost upon reboot, you can create a systemd service file to apply this change again at boot.
I will assume you copied zenstates.py to $PATH.
sudo nano /etc/systemd/system/overclock.service

Inside this file, add these values.
[Unit]
Description=Overclock
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=basic.target

[Service]
Type=oneshot
ExecStart=zenstates.py -p 0 -f 98 -d 8 -v 18

[Install]
WantedBy=basic.target

Verify service is working :
sudo systemctl daemon-reload
sudo systemctl enable overclock
sudo systemctl start overclock

If system become unbootable, boot to recovery and delete or edit the service file.
Test stability using these projects.
https://github.com/akopytov/sysbench
https://www.mersenne.org/download/
https://github.com/stressapptest/stressapptest
https://www.phoronix-test-suite.com/?k=downloads
You may want to do the stress test from a different dedicated installation of your favorite linux distribution, in case of data corruption due to instability.
Operate these tweaks with caution.
Other tools that may get the job done : Ryzen Controller, CoreFreq (soon)


How to switch Airplane Mode Off when you don't have Wi-Fi (Ubuntu 18.04)

Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller
  [10ec:8172] roller [10ec:8172] Kernel driver in use: rtl8192se Kernel
  modules: rtl8192se

It appears that your wireless card is not inactive and is not removed. You can disable its driver and therefore stop Airplane Mode permanently by unloading and blacklisting its driver:

sudo -i
modprobe -r rtl8192se
echo "blacklist rtl8192se"  >>  /etc/modprobe.d/blacklist.conf
exit

You should be all set.


There is command line based good software to recover corrupt partition called TestDisk

It once helped me to recover accidentally deleted partition table, it can also be used to recover partition or fix errors in it.

You should watch this youtube video before you use it, its pretty easy to use but handle it carefully

OR

A simple method you should give a try before TestDisk
Since you can boot to 14.04 you should try this simple pre-installed command, it also can be used to fix corrupt partition and recover data

sudo fsck.ext4 /dev/sdaX

note you have to replace X in above command with a number corresponding to the partition containing 15.04. For this you can use a software called Disk. You should search for it in search dash


SQLite error after COTURN installation on Ubuntu Server 16.04.1

In case anyone encounters same problem:

1) Install SQLite3:

>> sudo apt-get update
>> sudo apt-get install sqlite3 libsqlite3-dev

2) In install documentation there is an error when defining database file in  etc/turnserver.conf:

userdb=/etc/turnuserdb.conf

should be changed to:

userdb=/var/lib/turn/turndb

PS:

Here are important parts of turnuserdb.conf in case you need:

# you can listen ports 80 and 443 instead of 3478/5349
listening-port=3478
alt-listening-port=0

tls-listening-port=5349
alt-tls-listening-port=0

listening-ip=YourPublicIPv4
relay-ip=YourPublicIPv4
external-ip=YourPublicIPv4

# realm=yourdomain.com
# server-name=yourdomain.com

# lt-cred-mech
# userdb=/etc/turnuserdb.conf

oauth
user=youruser:yourpassword

# use real-valid certificate/privatekey files
# cert=/etc/ssl/certificate.pem
# pkey=/etc/ssl/private.key

no-stdout-log

Consider using your YourPublicIPv4 (x.x.x.x) and youruser:yourpassword.


How to Install a Canon MF8040Cn Printer on Ubuntu 12.04

I answered this on this SO question but here's that answer, reprinted.
For 14.04 through 20.04 do the following:

Download the drivers from:
https://www.usa.canon.com/internet/portal/us/home/support/details/printers/black-and-white-laser/mf4770n?tab=drivers#Z7_MQH8HIC0L88RB0AMD0F1Q42K25

Extract the file archive to a directory. From that directory:
cd ~/Downloads
tar -xf *inux_UFRII*.tar.*
sudo dpkg -i *inux_UFRII*/*/Debian/*.deb
sudo apt-get install -f

It shouldn't be necessary to reboot, but if the next step fails, reboot and try again.

Run "Add printer". That should just show up automatically when you click the 'Add' button. Give it a few seconds and the printer chirps then just magically shows up.

EDIT 2/27/16 (16.04beta) Updated the link to the 3.10 driver (they updated their website). Everything just worked using above, didn't need to reboot.
EDIT 9/8/16: The current driver version is now 3.20. Make installation commands agnostic to both the driver version and the system architecture.
EDIT 06/12/20: The current driver version is now 5.10. Adjusted the installation steps for different wildcards.


xubuntu 15.10 display popup after suspend

I found the solution under:
https://bugs.launchpad.net/ubuntu/+source/xfce4-settings/+bug/1264629

Go to 'Settings Manager->Keyboard->Application Shortcuts' then remove XF86Display shortcut.


How to fix indicator icons from being cut off?

If the refresh / re-login doesn't fix it, and you are willing to sacrifice a couple of pixels as a work-around you can right-click on gnome-panel and change Properties > Size.


dpkg: How to remove a package and all other packages depend on it?

Usually one uses a higher-level utility instead of dpkg. You can use apt-get to remove a package and all its dependencies.

apt-get remove <package>


Validate and format JSON without alphabetically sorting the data with 'jsonlint'

Excerpt from the manpage of jsonlint:

[...]

-f, --format
      Reformat the JSON (if legal) to stdout

[...]

    When reformatting, all members of objects  (associative  arrays)
    are  always  output  in  lexigraphical  sort order.

[...]

That means if you use the -f option to reformat your JSON data, this tool will always alphabetically sort the entries.

You have to look for alternative software to do this. I will edit this answer and add some if I find any.

You could look at the site http://www.json.fr/ where all validating is done client-side, that means you can save the site on your computer (save full site, not HTML only!) and then still use it offline by opening the downloaded file in your browser.

It does not change the element order by sorting it. Your example input becomes to:

{
  "beta": 123,
  "alpha": 123
}


How do I run a 'sudo' command inside a script?

It is rarely a good idea to have sudo inside scripts. Instead, remove the sudo from the script and run the script itself with sudo:

sudo myscript.sh

That way, all commands within the script will be run with root privileges and you only need to give the password once when launching the script. If you need a particular command within the script to be run without sudo privileges, you can run it as a regular user with  (thanks Lie Ryan):

sudo -u username command

The space is irrelevant, it should not affect anything, there is always a space between a command and its arguments.


Microphone Recognized, Selected, but No Sound Showing or Input with Recording

Maybe a bit too late, but I also had this issue and using PipeWire solved it.
It seems related to PulseAudio doing something funny that upsets the mic and makes it restart. See: https://askubuntu.com/a/1295311
I used this PPA: https://github.com/pipewire-debian/pipewire-debian#1-ppa-configuration
You will probably have to disable the PulseAudio service and restart.


On the samba machine go to the folder, right click the folder and select the permission tab. There you can define the permissions on 3 levels: owner, group and others. If you want to block access, you have to change the Others "Acces Files" permission to "none".

To be complete, you have to check, who is part of the indicated group above. Default the group equals your user-id, if you did not change that group yourself, you do not have to do anything else.


Can I put the Ubuntu button on the top panel instead of the launcher?

That is not possible.

Even the new button is bigger, you save vertical space because other Places buttons (Applications and Files) of Natty are now integrated in the main Dash.

One bigger button more, two buttons less.


Steam Resolution Problem in Ubuntu 12.04

Please attempt to do the following:

Press Alt+F2 and type in gnome-terminal.
Type in the following:

sudo apt-get install --yes lubuntu-desktop

and then type in your password.
When it's finished, log out and click the ubuntu logo on the logon screen. Choose LXDE. Login with your username and password and launch Steam. Does the problem still occur?

If yes, go back and click the white circle next to your user name and click Ubuntu. Log in again and press Alt-F2 and type in gnome-terminal again.
Type in:

sudo apt-get autoremove --purge --yes lxde lubuntu-desktop openbox

and your password. Look in settings for Propiertary Drivers and choose to install them. If the problem still occurs after a reboot, I can't help you. And if it works in LXDE, play in LXDE and do other stuff in Ubuntu.


GNOME showing double top bar and search box on display

It seems someone has changed your desktop background image to an old screenshot of your desktop.

Open Settings and change your desktop background.


Sharing Internet Connection (DHCP) through a Wireless Hotspot

I assume you are connecting to internet through your eth0 and wish to share the connection to other computers via your wireless card (wlan0).

The reason what you have tried is failing is because your ubuntu only shares the connection as is, and your cable modem provider likely provides only one external IP address, which is given to your ubuntu computer. The other computers connecting to your newly created WiFi network are not getting IP addresses, and thus are not able to get connected.

Thus you have to install & enable a DHCP server on your ubuntu machine.

sudo apt-get install dnsmasq

and then configure it sudo nano /etc/dnsmasq.conf by adding the following lines in the "interface" section:

interface=wlan0
dhcp-range=192.168.0.100,192.168.0.250,72h

After this, your clients should get a IP address when connecting to the newly created WiFi network, and then the connection should be forwarded to the internet.


ubuntu 11.10 btrfs errors after every reboot

Since you're using a solid-state disk (SSD) you might want to put the 'discard' option in your /etc/fstab file. This enables the TRIM command.

You might want to run sudo btrfsck /dev/sda3 to check your system for errors.

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

https://en.wikipedia.org/wiki/Btrfs


Can I download and run ubuntu directly from computer without blank CD or USB stick?

You can run it from within a VirtualBox or VMware.

Writing the entire how-to use would be too long and quite trivial. There are many tutorials available in the internet on the installation instruction and how to use either of the software to run a guest OS(Ubuntu which you want to try out) inside a host OS(Ubuntu/Windows/any other OS that you are running now), an example being here.

Further explanation:

VirtualBox is an virtualization software which installs on an existing host operating system as an application; this host application allows additional guest operating systems(in your case, ubuntu), each known as a Guest OS, to load and run, each with its own virtual environment.You just need to allocate some free space where the application will create a vitual HDD and let you run ubuntu even when inside your current operating system.


How can one change the Oxygen look away from Gtk aplications when having both Ubuntu and Kubuntu Desktop?

I have managed to fix the issue by opening "kde system settings"  clicked on Application Apperance > GTK+ Apperance and switched all things from oxigengtk to Ambiance.

Problem Solved


You cant do it at least at this moment ,but you can change the position of the unity launcher to the bottom using a compiz plugin
See this guide for it


Is Ubuntu unstable or is it just my computer?

I have an Acer and had to change the hard disk after a couple of years.

Try running a smartctl test on the drive and see what it reports. Check out:

https://apps.ubuntu.com/cat/applications/natty/gsmartcontrol/ for the graphical version, (that seems to be for natty),
https://apps.ubuntu.com/cat/applications/smartmontools/ for the command line version.

If the hard disk is messed up, things won't work well regardless of the OS. Changing the hard disk in my Acer Aspire, was very simple but I can't speak for your one. You need to check it first though.


About NixNote and note taking alternatives

Here are few alternatives:

FromScratch.
Cherrytree
Springseed
Turtl


It looks like you are using a Window Manager with a tall top bar. I use Defcon-IV for example, and it has a small top area. You can install more Window Manager styles by running:

sudo apt-get install xfwm4-themes

To toggle viewing the top menu items, just hit ctrl+m in Thunar.
Here is Thunar on my computer.

You can change the icon size by going to View > Normal Size or zooming in or out.


how to set valid host and domain names in ubuntu 12.04 to avoid Java exceptions?

I assume it is a single node installation

you need hostname to IP mapping for localhost , something like below in your /etc/hosts

127.0.0.1 localhost localhost.localdomain  fatima-HP-ProBook-4520s
 127.0.1.1 fatima-HP-ProBook-4520s


How to pair+setup+connect airpod pro on ubuntu 20.04

Short answer is: use ControllerMode = bredr as discussed here
For others:

Set ControllerMode = bredr by editing /etc/bluetooth/main.conf file using sudo nano /etc/bluetooth/main.conf command (or another text editor of your choice)
sudo /etc/init.d/bluetooth restart
Try to pair again.


Clone multiple partitions without re-creating them manually

Try clone the entire disk with Clonezilla (in 'raw' mode - or whatever it is called) or dd and then delete the unnecessary partition with gparted. If your target disk is smaller then source -- don't worry, Clonezilla will just freeze in the end and the last partition on target will be broken. Just reboot and delete it anyway.

Copying partitions with gparted will not give you working bootloader.


Hardware acceleration is making chrome laggy , with NVIDIA 390.48 in UBUNTU 18.04 , how to solve?

+1. Here is bug-report. Feel free to mark that this bug also affects you.


Deleted Win7 partition of 263GB. How to get Ubuntu 12.04 to utilize that space?

If you have already deleted the space and it is unallocated, boot to the Ubuntu live CD and run GParted which will allow you to expand your partition, create a new one, etc.


Importing Windows Live Mail Email Accounts into Evolution

I found this post mark as [SOLVED]: http://ubuntuforums.org/showthread.php?t=1392034
I hope this can be useful for you or give you ideas to solve your problem.


ubuntu USB wont save my setting on reboot despite my 2gb persistent partition

You might bebefit from INSTALLING it to the usb drive.

Set up a usb drive with the installer.
Boot with both usb drives in the computer from the drive you put the installer on.
Select install, then "something else" from the menu
Pick out your 8gig usb drive to install to.
Be SURE to put grub on that (8gig) drive. -ie /dev/sdb not, for example /dev/sdb1
It will take longer to install, but you will have a 'real' install on the 8gig drive now.


How can I enable publishing to Facebook using Online Accounts in Lubuntu Shotwell 0.13?

Close shotwell (all aplication related, like control-center)

Use the shell:

sudo leafpad /usr/share/applications/gnome-credentials-panel.desktop

Change the line:

OnlyShowIn=GNOME;Unity;

to

OnlyShowIn=GNOME;Unity;LXDE;

Save and quit. Then, in the shell wirte this:

gnome-control-center

Add your accounts, open shotwell and export your photos :)