xrandr not working on ubuntu 19.04. How to reduce brightness below default minimum?

Here is the simple step to control brightness in Linux based system
First, you have to know the monitoring screen connected you.
To know this run this command
xrandr -q

It will give useful information about the screen

( Here my screen connected to eDP, It might be different for your system )
After knowing that run the below command
xrandr --output eDP --brightness [0-10]
Replace eDP by your connected screen from the above output and you can have normal brightness values from 0.1 to 1.0
Hope it helps you


Panel apps try to launch in xterm, even though it isn't installed

I was tooling around in synaptic, which I installed later to help me figure this out.

I noticed GNOME-terminal wasn't installed, so I installed it.
Suddenly my links work properly now.

To be certain, I uninstalled it, and deleted the link I made recommended by Sneetsher

Once uninstalled I was getting the same errors.
When I install GNOME-terminal again, it works as expected.


Does ubuntu 16+ (specifically for ARM) have HDMI drivers by default?

I have used Ubuntu 16.04 on my Odroid XU4 with a perfect HDMI support. I have also used the same Ubuntu version on Wandboard Quad, also with HDMI screens. I think it could be a problem with your screen. Here are the images for download:

Odroid Ubuntu 16.04 Images

WandBoard Ubuntu 16.04 Images

You could also try with the UDOO SBPC:

UDOO Downloads, Ubuntu 12.04


KDE Plasma OSD icons

Plasma OSD is using icons from the plasma desktop theme - volume OSD icons are in audio.svgz:

Plasma theme details: https://techbase.kde.org/Development/Tutorials/Plasma5/ThemeDetails

Icons: https://techbase.kde.org/Development/Tutorials/Plasma5/ThemeDetails#.22icons.22_folder

Plasma desktop theme can be changed from the KDE System Settings > Workspace Theme > Desktop Theme


Ahh in 11.10 the path is different

LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so skype

Now it works


Go here to get to the download page.

Note the new licensing agreement...

Go to the bottom of the page, find the area shown below, accept the license agreement, click the download link...

Once downloaded, double-click on the .deb file to install it.


There's probably nothing to worry about, this looks like a temporary guest account. They are normally removed upon logging out. Malware is unlikely in my opinion, but can't be ruled out without more information.


ping 8.8.8.8 and DNS fails despite healthy connection to router and good DNS settings

I also had similar situation and solved by changing DNS.
You can try changing any other DNS.
Try 1.1.1.1 DNS it's new and fast. Hope changing DNS will solve your problem.


Where can I find my .emacs file for Emacs on Ubuntu?

As @steeldriver already mentioned, the .emacs config file usually resides in your home directory. See also The Emacs Initialization File.

If you need to start with a blank .emacs, try touch ~/.emacs and then open it with your editor of choice (that I'm guessing is not Emacs) to add the requested lines.

And if you have further questions on emacs, Emacs Stack Exchange is probably the best place to ask.


I would recommend taking a look at GalliumOS. It's based on Xubuntu 16.04 but with certain modifications to run better on Chromebooks, such as special kernel patches for audio support. Linked above is their hardware compatibility chart detailing which Chromebooks are compatible with GalliumOS, and what steps are needed to install it.


Cannot play a sound with Cron since recent system update (Ubuntu 19.10)

not sure what will help, but ...
step 1
xuser@mbs:~$ env|grep -i runt
XDG_RUNTIME_DIR=/run/user/1000

step 2 create file play.sh (remember about chmod)
#!/bin/bash
export XDG_RUNTIME_DIR=/run/user/1000
/usr/bin/mpg123 $1

step 3 crontab -e
хх * * * * /home/xuser/bin/play.sh /home/xuser/Музыка/demo_moya_vesna.mp3

step 4
$%)) ata-ta %:) enjoy


You need to run your editor with sudo, because site configuration files cannot be modified by users.

For example:

$ ls -l /etc/apache2/sites-available/default
-rw-r--r-- 1 root root  950 2011-06-07 14:56 default

You should try to follow the official Ubuntu Server Guide. It is a very concise and clearly written article on what you'd like to achive.


How to dual booting ubuntu 11.10 and fedora 16?

One suggestion (I use when I have not time to search) is to install the second os bootloader on the partition table (not in MBR) and redirect unto it from the first bootloader.


Ubuntu 13.04 on external drive not getting detected by Windows 8 laptop

First, /boot/efi is where Ubuntu mounts the EFI System Partition (ESP). Depending on how the disks were partitioned, the internal disk, external disk, or both could have ESPs. If you installed Ubuntu on Computer A and it set Computer A's ESP to mount at /boot/efi, then when you moved the disk to Computer B and tried to boot, it would of course be unable to locate Computer A's ESP, and so you'd get the error about being unable to mount /boot/efi. I can think of a number of workarounds for this, but the best one probably depends on your computers' disk configurations (including the shared external disk); however, if you're just booting on Computer B on a temporary basis to debug the problem, it might be best to leave it alone. If you need help fixing this problem, please post the output of sudo parted -l on both systems, with the external disk connected to at least one of them. (Use an emergency disk to boot Computer A, if necessary.)

As to your Computer A boot problems, this could be an issue of a firmware setting, so you should enter your firmware's setup utility and look for options related to boot devices. It's also possible that the Boot Repair utility could help; but I'd be a bit wary, since your setup is unusual and Boot Repair will make permanent changes to your boot setup -- changes that might help but also might make matters worse. (You'll need to launch Boot Repair from an emergency disc, should you decide to try it.) Another option is to use my rEFInd boot manager. You can use the CD-R or USB flash drive image for testing without making any changes to your hard disk. If it works, boot to Linux and install the Debian package version. This might be more reliable if you ensure that your internal hard disk's ESP is mounted at /boot/efi, rather than the ESP on your external disk (if it has one).


bash: ./sublime_text: No such file or directory

You are getting this error because you are trying to run a 32-bit binary on a 64-bit system. If you download the proper package for your system, it should work. If you don't know if your computer is 32-bit or 64-bit, try running

getconf LONG_BIT

(actually this checks if you're running 32-bit or 64-bit Ubuntu, to actually check if your hardware is 32-bit or 64-bit run:

grep -o -w 'lm' /proc/cpuinfo | sort u

and if one of the flags listed is 'lm' you have a 64-bit processor.)


What is the difference betweem daemon-reload and reload?

daemon-reload will reload systemd files. If you change a service file in /etc/systemd/system/, daemon-reload will reload these files.
For instance, you realize that you need a 5 seconds timeout between restarts in a service. You add that timeout in a service file and make a daemon-reload. That will cause a timeout on next service restart. Service configuration will not be affected by that change.
reload will reload a specific service. That means that the systemd will send a SIGHUP signal to a service, and that signal will tell the service to reload its configuration files, which has nothing to do with systemd config files.
For instance, apache has a file httpd.conf. With reload, systemd will send a SIGHUP to a running apache to tell it to reload the configuration file. However, that will not change anything, how the service is treated by systemd.
With reload you have to provide additional parameter(s), telling which services will receive SIGHUP signal. With daemon-reload you do not provide any additional parameters, as systemd will check all its service files for changes and reload them.
It is not written in manual, but I guess a service has to support reloading in order to make reload successful. Otherwise, you have to restart it to force it to reload configuration.


I think you should only dd back the img data to partiton.
example(boot with live ubuntu, expected /dev/hda1 is the restoreable partition, unmount it first, if it mounted):

# umount /dev/hda1
# dd if=/path/to/image.dd of=/dev/hda1
# mount /dev/hda1 /path/to/mount

After you checked the data, reboot, or set correctly your fstab.
Please give more info, for more help!


Snes9x-GTK freezing on Ubuntu 13.10 while try to open roms

Works fine when I chose SDL as Sound Driver !! ;p


Dell Inspiron N5110 Touchpad not detected

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

sudo gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled true


Is Swap File slower than Swap partition in Ubuntu 20.04

Once in place, a swap file is used the same way as a swap partition. Through the swap file or swap partition, the kernel knows which sectors are allocated for this use, and uses this space for swapping memory. As such, there fundamentally will be no difference in performance.
A swap file, however, may be fragmented. That would degrade performance on a traditional hard drive, but less so on an SSD.


Difference between Firefox and Chrome Installation in Ubuntu

The easiest way to install Chrome is from the official website, it will download a .deb file that it will install with the Software Center (but you can also download it from there and install it via terminal if you really want to).

You can't install Chrome the same way you install Firefox because it's proprietary software and isn't in the Ubuntu repositories.


The two tools serve fairly different purposes, so it isn't clear that having a single UI covering both use cases would be a win.

Updating your system should be a very simple and straight forward operation, or you risk users not doing it and leaving their system at risk.  So I don't think complicating the Update Manager UI would be an improvement.

Now on the backend side it certainly makes sense to share code, since the backend tasks of the two tools are related.  And in fact they do share code through the aptdaemon backend.


I found a bug report of similar problems.

Bug #886084


Why Ubuntu Server asks to insert a CD-ROM when installed from PXE?

I had the same problem trying to PXE boot the 14.04 server-amd64 disc. I finally noticed I had used the wrong initrd.gz. Make sure you are using the one from /install/netboot/ubuntu-installer/amd64 on the disc. The filesize for mine (14.04, not 14.04.1) is: 21256771.

Here is my pxeconfig entry:
   LABEL Ubuntu 14.04 Server amd64
        kernel http://172.20.1.9/tftpboot/Ubuntu/14.04/server-amd64/vmlinuz
        append boot=casper netboot=nfs nfsroot=172.20.1.9:/images/Ubuntu/14.04/server-amd64/ initrd=http://172.20.1.9/tftpboot/Ubuntu/14.04/server-amd64/initrd.gz ip=dhcp --
        MENU LABEL Ubuntu 14.04 Server amd64
        TEXT HELP
    Ubuntu Server 14.04 amd64 with NFS root
    ENDTEXT


How to make steam games use my AMD GPU instad of my Intel GPU?

Launch Steam from terminal using DRI_PRIME=1 steam. Now every game you launch from Steam will use the AMD GPU.

Alternatively, if you are using GNOME 3, you can right-click the steam icon then choose "Launch using Dedicated Graphics Card".


Windows dual boot access to other hard drives

"Probably," assuming you're using NTFS on all of your other hard drives, Ubuntu will be able to access them and read/write to them just like any other disk.


What are the differences between "-" and "--" in commands?

It is a matter of convention. POSIX standard programs usually only have single character options, and they're all prefixed with a single hyphen. The longer versions are a GNU improvement for clarity, as far as I can tell, and usually are prefixed with double hyphens. You can see this in the libraries and programs used to parse options - getopt and gnu-getopt respectively. Non-GNU and non-POSIX-compliant programs may do something else altogether. Note that you really can't be sure that the long form of an argument may be the same from program to program. -f usually means --force, but not with apt-get install (common misconception). -v may mean version - usually, or --verbose, and so on. Check the man pages or other documentation to be sure. Also have a look at the Wikipedia article on getopt. All this predates Linux by a decade or more.

dd is an example of a POSIX standard utility which doesn't have any hyphenated options at all. find is the classic example of a POSIX standard utility that has word options with single hyphens - nearly all of find's options are multiple characters long. ps supports multiple option styles:

This version of ps accepts several kinds of options:

1   UNIX options, which may be grouped and must be preceded by a dash.
2   BSD options, which may be grouped and must not be used with a dash.
3   GNU long options, which are preceded by two dashes.

GNU tar also supports multiple option styles.

As a matter of usage, prefer the long options in scripts if you can be sure that the scripts will be run in compatible environments - the improvement in clarity is a blessing when debugging. For portability, the short options are preferred.


what's the fs type for mounting an existing Ubuntu partition?

Assuming you set this up using more-or-less defaults, you should use the command:

mount -t ext4 /dev/sda4 /mnt

Note the -t ext4 part. Change /mnt to the mount point you decided upon.


The package for the murrine engine, the cairo-based gtk+-2.0 theme engine is gtk2-engines-murrine. cairo is a 2D vector graphics library.

sudo apt-get install gtk2-engines-murrine

The murrine engine is based on clearlooks and approximately 30% faster.


"Missing Operating System" when booting from USB flash drive

You shuold take an eye on these things:

Don't connect other disk to your computer.
Don't use unreliable tools.
Don't download incomplete system files.


You could try this:

File Manager > Preferences > Visualization > (at the bottom) List View: Browse folders in a tree view (or something similar, I have it in another language) [uncheck]


First of all try to find a Ubuntu release that was out after the release of the required version of GCC. You can find the release history of GCC on GCC Releases - GNU Project - Free Software Foundation (FSF) and that of Ubuntu on Ubuntu version history - Wikipedia.

GCC 6.3 was released on December 21, 2016 and the closest Ubuntu release was Ubuntu 17.04 (Zesty Zapus) which was released in April 2017. You can use the archives of Zesty to install that. But since Zesty reached end of life way back in January 2018, therefore, its archives have been moved to Old Releases. To install GCC 6.3 from its repository:

Add the repository of Zesty and disable the Universe repository of Bionic since it contains 6.4 as well as 6.5 which might get installed while trying to install 6.3.

echo "deb http://old-releases.ubuntu.com/ubuntu zesty main" | sudo tee /etc/apt/sources.list.d/zesty.list
sudo apt-add-repository -r universe

Update the available package information and install GCC 6.3.

sudo apt update
sudo apt install gcc-6

Add GCC 6 as an alternative for GCC.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 1

Check the GCC version using gcc -v. You should get the output like:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.3.0-12ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)

Once you're done with "making", you can remove the installed GCC 6.3 and the repository information of Zesty. And re-enable Universe repository of Bionic.

sudo apt purge gcc-6
sudo apt autoremove --purge
sudo rm /etc/apt/sources.list.d/zesty.list
sudo apt-add-repository universe

Fix the symlink for /usr/bin/gcc.

ln -sf /usr/bin/gcc-7 /usr/bin/gcc


How to remove all files from a directory?

Linux does not use extensions. It is up to the creator of the file to decide whether the name should have an extension. Linux looks at the first few bytes to figure out what kind of file it is dealing with.

To remove all non-hidden files* in a directory use:

rm /path/to/directory/*

However, this will show an error for each sub-directory, because in this mode it is only allowed to delete files.
To remove all non-hidden files and sub-directories (along with all of their contents) in a directory use:

rm -r /path/to/directory/*

* Hidden files and directories are those whose names start with . (dot) character, e.g.: .hidden-file or .hidden-directory/. Note that, in Bash, if the dotglob option (which is off by default) is set, rm will act on hidden files too, because they will be included when * is expanded by the shell to provide the list of filename arguments.


Ubuntu 14.04 Returns to Login Screen After Login

Press Ctrl + Alt + F1 and log in there and run:

sudo chown -R $USER:$USER $HOME

Then press Ctrl + Alt + F7 and try to log in.


Installing  and implementing the MCU media server is a quite in depth process, which is far too exhaustive to answer here without duplicating most of the official installation guide.  The applications need to be configured manually based upon your own requirements and preferences.

The official sourceforge project page has a wealth of resources including active forums and links to source code that can assist you.


Always a 'Network error' on mobile in Ubuntu One Music

We've released an update of Ubuntu One Music. Please upgrade. If you're still experiencing the issue, please contact us at ubuntuone-support at canonical.com

Thanks!


You're looking at output redirection (Bash). 2 stands for 'stderr', the error output. By redirecting it to /dev/null, you're discarding it to oblivion. Regular output, 'stdout' or 1 is still shown (in your terminal by default), though.

Basically, this is just silencing error output of the mv command.

A snippet from the above link explains it more general:

COMMAND_OUTPUT >
  # Redirect stdout to a file.
  # Creates the file if not present, otherwise overwrites it.

  ls -lR > dir-tree.list
  # Creates a file containing a listing of the directory tree.
[..]
1>filename
  # Redirect stdout to file "filename."
1>>filename
  # Redirect and append stdout to file "filename."
2>filename
  # Redirect stderr to file "filename."
2>>filename
  # Redirect and append stderr to file "filename."
&>filename
  # Redirect both stdout and stderr to file "filename."


How can I create a CSV file from a directory listing with multiple columns based on the file names?

Using perl:

ls | perl -pe 's/(.)(.*)_(\d{4})(\d{2})(\d{2})_(\d+).jpg/\u$1$2,$3-$4-$5,$6,$&/'

In perl, (...) is used to group matching text, so (.) is a group with a single character, (.*) is a group with an arbitrary string, (\d{2}) is a group with two digits (\d is a digit, and {2} indicates two of the previous) and so on. \u converts the next atom to uppercase. $1, $2, ... are the various groups in order. $& contains the entire matched text.

Output:

Gas,2016-07-10,3432,gas_20160710_3432.jpg
Gas,2016-08-10,242,gas_20160810_242.jpg
Water,2016-10-04,4510,water_20161004_4510.jpg

You can add the headers independently.


How can sound work when pulseaudio is not running?

Ah, never mind.

amixer set -c 0 Headphone 100 unmute
amixer set -c 0 Master 100 unmute

or to mute:

amixer set -c 0 Headphone 100 mute
amixer set -c 0 Master 100 mute

and to get the audio-control working:

apt-get install kmix

kmix

to increase volume

amixer set Master 30%+

to decrease volume

amixer set Master 30%-


How do I restore monitor resolution on my Dell XPS 15

Remove the xorg config file and reboot.

Use bumblebee afterwards.


It is possible to create two graphic terminals in one computer?

What you need is multiseatX installation. several users with their own keyboard, mouse and display on the same computer. documentation


switching a job (pid) from running as root to just running as the current user

su - yourusername ./btsync should fix it. Just make sure the ./btsync has the right permissions for you to run it.


Prevent screen turning off when watching video in XBMC

We can create a shell script which would simulate mouse movement at a specified interval (only when XBMC is running) and prevent your screen from turning off.

Follow the steps:

Install necessary tools:

We would need xdotool  to do this job for us. Install it by running the following command in terminal:

sudo apt-get install xdotool

The Script:

Save the following script anywhere on your PC. You can modify sleep_period according to your needs, I have set it at 60 seconds. The script checks if there is a process called xbmc.bin running; and if it finds one, then it loops to simulate mouse movement while the process is active. Otherwise, checks for the process again after the specified interval.

#!/usr/bin/env bash

sleep_period=60s #seconds

mouse_x=0
mouse_y=0

movement_px=2
  mouse_x=$(xdotool getmouselocation 2>/dev/null |  sed -e 's/x://' -e 's/y//' -e 's/ screen:.*$//' -e 's/ //' | awk 'BEGIN {FS=":"} {print $1}')
  mouse_y=$(xdotool getmouselocation 2>/dev/null |  sed -e 's/x://' -e 's/y//' -e 's/ screen:.*$//' -e 's/ //' | awk 'BEGIN {FS=":"} {print $1}')

while true; do
  if [[ $(pidof xbmc.bin | wc -w) -gt 0 ]]; then
    while [[ $(pidof xbmc.bin | wc -w) -gt 0 ]]; do
      xdotool mousemove $((mouse_x+${movement_px})) $((mouse_y+${movement_px}))
      xdotool mousemove $((mouse_x-${movement_px})) $((mouse_y-${movement_px}))
      sleep ${sleep_period}
    done
  else
    sleep ${sleep_period}
  fi
done

Make this script executable:

Right-click on the file you just saved >> Select Properties >> In the Permission tab, put the Check mark on Execute.

Execute this script automatically on every startup:

We can do this with the help of Startup Applications. Open your Dash by pressing Enter and query for Startup Applications >> In Startup Applications Window, click on Add >> Then, in the dialog that pops up, fill the information:

Name: optional, whatever you want to name this.

Command: path to the file where you saved it.

Comment: optional, if you wish to add some.

Restart your system and enjoy your movies with XBMC.

How to use it with other Applications

This was an example for XBMC (Process name xbmc.bin). However, it can also be used for any other process of your choice by just replacing xbmc.bin in the Script mentioned in Step-2 with the name of the process you wish. Find the following lines in the above script:

while true; do
  if [[ $(pidof xbmc.bin | wc -w) -gt 0 ]]; then
    while [[ $(pidof xbmc.bin | wc -w) -gt 0 ]]; do

And replace xbmc.bin in both lines 2 and 3 with the process name of your choice.

How to find the process name

With GUI (GNOME):

We can use System Monitor to find the name of the process. Press Super to open Dash and query for "System Monitor" to launch it. In the Processes Tab, we can find the Process Name as the first column.

With Terminal:

We can run top to list all the running processes. The last column called Command gives us the name of the Process (however it is limited to first 15 characters).

Here we can see that Firefox is just named as firefox. So, if we want this behavior when Firefox is running; we would replace xbmc.bin in the script with firefox and everything else would work just fine.

Acknowledgement: I had found the script here. However, I have made necessary modifications to make it compact and satisfy the demands of the question.


I had the some problem and it was solved using this command
export LC_ALL=C

It is related with the language of my OS.


ppa:tualatrix/ppa doesn't (currently) contain any package for Ubuntu 15.04. The warning messages in your question are normal behaviour in such a case.

As a remedy, you can

remove Tualatrix' PPA and use the GetDeb App repository:

wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu vivid-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'

(source)
switch to the trusty packages from Tualatrix' PPA, since that seems to be the latest upstream version anyway:

Open the software properties settings (gksudo software-properties-gtk, if you can't find it in the system settings overview).
Select the entry for Tualatrix' PPA (binary) and click on the button titled Edit.
Replace vivid with trusty and click OK.

Repeat step 2 and 3 with the entry for Tualatrix' PPA (source).
Click Close.

In both cases you need to run sudo apt-get update to update the newly configured package sources.


fatal: unable to access 'https://github.com/gitaccount/repo-name.git/': Operation timed out after 300017 milliseconds with 0 out of 0 bytes received

I tried git clone on another Ubuntu-"20.04.1 LTS" live boot, and the issue is present there also. Apparently this is an issue with "20.04.1 LTS" version.
Now I am using "Ubuntu 18.04 lts", and everything is fine, life is nice n' dandy, full of sunshine... I'm out of my depression and getting back to life again.


unable to connect to internet with osboxes.org ubuntu server 19.10 image on virtualbox

The solution:

Identify appropriate interface name: ip a will list everything
Open the yaml file in /etc/netplan. Note: open default file there. No need to create a new file as mentioned in the article linked into the question post.
In the file, write the configuration details (as mentioned in that same article mentioned above)

For e.g. my interface name turned out to be enp0s3 hence content in the config file was:

network:
   version: 2
   ethernets:
       enp0s3:
           dhcp4: yes

Apply the configuration: sudo netplan apply

You may even test it before you apply the changes...sudo netplan try


I can't connect to internet through wifi using Xubuntu

You can install another driver. You need to be connected to internet by wire.

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms linux-firmware

and reboot.


How to make Ubuntu server 18.04 use dns-nameservers from /etc/network/interfaces?

You need the package resolvconf, too.

So, to get rid of netplan completely:

Configure /etc/network/interfaces
Install ifupdown and friends: $ sudo apt install ifupdown resolvconf
Remove netplan: $ sudo apt remove nplan netplan.io


Diffrence between "perm -mode" &"perm /mode" in find command

It's basically the difference between all three bits (-mode) and any single bit (/mode) permission (-perm) subset test.

find -perm -mode:
In this case the permission bits mentioned must be present for the file. For example, if you do find -perm -666 and if a file has 776, it will be matched. Similarly 666, 777 etc will be matched too, but 665 won't be matched. In summary, the mentioned (three) bits must be a subset of the permission bits.

find -perm /mode:
Here any one bit of subset would do. For example, if we do find -perm /666, and if a file has 644, the file will be matched because the user permission bit is 6, and we are looking for a single bit subset. Similarly, 700, 060, 006 etc will be matched, but not e.g. 444, as no bit contains any subset of the required permission bits.


How to keep PPA's enabled during 18.10 to 19.04 Release Upgrade?

This article:

Ubuntu Users Can Now Keep PPAs And Third Party Repositories Enabled When Upgrading To A Newer Ubuntu Version

... describes a new ground-breaking development for Ubuntu users:

  Brian Murray, Ubuntu Bugmaster, says this should solve many of the
  issues people are encountering when trying to upgrade from one Ubuntu
  release to another. I'd also add that his makes it easier to continue
  receiving updates to software installed from PPA / third-party sources
  after an Ubuntu upgrade, while also not removing software that might
  be otherwise removed due to incompatibility when upgrading.

You can use (in 18.10 now, in 18.04 soon) a new flag:

RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 update-manager -d

Note: Only PPAs supported in the new version will be enabled:

  It's worth noting that you may still see a warning about third party
  sources being disabled on upgrade, but those that support the Ubuntu
  version to which you're upgrading will not be disabled.


Error while copying: "no such file or directory"

You need a / in front of media

sudo cp /media/belkacem/01CF36CD84AC8C90/Originals/stvbios.zip /usr/share/games/mame/roms

will work, assuming the path is correct

Explanation of the error

The mountpoint of your external device is in the directory /media. the first / specifies the root directory - all full absolute paths start with / You can use relative paths without / but this depends on where you are. For example, when you open a terminal you are in your home directory, so you can see the contents of your Downloads directory like this

ls Downloads

or move to your Documents and list the contents like this

cd Documents; ls

and so on...


Delete the mergelists:

sudo rm -rf /var/lib/apt/lists/*

Then run the package list update again:

sudo apt-get update

And update your system:

sudo apt-get upgrade


Upgrade MaaS from 1.5 to 1.6 on a running installation

I recommend you wait for maas 1.6 to be merged into the trusty default ppa.

Running the upgrade with ppa:maas-maintainers/stable, it appeared to work initially.

I have found a number of migration issues such as maas being unable to match nodes to pre-existing tags.


Login loop on setup of new ubuntu 16.04 Nvidia-367 driver

To all who might be having this problem, what ended up fixing it for me was disabling the onboard video in my motherboard. I'm not sure why that did it but according to someone else it was causing the video to keep resetting. Something to try.


Installing latest stable kernel (3.3.1) in Ubuntu 11.10

You can try this:

http://www.ubuntubuzz.com/2012/03/upgrade-to-kernel-33-in-ubuntu.html


Is there a way to change my home folder to encrypted after upgrading to 12.04

Here is a great tutorial. http://www.makeuseof.com/tag/encrypt-home-folder-ubuntu-installation-linux/ It was written for 11.10, but it should be more or less the same.


image File type associations and sorting

You could remove the NEF file association in /usr/share/applications/defaults.list, open a Terminal with Ctrl+Alt+t and type:

sudo gedit /usr/share/applications/defaults.list

Look for a line containing image/x-nikon-nef and delete only this line.

Then restart your system/session to filter by type as expected.


I wrote this small utility to auto make Logoff, Screensaver, shutdown suspend and Hibernate .  Just compile it with your sound listed it the program code.  Chmod u+x the filename once complied with g++.   I use a small script file on the desktop to launch the program and run in Terminal.

include

using namespace std;

define bold_on "\e[1m"

define bold_off "\e[22m"

define red_on "\033[31m"

define reset "\033[0m"

define yellow "\033[33m"

define b_green "\033[1m\033[32m"

//======================================================================

int main(int argc, char *argv[])
{

char answer;

cout << b_green "\n\n Please make you choice? Any other key to quit the program. \n" reset << endl;

cout << bold_on red_on "      S"  bold_off reset yellow" - Shutdown the Computer"  << endl;
  cout << bold_on red_on "      R"  bold_off reset yellow" - Restart the Computer"<< endl;
  cout << bold_on red_on "      L"  bold_off reset yellow" - Logoff the Computer"<< endl;
  cout << bold_on red_on "      U"  bold_off reset yellow" - Suspend the Computer"<< endl;
  cout << bold_on red_on "      H"  bold_off reset yellow" - Hybernate the Computer"<< endl;
  cout << bold_on red_on "      X"  bold_off reset yellow" - Lock the Computer \n\n" red_on;

cin >> answer;

    if( answer=='L' ) {
     system("cinnamon-session-quit");
     system("paplay /home/dad/Music/desktop-logout.wav");

    } else if( answer=='R' ) {
     system("paplay /home/dad/Music/desktop-logout.wav");
     system("systemctl reboot") ;

    } else if (answer =='S') {
     system("paplay /home/dad/Music/desktop-logout.wav");
     system("systemctl poweroff" );

    } else if (answer =='U') {
     system("paplay /home/dad/Music/desktop-logout.wav");
     system("systemctl suspend");

    } else if (answer =='X') {
     system("paplay /home/dad/Music/desktop-logout.wav");
     system("cinnamon-screensaver-command -l");

    } else if (answer =='H') {
     system("paplay /home/dad/Music/desktop-logout.wav");
     system("systemctl hibernate");

  }

}
here is my script file on my desktop.

!/bin/bash

/home/dad/LRS
exit

my program is LRS you can name it anything you want.


There are a few important things to factor in here.

First, Linux is going to use your hardware differently. That means the temperature will be different. It may do more stuff, use more power, have different default CPU speeds etc.

This is not a bad thing, it is just 'a' thing.

Second, Linux will not overheat your board. The kernel has built in protection. If your box gets to hot it will log a "Thermal Event" and then either shut down or adjust things to run cooler.

Third,  almost all boards have a thermal protection circuit that will turn off the computer  before any damage is done. You should not relay on this, as it is just a safety net but it's worth mentioning.

Last, Linux is very adjustable if you have a real need to run cooler (and it's not just to match windows) you can probably slow the CPU, speed up any fans, turn off some graphic features, or kill some CPU intensive processes. (Or maybe even run some hardware in a "power saver" mode that reduces the power it uses.)

My advise is, if it ain't broke don't fix it. Look in /var/log/messages and see if there are any thermal events, if there aren't and the computer is not crashing, then your fine and enjoy your new Linux box.


Moving to New Machine... also upgrade to 64bit. What steps?

Yes, rsync is a good way to copy your files to the new computer.  If you want the same set of packages installed, you might also want to run synaptic and File -> Generate Package Download script on the old machine, and load it into the new machine.


Error when trying to encrypt USB memory with gnome-disks

I've never used gnome-disks to do that, the guide you linked to is from 2012 & has screenshots of the "old" Disks UI (better IMO) but it's not my first choice for these tasks (it is awesome for info & basic mount/umount, unlock/lock LUKS devices).
But I have successfully used Gparted (or just parted) to clear / create a partition (/dev/sdf1 in your example) and then in a terminal:
cryptsetup luksFormat /dev/sdf1

and open it with one of these ("old syntax" is listed first, less typing)
cryptsetup luksOpen /dev/sdf1 cryptname
cryptsetup open --type luks /dev/sdf1 cryptname

and then format it with
mkfs.ext<2,3,4> /dev/mapper/cryptname

then mount & use it
mount /dev/mapper/cryptname

That's if there's not a hardware error on the drive that's causing the wipefs problem. If you can create (or already have) the partition, then LUKS should overwrite everything anyway (or a dd with /dev/zero after it's luksOpen-ed). I'd try not using gnome-disks first - fewer things to go wrong.

Found a confirmed bug report about the error (Erasing disk failed: Error wiping newly created partition) reproducible using Gnome Disks too. Apparently:

Seems like udisks is trying to act on a device before the device node appears. The affected code seems to live in src/udiskslinuxpartitiontable.c, that pretends to "sit and wait for the partition to show up" before wiping the newly created partition, but apparently doesn't reliably wait for the device node to appear in /dev.

With a comment for a workaround using dd to erase the first MB (MiB) of a partition:

sudodus (nio-wiklund) wrote on 2015-09-18:     #3
My tip for a solution is independent of waiting for udisks to be fixed:

Wipe the first megabyte (actually mibibyte) *

When the target drive is identified and selected (so that there can be no mistake), simply wipe the first mibibyte (use dd under the hood to overwrite it with zeros). This has worked well for me and people I have helped at the Ubuntu Forums. It is part of mkusb and I have used and recommended the method for years. mkusb from ppa:mkusb/unstable has a menu with several alternatives, where the first one (standard) will create pendrives, that work with for example the s-d-c and Unetbootin.

The workaround should be equivalent to your just using cryptsetup on the partition once it's created, since it shouldn't care if there's an existing filesystem there anyway and warns that it will overwrite any existing data.


Can't transfer seahorse keyrings [16.04]

To overwrite the keyring files on disk, the keyring service must not be running.

The easiest and best way to accomplish this is to simply log out from the graphical session, copy the files via ssh or via console login, and then you can log into the graphical session and keyring will have the data you were expecting.


You need to install the right driver. Not all drivers from Nvidia's site work properly on 12.04. When I was on 12.04, I tried several, until one worked. I don't know if they updated the drivers since.


oracle-java-10-installer package gives 404 error on Ubuntu 18.04

There is a not fully installed or removed package. For solution just delete or uninstall it.
Use: sudo apt-get purge "package name"
In my case I used: sudo apt-get purge oracle-java10-installer


make different content between domain and IP Server

You need to configure your virtual hosts. In directory /etc/apache2/sites-available/ you may find example of virtual host files. So the steps are:

1. Create a virtual host file

sudo nano /etc/apache2/sites-available/site.com.conf

and set a content

<VirtualHost *:80>
    ServerAdmin admin@site.com
    ServerName site.com
    ServerAlias www.site.com
    DocumentRoot /var/www/site1/html
</VirtualHost>

It is a simple example. You can read manuals, to get more. Now just take in account, that you need to configure separate file for each site you want to run.

2. Enable your VH

When you finished your VH config, you need to enable your host by command:

sudo a2ensite site.com.conf

3. Reload Apache

To apply new host, you need to reload Apache

sudo service apache2 reload

Now it should work.


Invalid Partition table when trying to boot from USB on windows system

I don't see how you could have followed the guide you linked from a windows. that guide has you run ubuntu software from the ubuntu desktop.

let's just finish creating your USB with a correct guide, you still have the ISO right?

Download : Rufus
Install it
run it
select your kubuntu ISO
set the partition type to GPT :

start


How to publish a Quickly-generated program to Windows?

You will need a Windows pc to build it on. On this Windows pc you will want to install python, gtk, pygobject, pycairo, pygtk, py2exe, and SetupTools. Also you will need any other dependency/module your app might need but SetupTools should make that easier to pull off. Also you will need to remove anything in your application that would not be available to Windows. (i.e. Unity Bindings). Then you would run your app through Py2Exe and install it. Its not going to be a cake walk but its possibly possible :) Good Luck and Godspeed

Further reading/sources:

PyGTK FAQ article on this
Write-up by Sebastian Noack on the subject
Python for Windows: www.python.org/download/releases/2.7.3/
GTK for Windows: www.gtk.org/download/index.php
PyGobject for Windows: ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/
PyCairo for Windows: ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/
PyGtk for Windows: ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/
Py2EXE: www.py2exe.org/
SetupTools: pypi.python.org/pypi/setuptools#downloads


how do I check my network users on ubuntu?

You have two questions.

how can I check the network users?

Ask your router. Usually the router's address is 192.168.0.1. You can find out yours by issuing ip route. You can normally access a webpage by typing that address in your browser. Look for DHCP or Computers there. It'll probably ask you for user and password, which depends on the router's make, but is usually admin/admin.
(Easier!) Probe the local ip range and display results. A tool to do that (and much more) is nmap. To list all clients on the local network you can issue nmap -F 192.168.*.*, although nmap -F 192.168.0.* is usually enough for home networks and much, much, faster. If you want to see the operating system of each computer listed, use nmap -O -F 192.168.0.* - you'll need root privileges for that.

How can I access their machine with local ip address?

As root, initiate ssh in both computers: service ssh start. Then, from your computer, issue ssh user@ip. You now have full access to that user account on that computer. You can use scp or rsync to copy files between computers, or use software like samba to share printers and much more.

Note: In order for a computer to be accessible via ssh from outside the local network, you'll need to forward port 22 on the router to that computer, and if you have a firewall enabled, add an exception as appropriate.


the mount command need to be executed every time you reboot your system but to avoid that and to do automatic mount at each reboot simply edit /etc/rc.local file and add the mount command in a new line in it then save and exit after that you may try to reboot your system to check if the mount works or not.

if you didn't execute the command and added it only to /etc/rc.local file you wont find the mount on. the mount only will work if u execute the command and the line in /etc/rc.local will work after rebooting also.

after all that change the symbolic links back to your desire and i think it will work properly at each restart.


gnome app indicator /org/ayatana/NotificationItem/

In Ubuntu 18.04 default,

gsettings list-recursively | grep -i ayatana

comes up empty.

gsettings list-recursively lists all the "schemas" along with keys and values. So it's understandable that dconf won't reveal any entries related to ayatana either.


There is no avidemux in Oneiric (yet(?)). Neither a libavidemux0 according to the ubuntu packages page it seems.

But you can find the .deb files for amd64 or i386 on Launchpad. Download all the files you need for your version and then use Ubuntu Software Center to install these.


What are the exact steps towards having cursor keys on RALT+hjkl?

Create a new layout by opening your current keyboard layout (eg. /usr/share/X11/xkb/symbols/us) and save the file as a new file (eg. oe).
Inside the first block (xkb_symbols "basic") and at the end, add include "level3(ralt_switch)"
In that same block, locate the key symbol for h (eg. <AC06>) and change the contents so it reads something like key <AC06> { [ h, H, Left ] };
Open /usr/share/X11/xkb/rules/evdev.xml
Go to the end of the <layoutList> section (search for </layoutList>) and add the following after the last </layout> tag:

<layout>
 <configItem>
   <name> oe </name>
   <shortDescription> oe </shortDescription>
   <description> my new keyboard layout </description>
   <languageList>
      <iso639Id> eng </iso639Id>
   </languageList>
 </configItem>
 <variantList/>
</layout>

Repeat for corresponding key symbols(Right, Up, Down) and the other keys (j, k, l).
Load your newly created layout with setxkbmap -layout oe

Note : This has been tested for h and works for Ctrl+Alt+h to move cursor one word to the left.


Android Studio icon showing in launchpad but not opening

Have you tried running it directly from the command line? I had a similar issue with Arduino Studio and that fixed it.

eg.

sudo /path/to/andriod/studio


How would I go about installing an AverTV Hybrid Volar HX?

This is for 64 bit drivers, but probably the same solution applies to the 32-bit version by just using x86 instead of x64 in filenames. The solution is inspired in the great work by the guys of linuxtv.org

Create a directory called AverTVVolarHX in your home
Download C038A827H826_Installer_x64_0.10-Beta_091126.zip from AverMedia WebSite to that directory
Create in same directory patch file aver.patch:
diff -Nr -u0 original/installer/installer.sh modified/installer/installer.sh
--- original/installer/installer.sh     2009-11-13 11:47:33.000000000 +0100
+++ modified/installer/installer.sh     2011-08-28 20:58:38.000000000 +0200
@@ -177,13 +176,0 @@
-       if [[ "$kversion" != "2" || "$kpatchlevel" != "6" ]]; then
-               dialog --backtitle "$BACKTITLE" \
-               --title "Kernel version error" \
-               --msgbox "Installer cannot determine kernel version or the running kernel is not 2.6.x kernel. \n\
-Installer will abort now.
-" \
-               10 $WIDTH
-               log "generate_kdep_string: wrong kernel version ${kversion}.${kpatchlevel}.${ksublevel}. Abort."
-        log_from_file $ksrc/Makefile #s016
-        log_from_file $kobj/Makefile #s016
-               exit
-       fi
-
@@ -994,3 +980,0 @@
-   # check if root
-   log "check if root: EUID=$EUID"
-   if [[ "$EUID" != "0" ]]; then
@@ -998,9 +981,0 @@
-       dialog --backtitle "$BACKTITLE" \
-       --title "ERROR: " \
-       --msgbox \
-       "You must be root to run installer. \
-\nPlease login as root or use 'su' or 'sudo' to abtain root privilege. \
-\nInstaller will now abort." 10 $WIDTH
-       clear
-       exit
-   fi
diff -Nr -u0 original/installer/src/aver/osdep.c modified/installer/src/aver/osdep.c
--- original/installer/src/aver/osdep.c 2009-11-13 11:54:56.000000000 +0100
+++ modified/installer/src/aver/osdep.c 2011-08-28 20:19:19.000000000 +0200
@@ -89 +88,0 @@
-#include &ltlinux/smp_lock.h&gt
@@ -435 +434 @@
-               init_MUTEX(tmp);
+               sema_init(tmp, 1);
@@ -439 +438 @@
-               init_MUTEX_LOCKED(tmp);
+               sema_init(tmp, 0);
@@ -1069,0 +1069 @@
+static DEFINE_MUTEX(dvbdev_mutex);
@@ -1072 +1072 @@
-       lock_kernel();
+       mutex_lock(&dvbdev_mutex);
@@ -1077 +1077 @@
-       unlock_kernel();
+       mutex_unlock(&dvbdev_mutex);
diff -Nr -u0 original/installer/src/aver/osdep_dvb.c modified/installer/src/aver/osdep_dvb.c
--- original/installer/src/aver/osdep_dvb.c     2009-11-13 11:54:57.000000000 +0100
+++ modified/installer/src/aver/osdep_dvb.c     2011-08-28 20:19:36.000000000 +0200
@@ -79 +78,0 @@
-#include &ltlinux/smp_lock.h&gt
@@ -233 +232 @@
-               init_MUTEX(&p-&gtfeedlock);
+               sema_init(&p-&gtfeedlock, 1);
diff -Nr -u0 original/installer/src/aver/osdep_th2.c modified/installer/src/aver/osdep_th2.c
--- original/installer/src/aver/osdep_th2.c     2009-11-13 11:54:57.000000000 +0100
+++ modified/installer/src/aver/osdep_th2.c     2011-08-28 20:20:00.000000000 +0200
@@ -78 +77,0 @@
-#include &ltlinux/smp_lock.h&gt
@@ -80,0 +80 @@
+#include "osdep.h"
@@ -90 +90 @@
-        lock_kernel();
+        SysLockKernel();
@@ -100 +100 @@
-        unlock_kernel();
+        SysUnlockKernel();
diff -Nr -u0 original/installer/src/aver/osdep_v4l2.c modified/installer/src/aver/osdep_v4l2.c
--- original/installer/src/aver/osdep_v4l2.c    2009-11-13 11:54:58.000000000 +0100
+++ modified/installer/src/aver/osdep_v4l2.c    2011-08-28 20:20:19.000000000 +0200
@@ -75,0 +76,2 @@
+#define VFL_TYPE_VTX 3
+
@@ -84 +85,0 @@
-#include &ltlinux/smp_lock.h&gt

Open terminal
$ cd ~/AverTVVolarHX
$ unzip C038A827H826_Installer_x64_0.10-Beta_091126.zip
$ cd H826D_Installer_x64_0.10-Beta
$ tail -n +115 AVERMEDIA-Linux-x64-H826D-0.10-beta.sh | bzip2 -d | tar xf -
$ patch -l -p1 &lt ../aver.patch
$ cd installer
$ ./installer.sh

During the installation choose Expert Installation, select /home/&ltyouruser&gt/AverTVVolarHX as the directory for expert installation and finish installation (it just will output the module sources to /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install)
Now you need an hex editor, e.g. ghex, which is in the default repositories. Hex edit file /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install/aver/osdep_dvb.o_shipped and replace param_array_get and param_array_set by param_array_ops

Create in directory /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install installer.sh:
#!/bin/bash -i

# get absolute path of this script
BASE=`(cd \`dirname $0\`; pwd)`

TARGET_DIR=/lib/modules/`uname -r`/kernel/drivers/media/dvb/dvb-usb

if [[ "$EUID" != "0" ]]; then
    echo -e "You must be root to run installer.
\nPlease login as root or use 'su' or 'sudo' to obtain root privileges.
\nInstaller will now abort."
    exit
fi

cd "$BASE"

make || { echo "make failed"; exit 1; }

echo -e "\nCopying h826d.ko to $TARGET_DIR/h826d.ko"
cp -r h826d.ko $TARGET_DIR/ || { echo "copy failed"; exit 1; }

echo -e "\nCopying averusbh826d.ko to $TARGET_DIR/averusbh826d.ko"
cp -r averusbh826d.ko $TARGET_DIR/ || { echo "copy failed"; exit 1; }

echo -e "\nRunning depmod -a"
depmod -a || { echo "depmod failed"; exit 1; }

echo -e "\nCleaning"
make clean || { echo "make clean failed"; exit 1; }

echo -e "\nCompleted"

Finally run installer.sh
$ cd /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install
$ chmod +x installer.sh
$ sudo ./installer.sh

The H826D-expert-install directory is the only thing you need for future recompilations, so save it somewhere else. The other files and dirs can now be safely deleted.


apache show me php5 but I have already install php7

Open a terminal

cd /etc/apache2/mods-enabled

sudo a2dismod php5

sudo rm php5.load

sudo rm php5.conf

sudo a2enmod php7.0

sudo ln -s php7.0.conf ../mods-available/php7.0.conf
sudo ln -s php7.0.load ../mods-available/php7.0.load

sudo a2enconf php7.0-cgi
sudo a2enconf php7.0-fpm

# do those commands only if the above didn't work out
sudo ln -s php7.0-cgi.conf ../conf-available/php7.0-cgi.conf
sudo ln -s php7.0-fpm.conf ../conf-available/php7.0-fpm.conf

sudo service apache2 restart


You will be able  to see what is  using the lock file:

lsof /var/lib/apt/lists/lock
lsof /var/lib/dpkg/lock

Be careful before delete the files ... there is certainly a reason if the files are block...


Ubuntu 14.04.1 LTS installer does not recognize Windows 7

I got an option to install alongside windows 7 when I was using 7. This is what i did.

In control panel I went to administrative tools. From there I selected computer management and then disk management (or something similar)

When that loads it will show all partitions. Decide how big you want Ubuntu partition up be, and shrink your main partition.

Once it is shrunk, it will show as unallocated space. Leave it as it is.

Now reboot and start install of ubuntu. You should now get a "install alongside windows 7" option.

Select that, install and Ubuntu will automatically install to the unallocated partition that was created in Windows.


My ubuntu crashes and an error screen appears

Try to run in recovery mode :

Switch on your computer.
Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.)

For full instructions, see the wiki for Recovery Mode instructions.


To create unallocated space, take your installation drive for Ubuntu, and click Try Ubuntu without installing from the GRUB Startup menu. Once logged in, look for GParted in the Ubuntu search menu. Once opened, select your Ubuntu partition, right-click it, then click "Resize" from the menu. Resize to the desired size, then install Maverick in the unallocated space.

Cheers


How to completely remove firefox so it won't update?

Remove the firefox and all the associated language packs with this command

sudo apt-get --purge autoremove firefox

It should remove firefox and all language packs for it. The output in my computer is shown below:

anwar@edubuntu-lenovo:~$ sudo apt-get autoremove firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  firefox firefox-globalmenu firefox-gnome-support

Your output may vary depending on the packages you installed. The important thing is you should see the uninstallation of these packages

firefox firefox-globalmenu firefox-gnome-support

Using autoremove uninstall packages which was required by firefox but is not required now after removing it. Without autoremove those packages will be left on system.

autoremove: removes any packages on your system that are no longer needed. As an example if I install package A, it might install packages B and C as dependencies. Simply un-installing package A doesn't automatically un-install packages B and C as well, they are left installed. apt-get autoremove searches your system for packages that have been installed as dependencies but are no longer used and removes them.

See this apt-get manual page for more info.

Hope this helps.


In guest session, Google Chrome won't start and hibernation is missing in menu

Two solutions to Google Chrome problem:

Use Ubuntu 14.10, 15.10. Chrome now works in Guest Session.
Under 14.04 run Chrome from a terminal: Ctrl-shift-t to invoke terminal. google-chrome --no-sandbox launches Chrome.

FYI You can use the account 'guest prefs' to create a shortcut that launches that command under 14.04. Obviously that's unnecessary under newer versions, but, then again, there are some compelling reasons for some users to still be on the LTS version.

Fyi. The question about Chrome has been answered elsewhere.


Is it possible to produce an ISO image of my current installed Ubuntu OS?

Remastersysis a backup tool that creates your own distro, an .iso as a live CD to install on another machine. This can include all your data, and you can select whether to include the home folder or not. Here is the Remastersys sourceforge page .
I hope this helps.

Ref:Can I backup my entire Ubuntu installation to ISO DVD?


How to log into running terminal/shell with ssh

Your screen session is probably still attached.

Try this:

screen -list
screen -d (with label, for more than one session)
screen -r

Btw: There are also some great alternatives like tmux


Ubuntu Xenial 16.04 libapache2-mod-php5.6 NO PPA

This is similar to your problem. So as written there, you could give

sudo apt-get -f install

a try which is supposed to search and install unmet dependencies.


This happens because the MySQL database that Moodle is trying to connect to doesn't recognize root as an authorized user.  It's likely you need to set up MySQL properly before you can continue.


Random Mouse Movements Using Ubuntu 15.10

Few times observed same bug on
Linux 4.4.0-59-generic #80~14.04.1-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04.5 LTS

Just got idea why it could happen and did not check yet. It might be because ibus-daemon issue that affects keyboard health which is known issue for IntelliJ Idea in Ubuntu. So, should this behavior still appears time to time, try to kill ibus-daemon once you face it. It helps to resolve Idea's keyboard stuck issue.


Some keys don't work, arrow keys increase brightness and volume on restart

Found the solution, looks like my Fn key was stuck, and everything else was just due to the Ubuntu shortcuts. This is a common occurrence with the Acer Aspire series, so I'm surprised I couldn't find anything online.
Hopefully, I can find this post when this inevitably happens to me on my next Acer laptop.


I can't shut down nor reboot without console

Do you have rabbitmq installed? That is the culprit for me. Here is bug ticket for it:
https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/670289


Unity workspace-switcher (super+s) background color

Open compiz config manager
Expo.
Appearance Tab.
Interactive view ports section.
increase Brightness.


Which openstack version will be installed with juju?

By default, the Ubuntu distribution default will be installed when the charms are deployed. At the time of this post, it looks like this:

trusty: Icehouse.
utopic: Juno
vivid: Kilo

However, you can opt to use Juno or Kilo on trusty with the Cloud Archive. The charms have configuration options to allow you to change versions at deployment time.

Be aware that Kilo is very much still in development. Trusty + Icehouse is considered the current long-term support option and what you'll get by default when you deploy with Juju.

This page provides an outline of the supported combinations:
https://wiki.ubuntu.com/ServerTeam/CloudArchive


Is there any equivalent for Jupiter for Kubuntu?

Jupiter is an application for Linux so it should work on Kubuntu.


Boot error after installing Ubuntu 12.04.2 LTS

I must reply in English. Sorry! I frequently have a similar problem. Nearly every time I have installed Ubuntu since 2011, grub is damaged and the computer won't boot. Is your boot disk an SSD?

The usual answer is to use boot-repair as in this post: grub rescue prompt after install installing Ubuntu in a dual boot You can also reinstall grub by hand, using a command terminal. This is what I do... often... but a lot of people swear by boot-repair.


Over-scan Issues when using HDTV through VGA

Televisions do not have a native resolution of 768 lines.  Standard def is 540, and HD is either 720 or 1080.  It probably expects 1280 x 768 from a VGA connector and scales it.  When you give it the wider resolution, it scales wider than the TV.  Stick to the resolution that works.


How do I switch back to Evolution and ensure that it is integrated with the desktop?

Install evolution-indicator, but DO NOT uninstall thunderbird, otherwise the indicator will not show.

sudo apt-get install evolution-indicator


did you get the installation trough the apt-get? i couldn't get any VMs working on virtualbox in ubuntu 12.04,
i fixed it by removing the virtualbox i installed from the apt-get and installed the version provided on the oracle site, afther that i added myself to the vboxusers group.
this fixed all my problems i had.

hope this helps


Problem solved. I did use CUPS but the problem was with that I was going through an IO Gear printer switch. When I connected the computer directly to the printer, it worked. So now I am looking for a USB cable that has two true Y male ends if that's possible so I can attach my other computer to the printer.


The Kubuntu download is an ISO file, which you can download here.

You've to burn this file to a DVD (using ImgBurn for example) or put it on an USB drive (using Rufus for example). You cannot just copy the ISO file itself to a DVD or USB drive, this way your DVD or USB drive won't be bootable.

Then you have to start your pc from the bootable DVD or USB drive you've just created. Click here for a tutorial about booting from DVD or USB drive.

When you've booted your Kubuntu ISO you'll see Kubuntu's graphical installer and you can just follow the on-screen instructions.

Note: some older PCs don't support booting from USB drives. Sometimes it's not enabled in your BIOS and you can just enable it there (look for Legacy USB Support or something like that). Otherwise you'll have to boot your Kubuntu ISO using a DVD.


MBR Issues after moving/resizing partition (Unable to Boot; BIOS cannot see OS)

Your disk is an MBR disk with BIOS-mode boot code but it also has an EFI System Partition (ESP) with EFI-mode boot loader files on it. This is an unusual combination, and it's not clear if your computer had been booting in BIOS/CSM/legacy mode or in EFI/UEFI mode. This fact makes it difficult to advise you on how to repair the boot loader, since a repair procedure based on the assumption of a previous BIOS-mode installation might fail if the computer had actually been booting in EFI mode and vice-versa. It's also not clear how old your computer is or what brand and age of firmware it has -- some EFIs (especially older ones) are buggy and might work poorly when booting in EFI mode. This is especially true when an MBR disk is at play.

My own inclination, based on the limited information I have, would be to use my own GPT fdisk (gdisk) to convert the disk from MBR to GPT form. It will then be possible to install an EFI-mode boot loader on the computer -- you can either use Boot Repair (from an Ubuntu recovery tool booted in EFI mode) to (re-)install the EFI-mode version of GRUB or boot with the USB flash drive version of my rEFInd boot manager and install it permanently via a Debian package or PPA.

OTOH, if your computer has a buggy enough EFI, going with a BIOS-mode boot loader may be more reliable. If this is the case, you shouldn't mess with the partition table. Instead, you should learn how to control your computer's boot mode and boot an emergency Ubuntu system in BIOS mode. You can then run Boot Repair. With any luck that will set up a consistent BIOS-mode GRUB, which will then boot the computer.

You can test whether you've booted Ubuntu in BIOS mode or in EFI mode by looking for a directory called /sys/firmware/efi. If that directory is present, you've booted in EFI mode; but if it's absent, you've booted in BIOS mode. Controlling the boot mode can be tricky and how to do it varies from one computer to another. See my page on the CSM for some information on this topic, but be aware that you'll probably have to poke around in your firmware and your computer's built-in boot manager to figure it out for your specific computer.


Boot (possibly MBR) messed up after updating from 12.04 to 14.04

It is grub-install you need to run, not update-grub, which just rebuilds the menu.  Since it looks like you are using efi, you also have to mount the efi system partition in /boot/efi before you chroot into your root partition.


How to completely remove GlassFish and reinstall it

I am not familiar with GlassFish. Was it installed from a .deb or from apt?
If so, then follow this
Verify the package is installed first. Something like.

sudo dpkg --list | grep -i glass

If you see it listed as installed, something like.

ii  <package name>

Then uninstall.

sudo apt-get remove --purge <package name>

Answer yes if prompted.

If not, that means it was manually installed.
I see some reference to uninstall it here

Looking around, some older posts suggested removing /opt/glassfishx, where x is the version number. So in your case.

rm -rvf /opt/glassfish4

Might be the answer after successfully killing the service.


Ubuntu 18.04 LTS Why are kernels installed on /boot and not /boot/efi?

I think this answer from Unix & Linux Stack Exchange makes sense of it:

  The EFI System Partition is the partition the EFI firmware (in ROM on the motherboard) knows of and from which the firmware can load EFI applications like boot loaders. So the ESP is the place where you put GRUB2 for the firmware to load and run. The /boot directory/partition is the place for GRUB to find files it needs, like you said. However, there is no reason the ESP and /boot can't be the same partition.


It looks like you can obtain an old debian package that still has it here

You should be able to install it with software center

Full disclosure: I have not installed this font. Please let us know your results


Can Ubuntu 16.04.3 LTS on 1GB RAM and 1GHZ Processor?? Please Answer

Yes, but you will not have much of performance left for applications and you may quickly run out of RAM if you will try to run any hardware-expensive app. Also, you may assign a bit of disk as SWAP, but it will be REALLY slow then


Failed to fetch cdrom:* warnings in apt, how to fix them?

Try running gksu software-properties-gtk and uncheck the 10.04 CDROMs.


Ubuntu 17.10 GDM Login Screen Resolution

The mode you are trying to set may not be available to xrandr yet.
In your /etc/gdm3/Init/Default, put the following also before the exit 0.

xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode XWAYLAND0 "2560x1440_60.00"
xrandr --output XWAYLAND0 --primary --mode "2560x1440_60.00"
exit 0


Unity ignores "scale for menu and titlebars"

Work fine for me with the following details:

System:    Kernel: 4.4.0-15-generic x86_64 (64 bit)
           Desktop: Unity 7.4.0  Distro: Ubuntu 16.04 xenial
Machine:   System: ASUSTeK (portable) product: UX305LA v: 1.0
           Mobo: ASUSTeK model: UX305LA v: 1.0
           Bios: American Megatrends v: UX305LA.206 date: 08/03/2015
CPU:       Dual core Intel Core i7-5500U MHz
Graphics:  Card: Intel Broadwell-U Integrated Graphics
           Display Server: X.Org 1.18.1 driver: intel
           Resolution: 3200x1800@60.00hz
           GLX Renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2)
           GLX Version: 3.0 Mesa 11.1.2

By usability reasons I set up the scaling of the screen to 2 - 2.2 at System settings "All settings:Displays - Scale for menu and title bars"


How to install Java 7 or jkd 7 on Ubuntu 16.04?

I agree with @user unknown's comment, you should be trying to move towards a supported JDK, like version 8. If you just need to get single command working real quick, a one-time thing, then you can still easily install JDK 1.7, albeit an out-of-date version. It doesn't have the security updates, but it does get the JDK installed and working. I just tested this for myself for you, on a new Ubuntu 16 vagrant box:

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk

This was copied from https://askubuntu.com/a/761527/283173. You should really go there and see all the comments about that PPA. This isn't something you should be doing for a production system. Moving towards version 8 is the smarter move.


Just trying to install Git on a new Kubuntu instance, getting "please insert Kubuntu 19.10 into cdrom"

You have to edit the file /etc/apt/sources.list and comment all CDrom entries (usually on the very beginning of the file).

sudo -H gedit /etc/apt/sources.list

Add # before each line you wish to comment. Then simply run:

sudo apt update
sudo apt install git


Error when reboot after upgrade from 18.10 to Ubuntu 19.04

Yes you can. Boot a live-session(from pendrive or DVD)

sudo fdisk --list

search for Type linux ignore swap if present.

Example from my system

/dev/sdb1           2048   62916607   62914560    30G 83 Linux
/dev/sdb2       62916608   71305215    8388608     4G 82 Linux Swap / Solaris

start file-manager in live-sesion and mount over that your filesystem.

Plugin an usb-harddrive and mount it too. With

findmnt

you can see there both filesystem is mounted. Another example from me

├─/media/alex/bionic-home             /dev/sdc5            ext4            rw,nosuid,nodev,relatime
└─/media/alex/bionic                  /dev/sdc1            ext4            rw,nosuid,nodev,relatime

That's my backup-harddrive.

sudo cp -a /full/path/to/your/home/on/disk  /full/path/to/usb-drive

another example; english is not my native speech.

sudo cp -a /home/alex /media/alex/bionic-home

Please adapt it to your situation.

from a live-session you need grandet rights, because normally the username from installed system is not the same as in a live-session.

I hope this is understandable for you.


IMHO easiest solution is winetricks

https://wiki.winehq.org/Winetricks

Winetricks is a script and will install directx and other nice to have items ;)

although it is in the repos, I use the most current version in git hub

https://github.com/Winetricks/winetricks

The script is run from the command line as there is no graphical launcher, but once it is running it is a graphical menu

Looks like this:


Brightness buttons on Hp laptop not working

First open the terminal,
$ xrandr --current # determine the output display, which is eDP-1 for HP x360
$ xrandr --output eDP-1 --brightness 0.75 # --output <primary display>

This works for me.


Why does Virtual Box uninstall gnome-terminal?

Problem was caused by downloading the 32 bit version of vitrualbox from the i386 link on the website, instead of the AMD64.


Packages are not available for installation

Please, open-up update-manager or Software Sources depending on your distro then add/tick universe repository from the software sources.

Read https://help.ubuntu.com/community/Repositories/Ubuntu  "Adding Repositories in Ubuntu"

  GUI-based repository management is normally accomplished via "Software
  Sources". This interface can be accessed via several methods. For the
  latest versions of Ubuntu, the easiest way is to go through the
  "Ubuntu Software Center". Open the software center, then from the Edit
  menu select "Software Sources". You will have to enter your password
  to change settings in this window.

  For older versions of ubuntu, there are several options:

Main Menu: System > Administration > Software Sources.

Synaptic : System > Administration > Synaptic Package Manager : >> Settings >> Repositories.

Main Menu: Ubuntu Software Center : >> Edit, Software Sources.


.profile file not getting updated in Ubuntu 12.04, trouble installing mysql

MySQL has a client/server architecture. You now need to install the server -- not just tools that allow you to talk to it. It will probably have a name like 'mysql-server', so do "sudo apt-get install mysql-server".


Can't move windows to lower or upper workspace

In ubuntu 13.10 the hotkeys to move windows to workspaces up and down have been changed:

Move window up: shift+super+page up
Move window down: shift+super+page down

(the super key should be the "windows key" on your keyboard)

You can change the hotkeys back to what they were from system settings, keyboard, shortcuts tab, "Navigation" menu, scroll down till you find "Move window one workspace up" and "Move window one workspace down" below it.

I did this myself.


I did this steps and been able to use FlashPalayer in LiveMocha. This lines install the Google Chrome stable, that comes with FlashPlayer 11.4.

Run wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -.
gksu gedit /etc/apt/sources.list.d/google.list (opens a graphical text editor)
Paste the text: deb http://dl.google.com/linux/chrome/deb/ stable main
Run sudo apt-get update.
Run sudo apt-get install google-chrome-stable.


Can't see "home" partition in "other locations"

With your settings, I wouldn't expect that you find your "Home" in "Other locations".
Your home is mounted when your system boots. You can access it straight via the "Home" (and Document, Music, Pictures...) link in Nautilus, the file explorer. It is not an "Other location", it's part or your File System, even if installed on two different partitions.


You could install the default-jre, that is openjdk-7.

This should be the more stable of all jre.


Upgrading Win7 to Win8 on a dual boot with Ubuntu 12.04

You need to be very careful as Windows 8 will probably clobber you MBR (boot area). Basically this means you will only be able to boot into Windows 8 even though Ubuntu will still be there on another partition (just invisible to the boot loader). There a numerous guides showing how to backup and restore your boot area post windows installation. I'm sure they will work for windows 8 but maybe someone with more specific knowledge of windows 8 installation can chime in just to make sure I don't point you to some out of date or incorrect information.
Obviously - Make sure you backup you system beforehand anyway...


Ubuntu boot partition corrupted after using DBAN on an external disk

According to what's listed there the problem may be in the boot sequence. Try entering the BIOS and checking that everything is correct.

edit:

The new error also suggests you are trying to boot from an incorrect boot device. But since you have reverted the boot order changes it could well be a corrupted boot partition. In that case you probably need to repair grub from a live USB. Check that answer and/or that for details on how to do it. Be sure that you mount the proper devices for your system configuration.


You can practice a universal method to create a toggle script/functionality for settings, connections etc. Also, you will probably be able to reuse a great part of the code for different situations. However, an easy "all in one" solution, applicable in different situations and without any knowledge on, or feeling with coding is hard to give. You depend on the nature of the two states the script has to toggle between, their corresponding commands and the method you can use (or not) to check what is the current state.

Having said that, given your toggle hotspot example, below are three ready to use versions of a setup, from relatively simple to a bit more complicated. The first two are the most "universal" ones; the third is for use in Unity only.

The general "anatomy" of the toggle scripts is as follows:

> check what is the current_status
> if current_status = A:
      (switch icon to icon_b)
      run command to change state to B
      (check if toggle command was successful, if not > switch icon back)
> else:
      (switch launcher icon to icon_a)
      run command to change to change to A
      (check if toggle command was successful, if not > switch icon back)

Toggle setup; the three examples

Toggling with a single starter (desktop file) on your desktop.
Idem, but toggling icon as well, to show the current state
Toggling from an icon in the Unity launcher, with toggling icon to show the current state

Notes:

Since you will be asked for your password, you need to install gksu if it is not on your system already. Example 3 should not be used (as it is) on 12.04 or earlier.
Keep in mind that a script that asks for administrator's permission is a potential security risk. If you are having doubts on who is doing what on your computer, store it in a secure directory.

1. Toggling with a single starter (desktop file) on your desktop

The most simple one: toggling via a (fixed) starter on your desktop

Instructions:

Icon:

Download either one of the icons from below (right-click > safe as) safe it as toggle_icon.png in a location of your choice.

The script:

Copy the text below, paste it in an empty file and save it as hotspot.py in a location of your choice.

#!/usr/bin/python3

import subprocess

# identifying string to look for when "pstree" is run
running_id = "ap-hotspot"

def check_ifrunning():
    # check if hotspot is up or down
    get_pstreeinfo = subprocess.Popen(["pstree"], stdout=subprocess.PIPE)
    output = (get_pstreeinfo.communicate()[0].decode("utf-8"))
    if running_id in output:
        return "running"
    else:
        return "not_running"

def toggle_connection():
    runcheck = check_ifrunning()
    if runcheck == "not_running":
    # command to start hotspot (spaces replaced by ",")
        subprocess.Popen(["gksu", "ap-hotspot", "start"])
    else:
        # idem, stop hotspot
        subprocess.Popen(["gksu", "ap-hotspot", "stop"])

toggle_connection()

Create a desktop file:

Copy the text below, paste it in an empty text file. Add the correct path to the script in the Exec= line, the correct path in the Icon= line, and safe it to your desktop as hotspot_toggle.desktop. Make it executable and your setup should work.

[Desktop Entry]
Name=Hotspot toggle
Comment=Hotspot toggle
Categories=Accessories
Exec=python3 /path/to/script/hotspot.py
Icon=/path/to/icon/toggle_icon.png
Terminal=false
Type=Application
StartupNotify=true

2. Toggling with a single starter (desktop file) on your desktop, with icon change effect

This is an enhanced version of the first example: the icon will change to toggle_officon.png / toggle_onicon.png on your desktop, depending on whether hotspot is on/off.

Instructions:

Icons:

Download both icons from the first example, safe them as

toggle_officon.png (the grey one)
toggle_onicon.png (the green one)

in a location of your choice.

The script:

Copy the text below, paste it in an empty file and save it as hotspot.py in a location of your choice. Add the correct paths to the lines starting with path_todtfile = (path to the desktop file, see further below),  icon_offpath = (path to toggle_officon.png) and icon_onpath = (path to toggle_onicon.png). Note: The "real" name of the desktop file is how you named it when you saved it. The name you see in your interface is defined in the Name= line of the desktop file.

#!/usr/bin/python3

import subprocess
import time

wait = 10

# identifying difference on pstree command on / off
running_id = "ap-hotspot"

# pathto_desktop file
path_todtfile = "/path/to/desktop_file/toggle.desktop"
# paths to icons
icon_offpath = "/path/to/toggle_off_icon/toggle_officon.png"
icon_onpath = "/path/to/toggle_on_icon/toggle_onicon.png"

def set_icon(set_mode, state):
    if state == "running":
        iconset = [icon_onpath, icon_offpath]
    else:
        iconset = [icon_offpath, icon_onpath]
    if set_mode == "set_current":
        appropriate_iconpath = iconset[0]
    else:
        appropriate_iconpath = iconset[1]
    with open(path_todtfile, "r") as editicon:
        editicon = editicon.readlines()
    line_toedit = [editicon.index(line) for line in editicon if\
                   line.startswith("Icon=")][0]
    if not editicon[line_toedit] == "Icon="+appropriate_iconpath+"\n":
        editicon[line_toedit] = "Icon="+appropriate_iconpath+"\n"
        with open(path_todtfile, "wt") as edited_icon:
            for line in editicon:
                edited_icon.write(line)
    else:
        pass

def check_ifrunning():
    # check if hotspot is up or down
    get_pstreeinfo = subprocess.Popen(["pstree"], stdout=subprocess.PIPE)
    output = (get_pstreeinfo.communicate()[0].decode("utf-8"))
    if running_id in output:
        return "running"
    else:
        return "not_running"

def toggle_connection():
    runcheck = check_ifrunning()
    set_icon("set_alter", runcheck)
    if runcheck == "not_running":
        subprocess.call(["gksu", "ap-hotspot", "start"])
    else:
        subprocess.call(["gksu", "ap-hotspot", "stop"])
    time.sleep(wait)
    runcheck = check_ifrunning()
    set_icon("set_current", runcheck)

toggle_connection()

Desktop file:

Create the desktop file like in example 1. Add the correct path to the script in the Exec= line, the path to either one of the two icons in the Icon= (it will be straightened out on first use), and safe it to your desktop as toggle.desktop. Make it executable and your setup should work.

3. Toggling from an icon in the Unity launcher, with toggling icon to show the current state

down / running

(This example should not be used as it is on 12.04 or earlier.)

Icons:

Download both icons from the first example, safe them as

toggle_officon.png (the grey one)
toggle_onicon.png (the green one)

in a location of your choice.

The script:

Copy the text below. paste it in an empty file, save it as hotspot.py in a location that suits you.

#!/usr/bin/python3

import subprocess
import getpass
import time

# time to wait, to check if hotspot was established (set correct icon)
wait = 10
# identifying difference on pstree command
running_id = "ap-hotspot"
# location of the launcher restore script
backup_copy = "/home/"+getpass.getuser()+"/.restore_currentlauncher.sh"
# name of the desktop file if hotspot is down
mention_ifdown = 'application://hotspot_off.desktop'
# name of the desktop file if hotspot is running
mention_ifup = 'application://hotspot_on.desktop'

def check_ifrunning():
    # check if hotspot is up or down
    get_pstreeinfo = subprocess.Popen(["pstree"], stdout=subprocess.PIPE)
    output = (get_pstreeinfo.communicate()[0].decode("utf-8"))
    if running_id in output:
        return "running"
    else:
        return "not_running"

def read_currentlauncher():
    # read the current launcher contents
    get_launcheritems = subprocess.Popen([
        "gsettings", "get", "com.canonical.Unity.Launcher", "favorites"
        ], stdout=subprocess.PIPE)
    return eval((get_launcheritems.communicate()[0].decode("utf-8")))

def set_current_launcher(current_launcher):
    # before editing the launcher, create restore script
    backup_data = read_currentlauncher()
    with open(backup_copy, "wt") as create_backup:
        create_backup.write(
            "#!/bin/sh\n\n"\
            "gsettings set com.canonical.Unity.Launcher favorites "+\
            '"'+str(backup_data)+'"'
            )
    # preparing subprocess command string
    current_launcher = str(current_launcher).replace(", ", ",")
    subprocess.Popen([
        "gsettings", "set", "com.canonical.Unity.Launcher", "favorites",
        current_launcher,
        ])

def set_icon(change_mode):
    # defines the appropriate icon in the launcher
    state = check_ifrunning()
    if state == "running":
        if change_mode == "set_current":
            iconset = [mention_ifup, mention_ifdown]
        else:
            iconset = [mention_ifdown, mention_ifup]
    elif state == "not_running":
        if change_mode == "set_current":
            iconset = [mention_ifdown, mention_ifup]
        else:
            iconset = [mention_ifup, mention_ifdown]
    # set the defined icon
    current_launcher = read_currentlauncher()
    if iconset[0] in current_launcher:
        pass
    else:
        index = current_launcher.index(iconset[1])
        current_launcher.pop(index)
        set_current_launcher(current_launcher)
        time.sleep(1)
        current_launcher.insert(index, iconset[0])
        set_current_launcher(current_launcher)

def toggle_connection():
    set_icon("set_alter")
    runcheck = check_ifrunning()
    if runcheck == "not_running":
        subprocess.call(["gksu", "ap-hotspot", "start"])
    else:
        subprocess.call(["gksu", "ap-hotspot", "stop"])
    time.sleep(wait)
    set_icon("set_current")

toggle_connection()

Two desktop files, that will switch in the launcher:

Below two desktop files you need. Open an empty text file, paste the code below (in separate files), replace the paths by the actual paths to the icon(s) you saved above, and the path to the script, and save them in ~/.local/share/applications, as hotspot_off.desktop, and hotspot_on.desktop:

hotspot_off.desktop:

[Desktop Entry]
Name=Hotspot off
Exec=python3 /path/to/script/hotspot.py
Icon=/path/to/toggle_officon/toggle_officon.png
Terminal=false
Type=Application
NoDisplay=true

hotspot_on.desktop:

[Desktop Entry]
Name=Hotspot on
Exec=python3 /path/to/script/hotspot.py
Icon=/path/to/toggle_officon/toggle_onicon.png
Terminal=false
Type=Application
NoDisplay=true

Finally, drag either one of the desktop files on to the launcher. Don't worry if you picked the right one or not, it will be straightened out on first run.


I don't really know what happened with previous droidcam source I was using to install it on 19.10 a few weeks ago. But now I've found a different source which works in my case on 20.04.
Steps I was using which could not be required if you've done them previously. It is better to run the next command:
$ sudo apt install v4l2loopback-utils v4l2loopback-dkms cmake nasm yasm pkg-config libgtk2.0-dev
$ sudo modprobe v4l2loopback
$ v4l2-ctl --list-devices     # check if you have dummy video devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
/dev/video0

Build required dependencies:
cd ~/Downloads
git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git
cd libjpeg-turbo
mkdir build && cd build
cmake -G"Unix Makefiles" ../
make && sudo make install

Build droidcam from sources:
cd ~/Downloads
git clone https://github.com/aramg/droidcam.git
cd droidcam/linux
make
sudo ./install-dkms

Run it:
droidcam &
ffplay /dev/video1    # in your case it could be a different video device


It's seems you where allowed to login with a kind of Restricted shell.
Or maybe you where contained by a tool like Jailkit.  You can find useful this blog page too.

When you create a new user you will be asked for username, password, shell...
If rbash is installed in your system you can select it.
It's possible to force the user to change the password at the first login.
If the user was just been created you can always force his password to expire with
sudo chage -d 0 TheUserThatHaveToChangePassword

Restricted Shell
If  bash  is  started  with  the name rbash, or the -r option is supplied at invocation, the shell becomes restricted.  A restricted shell is used to set up  an  environment  more  controlled than the standard shell.  It behaves identically to bash with some limitation:

 -      changing directories with cd
 -      setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
 -      specifying command names containing /
 -      specifying a filename containing a / as an argument to the .  builtin command
 -      specifying a filename containing a slash as an argument to the -p option to the  hash builtin command
 -      importing function definitions from the shell environment at startup
 -      parsing the value of SHELLOPTS from the shell environment at startup
 -      redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
 -      using the exec builtin command to replace the shell with another command
 -      adding  or deleting builtin commands with the -f and -d options to the enable builtin command
 -      using the enable builtin command to enable disabled shell builtins
 -      specifying the -p option to the command builtin command
 -      turning off restricted mode with set +r or set +o restricted.

These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed, rbash turns off any  restrictions in the shell spawned to execute the script.
This means you may need  some work more to enforce the security.


ubuntu 12.04 skype messages don't deliver

Installing .deb file manually on ubuntu -

mkdir xxx
cd xxx

Now move your .deb file in /home/xxx/ and use the following -

to know the name of package_name.deb

ls

then

sudo dpkg -i package_name.deb

If you get any broken package error use -

sudo apt-get install -f

Hope it helped you.


I decided to delete ubuntu and change to ubuntu 12.04 as 14.04 does not have much softwares..

First, this is a mistaken assumption. I haven't checked the package manifests of the two versions of Ubuntu, but I'd be surprised if less was available for 14.04 than for 12.04. There's a lot of software available for Ubuntu (and for Linux generally). If you need a specific type of program and can't find it, post a question about that rather than do something radical (more radical than you realize; see below....).

  I opened Disk Management and deleted two partitions which were unnamed(so they belonged to Ubuntu).(Three of the local disks changed to dynamic)

If attempting to downgrade from 14.04 to 12.04 was your first mistake, using the Windows Disk Management tool was the second one. You've identified the reason: That tool changed, without asking you, your disk from a standard partitioning setup to one that uses Logical Disk Management (LDM), aka dynamic disks. The trouble is that Ubuntu can't install to a disk that uses LDM, so by doing this, you've created a new hurdle for yourself.

There are lots of questions here that address this issue, such as:

Ubuntu Install Unknown Partitions
Ubuntu 14.04 not detecting free space
Partitions created in Windows are not showing in Ubuntu

The good news is that you can convert back, but you'll need to use third-party tools to do so -- see the earlier questions for links.

In the future, do not use the Windows Disk Management tool to do anything but shrink your Windows partition. It's got numerous known bugs that Microsoft refuses to fix and it tends to pull stunts like this one. Instead, use GParted, parted, fdisk, gdisk, or other Linux tools; or perhaps third-party Windows tools (with which I'm relatively unfamiliar) for disk partitioning. Shrinking the Windows partition is a possible exception to this rule, since it's likely to be a little safer to use Microsoft's tool for this task. If you do that, though, do not create additional partitions in the free space; leave that task to the Linux installer or do it manually with a Linux program.

Once you've fixed your LDM problem, re-install 14.04. That will install a fresh copy of GRUB, which should work.

Incidentally, the problem with the grub rescue> prompt is caused by the way GRUB works. Specifically, GRUB relies on files in the Linux partition, so as soon as you deleted the Linux partition, GRUB could no longer work properly -- but as the way you deleted Linux left GRUB in control of the MBR, GRUB still tried to work. If you wanted to delete Linux and continue using Windows, you'd need to re-install the Windows boot loader to the MBR, which you'd do either with a Windows recovery tool or by restoring a backup (if you'd had the expertise and foresight to create one; most people don't).


How to make all new files in a directory executable

You can change permission of a directory using the following command
chmod -R 700 directory

where -R ----> recursively apply permission all sub-directories and files under directory


You can install the latest Catalyst by running

sudo apt-get install fglrx-updates


Sudo apt update: How to Avoid a Google Package from Updating Itself?

The message you are referring to is about a repository not a package - repositories hold packages and sudo apt update refreshes the local cache with the info from the repositories.
To remove a repository there are several possibilities:
1. Using CLI
Normally all repositories are listed under /etc/apt/sources.list - so you could either open that file via sudo nano /etc/apt/sources.list (replace nano with vi or emacs if you like). Then delete the corresponding line or comment it out by putting a # at the beginning.
Sometimes the repository is saved to a seperate file under /etc/apt/sources.list.d/ in this case you might just want to delete the corresponding file with sudo rm /etc/apt/sources.list.d/google-cloud-sdk.list (the file might be named differently).
2. The GUI way
Open the Application "Software & Updates" head to the tab "Other Software" and either uncheck the Box in front of the repository or click on the repository and hit the Button "remove".
For more info about repositories and how they work you might have a look at these ( a little bit older) wiki pages:
https://help.ubuntu.com/community/Repositories/Ubuntu
https://help.ubuntu.com/community/Repositories/CommandLine


sudo chmod -R 777 / sounds like an incredibly bad idea. If you ran that command successfully, you will probably want to reinstall your system right away, since you made all your files accessible and executable.

Ubuntu systems don't have a root password by default for security reasons. Users in the sudo group can run any commands as root using the sudo command, but you should think twice, because you can (no, you will) break your system if you don't know what you're doing. If you really want a root shell, you can get one with sudo su -. You have been warned. To read more about how to use sudo, please refer to the Official Documentation.

About installing ruby1.8, that's a quite different question. Since ruby1.8 has been removed from the official repositories in 14.04, you will have to use a PPA like this one.

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby1.8

Check out the referenced website for further information.


Cofiguring a Netgear WNDA3100 USB adapter

Try to follow these steps:-

Getting the ndiswrapper package files

you need to grab all the files for linux(ubuntu) for that read this  described Article.
Place the files on your Ubuntu system

After you got the files place them in a folder on you Ubuntu system. Note that the driver files will need to stay their permanently so chose a place you will not remove later.
Installing the ndiswrapper packages

Execute the following linux commands:

sudo dpkg -i ndiswrapper-common

sudo dpkg -i ndiswrapper-utils-1.9

sudo dpkg -i ndisgtk
Installing the drivers on Ubuntu

for installation choose additional driver options.
Configuring your Wireless Network

Navigate to your Network Manager by clicking one of the icons at the top right corner. Here you can now select the desired network and configure this. You can use the same data aas you used under Windows.

if you want detailed process, please  read this article.


How to group applications used together?

Should probably look into a tiling window manager such as i3 or awesome to achieve tmux-like behaviour

(Will add more info to this answer when I have more time to try them)


What is the easiest way to install ubuntu

Download an .iso file of Ubuntu from the official website.
Burn it onto a DVD. (DO NOT COPY AND PASTE AS THIS WON'T WORK)
Restart your computer and go to BIOS settings (usually done by pressing F12 while the system is rebooting)
Choose to boot from disk
Select Install Ubuntu


I struggled with this problem since upgrading to 13.10 in October. I believe I've finally solved it by upgrading to the development version of lightdm (1.9.7). https://launchpad.net/ubuntu/+source/lightdm/1.9.7-0ubuntu2/+build/5582036

To determine if lightdm is the source of your problem you could try replacing lightdm with gdm. If things go smoothly with gdm then continue with gdm or try the dev version of lightdm.


Unfortunately this is a bug in Ubuntu and there is no fix available yet.

The bug is tracked here but unfortunately most of the workarounds didn't work for me. Feel free to try them on your system:

  As funnylife_ma mentioned, you could
  either disable compiz (not ideal) or
  you could just disable the Place
  Windows plugin. Simply trying to
  untick Place Windows didn't work as
  after a few seconds it would be
  re-enabled (I assume another plugin
  required it). To do this I had to go
  into CCSM > Preferences > Plugin List,
  un-tick Automatic Plugin Sorting (and
  acknowledge the warning saying I know
  what I'm doing) then disable Place.
  Not ideal but a lot better than
  auto-hide panels or no compiz.

--or--

  Go to System - Preferences - Conmpiz
  Config Settings Manager

  In this screen click on utilities on
  the left, click on workarounds on the
  right. Put a checkmark for the enable
  legacy full screen support

--or--

Install OOo from openoffice.org like this

The workaround that works is to disable Compiz by setting Visual Efects to None in System → Preferences → Appearance.