Can I run command-line commands within a python script?

Here's a fish...

import popen2, sys

def loopy_subprocess(arga, argb, iterations, command = 'echo'):
    for i in range(int(iterations)):
        p = popen2.Popen4((command, arga, argb))
        p.wait()
        print(p.fromchild.readlines())

if __name__ == '__main__':
    try:
        arga = sys.argv[1]
        argb = sys.argv[2]
        iterations = sys.argv[3]
    except:
        print("You didn't supply enough arguments\n"+\
              "Usage: python script.py arga argb iterations\n"+\
              "Warning - unsafe.  No input validation and doesn't account for spaces in arguments\n"+\
              "Optionally supply the command to be run as a final argument\n")
        quit()
    try:
        command = sys.argv[4]
        loopy_subprocess(arga, argb, iterations, command)
    except:
        loopy_subprocess(arga, argb, iterations)


How to delete sensitive data on Android phone?

You can erase SD card using a command line tool called shred (manpage)

You can also refer to this discussion in askubuntu.
How to delete file(s) in secure manner?

OR

Here is a tutorial (but you don't need live cd, if you are on ubuntu) - http://www.howtogeek.com/howto/15037/use-an-ubuntu-live-cd-to-securely-wipe-your-pcs-hard-drive/

For deleting everything on phone, Hard reset is OK. But I recommend flashing the original phone firmware. You can get instructions at XDA


The solution is:

sudo dpkg -i *.deb

Which will automate the process.


Recently I had a problem with spanish input method (suddenly misconfigured). I saw my ~/.xinputrc was created some time ago, configured with "ibus". In this file it suggested the command im-config

I solved only excecuting:

im-config

And I followed choosing 'default' and it worked well. I hope it will help you.


Mac Mini 2.1 (32bit EFI / 64bit CPU) Ubuntu 18.04.2 Server - GRUB reports unknown filesystem

I got 18.04 running on one of these a couple years ago, and it runs really nicely. It was definitely a hassle on this model, but once installed it seems smooth as silk. Unfortunately, I didn't really keep notes, so I don't know the answers to your questions off the top of my head...but I can probably help you figure it out if you're still stuck. (I see it's been a couple years, so I'll hold off unless you request more info!)
Right now I'm running an upgrade to 20.04, fingers crossed! It's going to become my home file server. (USB 2.0 is an unfortunate limitation, but I think it'll be fine for personal use.)


In newer versions of Steam, games seem to be located at:

~/.steam/steam/SteamApps/common

Don't know when this changed, but Steam is no longer in ~/.local/share


sudo requires a terminal to get the password from. Use gksudo instead; it asks for the password via a gui dialog box.

gksudo -- script


Unable to format SD Card (Unable to Format it and locked in read only mode)

If you look on the SD card reader, you will see a switch, and flip the switch to format it.
Switch on the sd card


What I do is

Right click on desktop
Select change desktop background
Go into behaviour tab
Turn on auto hide
Select top left corner
But on lowest sensitivity

This makes it basically impossible to open the unity bar.
If you want to open to access the unity bar just use the super key to open the dash and it should be right there.

Ziggy :D

P.S: this will only work in Ubuntu 12.04


As long as you practically "hide" the TV Live Hub behind PC1 it will not be possible (without some tricks) for the other PCs to see it.

As for the IP address: the TV Hub uses the connection to PC1 it must have a correct IP address for that network (via crossover). So leave that address well alone.


Make sure that the aspect ratio is 16:9 by going to System Settings → Devices → Display Resolution.

Note that the ratio 16:9 means full screen actually!


Well, downloading manually NDK might be not good options for beginning.

I highly recommend you to follow these tutorial: https://developer.android.com/ndk/guides/index.html

If you still feel get stucked, check this topic: https://stackoverflow.com/questions/7899740/android-ndk-tutorial-guide-for-beginners


Why does it take so long for my USB speakers to be recognized by pulseaudio?

We have no solution for the long timeout your system needs to recognize an external USB sound device but there is a way to connect the Pulse Audio output sink with this device as soon as it was available (as loading a default sink in your default.pa is not possible when the device is not ready by the time the sound server is started).

Pulseaudio module-switch-on-connect enables automatic switching of an audio device on connection. To test if this works we may issue the following commmand in a terminal:

pacmd load-module module-switch-on-connect

On success we may add the following line to our /etc/pulse/default.pa

load-module module-switch-on-connect

to always load this module per default.

Now the Pulseaudio output sink should be switched to any newly connected sink, in your case this would be your USB audio device.


Can I install Ubuntu 12.10 in a Toshiba Satellite C645D?

I guess so. I'm using Ubuntu 12.10 x64 in my Toshiba Satellite C665. It works very fine.


Boot problems when adding new hard drive to working 18.04 system

As several of you noted, the best answer is to stop using sda,sdb,sdc,sdd in fstab, and use the UUID's.
The quick answer that solved it for me was to comment out the mounting of sdc -- that allowed the gui to start.
But I believe the long term answer is to use UUIDs in the fstab.


No sound from speakers and also earphones

Sorry my English is not good , hope you understand

Firstly you plug your headphones and speaker on monitor or pc?

This is the solve solution

Try turning the volume up

if it's not work

Look pc sound cable is steady in  motherboard sounds pin

If it's still not work

Try re plug you headphones or speaker and reboot your system

I hope this can help you


How to install ubuntu and remove windows

Ubuntu download
Flash the usb with this
Okay you need to download Ubuntu desktop first. After that Download Rufus (second link) and insert your USB drive to your computer. After you have done that run Rufus and select where you have downloaded Ubuntu(it ends in .ISO). After that just restart your PC with your USB inside and you can install Ubuntu then.


18.04 Cannot change laptop screen brightness

The only way I found to fix this problem was by changing the display manager which you can read about here. Fair warning, this has unintended consequences because it will change your login screen and other things as well. Sometimes the cure is worse than the dissease. I would advise against this, but I also understand the need to want to fix the brightness issue without having to do it manually every time you boot. Try to switch to lightdm display manger and follow the instructions here. Than follow the instructions here to use xbacklight with a script to change the brightness settings. Next time you reboot, the script should change the brightness on your laptop. Some of the instructions might be dated so you may need to adjust them. I hope that helps, good luck.


"Deprecation Notice" error in phpmyadmin with 16.04

This depends whether you are adventurous enough. If you understand the error, it means your PHP has some old class constructors.

OLD Php Class Constructor

Class myclassname {

    function myclassname() {
      //This is a constructor
    }

New Php Class Constructor

Class myclassname {
    function __construct() {
      //this is the new constructor using __construct instead of the same function name as class name.
}

So what I did was to go into /usr/share/php/php-gettext/stream.php and /usr/share/php/php-gettext/gettext.php (or whatever file stated in your error), go to the file and change function myclassname() to function __construct.

The function myclassname should be identical to the CLASS myclassname declaration.

You should see about 4 errors if you are on ubuntu 16.04 with latest gettext. I just change that and it's not harmful to your system. It's a outdated programming syntax and if you upgrade in the future you wouldn't face any problem too. I will say it's a safe edit.

It's not really a major change or anything, just syntax updating. If you install from apt-get package you really have no other choice unless you compile yourself.

sudo nano /usr/share/php/php-gettext/streams.php

Line 48 StringReader Error.

Go to Line 52 and change

function StringReader ($str='') {

TO

function __construct($str='') {

Line 84 FileReader Error

Go to Line 90 and change

function FileReader($filename) {

to

function __construct($filename) {

Line 145 CacheFileReader error

Go to Line 146 and change

function CachedFileReader($filename) {

to

function __construct($filename) {

Using sudo nano /usr/share/php/php-gettext/gettext.php.

Line 36 gettext_reader { error

I think you get the gist now, go to line 101 and change

function gettext_reader($Reader, $enable_cache = true) {

To

function __construct($Reader, $enable_cache = true) {


Ubuntu Not Recognizing WiFi Chip Intel AC 9260

It seems I also encounter this wifi issue on my Ubuntu 18.04 laptop.

Tried to solve it by myself and it could be fixed by following steps.
You may refer it to see whether it can solve the problem on your side.

remove the problematic firmware manually

$ sudo mv /lib/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode $HOME

reload the iwlwifi

$ sudo modprobe -r iwlwifi; sudo modprobe -r iwlwifi

Then wifi works well.


Second hard drive -- detection, formatting and mounting

This is a 500 GB drive:

   8        0  488386584 sda

This is a 1 TB drive:

   8       16  976762584 sdb

However, they both appear to be already formatted. In any case, you should probably use gparted if you need to format/partition a disk.

I don't know of a GUI program to manage mounting, so I simply edit /etc/fstab or put a file in /etc/fstab.d/. The latter is probably the way to go. The file should have a single line for each paritition in the following format:

/dev/sdXN <tab> /media/blah <tab> ext4 <tab> defaults <tab> 0 <tab> 1

You should replace the dummy data with actual values and the mount point should be a directory that exists. You can use an UUID instead of /dev/sdXN to allow you to copy the partition over to another disk later.


HP Notebook - OS boot manager (UEFI) failed load OS

It has been solved. Used 'rufus' for creative live usb (GPT - UEFI).


Where to place a script, which clones gdm greeter to screen and beamer?

Creating a .desktop file e.g. clone.desktop in directory /usr/share/gdm/greeter/autostart containing a link to /usr/local/bin/clone will dynamically clone the gdm-greeter to PC-screen and beamer-screen, so both screens will show login information and make login possible.

Contend of clone.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=Clone PC Screen and Beamer Screen for Login
Exec=/usr/local/bin/clone
Terminal=false
NoDisplay=true


Installing Ubuntu on a 32gb Notebook with a failed Windows 10 Installation

Enter the BIOS of your netbook and set it up to try to boot from USB first. Then use your USB drive to install Ubuntu. You can see instructions for that there.

If you encounter a problem make sure to note the error message. If googling doesn't find something mention it here (editing/updating your question) so we can help.

Regarding dual booting with Win 10 this answer may be of help.


How do you delete files in the location: /usr/local/src?

Open a terminal with Ctrl-Alt-T and Use sudo like this.

cd /usr/local/src
sudo rm ./file-name

If you want to delete the entire content of a folder, you should use -r switch. like this:

cd /usr/local/src
sudo rm -r ./folder-name

Please, make sure you aren't deleting any system files. Also double check the file and folder name before hitting Enter key.


Installing from such repository can't be done securely

Looks like an issue with one of the PPA repository you added

More than likely they don't support non LTS version of Ubuntu (or don't support 19.04 yet). You can check and see if they have a repository for your Ubuntu version or try setting up the repository again, but I'd advise you to do the following

Use:

apt edit-sources

And comment out (put # in front of) the repository that gave the error and you should get rid of that error


Installing Ubuntu Desktop on server with only system management tools in it?

I think these should cover what you want:

Some recommended packages for ubuntu-desktop (apt-cache depends ubuntu-desktop to see complete list):

sudo apt-get install gnome-disk-utility gnome-terminal libpam-gnome-keyring \
libproxy1-plugin-gsettingslibproxy1-plugin-networkmanager network-manager-gnome \
network-manager-pptp network-manager-pptp-gnome ttf-ubuntu-font-family xdg-utils

Some recommended packages for unity (apt-cache depends unity to see complete list):

sudo apt-get install unity-control-center unity-lens-applications unity-lens-files \
indicator-session indicator-power indicator-keyboard indicator-datetime \
indicator-sound indicator-application indicator-appmenu hud


The actual command that launches Terminal is . . .gnome-terminal. There are actually many different Terminal Emulators. For instance, I am using sakura right now, a lot of people like Terminator , the classic one is xterm (which by the way also comes with Ubuntu and pretty much any Linux distro that has graphical environment).

What you call "shortcut" in Windows world is an .lnk file. In Ubuntu world there is something similar, .desktop files. They are used for a lot more than just running some app - you can also use them to launch stuff on GUI login if you put those files into .config/autostart folder (notice the leading dot). The structure of those files is as follows :

[Desktop Entry]
Type=Application
Exec=**actual command goes here**
Hidden=false
NoDisplay=false
Terminal=false

So knowing that you could create  a file like this:

[Desktop Entry]
Name=MY-CUSTOM-APP
Type=Application
Exec=gnome-terminal
Hidden=false
NoDisplay=false
Terminal=false
Icon=/usr/share/icons/gnome/48x48/apps/terminal.png

The Icon field can be ignored sometimes, but if you want the shortcut to look pretty, give it a full path to the image.

Also, there exists a folder with all the .desktop files, the /usr/share/applications, and there is /usr/share/applications/gnome-terminal.desktop. One could copy over such file to /home/user/Desktop/. Problem is, those files are owned by root user, so you have to do something along these lines:

cp /usr/share/applications/gnome-terminal.desktop /home/$USER/Desktop/Terminal.desktop

chown $USER:USER /home/$USER/Desktop/Terminal.desktop

chmod +x /home/$USER/Desktop/Terminal.desktop


In Kubuntu 15.04, how do I switch the K-menu back to classic style?

If I undestood it correctly, you are looking for the "Application Menu" applet. Right click on the bottom bar then click on Panel Options - Add widgets and look for Applications Menu.


Alps Touchpad not working on VAIO VPCEH laptop

you may try installing the package I've extraced from dell standard ubuntu image check this out https://askubuntu.com/a/278133/65801


o into sstem settings>Shortcuts and Gestures (might be different for Ubuntu as i'm using Kubuntu) and edit the keybindings. the windows key will show up as "meta"


Can't mount /. Ubuntu 13.10 problem with booting

try running from live CD https://help.ubuntu.com/community/Boot-Repair

if doesnt work. Just install again, and save your home directory in someway.


How do I enable hardware virtualization technology (VT-x) for use in Virtualbox?

Before changing BIOS settings we may want to see if hardware virtualization (VT-x for Intel, AMD-V for AMD processors) is supported by our CPU.
From a terminal issue
grep --color vmx /proc/cpuinfo ## for an Intel processor
grep --color svm /proc/cpuinfo ## for an AMD processor

If virtualization was supported the flag vmx (for Intel CPUs) or svm (for AMD CPUs) will be colored.

In case the CPU supports hardware virtualization, we need to enable it in the computer BIOS to be able to use it.
Also read How to determine if CPU VT extensions are enabled in bios? for other approaches.
Enter the BIOS (often pressing Del or F12 while booting) and see with the manual how it is named there. Each BIOS appears to have a different name fror this. Search for Virtualization, Virtualization Technology (VT-x), SVM, VMX, or similar, here shown for an Award BIOS:

For an example screenshot of an Asus EFI-BIOS see this answer on SU.
Set this entry to Enabled in case it was not done yet. Some BIOS need a cold boot (i.e. boot from power off state) to be able to use hardware virtualization.
Hardware virtualization can then be chosen in the virtual machine's  System -> Acceleration settings:

By this the VM uses hardware virtualization for optimal performance. We would even be able to run a 64-bit guest OS on a 32-bit host for testing.


error message when trying to intsall software-centre

It is not called software-centre. The package is called software-center.
Therefore, the code should be sudo apt-get install software-center


fstab won't mount SMB/CIFS share in Ubuntu 14.04 (after upgrade from 12.04 LTS)

Through an insane number of trial and error experiments and scouring different discussion fora (not forums, fora) I found the following works

//192.168.1.103/public /opt/Z cifs username=,password=,_netdev,uid=1000,iocharset=utf8,sec=ntlm  0  0

I have no idea what sec=ntlm means, but it appears to solve my problem. Could someone please do a post-mortem on this for me?
(Neon_overload: Thank you for trying to help anyway.)


How can I encode and decode percent-encoded strings on the command line?

These commands do what you want:

python -c "import urllib, sys; print urllib.quote(sys.argv[1])" æ
python -c "import urllib, sys; print urllib.unquote(sys.argv[1])" %C3%A6

If you want to encode spaces as +, replace urllib.quote with urllib.quote_plus.

I'm guessing you will want to alias them ;-)


You cannot have two operating systems running next to each other at the same time. So there is no way to simply press a button and go to Windows.

What you could do is use virtualization, for example using VirtualBox. You boot one operating system normally, and run the other operating system in a virtual machine inside VirtualBox.

Note that there are some limitations to this - the OS running in the virtual machine does not have direct access to the hardware, so performance might be a little lower and 3D graphics etc. won't work as well as when running natively.


unable to change the IP address on Ubuntu server 17

Have you tried using nmtui(NetworkManager TUI)?
Open nmtui with root privileges,
You'll see ncurses prompt, use tab key for navigation.
Select edit a connection,
Select the Network interface you want to edit, and select edit,
There you will find profile name,
Change the name as per your needs
After selecting edit, you'll see IPv4 configuration it might me set to automatic. Set it to manual, and select show,
In addresses field, input desired IP address,
Provide gateway, and DNS Server address,
And select ok.
You would return to interface section,
Select back, exit NMTUI,
And restart Network


how to completely remove mysql community workbench from my system

Based on the documentation, you can uninstall MySQL Workstation like this:

Open Terminal (if it’s not already open)
Uninstall the package:
sudo apt-get remove mysql-workbench-community

Check if there is a /mysql or /workbench directory in your home directory, and delete it if the files are no longer needed.

If you had installed the snap version of MySQL Workbench, then you can do this:

Open Terminal (if it’s not already open)
Remove the snap:
sudo snap remove mysql-workbench-community

That should be it


dpkg: error processing package sendmail-base

I had similar errors: update-inetd: error: --group is only relevant with --add.

So I followed advice in the link OP gave above.

I did this:

edited sendmail's pre-removal script /var/lib/dpkg/info/sendmail-base.prerm accordingly (depends on the error you're getting) ...I removed --group MAIL from that problem line, was almost at the top of the file
uninstalled sendmail-base and sendmail-bin (though this may be unnecessary... I had so many errors relate to sendmail that I just nuked it... don't need it on my ubuntu desktop anyway)
installed lsb-invalid-mta which is a fake MTA (will avoid problems later on with apps that want an MTA) - only necessary if sendmail was removed above

Now apt is upgrading properly again!


On "SMPlayer -> Preferences -> Advanced -> MPlayer/mpv -> Options" add "--osd-level=1".

For details about the problem and the solution follow the link:
http://forum.smplayer.info/viewtopic.php?f=2&t=8893


Nvidia drivers failed & login loop proplems

So after one day i found solution to this problem. The main fail was in gcc compiler which was installed from test repository(I need it for golang), but which brakes kernel.

So what i did to fix this:

Login to tty1 with Ctrl-Alt-F1 on
login Screen.
Stop lightdm servie with sudo service lightdm stop
Purge all nvidia and cuda packages with 'sudo apt purge nvidia-*
cuda-*'
Install purge ppa tool: sudo apt-get install ppa-purge
Remove test ppa: sudo ppa-purge ppa:ubuntu-toolchain-r/test
Check gcc version, now it should be 5.4.0. gcc --version
Remove old kernels: sudo apt-get purge linux-headers-4.4.0-119 linux-headers-4.4.0-119-generic linux-image-4.4.0-119-generic linux-image-extra-4.4.0-119-generic linux-signed-image-4.4.0-119-generic
Reinstall kernel: sudo apt-get install linux-generic linux-signed-generic
Reboot sudo reboot (after reboot you may see black screen, it's ok)
Repeat 1-2
Install nvidia drivers

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb

sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb

sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub

sudo apt-get update

sudo apt install nvidia-390 nvidia-390-dev

Reinstall ubuntu-desktop sudo apt install --reinstall ubuntu-desktop
Reboot
Profit!


Android Phone 6 not detected after improper removal Ubuntu 16.04

I had the idea of trying other usb cables attempted to do one and it did work. It was all just a hardware problem after all.


Ubuntu 12.04 is a Long Term Support version of Ubuntu and it is supported with maintenance and security updates for 5 years. Ubuntu uses Unity as its Desktop User interface and will be supported as scheduled with updates that mostly are bugfixing and not things that may drastically alter the user experience or break the system.

On the other hand Gnome 3.6 (I think you refer to Gnome Shell) is maintained by the Gnome Community and the only way to stay up-to date is to use the external, unofficial repositories. The PPA's that are available for gnome will eventually back-port the 3.6, but that may break your system if you don't know what you are up to.

There are many changes in the Gnome libraries that are not fully compatible with 12.04 and it is better to upgrade to 12.10 when it is ready. This version will sync its GTK3 libraries with the upstream Gnome 3 and it will be more comfortable to you to have Gnome 3.6.

Also, there is a Ubuntu 12.10 Gnome Remix (Gnomubuntu) that will be designed to meet the needs of people who want Gnome Shell 3.x instead of Unity.


Why do samba users need to log on to the server first?

If you are using Samba4 on Ubuntu and don't require student shell logins to Samba server, most likely you have to look forward to Samba AD.
http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/#samba4

A note about adding users on Samba version 4.x
Unlike Samba version 3.x and earlier, Samba version 4.x does not
require a local Unix/Linux user for each Samba user that is created.
The command is as follows for adding users into Samba Active
Directory:

samba-tool user add USERNAME-HERE

Please see Samba AD DC howto for more info - https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO

http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/#samba4


gpg does not know options --output --armor

The problem is the order of the arguments. You can use the one letter version of the option, this should work:
gpg -a -o temp/key.asc --export XXX


Repartition drive without caring what's on it

Try this:

Run parted as root: in a terminal: sudo parted /dev/sdd (you will be prompted for your sudo password)
Create a new partition table: in parted: mklabel gpt
Exit: in parted: q

And see if GParted is able to handle the device.


Simple Export Firefox Quantum Logins and Passwords

You can backup bookmarks, passwords and everything (your profile) up by going to ~/.mozilla/firefox(it is a hidden folder in your home folder).  Press Ctrl + H to show/toggle the hidden files in nautilus file manager.
You'll find many files and folders, the ones you need to back-up/export are those I selected (Make sure you exit from Firefox browser to be able to copy the files):

After copying them to a safe place, you can uninstall Firefox then install it again (or do whatever you want), then move the files you backed-up to ~/.mozilla/firefox again. After that open Firefox, and you'll find everything safe as you let it before re-installing Firefox.
Source:  For more details or to restore your profile to a different location, please visit mozilla support website


wc prints a byte count for a nonexistent process

Ok

first of all

ps -ef

will list every process on the system

Then you pipe the result and search for string "dfdsfdf"

The output will be nothing unless the command grep

hadi  28052 27027  0 08:54 pts/0    00:00:00 grep --color=auto dfdsfdf

Now you are passing this output to the pipeline and then counting the charters of this output and thus you obtain 74.

To check something remove one character from the string "dfdsfdf" then count become 73.

see:

ps -ef | grep dfdsfd | wc -c
73

Thanks to @steeldriver for his comment.

  It might be worth adding that grep can be 'tricked' into not matching
  its own output by replacing the literal search string with a regex

ps -ef | grep [d]fdsfdf | wc -c

This will return 0


Workspace Switcher doesn't match workspace settings

I had the same problem.

open Compiz config setting Manager

click on general options

click on Desktop Size tab

see if your settings are:
    Horizontal Virtual Size =4
    Vertical Virtual Size =1
    Number of Desktops =4 (Change this to 1 and your switcher will work)

Also look at your Viewpoint Switcher.  This is the addon that will make an app drag with you when you change workspaces


How to shrink my current Windows partition from ubuntu?

First off, shrinking the windows partition from ubuntu can lead to corrupted data, loss of said data, and inability to boot from the shrunk partition. Back up any data you do not want to lose and continue.

My recommendation is to shrink the windows partition from the windows itself. Should that not be possible, for whatever reason,

Let me state this again: THIS IS NOT A GOOD IDEA. IT IS VERY EASY TO DESTROY DATA AND CORRUPT THE PARTITION BEING SHRUNK! BACK UP YOUR FILES BEFORE ATTEMPTING THIS!

But the correct tool to use on Ubuntu 13.10 and back is Gparted. On Ubuntu 14.04 LTS, Gparted is not installed by default, but can be found in the Software Center. Install Gparted (or make sure it is installed), and continue

Again, DOING THIS MAY CORRUPT DATA OR BREAK THE PARTITION! MAKE SURE YOU BACK UP YOUR FILES FIRST!

All you need to do is unmount the disk and resize the partition, then save the changes. Then, expand the Ubuntu partition to fill the new space. Make sure you leave extra space on the partition you are shrinking,  or else things are going to get ugly.


Unable to access Internet in Ubuntu 14.04 LTS

Download these files to your Home folder

http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.041.00-1_all.deb
http://mirrors.kernel.org/ubuntu/pool/main/d/dkms/dkms_2.2.0.3-1.1ubuntu5.14.04.9_all.deb

and run

sudo dpkg -i *.deb

This will install a vendor driver.


Will Ubuntu 64-bit support my PC with of 2 gb ram?

In theory you probably can, but it is not recommended to install 64bit Ubuntu (or other OS) on systems with significantly less than at least 4GB of RAM.

The reason is that a 64bit system stores all data in RAM as chunks of at least 64 bits wide, which is 8 bytes. This also applies if the data chunk would just need e.g. 1 or 8 bits to be saved.

On a 32bit system, all data in memory is split up into clusters of 32 bits width, which is 4 bytes. Therefore, as many applications mostly use data types with not more than 32 bits width, a 64bit system may need up to twice as much RAM as a 32bit system. Because of this, there is the 4GB rule of thumb.

The 64bit version may be slightly faster because of better processor usage, but it may also be slower because it runs oftener and more quickly out of RAM.

This thread provides more explanations about 32bit vs. 64bit.

Therefore my recommendation:
Install Ubuntu (version 14.04 LTS or 15.04) in 32bit architecture or upgrade your RAM.

In case you still get bad performance, maybe you should even consider choosing a more lightweight desktop environment like XFCE instead of Unity. Xubuntu comes with XFCE desktop by default.


So the problem turned out to be a different path setting.

Gunicorn was using the python virtualenv as PATH and therefore did not know whoami at all. Pushing in absolute path worked!


Triggering an action when a specific volume is connected

You can do this with udev, you must write rules in separate file and put them to /etc/udev/rules.d

For example this rule describes udev to run /path/to/mount/script when usb is mounted and /path/to/umount/script when umounted.

SUBSYSTEMS=="usb", ACTION=="add", KERNEL=="sd[a-z]1", RUN+="/path/to/mount/script", OPTIONS="last_rule"
SUBSYSTEMS=="usb", ACTION=="remove", KERNEL=="sd[a-z]1", RUN+="/path/to/umount/script"

Here you can read complete manual.


Lenovo Z400 low brightness video driver problem

I have the same laptop and the same problem. Here is the solution I found:

Run:

ls /sys/class/backlight/*/brightness

You should see:

/sys/class/backlight/ideapad/brightness/sys/class/backlight/intel_backlight/brightness

You need to adjust the first line (adjusting the second line won't do anything). Find the current brightness:

cat /sys/class/backlight/ideapad/brightness

Find the maximum brightness:

cat /sys/class/backlight/ideapad/max_brightness

Adjust it to the desired value, say 15, by:

echo 15 | sudo tee /sys/class/backlight/ideapad/brightness


Missing Terminal, Menu Bar and other things

You may be able to get a working terminal by pressing Ctrl + Alt + F1 (Actually, any F-Key from 1 to 6 should work).

If you get a Terminal, you should be able to reinstall the appropriate python package via apt.

Also, it might be worth it to check first if you can fix it by installing the ubuntu-desktop metapackage, which contains some of the vital parts of your system:
sudo apt install ubuntu-desktop


Open Ubuntu Software Center and install Compiz.
Open Compiz (alt + F2 and type ccsm).
Go to Unity and check the shortcuts.


If you're not doing this from the root user (which I presume you aren't), you need to use sudo.

It should be as simple as sudo mount /dev/xvdb1 /var/www


Can I load Clonezilla not from USB but from my main internal HDD?

Unclear what you are asking, but here goes my guess.

I assume you are asking if it is possible to run clonezilla without booting from a usb first.

You can run clonezilla, but you can not clone any mounted disks. In other words, you can not clone the disk from which clonezilla is running. You can clone other disks, if you have any.


It should be available for all users, not me.

... answers your question. I would go for /opt/ purely so you separate it from your main system. Even though it might not 100% completely match the /opt/ definition it is the best place to put it.

Set it up with a group and add all the users needing it to that group.

  /opt/

  This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here. To comply with the FSSTND, all third party applications should be installed in this directory. Any package to be installed here must locate its static files (ie. extra fonts, clipart, database files) must locate its static files in a separate /opt/'package' or /opt/'provider' directory tree (similar to the way in which Windows will install new software to its own directory tree C:\Windows\Progam Files\"Program Name"), where 'package' is a name that describes the software package and 'provider' is the provider's LANANA registered name.


Ubuntu 14.04 does and will use Upstart for init. However, systemd has many components, and a number of them can be used without systemd being the init service. For example, logind has been in use for a couple of releases at least. Don't worry, you will have Upstart as init as long as you stick with 14.04. This will change in future releases.


The xdotool commands to use are:

Zoom in (aka Ctrl++)

xdotool key Ctrl+plus

Zoom out (aka Ctrl+-)

xdotool key Ctrl+minus

Normal size (aka Ctrl+0)

xdotool key Ctrl+0


Is there any GUI network/bandwidth monitor?

Nutty is one such graphical network information and monitoring tool that works on Ubuntu.

Nutty is available as a PPA for Ubuntu (16.04 upwards) and other Ubuntu based systems. Open Terminal and run the following comands for installation

sudo apt-add-repository ppa:bablu-boy/nutty
sudo apt-get update
sudo apt-get install com.github.babluboy.nutty

In case of issues related to missing libgranite package, add the Elementary PPA as shown below and re-try. The Elementary PPA can be removed after Nutty is installed.

sudo add-apt-repository ppa:elementary-os/stable
sudo apt-get update
sudo apt-get install com.github.babluboy.nutty


As @hakermania said it has to be written somewhere, so it takes space.
Plus ext4 has jurnal, so additional information is written and you don't know were data is physically on hard drive (in opposite to ext2) so even shred doesn't work.

It is possible to restore any file deleted on ext4, but they are deleted if you delete the forlder (they need to be somewhere).

As for inodes and more information on folderd, it's explained very well in this article:
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout
so copying it has no sense.


You can easily combine text (assuming your certificates are text files) by copying and paste the content with any text editor. You can also combine the text by the current command:

cat Intermediate\ 1.crt Intermediate\ 2.crt Root.crt Servercertifacate.crt > combined-certificates.pem


Create a file by the name of the user in /var/lib/AccountsService/users that contains these two lines:

[User]
SystemAccount=true

Restart lightdm either by rebooting or running this from a console:

$ sudo service lightdm restart

The user will be treated as a SystemAccount and not be displayed.

If the username is myusername the file would be:

/var/lib/AccountsService/users/myusername

The user myusername would not show on the Ubuntu login screen, nor would it show in the dropdown of the gear in the tp right of the screen control.

This works in Ubuntu 14.04 LTS.

You may want to also enable the greeter-show-manual-login function so that the user can login the system.  You can do this by adding this to the [SeatDefaults] section of the /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf file.

[SeatDefaults]
greeter-show-manual-login=true


Installed 20.04 , lost network interfaces

I solved it by adapting instructions from https://linuxconfig.org/how-to-switch-back-networking-to-etc-network-interfaces-on-ubuntu-20-04-focal-fossa-linux


Draining the battery to 0% charge likely will cause any laptop with any OS to fail to boot. Recharge it completely, and then boot up.

And, since you're new here, please make sure to select the best answer provided and click on that answer's checkmark so they get the gratification of knowing they helped.


Telegram notifications stopped working. Ubuntu Touch 15.04 r4

It appears the reason was a changed password to my Ubuntu One account.

The only way to be able to re-authenticate was to delete the account and then set it up again. Notifications are working again.

Keeping this Q&A for anyone bumping into the same issue.


Chmod breaks folder access / file access

By chmod -777 you set the access rights to --------- i.e. you remove all access rights. Try chmod 777 and your file or folder will be accessible again.


Unity 2D was abandoned and removed from the repositories in the 12.10 release cycle to focus all development resources on the compiz-based Unity.

In the future the current implementation of Unity (compiz-based Unity version 7.2) will be replaced by the converged desktop experience of Unity 8, which we will then still call Unity. To my knowledge this future implementation, which is based upon Qt 5.x will not require compiz.


Howto detect an unplug
Basically what worked for me was:
# When plugged in:
cat /proc/asound/card0/codec#0 > pluggedin.txt

# When not plugged in:
cat /proc/asound/card0/codec#0 > notplugged.txt

# Then compare the differences
diff pluggedin.txt notplugged.txt

For me the difference was in 'Node 0x16' under 'Amp-Out vals':
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out             Node 0x16 [PinComplex] wcaps 0x40058d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1         Amp-Out caps:ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]                                    |    Amp-Out vals:  [0x00 0x00]

So I based the detection on the difference found.
Howto mute
With this knowledge you can have a script running in the background. If unplugged the scripts mutes your speakers like using amixer sset Master playback 0% (or any other command).
#!/bin/bash
# This scripts detecs unplugging headphones.

oldstatus="unrelated string"
while [ 1 ]; do
    # The following line has to be changed depending on the difference (use diff) in '/proc/asound/card0/code#0'
    status=$(grep -A 4 'Node 0x16' '/proc/asound/card0/codec#0' |  grep 'Amp-Out vals:  \[0x80 0x80\]')
    if [ "$status" != "$oldstatus" ]; then
        if [ -n "$status" ]; then
            echo "Plugged in"
             amixer sset Master playback 80% # Set volume to 80%
            oldstatus="$status"
        else
            echo "Unplugged"
            amixer sset Master playback 0%  # Mute
            oldstatus="$status"
        fi
    fi
done

You can make it executable with chmod +x scriptname.sh and put it in the startup applications. You will have to adjust the unplug detection though by finding your own difference in /proc/asound/card0/codec#0 (maybe even change the numbers here for multiple soundcards.
Related Links:
https://wiki.ubuntu.com/Audio/PreciseJackDetectionTesting
https://unix.stackexchange.com/questions/25776/detecting-headphone-connection-disconnection-in-linux
How to automatically change volume level when un-/plugging headphones?


Ubuntu 14.04 spying? suspicious traffic at boot

GOT IT!
Or at least, for now, I think I have the answer (thanks to the Q&A and research noted below). I now have a computer that does not reach out to the Internet  until I ask it to do so (we will see how periodic auto updates do [which I am ok with])... ahh finally the soothing tranquil sound of an Internet quiet machine at boot/start and shut down (still talks to router, broadcasts ect. Ok with that)

The following is what I did. I will explain it as best I can, and will not get into the merits of why one should, or should not do this. I don’t want to get into it with anyone regarding what traffic they are OK with  their computer doing behind the scenes. This post is not intended to be a “freak out” session or imply that Canonical's phones-to-home and NTP checks are evil, sinister or anything of the sort. I asked these questions for a specific reason and I thank all of you who responded with tips, suggestions, and information. I found most of it very helpful and learned from some of it (popcon.ubuntu.com - gone; another bites the dust).

The Solution (so far, at least)

Figuring that some of the traffic was clock related and  usage related, I continued researching the subject and came up with the websites referenced below (credit where credit is due). I believe the culprit here is a program called Zeitgeist. It sits around on your computer and monitors the user. It, along with some nasty co-conspirators called GeoClue and geoip, feverishly work to compile info about the user. The bandits collect, statistic-izes, package, and ship off what your doing to Canonical (oh, ...and they keep your time right, in case you're warping through a wormhole). Then (not before), I believe, Canonical makes the data anonymous and stores it for their usage needs (debug, develop, commercial, or otherwise). Either way it's got to go.

So:

sudo apt-get remove zeitgeist zeitgeist-core zeitgeist-datahub python-zeitgeist \
  rhythmbox-plugin-zeitgeist geoclue geoclue-ubuntu-geoip geoip-database

running that ultimately removed:

activity-log-manager activity-log-manager-control-center geoclue
geoclue-ubuntu-geoip geoip-database libunity-webapps0 python-zeitgeist
rhythmbox-plugin-zeitgeist unity-webapps-common unity-webapps-service
xul-ext-unity xul-ext-websites-integration zeitgeist zeitgeist-core
zeitgeist-datahub

A bunch of stuff I could live without. In an anticipation that it would “break” unity, I put on “flashback” and Gnome Shell for a few other options. But as it turns out to my surprise, Unity still works! No errors. Time is looking good, Dash works (minus the bloated web searches/live searches/lense searches as desired) I have not (yet) be forced off unity.

then:

sudo gedit /etc/default/ntpdate

and on the first line;

exit 0

put an end to NTPD requests (juniperberry, golem, ect)

The referenced sites below talk about possibly removing Whoopsie too, but I kept that in for now, since you usually invoke the transmission at the time of the problem. (emphasis … for now.)

So there you go! Now a nice quiet start to my computer in the network neighborhood! Thanks again for all your comments and help guys. I will keep an eye on this, and if the problem returns, perhaps you'll be hearing from me. Good luck if you try this.

REFERENCES:
http://ubuntuforums.org/showthread.php?t=2000108
and
Strange connections by gvfsd-http --spawner


Make directory named 0001 instead of 1 in a bash script loop

Your current script uses only a decimal value - this obviously translates to the value without leading zeroes.

You would have to pad the string to the length of 4 characters, with leading zeroes. You do this by using backticks `` to get the result of the printf call printf  %04d $j.

As a result, you should have the full command:

for i in *.jpg; do let j+=1; mkdir `printf %04d $j`; done

Source: StackOverflow: bash - Padding zeros in a string

(Obviously also see the further answers to that question, if you want a more in-depth solution, but this definitely works perfectly for this use case.)


What plugins are needed to use voice/video chat in empathy?

For what I have read and tested here you only need Empathy and to login with a google account. The other user also has to have a google account to make this work.

In the Empathy webpage it says that it supports this features: http://live.gnome.org/Empathy

I would mention the google-talk plugin but thats a browser plugin to use the gtalk features inside the browser.

When you have both users using a google account, the option to Audio Call will be highlighted when you right click the user in the Contact List window.

Now to be fair, this was not the case almost a year ago. Back then Empathy did not support this feature. Now you can use Empathy to call a user inside the browser, for example if he or she is using gmail at the moment and has the chat activated.

For now the problem I find is trying to call Empathy from the gmail webpage. It only works from Empathy to Gmail but not the other way around. With the many updates made to Empathy since the last version in Ubuntu 10.04 (Which is the 2.34) am thinking this "bug" might be corrected. For the changelog see here: http://linux.softpedia.com/progChangelog/Empathy-Changelog-27288.html


Right click My Computer, select Manage and Disk Management.

Right click the partition, select Change Drive Letters and Paths then remove the drive letter.

This just hides the partition! It doesn't make it not accessible though.


Password protected / private repositories?

You can store the desired packages on eg. a nsf. When this nfs is mounted somewhere on your computer you can simply install these packages with a command like:

sudo dpkg -i /path/to/deb/file.deb

apt-get is simply a more advanced version for installing applications, it includes dependencies and downloads the needed files form the internet.

But maybe you are looking for something like this:
http://www.omgubuntu.co.uk/2010/09/keryx-offline-package-installation-made-easy-in-ubuntu
or this: https://help.ubuntu.com/community/Repositories/Personal


Brightness controls disabled upon unplugging HDMI

I faced the same problem before on my laptop Lenovo z500 ideapad after  searching i found this solution :

 1. open terminal
 2. sudo gedit "/etc/default/grub"
 3. append "acpi_backlight=vendor" to GRUB_CMDLINE_LINUX_DEFAULT
 4. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
 5. save and close gedit
 6. sudo update-grub
 7. restart

If nothing changes , you can check the solutions of this question.


Data Provider for Thunderbird Lightning with Exchange 2010 problem

I presume you are using Exchange 2007/2010 Calendar and Tasks Provider Add-on(https://addons.mozilla.org/de/thunderbird/addon/exchange-20072010-calendar-/)

This Addon is not compatible with Thunderbird 15. The Author will need some time to make it work with the newer version.

The solution is to downgrade your Thunderbird to 14 or less and manually install a compatible Lightning (I use Thunderbird 11 with lightning 1.3 in ubuntu 12.04)

You can downgrade via synaptics or with

sudo apt-get install thunderbird=<version>

where <version> is something like 11.0.1+build1-0ubuntu2 (it is in my case)

On the negative site, you have to uncheck thunderbird for upgrade every time you update your system, locking the version in synaptics does not suppress the update (bug, I guess).

Hope this helps.
Good Luck!


This question has been asked before. You can follow the instructions in My wifi Qualcomm Atheros Device [168c:0041] (rev 20) doesn't show up and work in Ubuntu 14.04.3 on Lenovo flex 3 14 to enable it.


why am I getting fontconfig errors when running spyder?

Try:

export FONTCONFIG_PATH=$CONDA_PATH/etc/fonts/


How to run teamviewer 11 on Ubuntu - install completed

run:

sudo teamviewer --daemon enable

and then open teamviewer from the GUI


Are there any default programs in Ubuntu 16.10 which take my data and pose a privacy risk?

One answer can be found here: Ubuntu Spyware: What to Do?. The article is written by our famous friend Richard Stallman. To summarize:

  Since Ubuntu version 16.04, the spyware search facility is now
  disabled by default. It appears that the campaign of pressure launched
  by this article has been partly successful. Nonetheless, offering the
  spyware search facility as an option is still a problem, as explained
  below. Ubuntu should make the network search a command users can
  execute from time to time, not a semipermanent option for users to
  enable (and probably forget).

  Even though the factual situation described in the rest of this page
  has partly changed, the page is still important. This example should
  teach our community not to do such things again, but in order for that
  to happen, we must continue to talk about it.


A recent update in 14.04 fixed this issue for me.

If anyone figures out what caused it, or what update fixed it, post and I'll accept that answer.


How to make .htaccess to unhide the directory

The .htaccess file looks ok. Is there an index file (like index.html or index.php or something like that) in the directory where the .htaccess file resides? If so, then browsing to that path will show the index file rather than the folder listing. If you don't need the index file for anything, just remove it from that directory.

I don't think this is related but it looks like you have a superfluous line in the .htacess file - the last line of the file with "Options + Indexes```"


ubuntu server 16.04 wifi connection to internert lost when assign static ip address to ethernet

I post this question to https://ubuntuforums.org and their respond solved the problem.
I just post answer here too.
problem was in gateway value for static IP of Ethernet. in fact gateway announce to every device on subnet, if you want access to internet, you should reach this address(gateway address) on private network.
by defining gateway for my local network, i added second gateway to my system which overwrite WIFI default gateway.


Where are release notes from security updates that were installed in the background?

The results of unattended-upgrades are logged at /var/log/unattended-upgrades. Though this will not contain the changelogs; it will show you what has been upgraded. You can then use one of the methods mentioned by others to see the actual changelogs.

You might also be interested in the apticron package. It can be set up to email you about any packages on the system that need to updated. This email will include summary of changes in each package generated by apt-listchanges.

By default it will mail root. If you don't have this set to forward to a real account already, edit /etc/apticron/apticron.conf, to set the email address:

EMAIL="foo@bar.com"


I had the same problem after changing my sound from default to say drip and then installed: unity-tweak-tool...even without opening the teak tool, it seems to have fixed it for me. (looking at the terminal, there are no obvious errors or anything, but happy now it's fixed). update: well haven't rebooted yet...hitting tab in terminal is fixed, haven't rebooted yet but got an email with the old notification sound...hopefully once rebooted it's changed.


Firefox application sound resetting itself to50%

Solution was found here.

In Firefox's about:configchange media.default_volume value to 10


After reinstalling linux again i found out that specific nvidia drivers (nvidia 440 & 450) is the source of the issue. Nouveau drivers makes things a lot stable.


Installing Epson print driver gives 404 on Ubuntu.com

I do not know what is with the Software Center, but you can install the driver without it.

Create Epson folder in your home folder and place there deb driver files.

Then tun in terminal

sudo dpkg -i ~/Epson/*.deb
sudo apt-get install -f


Whether Nvidia graphics cards are better in Ubuntu than AMD graphics cards is a matter of opinion, but Nvidia graphics cards are more fully supported in Blender than AMD graphics cards.

Cycles is a new render engine available since Blender 2.61. It is still under development, and intends to become a render engine with a focus on interactivity and ease of use, while still supporting many production features. Nvidia CUDA is supported for GPU rendering with Nvidia graphics cards starting from GTX 4xx. Cycles requires recent Nvidia drivers and NVIDIA CUDA toolkit to be installed.

In Ubuntu 14.04 there is a new CUDA package that is not available in Ubuntu 13.10 called libcudart5.5. libcudart5.5 is the NVIDIA CUDA runtime library. libcudart5.5 requires the nvidia-331 or more recent graphics driver.

CUDA enabled in Blender in Ubuntu 14.04


How do I print a two side paper using one side printer on evince?

Technique

Assuming pages are output in the normal order.
Print only even numbered pages in reverse order.
Put stack of printed pages back in the tray.
Print only odd numbered pages, in normal order.
Print only the even numbered pages, printing in normal order.
Put the stack of printed paper back in the fresh paper tray.
Print only the odd numbered pages, printing in reverse order.
If the number of pages in total is odd, remember to put a blank sheet on the end after printing the even number pages to give something for the final odd page to print on the back of.

Getting the Paper the Right Way Round

The only tricky bit is getting the paper in the right way round when putting it back in. Getting it the wrong side up will cause overprinting and getting it the wrong end up will cause half the pages to be upside down. The correct way up will depend on the particular printer.

Most small laser printers these days take paper in from a fresh paper tray at the bottom, fed in short edge first, print on it starting with the page top, flip it over top to bottom and spew it out above the fresh paper tray. For these, put the even-side printed paper back in the fresh paper tray face down with the top of the page pointing towards the printer.
Most cheap inkjet printers these days take paper in from a fresh paper tray at the top, fed in short edge first, print on it starting with the page top, and spew it out below infront of the printer. For these, also put the even-side printed paper back in the fresh paper tray face down with the top of the page pointing towards the printer.
Anyway, it only needs testing once for a printer, there are only 4 possibilities to test and the sheets of paper consumed in testing will immediately be compensated for by the first pages of two-sided printing.

Etc.
If the application print dialogue contains the option to print a selection of pages, just put "1,3,5,7" etc. in that box, print & repeat with "2,4,6,8" etc.. If you need a list of the first thousand page numbers divided into odd & even comma separated lists for convenience, here they are: odd numbers;even numbers.
2. Convert it to PDF. I've read, but not tested, that the Acrobat Reader 8.1 has the option to print odd & even pages separately.
3. Alternatively show the navigation pane in Acrobat Reader, resize the thumbnails so exactly 2 columns fit in and drag select the whole of one column then print that selection.


Prefrences>Search and Preview
First section Search in subfolders. By default its on this computer only. Change to All locations


PPP Connection: Software Center 'Install' button is not active

I found a solution for this.

If you have problems with the Install button in Ubuntu Software Center try my solution:

Open terminal and type or paste this line

sudo -H gedit /usr/share/software-center/softwarecenter/netstatus.py

Scroll down to the end of the file and search for this

# simply query
def get_network_state():
    """ get the NetState state """
    global NETWORK_STATE
    return NETWORK_STATE

Next change return NETWORK_STATE to return 70
so it must look like this

# simply query
def get_network_state():
    """ get the NetState state """
    global NETWORK_STATE
    return 70

Save file, close Ubuntu Software Center and launch it again. From now Install button should be always accessible for you even if you don't have connection with internet.
Simple workaround. Hope it help someone.


This is a flash player error, a quick Google shows it is related to incompatible or outdated versions of flash.

Unfortunately adobe no longer releases flash updates for Linux, so it is likely unfixable in Firefox but you could try an alternative player like

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

It is Google's pepper flash packaged for firefox but I have tried it and could not get it to work, though I did not try very hard.

Alternatively I can confirm the videos run in Google Chrome (Pepper flash, like the repo above), so you could install chrome and use that.


Indeed, CDs already do not contain language packs other than English. The language choices you see on CD is just for the translations of the installation process' strings. For the actual language packs of an Ubuntu system other than English to be installed, you should either have a working internet connection during the installation or you should install from a DVD or you should install language packs later.

Its officially stated as below:

  DVD downloads

  Don't be confused, even though DVDs can hold far more data than the
  typical Ubuntu CD, the main benefit of
  the DVD downloads is to get access to
  all of the available language packs.
  Most people will be fine with the
  standard CD installer. There are fewer
  download locations for the DVD images
  and this list is updated less
  frequently than for the CD images.


setxkbmap -print is not helpful in this case. I found a little tool ... very easy to compile

sudo apt-get install git
mkdir -p `~/src`
cd `~/src`
git clone https://github.com/nonpop/xkblayout-state.git
cd xkblayout-state
make

Now you can execute the command ./xkblayout-state to get the current layout, e.g.

./xkblayout-state print "%n"
German%

or list all layouts that are installed

./xkblayout-state print "%N"
German
English
English

In this case without a trailing %. I would have expected that, because I have not added a \n.


Manually installing a mainline kernel does not uninstall the old one. They are considered as different packages and therefore the old kernel will still continue to be upgraded.

In any case, Ubuntu will continue booting from the new kernel by default.

The new kernel will NOT be upgraded automatically unless you installed through a PPA.

You should try installing a newer kernel only if you have specific problems with the current one and would like to try to test a newer kernel to see if the problem has been fixed or not. It's not recommended to install an upstream kernel simply to have the latest version, since these are not fully tested and may cause problems.


Touchpad not working on ACER Aspire LT Model V3-471G with 16.04

this is solved for now.  After booting, I just have to issue Fn+F7 to get the touchpad to work.  However, I need to do this after every reboot, the change is not persistent.  Oh well, I will live have to learn to live with this.  Thanks to all who offered various suggestions.


Thunderbolt 3 pci card that works with Ubuntu 20.10 Desktop - Suggestions wanted

@Europa
Any TB3 card should work on Intel machine.
I assume you have an Asus machine?
20.10 (Only Ubuntu I've used so far) supports TB3.
I'm running Ubuntu on Intel machine with Win10 latest.
I'm starting on Ubuntu myself from Win 10 and MacOS.
Ask away.  Hope this helps (a bit)


First run

 sudo apt-get autoremove <package name>

If it doesn't work then

 sudo apt-get autoclean

remove sources.list file.and create new sources.list...

sudo rm /etc/apt/sources.list

Then, type in

sudo software-properties-gtk

This will open software-properties-gtk and a newsources.list will be created automatically.

Then change the server to US or to any other server of your choice. You must enable repositories from the new dialog in order to create new sources.list.

Tick all the boxes then click on Revert then click close.

Need to restore default repositories

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

(it is good practice to backup this file before installing to recover if such things happen)

Now install anything!


Repair broken software package on ubuntu 12.04 and ubuntu 12.10,
To solve broken package problem on Ubuntu, you need to purge it which is related to PPA or software source. There are several way to solve this problem.

Cleaning using two ways command.

sudo apt-get clean && sudo apt-get update
sudo apt-get update
If you fail using the first command, try to use this one:

dpkg --configure -a
Try this command if you failed to remove broken package using the second command:

apt-get install -f

The last command will help you to remove all broken package.


How boot to terminal Ubuntu 12.04 MacbookPro

Ctrl+Alt+T doesn't boot into the terminal, just calls the gnome-terminal application.

If what you mean is you want to log in to a tty, try Ctrl+Alt+F# (where # is a value between 2 and 6) For instance, Ctrl+Alt+F6.

You can go back to the GUI with Ctrl+Alt+F7.


Screen recording applications are not detecting audio in ubuntu 20.04

The issue is due the use of a deprecated python feature. This PR fixes it, so this should be OK if Kazam ever gets updated again.

Anyways, to fix your problem, as I commented here using that PR, you can run

sudo gedit /usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py

And replace its content with this content.


Ubuntu 13.04 Installation problem: no full installation button in "try Ubuntu"

Well, "Try Ubuntu" does what it suggest, you can try Ubuntu with it, without installing, of course after restart you will get to your old system.

You can install it by clicking the Install icon on the desktop of the Live system.


Switching the mod key isn't working for me in i3

I know this is pretty old but just in case anyone else struggles with this, I had the same issue and I finally figured out that the config file in my user folder (/home/me/.config/i3/config was overriding /etc/i3/config


wget or curl gives 403:Forbidden while downloading file from OneDrive for business

Google Chrome as well as Mozilla Firerfox both provide an option to copy download link specifically for cURL. This option will generate cURL with all required things such as User agent for downloading things from the side. To get that,

Open the URL in either of the browser.
Open Developer options using Ctrl+Shift+I.
Go to Network tab.
Now click on download. Saving file isn't required. We only need the network activity while browser requests the file from the server.
A new entry will appear which would look like "download.aspx?...".
Right click on that and Copy → Copy as cURL.
Paste the copied content directly in the terminal and append --output file.extension to save the content in file.extension since terminal isn't capable of showing binary data.

An example of the command:

curl 'https://company-my.sharepoint.com/personal/path/_layouts/15/download.aspx?SourceUrl=
%2Fpersonal%2Fsome%5Fpath%5Fin%2Ffile' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux
x86_64; rv:73.0) Gecko/20100101 Firefox/73.0' -H 'Accept: text/html,application/xhtml+xml,
application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5'
--compressed -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Referer: https://company-my
.sharepoint.com/personal/path/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fagain%5Fa%5Fpath%2F
file&parent=%2Fpersonal%2Fpath%5Fagain%5Fin%2&originalPath=somegibberishpath' -H
'Cookie: MicrosoftApplicationsTelemetryDeviceId=someid;
MicrosoftApplicationsTelemetryFirstLaunchTime=somevalue;
rtFa=rootFederationAuthenticationCookie; FedAuth=againACookie; CCSInfo=gibberishText;
FeatureOverrides_enableFeatures=; FeatureOverrides_disableFeatures=' -H
'Upgrade-Insecure-Requests: 1' -H 'If-None-Match: "{some value},2"' -H 'TE: Trailers'
--output file.extension

Further Reading: why would curl and wget result in a 403 forbidden?


Error installing fluidsim package due to library fftw3

It looks like you don't have all of the libfftw3 component packages installed - perhaps because you installed libfftw3-single3 and libfftw3-double3 instead of the complete libfftw3-dev development package.

Try (re)installing libfftw3-dev

sudo apt install --reinstall libfftw3-dev

and if that doesn't work, try installing the sub-packages directly

sudo apt install --reinstall libfftw3-long3 libfftw3-single3


In the project's github website you can download the source code and compile it yourself. As for the deb's, maybe is just a temporary broken link, so I'd suggest you try again later.


How do I restrict access to a directory for a specific user through samba?

Try adding this line in your /etc/samba/smb.conf file and restarting samba.

[SomeSambaShare]
valid users = SomeUser


Why did Windows XP disappear from the menu on my triple-boot system?

Are you sure you not delete XP partition when installing Ubuntu 12.04?

I suggest you to download Grub Customizer and check your grub menu.

Install grub customizer 2.2 on ubuntu

Open the terminal and run the following commands

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Screen shot

If you cannot find Windows XP, probably you replace the partition with Ubuntu 12.04. If that so, find hardisk recovery to get back your data.


Mostly issues related to this can be solved easily by just reinstalling the application.
To reinstall: https://www.teamviewer.com/en/download/linux/


Binary distribution from cmake.org - what to do with the downloaded binaries?

You have to put your downloaded cmake on your $PATH, either is $HOME/bin or /usr/local/bin (or /opt and add /opt to your path) and then in setting a path put the location of your downloaded cmake first

For example,

PATH=$HOME/bin:$PATH

or

PATH=/usr/local/bin:$PATH

would search and find your downloaded cmake first if it were in $HOME/bin or /usr/local/bin respectively.

If you used PATH=$PATH:$HOME/bin is would use the system cmake first (due to order of directories in $PATH )

See https://unix.stackexchange.com/questions/115964/program-installed-to-home-username-bin-and-added-to-path-not-launching

Alternately you can use to full path to your cmake, for example

/home/your_user/Downloads/cmake --version

or

$HOME/bin/cmake --version


Is there a software way to make the screen more readable?

Open the Ubuntu System Settings. Then go to Appearance.

In the Look tab, there is Theme setting. The default is called Ambiance, but you can also pick High Contrast, which gives you a hard black and white contrast.

Furthermore, you can set a keyboard shortcut for switching to high contrast in System Settings->Keyboard->Shortcuts->Universal Access.


Trying to execute a process with pkexec asynchronously and get 'Refusing to render service to dead parents'

It is not allowed to run pkexec in the background by fork and exec and then terminating the parent. The process becomes an orphan and belongs to init (ppid == 1). See https://lists.ubuntu.com/archives/foundations-bugs/2012-July/100103.html.

You're giving control of an application to another user (usually root). The default way is to run the application with pkexec as root from a shell script. This way the parent is a shell and not init.

E. g. GParted (/usr/bin/gparted-pkexec) and GameConqueror (/usr/bin/gameconqueror) do it like this as shown below:

Create a shell script as /usr/local/bin/foo.sh:

#!/bin/sh
pkexec "/usr/sbin/foo" "$@"

Give executable permission to above script:

chmod +x /usr/local/bin/foo.sh

If you are using .desktop file, change Exec value as:

Exec=/usr/local/bin/foo.sh

Make sure that your policy file in /usr/share/polkit-1/actions/ has following entry to allow GUI:

<annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>

That’s it!


How do I make windows games run smoothly on ubuntu 12.04?

For windows games in Ubuntu you should try PlayonLinux.
It is a front end for Wine, but more user friendly and helps you install many games.

Other options are Crossovergames (you have to buy a license after trial period) or just use Wine. WineHQ has good tutorials.

Good luck!


Ap-hotspot wifi clients can't reach each other

You probably need to enable IP forwarding.

Edit /etc/sysctl.conf and search for the following lines:

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

Uncomment net.ipv4.ip_forward=1:

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

Restart your networking services, or reboot.


Cannot move file to subdirectory of itself

I am assuming you have files like,

[a-s]_dragon_ball_-_001_-_the_secret_of_the_dragon_balls__rs2_[4FC1375C]
[a-s]_dragon_ball_-_002_-_the_emperors_quest__rs2_[59F9C743]
[a-s]_dragon_ball_-_003_-_the_nimbus_cloud_of_roshi__rs2_[0C592F5F]
[a-s]_dragon_ball_-_004_-_oolong_the_terrible__rs2_[47CE4923]
[a-s]_dragon_ball_-_005_-_yamcha_the_desert_bandit__rs2_[B6A035BF]

these files have [a-s] at beginning. And you want them after rename as, (according to your comment)

001_-_the_secret_of_the_dragon_balls
002_-_the_emperors_quest
003_-_the_nimbus_cloud_of_roshi
004_-_oolong_the_terrible
005_-_yamcha_the_desert_bandit

Use this script below,

#!/bin/bash
for file in [\[a\-s\]]*
do
    newfile=`echo "$file" | sed -r "s/^.{20}//" | awk -F "__rs2" '{print $1}'`
    mv $file $newfile
done

How it work

This script scans all filenames in current directory that starts with "[a-s]". Next inside for loop for every scanned file name the script creates new file name leaving first 20 characters filtered throughsed and cuts part starting with string "__rs2" . That removes unwanted parts in the name. And lastly the files are renamed to new file name one by one.

Usage

Save the code as rename_file.sh.(say) Next put it at the same directory where all these files are. Give the script execution permission. Write in terminal,

chmod +x rename_file.sh

Finally to rename the files, just write in terminal,

./rename_file.sh

Done.


How to map external touch screen to ignore laptop in multimonitor setup?

You may find the following xinput option to be of interest:
--map-to-output device crtc
    Restricts  the  movements  of  the absolute device to the RandR
    crtc. The output name must match a currently  connected  output
    (see  xrandr(1)).  If  the  NVIDIA binary driver is detected or
    RandR 1.2 or later is not available, a Xinerama output  may  be
    specified as "HEAD-N", with N being the Xinerama screen number.
    This option has no effect on relative devices.

Based on info you've provided, the following command may do what you need:
xinput --map-to-output "G2Touch Multi-Touch by G2TSP" DP-1

If this command does what you want, you can set up udev to run it whenever the touch screen is connected. However, xinput will not work when called directly because udev is a system service that runs outside of X. It's necessary to create a watcher script inside of X that udev can notify.

Install inotify-tools.

Create the watcher script.  Set it up to run after the user has logged into X. This can be done via the display manager or desktop environment, depending on whether you want the script running for all users or select users.
#!/usr/bin/env bash
inotifywait -m /tmp |
   while read path action file; do
      if [[ "$file" =~ touchscreen-attach ]] ; then
         [[ "$action" = "OPEN" ]] &&
            sleep 1 &&
            xinput --map-to-output "G2Touch Multi-Touch by G2TSP" DP-1
      fi
   done

Use lsusb to get the device id of the touch screen. It will be in the form idVendor:idProduct (eg, 2a94:564d).

Create a file /etc/udev/rules.d/10-touchscreen.rules:
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2a94", ATTRS{idProduct}=="564d", RUN+="touch /tmp/touchscreen-attach"

See also:

How to execute a shellscript when I plug-in a USB-device
How to use inotifywait to watch a directory for creation of files of a specific extension

JackDaniels points out that KDE has input settings associated with Graphic Tablets. They work for my Wacom tablet, but not my laptop touch screen. If this works with your external touch screen, it would be much easier to set up than what I've described above.


Because they are still owned by root. You need to chown the new partitions.

You'll want to make sure the partitions are mounted, if you want to mount them at boot, then ensure they are set up in /etc/fstab.

The basic syntax for chown being

sudo chown user:group /path/to/partition

so if you're user/group is bert and the partition is mounted at /mnt/tmp then

sudo chown bert:bert /mnt/tmp

If you want to also deal with the access permissions for the partitions then chmod is you're friend.

To make the partition read/write/execute for user and group then

sudo chmod 770 /mnt/tmp

An excellent source of information for chmod - including a graphic representation tick box - http://ss64.com/bash/chmod.html


what does "export TERM=linux" actually do when inside a script

The export TERM=linux command sets the terminal emulator to linux.  Depending on the environment and capability of the console you're using, some emulations will work better than others.

The default TERM setting for Ubuntu is xterm.  You can check your TERM setting by running echo $TERM.

You may have to check with the provider of the application that you are running to find out the best-recommended terminal emulator for their program.  Most application will expect that you already have the emulator set to something compatible such as xterm or linux.

set -x
A debugging setting:
You refer to a noisy script.  You're getting verbose output from your script because of the set -x settings which are used for debugging.  Once you see what is happening and have your script running the way you want it, you could comment out the set -x line by placing the # symbol in front of it.

set -e
This setting is telling the script to exit on a command error.  For instance, if your command was to change directory to a none existing directory or to list a non-existing file, the script would terminate on the error, rather than proceeding to the next line.

Your problem with the ssh via the server you are logging into may result in that, by default the server tries to match the terminal emulator of the settings from the computer you are logging in from.  If it doesn't have a match, it doesn't know which settings you can handle.  For this, you'll have to use the export TERM command to specify to the server how to communicate with you.


Permanently install an updating Ubuntu on USB drive

Yes, it's possible to install Ubuntu in any available drive including external HDDs or USB flash drives and it will behave pretty much as installed in HDD or SDD, albeit slower.

From Windows 10 you can use Rufus to create an installation media with a different USB flash drive than the one you will be installing to. Needless to say you cannot install to the same drive your booting the installer from.

Shutdown. Then insert both the drive you've made with Rufus and the one you intend to have Ubuntu installed on, boot from the former and follow instructions to install in the latter.


How to supply password to sudo su in script

sudo su user will fork into a new shell. That's the last thing you want to do when in a non-interactive script. Sorry, I mean that's the last thing you want to do in a script after hard-coding a password into it! Please avoid that.

You would be much better off skipping su and using sudo on its own:

sudo -u admin -- ls /usr/bin

Or failing that, just making sure your script is run as root with this block:

if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

And then there's no need for interacting inside the script at all. Your script can sudo -u... command anything without needing to change password.


How to access the GUI in Ubuntu 12.04 while running from a disc?

$ startx

Is the command to start up the GUI. However if it did not start automatically then there is probably something wrong that prevented it from started in the first place.


how to get user permissions for nfs share?

Let usera be the primary group of UserA (groups usera). You can find out the GID using: id -g usera on the client system, say it is 1256. Now add your user to the usera group:

sudo adduser ayven usera

Now, on the server, do:

chown :1256 /Directory # Replace 1256 with the correct GID
chmod g+rwxs /Directory

Remount it on the client:

sudo umount /Directory
sudo mount /Directory

(You might have to relogin for your new groups to take effect.)

Now both you and usera have complete access to the NFS share. I have used the setgid bit, so you may have to enable it, I don't remember it. Add any users you wish to have access to this directory to the usera group.


12.04LTS stands for “long-term support.” LTS releases would be supported with security updates for years.

However, Ubuntu also have new releases every six months.  Every new release of Ubuntu offers new features.  The current release being 13.04

LTS releases will receive security updates and other bug fixes as well as hardware support improvements. The current LTS release, Ubuntu 12.04, will be supported until April 2017.

Now, a regular release like 13.04, will only be supported for nine months. Considering new versions of Ubuntu are released every six months, you’ll have three months after a new version is released to upgrade to it or you won’t receive security patches anymore.

Well, if you want to have the latest versions of all your software, and use the latest features before they make it to the LTS version of Ubuntu, upgrade to the every-six-month releases.  Now its 13.04

However, you’re not missing out much by using 12.04. It’s regularly updated with new hardware support and performance improvements.

On a personal note, I'm still using 12.04, and haven't upgraded to 13.04.

Also I would read the release notes as per gertvdijk comment above.


Ubuntu 14.04 kworker hogging cpu; fix didn't work

Ok, I think I solved the problem.  I'm going to leave my previous non-answer in place because I believe it has useful information.  Or at the very least it has keywords which will help people find this answer.

The problem was that noclobber was set in rc.local, so it wouldn't add disable to gpe10.  I solved that by adding two lines to rc.local.  Issue the command:

sudo gedit /etc/rc.local

And then append the following two lines BEFORE the "exit 0" line:

set +o noclobber
echo "disable" > /sys/firmware/acpi/interrupts/gpe10

Hope that helps someone.


How to add items to a submenu on xubuntu 13.10

There is the 'Directory Menu Plugin' which does this and comes pre-installed with the panel itself.

Integration into the existing application menu is not possible.


Creating a NTFS Data Partition on a Startup Disk Creator, balenaEtcher or Similar ISO9660 USB
Since 19.10 the process of cloning an OS to USB as done by Startup Disk Creator, creates a casper-rw partition.
This partition can be used for persistence by pressing shift at boot and esc, then F6 and esc again. then typing a space and the word "persistent".
This must be done every boot where persistence in wanted.
It is possible to modify the ISO file used by SDC to include the word persistence into grub, but it is not easy.
If the Ubuntu install is mainly needed for installing Ubuntu, the casper-rw partition can easily be converted to a NTFS or FAT32 partition, that can be used for Data storage by both Linux and Windows.
Procedure

Run Startup Disk Creator or Etcher to create Live 19.10, 20.04, (or later), USB.
Boot new Live USB to activate casper-rw partition, then Power Off.
Reboot the Live USB toram. (press shift when booting, hit F6 and type a space and toram).
Unmount casper-rw partition using Disks.
Open Terminal and run:

sudo mkfs.ntfs -f -L data /dev/sdx3
For NTFS Partition or for FAT32:
sudo mkfs.vfat -n data /dev/sdx3
were x is the drive number of the new Live USB

The drive should now have the original data space minus the size of the OS ISO.
Edit:
mkusb-plug can also be used to turn the space into Data space or into Persistence space that will save the work done on the USB from boot to boot.
https://help.ubuntu.com/community/mkusb/plug


My KDE desktop is 'GONE' How can I recover it?

Instead of reinstalling the system you could reinstall the KDE desktop environment. I'm not sure if it helps in this case though. But you may want to try reconfiguring it first by

sudo dpkg-reconfigure kubuntu-desktop

Reinstall it with this command:

sudo apt-get install --reinstall kubuntu-desktop

Only I think this leaves the configurations, so if it doesn't work, try

sudo apt-get purge kubuntu-desktop
sudo apt-get install kubuntu-desktop

I hope something works for you!


Alternatives to Firefox 3.5/POW to use SSJS?

You can download Firefox 3.5.19, as well as older versions of 3.5 from Mozilla's ftp framework. The timing is not the best right now, as the framework seems to be heavily overloaded, probably due to Firefox 5 release. The connection timed out many times for me, before being able to reach the files to verify their existence, but you might have better luck or might have to wait. Anyway, here it is:

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

Once downloaded, extract it, and you'll get a folder called 'firefox' with precompiled binaries (meaning there is no need to install). You can run it from that folder with './firefox -P 3.5' where 3.5 is the name of the new profile. You can also move the folder somewhere convenient to you and create a launcher.


How can I change the icon in Thunderbird's "New Mail" popup?

The icon is located under compressed file named omni.ja.You can find it under /usr/lib/thunderbird or /usr/lib/thunderbird{version}.

Open terminal.

Type sudo sudo file-roller /usr/lib/thunderbird/omni.ja  # replace the path according to your path.

Navigate to /chrome/classic/skin/classic/messenger/icons. Replace the new-mail-alert icon with whatever you want to.

First copy the faenza icon (default size 32x32) to your desktop.

Rename it to new-mail-alert.png.

Then just drag the icon over Archieve manager window. It will automatically overwrite the icon.

Restart thunderbird.

DONE!

For Firefox you can also find the omni.ja file located under /usr/lib/firefox.Navigate to /chrome/toolkit/skin/classic/mozapps/downloads & replace the 'downloadicon.png' file.

Note: This is weird, because on my computer( running Thinderbird 13 with ubuntu natty & precise) thunderbird uses system theme icons. So you may want to upgrade thunderbird to the latest stable version.


Automatically size windows using Xfce like in gnome

12.10 and above
Tiling snap is built into the XFCE window manager, just drag your windows to the edges of the screen for the snap to occur.
11.10 & 12.04
If you want the "tiling-snap" of compiz you will need to get your coding-hands dirty because this was made available as a code-patch for these two ubuntu releases.
According to this article - there is a patch available to enable windows tiling (aka windows snap) for the xfwm4 compositing manager.
There is a great you-tube video showing this in action.

I have applied this patch and uploaded this to my PPA.
to install
sudo add-apt-repository ppa:fossfreedom/xfwm4
sudo apt-get update
sudo apt-get install xfwm4

logout and login

If don't want to install the modified xfce window manager, you will need to use compiz as your compositing manager to enable tiling:
sudo apt-get install compiz compizconfig-settings-manager

Then add compiz --replace ccp & to your autostart programs list.


Cannot log off or shutdown in Ubuntu 10.10

Simply try sudo shutdown -h now from your terminal.


script in /lib/systemd/system-sleep/ deleted but still runs

You should run

sudo systemctl daemon-reload

after removing the script.

After testing this myself it turns out that a daemon-reload is not enough. Even systemctl daemon-reexec doesn't help. So the only way to get rid of the running script seems to be a reboot or killing the process manually.

Explanation why this is possible: It is normal on Linux that you can delete a script while it's running. What really happens is that the directory entry is removed (the file becomes "invisible"), but it is really gone only after all processes have closed the open file handles for this file.

You can test this behaviour like this:

$ printf "#!/bin/sh\nsleep 10000" >/tmp/bla
$ chmod +x /tmp/bla
$ /tmp/bla &; rm /tmp/bla
[1] 5959
$ ls -l /tmp/bla
ls: cannot access '/tmp/bla': No such file or directory

You will see that the script is gone, but still running until you kill its process.


Here are all music player softwares:
Rhythmobox
Audacious
Clementine
Amarok
DeaDBeeF
CMUS
Spotify
Sayonara
MOC
Exaile
Museeks
Lollypop
Strawberry
VLC
Harmony
Mellow
The links I used are:
https://www.omgubuntu.co.uk/2017/01/best-music-player-apps-ubuntu-linux https://www.tecmint.com/best-music-players-for-ubuntu-linux-mint/ http://www.linuxandubuntu.com/home/best-linux-music-players-to-stream-online-music
Note

That there may be some music player that can't be installed because of your ubuntu version is not compatible with the music software.

The links I used may not work in the future.

Rhythmobox should be default installed.


ubuntun 14.04 not Detect Bluetooth Dongle

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1314621

Upgrade to at least kernel version 3.14.1.
See https://wiki.ubuntu.com/Kernel/MainlineBuilds for details.


How to install grive tools on 16.04 or later

I had found (just before asking) an anwer but as it was about 6 months w/o grive tools, so I am happy to share that it works and how:

1) Install "gdebi".
2) Download the latest grive tools, i used the utopic one.
3) Install the deb file thru gdebi, it will download and install all required dependencies. (I actually used synaptic to install most deps before using gdebi).

Do not run the grive setup if you already had installed it before. Just run the "google drive indicator" directly, and setup auto start on its preferences if needed.

See a more detailed answer here: https://askubuntu.com/a/1012861/589343


Here is the solution for your Broadcom Corporation 43b1 wireless device...

$ sudo apt-get --yes install linux-headers-generic debhelper fakeroot build-essential dkms
$ cd ~/Downloads
$ wget http://people.canonical.com/~ypwong/drivers/broadcom/hybrid-v35_64-nodebug-pcoem-6_30_223_95.tar.gz
$ mkdir b43b1-6.30.223.95
$ tar xvzf hybrid-v35_64-nodebug-pcoem-6_30_223_95.tar.gz -C b43b1-6.30.223.95
$ echo -e 'PACKAGE_NAME="b43b1"\nPACKAGE_VERSION="6.30.223.95"\nCLEAN="make clean"\nMAKE="make"\nBUILT_MODULE_NAME="wl"\nBUILT_MODULE_LOCATION="./"\nDEST_MODULE_LOCATION="/updates"\n' > ./b43b1-6.30.223.95/dkms.conf
$ cat b43b1-6.30.223.95/dkms.conf
$ sudo mv b43b1-6.30.223.95 /usr/src/b43b1-6.30.223.95
$ sudo chown -R root:root /usr/src/b43b1-6.30.223.95/
$ cd /usr/src/b43b1-6.30.223.95
$ sudo dkms add -m b43b1 -v 6.30.223.95
$ sudo dkms build -m b43b1 -v 6.30.223.95
$ sudo rmmod wl

If you get, "Error: Module wl is in use," just ignore it.

$ sudo dkms install -m b43b1 -v 6.30.223.95
$ sudo modprobe wl

Then reboot.
(Press <CTRL>-C if modprobe hangs; in that case you will have to use your power button to shut down, but the module should load automatically once you restart; see below if it doesn't).

Log back in and make sure that the wl module was loaded:

$ lsmod | grep wl

You should not need to do the following, but if the wl module is not loaded after rebooting, type this and reboot again.

$ echo 'wl' | sudo tee -a /etc/modules

Note: This solution was adapted from psyray's posting on bug 14e4:43b1 Broadcom Corporation Device 43b1 (rev 03) - not supported.  You can reference that bug for more information.


"Absolute" trackpad after update to 16.10

Run in a terminal

sudo apt install xserver-xorg-input-all

and reboot.

The user space driver was removed while upgrading for some reason.


IDE that can use remote server (which can only be connected to by VPN) to save and compile C/C++ code

This is what I got to work for me.  I installed XFCE with croot, and the IDE that ran best on my Chromebook was CodeLite.  Google has a really nifty extension called Secure Shell which lets you validate your device and use a remote desktop without a VPN.  There is also a SFTP extension that integrates with the native file explorer, though it is a bit buggy.


Mouse movement, scrolling text has nothing to do with the speed of your hard disk. That is all -memory- based.

  In short, should I simply return to my previous setup?

That is a question only you can answer.

  Is it worth the hassle trying to configure things correctly? Sorry if this question is very vague.

In my opinion: yes, if only for understanding your system better.

In regards to slow responses from mouse and scrolling:

Open top in a terminal and have it visible. When the mouse lags or scrolling lags check what the processes are that eat up your resources.
Do a memory scan to check if the memory is faulty.
Also make a note of all your hardware and see if you can identify any problems there. If, as an example, you have 1Gb in memory you will see performance increase adding 3 or 7 more.


What is "Unknown pixelformat 0x00000000" in dmesg output

This warning message is issues by the Video4Linux driver when a VIDIOC_ENUM_FMT ioctl() command is actioned on some video device (for example, a webcamera).  An application is using the ioctl command to enumerate image formats and passing a v4l2_fmtdesc structure with the pixelformat field set to zero, which is not correct.  The driver detects this and emits the warning message.

If you are interested, the warning comes from function v4l_fill_fmtdesc in https://github.com/torvalds/linux/blob/master/drivers/media/v4l2-core/v4l2-ioctl.c

So, this is not a kernel issue, it's some application that is misusing the ioctl command VIDIOC_ENUM_FMT


Internet Service Providers quite often block common ports like 22, 80, and the like.  It's possible that your ISP is blocking that port from incoming connections.  Try forwarding a different WAN port to internal port 22.  i.e., have public port 2222 forward to your PC's port 22.  So in effect, on an external machine you would run:

ssh -p 2222 [public_ip]

to get access to your machine from the outside.  Just change the incoming port on the router to 2222 or something else (22222 is even less likely to be blocked).


How to show Wine System tray icons in the system top bar ? ( Ubuntu 18.04 )

I am using Ubuntu 20.04 currently, so I didn't test my solution in Ubuntu 18.04.
But, I suggest that you should use Topicons Plus.
As I know, Ubuntu 18.04 has Gnome shell version 3.28 and Topicons Plus supports it.
On Ubuntu 20.04, I could install it in official apt repository. (gnome-shell-extension-top-icons-plus). Please try it on Ubuntu 18.04.


Is there a way to save screenshots to custom location using gnome-screenshot?

Take your screenshot, select where to save from the pull down menu - "Save in folder"

From the command line just specify a location

bodhi@daemon:~$gnome-screenshot -f /home/bodhi/Pictures/testing.123.jpeg

bodhi@daemon:~$ls /home/bodhi/Pictures/ | grep test
testing.123.jpeg


Will the flashback desktop environment be able for installation in future versions of Ubuntu?

Ubuntu Mate is what you're looking for. Mate is a fork of the original Gnome 2 desktop and via the Ubuntu Mate project is now an official desktop respin.

And yes, they're releasing a 16.04 version. Not sure what their Mate package support is like (don't know if it's a long-term-release) but all the other core applications will be.


Using Online Accounts to authenticate against my server

I can only answer to the second part of the question (about the .application file), because I'm not familiar with the services offered by the U1 account.

You are correct in that you need an .application file, and you actually also need a .service file as well. Fortunately, it's possible to ship them also with confined applications shipped in a click package. Your manifest.json file should contain something along these lines:

{
  ...
  "name": "com.example.package",
  "hooks": {
    "my-app": {
        "account-application": "my-app.application",
        "account-service": "my-app.service",
        "apparmor": "my-app.json",
        "desktop": "my-app.desktop"
    }
  },
  ...
}

When the click package gets installed, the .application and .service files get processed and installed under ~/.local/share/accounts/, and their names (and therefore IDs) are changed to <package-name>_<application-name>.{service,application}, which in the example above would result in com.example.package_my-app.{service,application}.

Just for completeness, I'm showing an example of what these files could look like:

my-app.application

<?xml version="1.0" encoding="UTF-8" ?>
<application>
  <service-types>
    <service-type id="com.example.package_my-app">
      <description>Login into XXX using your U1 account</description>
    </service-type>
  </services-types>
</application>

and

my-app.service

<?xml version="1.0" encoding="UTF-8"?>
<service>
  <type>com.example.package_my-app</type>
  <name>U1 for XXX</name>
  <provider>ubuntuone</provider>
</service>


How can I delete duplicate emails in Evolution?

In 3.2.2, Ctrl-A (select all messages), Message -> Remove Duplicate Messages works for a folder.


12.04 LTS: Kernel Update to 3.13.0-44 broke my-weather-indicator

This happened to me few days ago on 14.04 with the kernel update to 3.13.0-46. After I've found your quetion today I tried to install utopic kernel backport and it works again! You can install it too with:

sudo apt-get install linux-generic-lts-utopic

If you don't want to upgrade to utopic kernel for some reason, you can boot into the last working kernel (at grub pick advanced options for ubuntu and then choose the kernel you want) and then purge the newer kernel by running:

sudo apt-get purge linux-image-3.13.0-44-generic

see this topic for more info on that:
Kernel downgrade after update broke my system


Is it possible for two processes to access the webcam at the same time?

Happily, now, YES!

There is currently a project on GitHub that can show not only two, but an infinite (limited only by system capacity) number of video devices from a single source.

The project is called v4l2loopback. (Check the link and scroll down to view the README for instructions.)

You can install v4l2loopback by cloning its GitHub and running these commands:

$ git clone https://github.com/umlaeute/v4l2loopback.git
$ cd v4l2loopback
$ make
$ sudo make install

Examples

For samples on how to use it with GStreamer, FFmpeg, MPlayer, and Skype, check their small wiki. Hopefully you could find the right settings to fit your needs.

Enjoy tweaking around!


Problem mounting USB Mobile Broadband dongle in Ubuntu 13.04

If you are facing a problem that your computer doesn’t recognize the device then run the command below:

sudo apt-get install usb-modeswitch usb-modeswitch-data


Prevent system of using updates after downloading and updating them

Reversing an update in Ubuntu may or may not be a trivial task. The update is now installed, and still needs some configuration on a next reboot. I recommend to reboot the computer and have the update installed. Updates that come through the software center are quite reliable and tested, and may bring significant security improvements. They will, by design of the Ubuntu release schedule, never cause your system to function differently.


"Check if you are using third party repositories" what this means while upgrading?

The message is clear. Something went wrong and it's most likely because some non-Ubuntu repository in your system. You can disable them using many ways, but my favourite is:

sudo mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.bk/
sudo mkdir /etc/apt/sources.list.d/


Difference between dhclient & dhclient3?

They are indeed one and the same:

~$ ls -lah /sbin | grep dhclient
lrwxrwxrwx  1 root root      9 2010-12-30 14:38 dhclient -> dhclient3
-rwxr-xr-x  1 root root   402K 2010-08-07 04:49 dhclient3

The arrow indicates that dhclient is a Symbolic Link that points to dhclient3. We can use

test -h /sbin/dhclient
echo $?

to make sure it is; it will return 0, meaning yes.

This is sometimes done to maintain backwards compatibility with older programs and scripts that assume the old command.

If you are writing a program that uses either of those, you should use dhclient3, and manage your dependencies accordingly.

In ls -lah, the arguments mean long listing format, all files, and human readable file sizes. Also, test has nothing to do with symlinks, it's a general utility to test the truth of a statement, the argument -h causes it to work on files, and return True (0) if the file exists and is a symlink.

To find out where the file is, I used the type utility:

type dhclient
dhclient is hashed (/sbin/dhclient)

If you find any two files that aren't symbolically linked, and you suspect they're still the same, you can use a Hash Function to see whether they're the same:

stefano@lenovo:~$ md5sum /sbin/dhclient && md5sum /sbin/dhclient3
fc2491e5c1576783bdc4aa8c5817166e  /sbin/dhclient
fc2491e5c1576783bdc4aa8c5817166e  /sbin/dhclient3


How to use Wifi on Ubuntu with a dual boot (macbook air)?

The easiest way to do this would be to connect to Ethernet (via usb dongle) and run

sudo apt-get install bcmwl-kernel-source

If you are not able to get access to Ethernet, you can download this file on another machine, transfer it via usb, and install it that way.

https://launchpad.net/ubuntu/+source/bcmwl/6.30.223.141+bdcom-0ubuntu2


Security question. Ubuntu installation on windows PC

If you use WUBI, then it is a little bit less secure.

If you do a proper ubuntu install then it can be considered as safe as if it was alone. Technically it is possible for a virus running on your windows installation to make changes to your ubuntu installation. But it is a hard job because windows doesn't support the linux partitions used in ubuntu, so the virus have to contain a file system driver for those linux partitions. This is a very very unlikely situation and I think there is no such virus for windows which does such things.

So you can consider your ubuntu installation as safe as if it was alone.


Try to boot with noacpi and noapic. See this list of boot options.

Make sure, your windows filesystem is clean (run checkdisk).
If you can, install ubuntu on native linux partition. Use wubi only if you have to.


Is your question on how to go to a specific screen? If yes labelling screens with screen -S screen_name and then you can go back to a particular screen with screen -r screen_name. If that's not the question could you provide more details