How can I make a program run at startup in only one definite session that uses the same desktop environment as others?

Startup applications are defined by .desktop files that live in ~/.local/share/autostart, according to the Desktop Application Autostart Specification.

They optional setting to limit them to one or more desktop environments, e.g.

OnlyShowIn=GNOME;XFCE;LXDE;

Alternatively you can use

NotShowIn=...

to exclude this app from the listed desktop environments.

Only one of these keys, either OnlyShowIn or NotShowIn, may appear in a single .desktop file. (That was a direct quote from the spec.)

Unfortunately, I'm not sure what you're doing qualifies as a separate desktop environment...


First, 14.10 is beyond end of life and so it is going to be more difficult.

Second "dist-upgrade" does NOT upgrade ubuntu. (This is a fairly common misunderstanding, perhaps the option "dist-upgrade" is a bit misleading, perhaps dist-sync or some such would have been better).

From the man page: http://manpages.ubuntu.com/manpages/vivid/man8/apt-get.8.html

  dist-upgrade

       dist-upgrade in addition to performing the function of upgrade,
       also intelligently handles changing dependencies with new versions
       of packages; apt-get has a "smart" conflict resolution system, and
       it will attempt to upgrade the most important packages at the
       expense of less important ones if necessary. So, dist-upgrade
       command may remove some packages. The /etc/apt/sources.list file
       contains a list of locations from which to retrieve desired package
       files. See also apt_preferences(5) for a mechanism for overriding
       the general settings for individual packages.

You upgrade by running update manager

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

And finally, it is going to take longer and be more error prone to upgrade this way. A fresh install is faster, more reliable, and will preserve your data in /home as long as you do not format the partition with /home on it.

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

  Since Hardy it is possible to reinstall Ubuntu without losing the
  content of the /home folder (the folder that contains program
  settings, internet bookmarks, emails and all your documents, music,
  videos and other user files). This can be done even if /home is not on
  a separate partition (which is the case by default if you did not
  manually separate it when installing Ubuntu originally). This tutorial
  can also be used to upgrade Ubuntu (eg 11.04 -> 12.04 from a 12.04
  live-CD).

The other unspoken advantage of a fresh install is that you have the opportunity to test the new version of Ubuntu on your hardware before you upgrade. It is frustrating to upgrade via update manager and then discover you have a hardware problem , can leave you stuck re-installing and updating the old version.

And last, before you upgrade, upgrades can always fail, so back up your data first.


Can't have dhcp and static IP on the same interface

It's because you're missing the following line:

auto lo eth0:0

auto: the interface should be configured during boot time.


Java process hangs after exiting Eclipse

You describe an old bug in some installations of Eclipse. For example, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=184575
I cannot remember what was the cause of this issue, however a clean installation helped fix the problem.

Specifically,

Do not use the packaged Eclipse that is found in the Ubuntu repositories. The packaging of Eclipse is a difficult process and the package from the repositories is not the best way to install Eclipse.
Install Eclipse from http://www.eclipse.org. It is quite straightforward to install.
I recommend to install in /opt
You can create first a /opt/eclipse directory and change the owner to your user account, therefore, you can install updates, etc easily.
You may have to start from scratch with a new ~/.eclipse/ so that old customisation is cleared, and you start with a new environment.


when using pulseaudio, internal sink not selectable

The internal sound card may not be detected or have the required drivers.

You must report the dmesg log found in /var/log/dmesg which can contain valuable information about hardware initialisation (or failure of)


Power manager GUI settings (not to shut down the display) are not followed

This could be a screensaver. Take a look at the screensaver-settings (xscreenserver). There is one screensaver which just fades the screen to black.

Edit in order to set as definitive answer:

There was no screensaver gui installed but somehow a screensaver daemon was active.

Installing xscreensaver, and running 'Screensaver' there is an option to disable screensaver.

'Screensaver' ("Screensaver Preferences") appears in main Menu/Settings in Xfce and among 'usr/share/applications'.

A solution with a wider scope - HERE, specifyng also that for the above solution to work,  Screensever (xscreensaver -no-splash) has to be added to the startup programs list. The problem may very well be caused in the first place by just disabling Screensaver in the Applications Autostart list.


For date and time you can make the following changes in your code:Add this line after #!/bin/bash

echo $(date '+%d/%m/%Y %H:%M:%S')

And then your code should look like this:

 #!/bin/bash

echo $(date '+%d/%m/%Y %H:%M:%S')
du -sh /Magna
df -h /Magna


In synaptic, you can select an installed package, right click, and select 'Properties'. There should be a tab named 'Files' that lists out all of the files contained in the package. This should tell you where your files were installed too.


What does “ping: sendmsg: No buffer space available” mean?

It means you reached a maximum value for a system parameter. Probably /proc/sys/net/core/wmem_max (but this might need some investigating on a system that shows this error). This setting is the maximum amount "receive socket memory".

It is likely that the cause is a broken NIC -or- a NIC that is not 100% supported if the system is not stressed out. Broadcom bcm4313 is one that seems to show this error.

In case anyone wants to know: the file where these are stored is /etc/sysctl.conf and you can alter them from a root(!) prompt. Some examples can be found here (also includes the parameter shown at the beginning of this answer). But this should only be done if replacing the NIC itself does not solve it.


merge 2 partitions (unallocated preceding) without losing data

It would be helpful if you were to post a snapshot of gparted showing your sda drive, as I suspect that your description may not be complete.

Just to confirm, what you want is to make your Windows partition larger, and that sda5 is empty and can be deleted to make it truly unallocated, yes? If yes, then it's possible to do what you want, but I'll caution you... BACKUP BACKUP BACKUP first. Moving data and partitions around can be risky, so be prepared.

I'll also caution you that any time you mess with a Windows partition, it'll probably not boot into Windows the first time without some help. You'll want to have boot-repair, and a Windows install disk ready, just in case.

Based just on what you've told us so far, a brief outline of what you'll need to be prepared to do is:

install boot-repair (using Synaptic) in Ubuntu (this will be used to fix booting issues)
if boot-repair is not available in Synaptic, you'll have to start the Terminal app from the Dash, and enter the following, as separate lines:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

sudo apt-get install -y boot-repair
start "Boot Repair" from the Dash just to make sure it works, then quit it
start gparted from the Dash in Ubuntu
use gparted to delete sda5 and sda1 to make it truly unallocated space
use gparted to move sda2 all the way to the beginning of the drive
try to boot into Windows now (and here's where you may have trouble, and may need to use boot-repair from Ubuntu, or use a Windows install disk running in repair mode)
once Windows is booted, you'll want to start the Disk Management program, and EXTEND the Windows C: partition

Are you ready to do this, or is it too much, too scary? More detail available on request.


Ubuntu 18.04 libosmesa6 depends libglapi-mesa (= 18.0.0~rc5-1ubuntu1) but 18.0.5-0ubuntu0~18.04.1 is to be installed

I am very new to Ubuntu, knowing nothing about it, so my question looks a bit dump. But here is how I solved it for my situation when I could not proper install libosmesa6-dev due to package dependency:

1 Try to google libosmesa6=18.0.5-rc5-0ubuntu0, download the deb file for your Ubuntu version, and cpu architecture(e.g. my case 0ubuntu0~18.04.1 (amd64 binary)), and install it manually. This is because in the current package repository, there is no libsomesa6=18.0.5-rc5-0ubuntu0 to match libglapi-mesa=18.0.5.

2 Now, I  add repository for newer version of libosmesa6-dev to my repository, and install it with apt-get command:

sudo add-apt-repository ppa:ubuntu-x-swat/updates

sudo apt-get update

sudo apt-get install libosmesa6-dev

After this, the libosmesa6-dev, libosmesa6, libglapi-mesa would be automatically upgraded to a newer version.

3 Once it's installed, I have no issue to import mujoco_py under my environment


The Bluetooth hardware of Lenovo G500 should be supported by Ubuntu 18.04

Check AirPlane mode status (F7) and disable it
Enable Bluetooth from Gnome control Center

gnome-control-center -s bluetooth &

If needed you can list BT hardware with this command

sudo lshw -class communication


Based on personal experience, a swap file might be better utilized than a swap partition in newer versions of Ubuntu. You could try creating a swap file and disabling the swap partition and see how it works for you. To do so, please follow these steps:

Create the swap file ( 8 Gib ):

sudo fallocate -l 8G /swapfile
Give the file right permissions to limit unneeded access:

sudo chmod 600 /swapfile
Prepare the file as a swap area:

sudo mkswap /swapfile
Activate the swap file:

sudo swapon /swapfile
Deactivate the swap partition:

sudo swapoff /dev/sda2

Test how your system swap behaves now.

Notice: ( except for the creation of the /swapfile ), these changes made to swap volumes are temporary and will be cleared after reboot. If you wish to make changes permanent,

please edit your /etc/fstab file

sudo nano /etc/fstab
Add this line to the end of the file /swapfile swap swap defaults 0 0

example:

/dev/sda2 none            swap    sw              0       0
/swapfile swap swap defaults 0 0
Comment out the line with the swap partition ( /dev/sda2 ) by adding # before it

example:

# /dev/sda2 none            swap    sw              0       0
/swapfile swap swap defaults 0 0
Save the changes by pressing Ctrl + X then Y then Enter

fallocate or dd:

Thank you to @heynnema for raising this concern in the comments section below:

  no, don't use fallocate to create /swapfile, use dd. Search for
  info about this here on AU.

I assume the concern is regarding the possibility of fallocate creating file holes which basically are portions of a file that contain null characters and are not stored in any data block on the disk. This in turn, if present, would render the swap file unusable.

To address this concern, let us have a look at the odds of fallocate creating file holes and the consequences of that.

It turns out:

fallocate will not normally create holes unless it is operated on a preexisting file and the option --punch-hole is specified. Please read Ubuntu Manpage - fallocate
fallocate --length 8GiB swapfile is suggested to create a swap file on Ubuntu man pages, please read Ubuntu Manpage - mkswap
After all, if the created file contained holes in it, sudo swapon will throw an error skipping - it appears to have holes. and in this rare case which I haven't faced or heard of yet, the solution is simple. Just use dd to create the file in step # 1 above and move on. Do it as follows:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=8388608

or as @v_mil did it:

sudo dd if=/dev/zero of=/swapfile bs=1048576 count=8192

In short, this concern is not worrying enough to give up on the speed gained by using fallocate.


Yes, there is such a tool

Read man journalctl

In my ~/.bashrc, in order to save typing, I have

alias jc=journalctl

I use jc -u postfix.service to look at my mailer logs.

jc -h, jc --fields, jc  --field=FIELD will show what you can ask journalctl about on YOUR system.

I also use "journalctl parenthesis". In ~/.bashrc:

# tsjou "18-11-01 01:55:28" for journalctl --since
alias tsjou="date '+%y-%m-%d %H:%M:%S'"

# record beginning for journalctl
alias jstart="JSTART_TIME=\"\$(tsjou)\""
#show journal since `jstart`
alias jend="journalctl --since=\"\$JSTART_TIME\""

Then, just BEFORE I "do it" (connect the device or other action that creates log entries):

jstart

Then, I do the thing, wait a couple of seconds for the logs to "settle", and

jend

will show me everything that been logged since jstart

jc /usr/sbin/NetworkManager to see what's up with networking.

One of my systems has been crashing (turned out to be power distribution). I use jc -b -1 -e to look at the end of the logs of the previous boot, in the hope of finding a commonality among the crashes. The lack of such a commonality was what led me to power.

jc --follow will follow the journal in near real time.

Looking through my bash history, I find I've used:

jc -b  _PID=1452 _PID=2772 _PID=2773
jc --since="14:25"
jc --since="2017-11-27 14:24:00" --until="2017-11-27 14:26:00"
jc --since="-30 minutes"
jc --since="$(tsjou --date="09:30")"
jc --since="$(tsjou --date="march 28 09:55:00")"


Open a doc from terminal, but not by its name

You probably haven't discovered Tab-completion (see here) yet.

While typing a filename in Terminal just type a first few letters and hit Tab and see magic!


I have had similar problems with my wifi. It was due to my interfaces file being manually configured since I was building my own system from a basic install with no desktop. Because I didn't like the Unity desktop and didn't want to go through the hassle of UN-installing and installing a new desktop and what not. Once I found a desktop I liked my wifi wasn't being managed because the system was reading the interfaces file to configure the network once I removed my manual configurations the system started using the network manager.

edit the interfaces file by typing: sudo nano /etc/network/interfaces

Then either comment out any manual configurations for wifi. my file looks like this:

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback


This may sound stupid, but is the card locked? There should be a little gray switch on the side of the card. This caused me many headaches myself.

This is what a lock looks like, and where to find it:

Sorry for the poor image, this was my camera SD card, and therefore the only one I had.
(I had to use my webcam).

As you can see, the lock is in the unlocked position.


Before (with /etc/network/interfaces) you had to put the netmask as a separate entry. With netplan they decided to merge the IP address and netmask value into one, so you have to specify the netmask as part of the IP address. Putting /24 would correspond to a netmask value of 255.255.255.0. Putting /32 would not make sense as it would reduce the size of the network to just the address itself.

You can read more about this here: Ubuntu 17.10 Server static IP netplan - how to set netmask


First, and most importantly, do not use uppercase variable names. You risk overriding environment variables and special shell variables, and in this case you did just that by overwriting the PATH variable.

Second. Quotes are very very important in shell scripting; quoting variable expansions avoids the result from being subjected to pathname expansion and word splitting.

For example, if var="St. Elmo's Fire.mpg", then $var will become the three words St., Elmo's and Fire.mpg, while "$var" will become the one word St. Elmo's Fire.mpg. So always quote variable expansions. "$var", not $var.

Something like this should be more correct:

#!/bin/bash
read -ep "Enter path for the .mpg-file: " file
IFS=: read -rp "Where should the trimming start? (HH:MM:SS): " shour smin ssec
IFS=: read -rp "When should the trimming end? (HH:MM:SS): " ehour emin esec
read -rp "What song is it? " title
read -rp "Who sang it? " artist
read -rp "Which album?" album

start=$(( shour*3600 + smin*60 + ssec ))
end=$(( ehour*3600 + emin*60 + esec ))
duration=$(( end - start ))

ffmpeg -i "$file" -t "$duration" -acodec copy -vcodec copy -metadata "title=$title" \
       -metadata "author=$artist" "$title · $artist.mpg"

Your ffmpeg command had -ss "$ANFANG", but ANFANG was never set in your script, so I omited it.


How can I remove the record of an installed package without deleting any files?

The 'best' way to do this, is by manipulating /var/lib/dpkg/status.
HOWEVER!
That file has a sensitive syntax; Doing it the wrong way may break your package management.
Here is what you have to do:
Find a block that looks a little like this (The actual look may depend on the package you're trying to make 'invisible'):
Package: xserver-xorg-input-vmmouse
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 136
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1:12.7.0-2
Provides: xorg-driver-input
Depends: libc6 (>= 2.7), xorg-input-abi-12, xserver-xorg-core (>= 2:1.10.0-0ubuntu1~), xserver-xorg-input-mouse, udev
Description: X.Org X server -- VMMouse input driver to use with VMWare
 This package provides the driver for the X11 vmmouse input device.
 .
 The VMMouse driver enables support for the special VMMouse protocol
 that is provided by VMware virtual machines to give absolute pointer
 positioning.
 .
 The vmmouse driver is capable of falling back to the standard "mouse"
 driver if a VMware virtual machine is not detected. This allows for
 dual-booting of an operating system from a virtual machine to real hardware
 without having to edit xorg.conf every time.
 .
 More information about X.Org can be found at:
 <URL:http://www.X.org>
 .
 This package is built from the X.org xf86-input-vmmouse driver module.
Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>

The first statement Package: <name> is where you have to look for, where <name> is the name of the package you want to remove.
Each block begins with a Package: <name> line, and ends with the next Package: line, BUT do not remove the next Package: statement!
If you keep that in mind, the package will no longer appear to be installed to dpkg; despite all the files still being available.
This is a terrible hack at best, but works just fine, I've done it a few times in the past myself, in a time when Ubuntu was still struggling with broken packages sometimes. I do not recommend it, it's a last resort option.


Can new terminals be spawned as tabs instead of windows?

It seems that in 16.04 the choice was removed from the menu and by default  new terminals are opened in Windows. This was bothering me as well. This can be changed by opening gnome-terminal, choosing Terminal then Preferences from the applications menu bar and changing the dropdown selection from Windows to Tab.

Note: This was tested on 16.04 on gnome-terminal version 3.18.3

In Mate Terminal this option doesn't exist. You can either install gnome-terminal easily with the command sudo apt update&&sudo install gnome-terminal or open a new tab in mate-terminal with ShiftCtrlT

Tested under 16.04 with mate-terminal v.1.12.1


Samba share on second hard drive not accessible... contact the administrator

In comments, I described the configuration I used, which allowed the OP to determine a solution.

  I made everything owned by a user1, let people sign on w/own userid
  and then force user user1 in the config file. Who owns client side
  mount points? For me forcing was only way it worked, but I am no
  expert.

The OP stated that based on this comment, they created a user other than root to own the shared folder. This resulted in the desired functionality. They did not have to force the user.


How to find files or folders that are inaccessible to a certain user?

Access to directory is controlled by x - execute - bit in the permissions.  The issue could be due to the user having no executable permissions as owner or a group to which user belongs has no executable permissions set on the directory.

In order to use find for that task, it's sufficient to specify -user as the owner of the directory and -not -executable flags.:

~$ find -type d -user $USER -not -executable
./foo/bar
./test_access
~$ ls -ld ./foo/bar ./test_access
drw-r-xr-- 2 admin admin 4096 Jan 15 03:36 ./foo/bar
drw-r--r-- 2 admin admin 4096 Jan  4 15:38 ./test_access

For cases where group part off the permissions is of interest, you could find groups the user belongs to and iterate over them:

for i in $(groups $USER | cut -d':' -f2) ; do find -type d -group "$i" -not -executable ; done

If neither case turns any potential results, the issue could be due to user not belonging to a group which has access to the directory that gives the issue.

Note also that web servers typically use www-data user/group. You probably want to be checking permissions using that username or group name.


Can't get root passworldless ssh to work

Since you've used a non-standard name for the key file (id_rsa_root instead of plain id_rsa) you will need to give it explicitly on the ssh command line i.e.

ssh -i ~/.ssh/id_rsa_root root@slave

Alternatively, you could set up a ~/.ssh/config file containing an entry for slave with the appropriate IdentityFile entry. See man ssh_config for details.

As a side note, if you are doing passwordless ssh you should not need to set root's login password (although not doing so initially means you will need to manually copy the public key to root's authorized_keys file, using sudo, since you won't be able to use ssh-copy-id) and you should use PermitRootLogin without-password rather than PermitRootLogin yes in the remote system's /etc/ssh/sshd_config file.


Ubuntu, Firefox, and other things Freeze and/or Crash!

Looks like RAM issue. Check it by memtest86


Did you add the script to /etc/init.d? You have to symlink the script you wrote to /etc/init.d so that it runs at startup.

sudo chmod 744 /etc/init.d/fan-speed-init.sh
sudo chown root:root /etc/init.d/fan-speed-init.sh
sudo ln -s /etc/init.d/fan-speed-init.sh /etc/rc2.d/S99fan-speed-init.sh


Grub rescue after installing Ubuntu 13.10 next to window 8

Okay, I finally use the radical way:

I was fortunat to be able to boot on a live cd.
Save important document I needed from my partitions.
Then with GParted delete all the crap (multiple partition of Windows 8...)
And finally install windows 7 (I don't know why this version getting along better with linux) and Linux.

Hope it can help other people!


Go to System Settings > Displays.

Tick the checkbox "Mirror Displays" on middle right hand side.


How to INSTALL kernel 4.4 which no longer resides on the system and then remove kernel 4.10 from ubuntu 16.04

Check that linux-image-generic is installed by running sudo apt-get install linux-image-generic, which if necessary will install the latest 4.4 kernel, currently 4.4.0.104.109.

The simplest way to reboot into the 4.4 kernel, is to reboot and press and hold Shift and select the 4.4 kernel at the grub menu. Older kernels may be listed in a sub menu as Advanced options for Ubuntu or Previous Linux Versions. Alternatively sudo nano /etc/default/grub && sudo update-grub to comment out GRUB_HIDDEN_TIMEOUT and GRUB_TIMEOUT=0, write the file Ctrl+o and exit Ctrl+x, update-grub will then run. After update-grub the grub menu should not be hidden when rebooting.

If everything works fine with the 4.4 kernel you can remove all the installed 4.10 kernel packages. See How do I remove old kernel versions to clean up the boot menu? for several methods to remove unwanted kernel packages.

Instead of removing the newer kernels you could change the GRUB_DEFAULT. grep menuentry_id_option /boot/grub/grub.cfg will provide a list of viable values to choose from. For my oldest kernel I could use GRUB_DEFAULT=gnulinux-4.8.17-galliumos-advanced-850a858b-1b7d-4451-8b00-541e3d314ee4


You probably need to install libreoffice-gnome

How to install LibreOffice? (replacing OpenOffice.org)


How to compile/install bind9 with DLZ (MySQL) support?

My answer: PowerDNS

It's built on top of MySQL by default and is much less difficult to set up. +1!

This software can be found in the Ubuntu Repositories as pdns-..., use

apt-cache search pdns

to find the packages.


gnome-session-flashback desktop -- is just booting into gnome enough or do I need to uninstall unity?

Just do:

sudo apt-get install gnome-session-fallback

Reboot and select your Gnome by clicking the Ubuntu sign before logging in. I think Gnome Metacity might be the right choice for you.


Need some help creating a script to rename text files and move them to a directory

This might get you started:

#!/bin/bash

find . -name 'note*' -not -name '*txt' -exec mv -bf '{}' '{}'.txt \;
find . -name 'note*.txt' -exec mv -bf '{}' /home/username/notes/ \;

The -bf makes mv not asking questions and backup if overwriting.


Dual boot with Windows 10 broken after update

I see this question was asked a couple of years ago. Since it comes up fairly high in the search results, I'll put in a late answer anyway. I have a dual-boot Windows/Ubuntu machine that I've been using since Win10 came out. Every major Windows update kills the dual-boot.

When this happens, open a Windows "command prompt" as Administrator. Then enter the following command:

bcdedit /set "{bootmgr}" path \EFI\ubuntu\shimx64.efi

For me, this has reliably fixed the problem every time. Obviously, for other distros, the path may be different. This article provides some good background information.


Static IP forcing route to interface that is not connected to network

One way is by removing hard-coded gateway and writing an if-up.d script as in this post that check network then set default gateway using route command.

Or Advanced way by setting up Dynamic Routing, See Reference: Debian Handbook


Unfortunately your observation that the https://wiki.ubuntu.com page is not nearly complete and often outdated is correct. Some pages there are useful, but more often you will be rather disappointed than satisfied.

There is also the official documentation on https://help.ubuntu.com/ though. You can link to pages of its HTML version.

More info about the differences between the Ubuntu Wiki, Community Wiki and Ubuntu Help pages can be found at What is the difference between the *.ubuntu.com wikis?

The Arch Wiki is amazing in its size and detail, and quite often there is few or no difference between Arch and Ubuntu (except mainly package management stuff, etc), so linking an Arch Wiki article can be perfectly fine. Just make sure you verify that the important parts are valid for both systems before posting.

Other than that, popular posts here on Ask Ubuntu (searching for keywords and sorting the results by vote score or a site-search on e.g. Duck Duck Go or Google will help you to find appropriate posts) or e.g. https://ubuntuforums.org can also serve as valuable reference.

Sometimes actually even Wikipedia does the job.


You need to put

use-agent

in your ~/.gnupg/gpg.conf

I know because Seahorse used to put a blank file there and break things for people using GNOME & KDE together.  I wrote the patch that made it properly copy the skeleton file, but that wasn't until 2009.


Showing music from Windows partition in music folder

Mounting the partition as Denis suggests is ideal if the Music folder is on it's own partition. Even if it is not you can mount any folder under another location using the -o loop option to mount.

The simpler way maybe to just create a link from the folder containing the Music to your home folder.

Right click on the folder containing the Music and choose "Make Link", then copy the link to your home directory and rename it to something like "Windows Music".


First of all backup all those file to another drive that means save those music files or folder in a drive other then C drive assuming Windows is installed in C Drive then go for installation.

Make a bootable USB or DVD as explained on the Official Download Page for Ubuntu .

Go into Bios and change the first boot priority to either USB or DVD , whichever you are using to install ubuntu from.

Insert you DVD or USB Stick and restart , it will ask you to choose either Try Ubuntu or Install Ubuntu in that click on Install Ubuntu.

then it will ask for installation type in that choose Replace Windows7 with ubuntu as shown below -

then press continue and provide the simple informations like date ,user name, and passwork.

Advice never select Encryption Option if you dont know what it is , not important for at all.

hope i have explained everything you want to know.


Secondary hdd with swap partition: spindown?

To force Linux not use the swap, run sudo swapoff -a

As for turning off the disk, you can do that through the included "Disks" application. See screenshot. (The option is grayed out for me as it is my system drive)


Why firefox is default browser in Xubuntu?

$ xdg-mime default google-chrome.desktop x-scheme-handler/http

Helped


I am running ubuntu 14.04 on a msi z170a motherboard.   This my fourth ubuntu 14.04 and all my hardware is different.    I also run fvwm2 as my window manager so I don't use the gnome or unity desktops.   What that means is I run gnome-'setup-stuff' from an xterm or gnome-terminal.

I have spent hours and hours trying to get my sound to work.   What has been and worked for my latest build is something like this.

From a terminal logged in as root.  or you can sudo commands I believe the following solved my problem.

As root I ran gnome-control-center sound
Then I did

xen2:~> ls -l /dev/snd
total 0
drwxrwxrwx  2 root root       80 Mar 21 11:13 by-path
crw-rw-rw-+ 1 root audio 116,  2 Mar 21 11:13 controlC0
crw-rw-rw-+ 1 root audio 116,  7 Mar 21 11:13 controlC1
crw-rw-rw-+ 1 root audio 116,  6 Mar 21 11:13 hwC0D0
crw-rw-rw-+ 1 root audio 116, 10 Mar 21 11:13 hwC1D0
crw-rw-rw-+ 1 root audio 116,  4 Mar 21 17:16 pcmC0D0c
crw-rw-rw-+ 1 root audio 116,  3 Mar 21 17:24 pcmC0D0p
crw-rw-rw-+ 1 root audio 116,  5 Mar 21 11:13 pcmC0D2c
crw-rw-rw-+ 1 root audio 116,  8 Mar 21 17:04 pcmC1D3p
crw-rw-rw-+ 1 root audio 116,  9 Mar 21 16:54 pcmC1D7p
crw-rw-rw-+ 1 root audio 116,  1 Mar 21 11:13 seq
crw-rw-rw-+ 1 root audio 116, 33 Mar 21 11:13 timer

The ls -l was just to see the files and  permissions

The permission for the files above were different when I first looked at /dev/snd.   To get a list of file and dirs

find /dev/snd
/dev/snd
/dev/snd/hwC1D0
/dev/snd/pcmC1D7p
/dev/snd/pcmC1D3p
/dev/snd/controlC1
/dev/snd/by-path
/dev/snd/by-path/pci-0000:01:00.1
/dev/snd/by-path/pci-0000:00:1f.3
/dev/snd/hwC0D0
/dev/snd/pcmC0D2c
/dev/snd/pcmC0D0c
/dev/snd/pcmC0D0p
/dev/snd/controlC0
/dev/snd/seq
/dev/snd/timer

Write the above to a file.
xen2:~> ls -l /dev/snd >> /root/reboot_fixes

Then I edited /root/reboot_fixes with chmod 777 for all directoies and
chmod 666 for all files.

ever time I reboot I have to run /root/reboot_fixes.  but this is the only way I could get sound to work.   I've read dozens of do this and none worked.
This works for me.


There was a mistake in the iptables rules. The destination and source ports were mixed. The working rules are:

iptables.rules:

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
#loop back
-A INPUT  -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A INPUT  -s 127.0.0.0/8 -j DROP
#APT
-A OUTPUT -p tcp --dport 80 --sport 32768:61000 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p udp --dport 53 --sport 32768:61000 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT  -p tcp --sport 80 --dport 32768:61000 -m state --state ESTABLISHED     -j ACCEPT
-A INPUT  -p udp --sport 53 --dport 32768:61000 -m state --state ESTABLISHED     -j ACCEPT
#MAIL
-A INPUT  -p tcp --sport 465 -j ACCEPT
-A OUTPUT -p tcp --dport 465 -j ACCEPT
#below not required in my use case
#-A INPUT  -p tcp --sport 587 -j ACCEPT
#-A OUTPUT -p tcp --dport 587 -j ACCEPT
#-A INPUT  -p tcp --sport 25  -j ACCEPT
#-A OUTPUT -p tcp --dport 25  -j ACCEPT
COMMIT


How to re-encrypt my swap to activate it again?

I am no sure if I understood your question properly, but I MIGHT have an answer to your question.

First of, what you were installing your OS, did you see on the partitionning part on the installer that you can either erase your hard drive or install alongside your current or do the partitionnig manually?

Now, you choose to do the partitionning manually.

Then, I advise you to chose the same partition for "/" (and for "/home" if you do not want to delete your files).

You have to chose/create another partition for your "swap space".

It is the only way I know to get your swap back. Once you did this, tell me!

Thank you.


Dual boot ubuntu with windows 10 Dell 7560

Seems like it's compatible

The fastest and most assured way to check if you're laptop (or desktop) is compatible is to see the certified hardware list published by Ubuntu

Ubuntu Desktop certified hardware

Ubuntu on Dell Inspiron 7560

The version that's officially supported on the page above in 16.04 LTS, but it's no harm to check out 17.04 (latest) via Try ubuntu Before installing session, keep in mind that 17.04 supports kaby-lake processors and your laptop has Kaby-lake processor

But remember that this is an official list maintained and published by canonical and ubuntu, if you're device isn't in the list that doesn't mean that it's completely unsupported


Why are almost all packages marked as manually installed?

Seems my Google powers were weakened: this is a known bug (concentrate on comments from Colin Watson) and it's hanging around for some time with no fix in sight:

Quoting Colin Watson:[...] Leaving all packages as manually installed is unsightly but the consequences of this bug are generally limited to not managing to be clever enough to remove packages that aren't needed any more. A flaw in the reverse direction would be much worse, because it could cause packages to be removed when they are still needed. Given that there does not seem to be a clearly correct fix available, it's better to air [sic] on the side of caution. [...]


Windows 10 + Ubuntu dual boot - Windows can't boot

I think you need to install boot-repair. type these commands in the terminal to install boot-repair:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

now launch the boot-repair by typing "boot-repair" in the terminal, Then click the "Recommended repair" button. When repair is finished, reboot and check if you recovered access to your OSs. i hope it will work. because it worked for me.


Will my current Gnome desktop be preserved when upgrading to 11.04

Switching between Unity and your (preserved) GNOME session will be as simple as logging out, choosing "Ubuntu Classic Desktop" at the login screen, and logging in again.


Windows Ubuntu dual boot - Windows boot problem after updates

Boot into a windows RecoveryCD/Installation Disk, click on Repair, then click on Advance/Other options, select CMD Prompt as the recovery option, then run the following.

bootrec.exe /fixboot
bootrec.exe /fixmbr

Once you have done so, restart your computer and it should boot into windows automatically.

From there you will need to boot into your Ubuntu LiveCD and run boot-repair to repair grub back to it's normal state.


I had the same issue. For me it was the graphics driver (Nouveau) that made the system freeze.

Then I found a solution that worked for me.

Disable Secure boot (BIOS setting)
Boot from USB
In the grub menu, go to the Install Ubuntu option (BUT DONT PRESS ENTER)
Press 'e'
Find the line that starts with 'linux' and after 'quiet splash' add: modprobe.blacklist=nouveau
Install Ubuntu
Once the installation is done, remove the pendrive and reboot system
Installing Nvidia Drivers
Select Ubuntu in the GRUB menu (you may need to repeat the modprobe.blacklist=nouveau step if the screen freezes again).
Run the following commands in a terminal window

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
//You can change this driver to whatever version suits you best
sudo apt install nvidia-driver-418
sudo reboot

Profit!

This solution was found here:
https://gist.github.com/mari-linhares/cef4cb3440408e44963d1447a7db5ae0


Ubuntu 14.04 is CrossRat malware a threat?

Yes it is but the same rule still apply: it is a threat but only if you let it. -You- need to activate the installation. For me that's enough to never have this activated onto my system.

Regarding this malware:

There are 2 places this malware pops up.

file mediamgrs.jar, in /usr/var/
file in ~/.config/autostart likely named mediamgrs.desktop.

the 1st is impossible to be there unless you provide the admin password. /usr/ is owned by "root" so it requires your admin password to store any program.
the 2nd is impossible unless you download it yourself.

  So please don't give me the standard Linux does things different

Sorry but that is STILL true: Linux DOES things different than windows. Keep your admin password safe and you have nothing to fear.

Besides that: removing the 2 files when they are present is enough to delete it from your system.

Regarding comments:

The malware puts in in a new dir var in usr. "Second problem is how can a web page install the critter unknown to the user, if an admin password needs to be put in or "you download it yourself" as you mention?" It can't under linux: the download always goes to the default download from the browser. So... you need to download it. you need to execute the download. you need to provide the admin password when asked. See the problem there for any malware that wants to settle outside your /home? Even inside your /home you need to execute the download.

"wine' is windows. So yes, wine is always an issue but again: do not insert your admin unless you know it should be asked = 99.8% safe (that is never going to be 100%) and any problem related from the other 0.2% can be fixed since you are still the admin or with a backup :) " I don't have any "mediamgrs" files but changing a name only takes a second, so that one is not comforting." well it is not really possible for malware to use random filenames so yes it is safe.

They might use different names but then someone would list those names too. This one uses 2 locations (1 in /usr/var/ one 1 .config as a desktop file. Easy to spot. Easy to delete. Not really a problem for a user comfortable with command line or someone careful with the admin password ;) ) Mind also what malware creators want: they want to make money. Often by harvesting emailaddresses, creditcard info etc. And preferably as quick as possible.... Windows is still a far easier target.

General tips:

do NOT use shared directories. Samba and wine are entry points though malware/virus needs to be created to abuse this kind of method.
do not automate processes that require a password.
Keep your admin password safe
Create (and verify you can restore) backups; if all else fails a backup of your personal data is enough to remove loads of problem.


How to add users to vboxusers to enable USB usage

In your host, run this command:

sudo usermod -a -G vboxusers $USER

Now perform a logout (always required after add current user to a group).

After login, check that you are in the vboxusers group with this command, make sure that vboxusers is in the shown list:

groups $USER


19.10 5ghz speed slow compared to dual boot windows

Tyhe problem is the your MTU is set to 1500. This is fine for wired connectons, but for WiFi/DSL it should be smaller, e.g. 1492. Your DHCP provider should have set this.

sudo ip link set wlp59s0 down
sudo ip link set wlp59s0 mtu 1492
sudo ip link set wlp59s0 up

will change it until the next reboot.


Someone suggested to set my BIOS to do legacy booting, so I put my BIOS in Legacy+UEFI mode. It didn't work, so I thought maybe Ubuntu had to be installed without the extra UEFI boot files, but I never got a chance to. Before I left for the weekend, I booted into Windows to do some work. I randomly decided to run my motherboard's updating program (Windows only - luckily I just bought Windows) which was taking hours, so I just left it running. Came back after the weekend, and it just worked! Specifically, I updated my BIOS from version 1.00 to 1.60.

For whoever is unlucky enough to have the same exact problem: link to BIOS upgrade tool.


How do I call a sed command in a python script?

With subprocess.call, either every argument to the command should be a separate item in the list (and shell should not be set to True):

subprocess.call(["sed", "-i", "-e",  's/hello/helloworld/g', "www.txt"])

Or, the entire command should one string, with shell=True:

subprocess.call(["sed -i -e 's/hello/helloworld/g' www.txt"], shell=True)

The arguments are treated similarly for subprocess.call and Popen, and as the documentation for subprocess.Popen says:

  On Unix with shell=True, the shell defaults to /bin/sh. …
  If args is a sequence, the first item specifies the command string,
  and any additional items will be treated as additional arguments to
  the shell itself. That is to say, Popen does the equivalent of:

Popen(['/bin/sh', '-c', args[0], args[1], ...])


How to install driver for DVB-T2 USB TUNER EVOLVEO SIGMA T2 on UBUNTU 17.10 (or newer ubuntu rls.)?

Your device 0572:c68a is supposed to be covered by the driver dvb-usb-cxusb, however, the exact usb.id isn't included yet in the version included in the latest stable Ubuntu version, 17.10 and, therefore, earlier. Let's build a newer driver.

Please try this with a working internet connection:

sudo apt-get update
sudo apt-get install -y git build-essential
git clone https://bitbucket.org/CrazyCat/media_build.git
cd media_build
./build --git https://github.com/crazycat69/linux_media latest
sudo make install

It builds with a few possibly harmless warnings for me. The new driver reports:

$ modinfo dvb-usb-cxusb | grep C68
alias:          usb:v0572pC68Ad*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0572pC689d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0572pC688d*dc*dsc*dp*ic*isc*ip*in*

As you can see, your device is included. As a part of the install process, the needed firmware is also installed.

Reboot and tell us if there is any improvement. I will have a few more instructions.

EDIT: You have compiled the driver for your current kernel version only. When Update Manager installs a later kernel version, also known as linux-image, after the required reboot, recompile:

cd media_build
make distclean
git pull
./build
sudo make install


Ubuntu support for motherboard that supports other Linux distros

All hardware specific features are in the Linux kernel. If the motherboard claims to be compatible with some Linux distro, then it means that the vanilla Linux kernel (in 99% of cases), or some distro specific patсhes or kernel packages support this hardware.

This means that most likely the motherboard will work with any Linux distro. In rare cases that distro maintainers added some patches to support something, it can be easily enough be done with another distro.

Open source software is good because if someone managed to write a driver for same specific software, it can be "stolen" and used in any other distro. The best case is when the solution is applied to the upstream kernel source, then it almost automatically gets sooner or later to all distributions with kernel upgrades.

A bad case is when some hardware is not supported anywhere.


Ubuntu 13.04 amd/intel hybrid graphics dual screen problems

I had the same issue. After some digging, I came to this solution that works for me:

xrandr --output LVDS1 --auto --right-of VGA1 --output VGA1 --auto --scale 1x1

In my case, I want to my laptop screen (LVDS1) to stand in the right of my external monitor (VGA).

You should replace LVDS1 and VGA1 with your own device ids.

You can find them by typing the command:

xrandr -q


I have Ubuntu 20.04 running on an Xserve2,1 (=MacPro3,1) with native EFI boot. To be fair, I (somewhat?) cheated, I netboot iPXE.efi and have that load vmlinuz and initrd off the network, and nfsroot. But on principle, EFI 1.1 will boot UEFI binaries just fine. Unfortunately, the MacPro<3,1 generation only has a 32bit efi unlike mine, so what you’ll need to do is as follows:
Restore Ubuntu20.04 desktop .iso to a flash drive, unmodified. Do not use rufus or the like! Those alter the partition layout. The unaltered .iso is specifically prepared to allow EFI boot.
Once restored, open the EFI partition (mount partition 1 via gnome disks or /sbin/mount) and go to EFI/BOOT. Download https://packages.ubuntu.com/focal-updates/amd64/grub-efi-ia32-bin/download and extract it. Copy BOOTIA32.efi to EFI/BOOT (where youll also see BOOTX64) and grubia32.efi to EFI/ubuntu
Let me know if it works, I’m only recalling this from memory.
I do not recall if Ubuntu autodetects the 32bit efi boot, and installs grub-ia32, or if you need to install it via apt manually.


my lxde login window has no my login name

You can probably type your name by clicking on that More ... menu entry


Make fn key run brightness script on Macbook pro 11, 5

Since you say you can already adjust this using a script, it looks like you're almost there already. You just need to:

Set up sudo to allow executing that particular script by your user without a password. First, open a terminal and run sudo visudo. That will bring up a window of your default editor. Add this line to the file:

terdon  ALL=NOPASSWD:/path/to/your/script

Obviously, change terdon to your user name and change /path/to/your/script to whatever the path to your script is. It will make your life easier if you can make sure that path has no spaces. Now, save the file and close it.
You can now run the script without needing to enter root's password, so all you need to do is assign the commands to raise and lower brightness to the F1/F2 keys. I don't use LXDE, but I found a forum thread here which suggests you can do it by editing ~/.config/openbox/lxde-rc.xml and adding something like this:

<keybind key="F2">
  <action name="Execute">
    <command>/path/to/your/script increaseBrightness</command>
  </action>
</keybind>
<keybind key="F1">
  <action name="Execute">
    <command>/path/to/your/script decreaseBrightness</command>
  </action>
</keybind>

For both cases, use whatever parameter your script would take to raise/lower the brightness.

Alternatively, you can also do this by installing xbindkeys:

sudo apt-get install xbindkeys

Create the default settings file:

xbindkeys --defaults > `~/.xbindkeysrc`

Get the right keycodes for your keys. It will likely be something like F1. Then, edit ~/.xbindkeysrc and add these:

"/path/to/your/script increaseBrightness"
F2

"/path/to/your/script decreaseBrightness"
F1

Finally, run xbindkeys and your shortcuts should work. Add it to your list of startup programs so it is always run when you log in.


Ubuntu 14.04 uses Upstart as the init system, the plan to switch to systemd is planned for 14.10+. There are parts of "systemd" that have been used in Ubuntu for a long time, but for most intents and purposes when people say "systemd" they mean systemd-as-init.

Here's some background info:

http://summit.ubuntu.com/uds-1403/meeting/22156/core-1403-systemd-transition/
http://summit.ubuntu.com/uos-1406/meeting/22277/ubuntu-server-plans-around-systemd/


Use

 update-java-alternatives

to switch between different implementations without removing or reinstalling and downloading packages.


Unable to Access the Virtual Machine VM via SSH outside of host machine network

Thanks Guys for helping me out actually I figured it out I need to assign a static IP to my KVM VM and create the proper bridge from host to Guest VM once its assigned than I enabled the SSH access on my VM and open the SSH port now I can successfully access my VM from public networks even via SSH as well.


Fully scan and clean broken installations in Ubuntu 12.04

From what you write, I think you did not actually deinstall or break any installed packages.
in case you did indeed, sudo debsums -c will help you to find the changes - see What is the apt equivalent to "rpm -V" (Verify installed packages).

But it sounds like you may have installed programs by building it from source, maybe under your home directory?

If so, there may be an uninstall command provided, like make uninstall.

If you installed something with make install or similar, but there is no make uninstall available, you need to find out which files were installed, and into which directories they were installed.
In simple cases this can be seen from the Makefile. But if that does not help, you can just run make install again - only to see the log output of which files are installed to where.

For future use, take a look at checkinstall - it can track what was installed from source, and cleanly uninstall it.


What are these ~/.local/share/wineprefixes files in Aptik?

Yes, you can remove those files since you're not using Wine anymore and aren't concerned with files created by Wine (Assumed from your question). Those are mostly settings files created by Wine while you were using it.

But, before removing I suggest going to that directory and see if any important files are there (very unlikely though). Move them somewhere else if you find any. Then remove the folder using this command

rm -r ~/.local/share/wineprefixes -v

You should now be able to ignore that folder in backup settings.

Note: You can also ignore that folder by unchecking the tick mark in Aptik backup settings window without removing anything.


Safe to remove folders for uninstalled packages in /usr and var/lib/dpkg?

Synaptic Package Manager (synaptic) has a feature for safely removing residual configuration files. In Synaptic select the Status category in the lower left corner and select Not installed (residual config) in the upper left corner. Click a package to remove the residual configuration files and select Mark for Complete Removal. After you have finished marking the selected package(s) for complete removal, apply the changes by clicking the Apply button, which is the third button from the left in the Synaptic toolbar.

You can install Synaptic alongside Ubuntu Software without either package manager interfering with the other one. To install Synaptic in all currently supported versions of Ubuntu open the terminal and type:
sudo apt install synaptic


You need to indent starting from pdflatex because they are the rules to make the target. Hint from here https://stackoverflow.com/questions/1739434/whats-wrong-with-this-makefile


Cronjob run program only if other programm is already running

You could write a script using the $? variable. This variable contains the exit status of the last program; so if you run systemctl status dnsmasq and it's active, running echo $? will return 0 which means true. If it's not active, $? will return a non-0 answer, which means false.

A simple script to achieve this function would be:

#/!bin/bash
x=1
while [ "$x" != "0" ]
do
 systemctl status (service to monitor)
 if [ "$?" = "0" ]
 then
  systemctl start (service to start)
  break
 else
  sleep 30
  continue
 fi
done

Line 1 = sets a variable to non-zero so a loop can be run from it

Line 2 = starts a loop that runs continuously (x can never = 0)

Line 4 = checks if a service is running, which sets $? to a zero or non-zero
value

Line 5 onward = checks if the exit status of the last command (checking if the service is running) was true or false. if it's true (zero), it starts the next service and breaks out of the loop. If it's false (non-zero) it returns to the start of the loop and runs until the selected service is running.

You could either run this script at startup or turn it into a service of its own.

You would need to run it as root, whichever your choice, since you're starting/stopping system services.


Does anyone have drivers for a TP-Link TL-WN823N USB wireless

The TL-WN823N WLAN USB stick bases on the Realtek chip set RTL8192CU.  You can download the driver from Realtek.


How to fix permission denied when I try to connect via SSH to my ubuntu server?

AWS forces private-key authentication. They don't allow only user/pass auth.

You have do:

ssh -i private-key.pem user@server-ip

Substituting in your information, obviously.

If you don't already have a .pem file, you can download it from the AWS control panel.


i want to convert Ubuntu to Xubuntu but I get this problem

The errors reported are due to you not having the Universe repository enabled in your software sources.

Fortunately we have a great Q&A that covers this in detail - I'm not going to repeat the same info here:

How do I enable the "Universe" repository?

After enabling the universe repository, re-run the update process:

sudo apt-get update
sudo apt-get install xubuntu-desktop


fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

Try this:

fsck /dev/sda6

(where /dev/sda6 is the partition mentioned)

And enter Yes (y) to for each error. Or press a one time for always-yes.

Then reboot and it should be fine.


How do I block Internet for an app using an apparmor custom profile?

You need much more to launch this type of app. When there is something missing in your profile it has no access to it. Sublimetext must have access to things like :

  X server
  system fonts
  Xauthority file
  dconf
  glib
  etc ...

The best and easiest way to create your own profile is to install apparmor-utils

sudo apt-get install apparmor-utils

then create your profile using generate profile tool:

sudo aa-genprof /opt/sublime_text/sublime_text

In this moment it creates sublimetext profile in /etc/apparmor.d/ and is listening for program actions. This profile is in complain mode and it is logging to /var/log/syslog. Now you need to launch your sublimetext and make some actions like opening and saving files, etc.. all this acions will be saved in log file which is used by aa-genproffor creating rules. When you are done with activities hit s key and answer for questions about access or deny to your resources. When done use f key for saving your newly created profile and turning it to enforce mode.

However it is quite easy this tool is not working perfectly. It will not include everything and you must add something manually like access to X
In /etc/apparmor.d/opt.sublime_text.sublime_text:

include <abstractions/X>

If any changes were made you have to reload config file:

sudo apparmor_parser r /etc/apparmor.d/opt.sublime_text.sublime_text


After replacing my motherboard I lost the boot option for Windows 10

sudo update-grub detected the extra drive.


How to recover my old installed ubuntu after installing Windows

Boot-Repair is a simple tool to repair frequent boot issues you may encounter in Ubuntu like when you can't boot Ubuntu after installing Windows or another Linux distribution, or when you can't boot Windows after installing Ubuntu, or when GRUB is not displayed anymore, some upgrade breaks GRUB, etc.
https://help.ubuntu.com/community/Boot-Repair


How to add windows to an ubuntu-application with Quickly?

Try adding in some windows using glade:

Open up a terminal, go to your project directory and type "quickly edit" - That will launch glade (gui designer) and it will automatically load in your project's ui files. In glade you can add windows by going to the Toplevels area on the left side and choosing which type of window you want.

To add widgets to that window, you have to put a container of some type into your window. A container will hold the widget basically. Once you have a container you can add as many widgets as it can hold.

If you would like to add windows in using Python:

I would recommend reading this tutorial.

To make a window with a button, try doing something like this:

from gi.repository import Gtk

class ButtonExample(Gtk.Window):
   def __init__(self):
       Gtk.Window.__init__(self, title="Buttons")
       box = Gtk.Box(spacing=6)
       self.add(box)

       button = Gtk.Button("Test Button") #create a button
       button.connect("clicked", self.on_button_clicked) #connect the handler
       box.pack_start(button, True, True, 0)

   def on_button_clicked(self, button): #what happens when button is clicked
       print "Button was clicked!"

win = ButtonExample()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()


How to install touch pad driver on inspiron 7220 se?

I have Dell 7720 SE too and I used this

Fn+F3 and configuration works perfectly


Computers calculate numbers in base 2 (binary). The closest a computer can get to 1000 is 1024.

Manufacturers quote sizes in base 10, so from the manufacturer's point of view a 500GB drive is 500 * 1000 * 1000 * 1000 = 500000000000 bytes. Nice round figures.

From the computer's perspective, the same figure is 500 * 1024 * 1024 * 1024 = 536870912000 bytes. A quick glance at that result might suggest it's a 536GB capacity drive, but we know that's not the case because it physically can only hold 500GB.

So a 500GB drive will show up on a computer as only having 465.66GB of space.

No-one has lied - the drive really is 500GB in size (a kilo of anything is 1000, not 1024), it's just that the computer cannot represent that exactly in base 2, so we get the next nearest figure.


Cannot reinstall python3 on ubuntu 14.04

OP: Apparently deleting python3 was one of the dumbest mistakes I could have made. I couldn't reinstall it because it seems that a lot of basic functions (including installing packages) depend on python3. It even broke my GUI when I restarted my computer. Luckily I was still able to backup my data and make an almost pain-free re installation of Ubuntu 14.04 (without messing up my other partitions). I guess I got lucky.

Short answer for other unexperienced Linux users like me: Do NOT uninstall python3 or any other pre-installed programs unless you absolutely know what you're doing. Ever. Unless you're willing to waste half of your day backing up your files and re installing your Ubuntu.


Regarding command could not be located because '/bin' is not included in the PATH environment variable

I have never faced this problem before, so I really don't know if this will work or not. Try this: Go to your home directory, there you can find a file named .bashrc (it is a hidden file, so enable 'show hidden files' in your file explorer for convenience).
Open the file with a text editor. Then, at the end of the file, add this:

export PATH=$PATH:/bin

In theory, this will add /bin to your PATH variable.
Then save the file. I hope this works. Good luck.


I had the same problem. Eventually the most obvious thing helped, pressing the 'FN screen key' several times brought my laptop screen back. It suddenly happened after pressing it about ten times, every time with waiting a few seconds in between.


Using a Yubikey with LUKS on Removable Storage

I've done exactly what you are looking to do. The way I did it is outlined below. Is it the correct way? Well... that's up for debate, but it works for me. Hope it helps you. Also, I'm not on Ubuntu, but it should work the same on Ubuntu

First, I setup Yubikey configuration by editing /etc/ykfde.conf
set YKFDE_CHALLENGE to a long random string like 40 characters or so. It doesn't matter what it is, just make sure it's random. This allows me to decrypt my drive without it asking me for a secret password. Also, set YKFDE_CHALLENGE_SLOT to whatever slot on your Yubikey you want to use. (Make sure you've setup your Yubikey for HMAC-SHA1 challenge response on that slot)

Next, I setup my drive to be encrypted with the following commands:
(this assumes that you've already partitioned your drive with fdisk or a similar utility)

# This will ask you for a password. Set a password so that you
# can decrypt the drive without your Yubikey
sudo cryptsetup luksFormat /dev/sda1

# Next, enroll the Yubikey so that it can decrypt it as well
# When required, touch your Yubikey so it can get a challenge-response
# It'll ask for an existing password, just enter the one you set in the last command
sudo ykfde-enroll -d /dev/sda1 -s 1

# Next decrypt the drive and add a file system
# Enter the password you set in the first command
sudo cryptsetup open /dev/sda1 drive
sudo mkfs.ext4 /dev/mapper/drive

After all the setup was done, I created a file called mountDrive.sh in my home directory as follows:

. /etc/ykfde.conf
ykchalresp -2 "$YKFDE_CHALLENGE" | sudo cryptsetup open /dev/sda1 drive
sudo mount /dev/mapper/drive /run/mount/

Now, I simply run sh mountDrive.sh
My Yubikey flashes, I tap it, and then my drive is mounted at /run/mount

Obviously, you'd need to change /dev/sda1 to whatever your drive device is and change /run/mount to wherever you want to mount your drive

Also, the ykchalresp -2 command tells it to use slot 2 on my Yubikey. Change that to whatever slot you have configured in your /etc/ykfde.conf file

One more thing is that I setup /etc/sudoers so that I can use sudo without having to type in my password. Perhaps there is a better way to do it without having to use sudo to decrypt and mount your drive... not sure... anyway, here's how I set that up:

Add %wheel ALL=(ALL) NOPASSWD: ALL to the /etc/sudoers file.
Add your account to the wheel group like:

me=`whoami`; sudo usermod -a -G wheel "$me"


Copying the Ubuntu partition in an external disk and boot from there

Please, Don't APPLY this procedure till someone else review it. I could miss something!

Using Gparted from Ubuntu live CD, It is possible to copy directly (on the fly) the partition without making image.

As new partition '/dev/sdc1 .. HPFS/NTFS/exFAT' was created with wrong partition type, it should be 83 Linux (Ext4 probably). I think that the partition is corrupted. I would suggest. Use gparted: Delete it ,APPLY, Copy partition /dev/sda5, Paste on /dev/sdc drive, APPLY, then continue the procedure.

Boot using Ubuntu live CD, Run Gparted, Unmount all mounted partitions (swap, lvm's, ...)
Now there are two clone partitions with same UUID, system will not be able to distinguish between them.

Select External drive → Right click on new clone partition (the one restored from image) → New UUID.

There is no New UUID in old Gparted: sudo tune2fs -U random /dev/sdxy, replace sdxy with the new partition path (sdc1)
It needs to be bootable

Right click again on new clone partition (the one restored from image) → Manage Flags → Check: Boot flag.
Right click → Mount new clone partition
Right click → Information → Copy: UUID and remember PATH (/dev/sdxy)

Close Gparted
Replace the old UUID with new copied UUID for / root partition in /etc/fstab

sudo cp /media/cloned_part/etc/fstab /media/cloned_part/etc/fstab_backup
sudo gedit /media/cloned_part/etc/fstab

note: replace cloned_part with path to where the new cloned partition has been mounted.
Reinstall grub to update its menu list

sudo grub-install --root-directory=/media/cloned_part /dev/sdx

note: replace sdx with the recorded from gparted (but without last number), the target is the hard drive not the partition.
Reboot, Select to boot from USB HDD.


How to access the NTFS partition where I've installed BOOT-LOADER of ubuntu 9.04?

It looks like something wicked happened to that NTFS partition. My move would be to pay for Stellar Phoenix or equivalent data rescue/forensic tool. In that case, you will need that ~560gb of free space from some other drive, since those tools are for copying data - not repairing broken filesystems.


Found a way to disable the crapware called "intel_powerclamp":

sudo su
cd /etc/modprobe.d
cat >intel_powerclamp.conf
# avoid shitty powerclamp
install intel_powerclamp /bin/true
^D

and then, after a reboot, no kidle_inject processes force you to save power.


Dual-booting Windows 8 and Ubuntu with UEFI on two separate drives?

Well, I'd recommend installing Ubuntu MATE (the supported remake of GNOME for modern versions of Ubuntu), but aside from that you should be fine. GRUB should recognize Windows automatically. Just make sure, if you can, to boot into the Ubuntu installer in EFI mode. You'll also want to set the SSD that Ubuntu is on to be before the Windows drive.


You need to run 64bit Ubuntu to address more than 4GB of ram.


I think you want to boot from another live iso (Ubuntu cd/dvd/usb), then mount your installed partition and change the file(s) back to what they were. (if that's really the problem)


how to color each new command in terminal?

To color each new command in terminal, you've to edit ~/.bashrc file.
To do this,

gedit ~/.bashrc

Uncomment the line

# force_color_prompt=yes

to

force_color_prompt=yes

Then, You can restart the terminal or do

. ~/.bashrc


Why some packages from universe are supported and others not?

Running apt-cache show on some of these packages reveals some interesting info:

$ apt-cache show vlc | tail
 installing additional plugins (vlc-plugin-fluidsynth, vlc-plugin-jack,
 vlc-plugin-notify, vlc-plugin-samba, vlc-plugin-sdl, vlc-plugin-svg,
 vlc-plugin-zvbi).
Description-md5: c3a7a10e39c9ddd30da6653ec2238442
Homepage: http://www.videolan.org/vlc/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 3y
Task: mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, ubuntu-mate-desktop, ubuntu-mate-cloudtop

Note: Supported: 3y.

Googling leads to the Ubuntu Wiki Security Team FAQ:

  How do seeds impact official support?

  Seeds determine in which component a package resides. All binary packages in the main and restricted components receive support for
  the life of an Ubuntu release.
  The Supported field in the Packages file for the main and restricted components is no longer updated and should be ignored.
  (Note: Launchpad still generates the Supported field in the
  Packages file for the main and restricted components as part of
  its publishing process and this was used to state the support length
  for each binary for releases with different support cycles (eg, Ubuntu
  10.04 LTS). Today, all releases have unified support lengths and as mentioned, the Supported field should be ignored).

Which leads us to Seed Management:

  Supported

  The supported system provides functionality not included by the base
  or desktop systems but which meets the following criteria:

  it is very widely used, people are committed to it.
  it is not architecturally insecure, it is thus easy for us to provide security fixes and updates.

  This list would include popular servers other than the ones we include
  in a Base or Desktop install; additional desktop software; and a build
  environment. It is never expected that someone would install the
  entire Supported list of packages, they would choose specific packages
  that provide specific needed functionality.

  This list is all the extra packages we think need to be supported in
  our distro. We will accept contributions of additional packages into
  this list, if they:

  have an external maintainer who agrees to maintain them to our standard, in Bzr, using Soyuz
  pass a one-time security review from MartinPitt and agree to be responsive to him on SecurityPage issues

Presumably the people maintaining VLC etc. have shown this added commitment and the maintainers of Clementine, etc. haven't.


Installing a Wacom Bamboo One Pen (CTE-460)

Your tablet isn't supported in 11.04. Both the kernel wacom module and the x11 input driver are missing references to the model of wacom you've shown. If the kernel module ws working for this device you'd see somrthing like this:

[420349.922] (II) config/udev: Adding input device Wacom Intuos3 4x6 (/dev/input/mouse2)
[420349.922] (II) No input driver/identifier specified (ignoring)
[420349.923] (II) config/udev: Adding input device Wacom Intuos3 4x6 (/dev/input/event9)
[420349.923] (**) Wacom Intuos3 4x6: Applying InputClass "evdev tablet catchall"
[420349.923] (**) Wacom Intuos3 4x6: Applying InputClass "Wacom class"
[420349.923] (**) Wacom Intuos3 4x6: always reports core events
[420349.923] (**) Option "Device" "/dev/input/event9"

In your /var/log/Xorg.0.log file as you plug and unplug the device. Please do add anything from this log into your question just to make sure.

To get your device working, you will either have to upgrade to 11.10 or create (or ask for one to be made) a wacom-dkms package and updated companion xf86-input-wacom package which I created for 10.10 and 10.04 for wacom tablets that started working in 11.04. (if all that makes sense)


I solved the problem finally.

There was no amdcccle or fglrxinfo or aticonfig even after installing fglrx

The reason for it was that the essential executable files were not there in the correct folders. So I did it by making some soft links as shown below:

ln -s /usr/lib/fglrx/bin/aticonfig /usr/bin/aticonfig
ln -s /usr/lib/fglrx/etc/ati/ /etc/ati

Even after that aticonfig --initial gave me error

  ERROR: No supported adapters detected

The following command solved the problem

/usr/lib/fglrx/switchlibGL amd

and then reboot


I did further reading of forums and found the solution. It's wi-fi related, and quickly switching airplane mode on and then off right after start up does the job.


Can 18.04 be installed ov r 17.01 when the pc has Windows 10 also?

Yes. You can surely install Ubuntu 18.04 in the hard disk along with Windows 10 without affecting files.
First of all boot, the Ubuntu 18.04 iso which is suitable for your system from a USB drive and choose a different partition in the disk other than the Windows 10 system partition.

Other option is updating the 17.04 or 17.10 to 18.0 directly. You can update the Ubuntu 17.04 or 17.10 from Ubuntu Softwares and Updates.


The simple and fragile solution
Let us write a simple script called hailmary.sh
#!/bin/bash
#The first line should always be just as it is above
#This script is called hailmary.sh
#because we run this script and we need to pray
#that all four commands will run correctly
#If one of them fail, you may not get the results

tophat -p 8 -G genes.gtf -o C1_R1_thout genome C1_R1_1.fq C1_R1_2.fq
cufflinks -p 8 -o C1_R1_clout C1_R1_thout/accepted_hits.bam
cuffmerge -g genes.gtf -s genome.fa -p 8 assemblies.txt
cuffdiff -o diff_out -b genome.fa -p 8 –L C1,C2 -u merged_asm/merged.gtf ./C1_R1_thout/accepted_hits.bam,./C1_R2_thout/accepted_hits.bam,./C1_R3_thout/accepted_hits.bam ./C2_R1_thout/accepted_hits.bam,./C2_R3_thout/accepted_hits.bam,./C2_R2_thout/accepted_hits.bam

Copy and paste all the above lines including the lines starting with
"#" in gedit, and save as hailmary.sh.

In Nautilus, right click on the file you just created and select
Properties. Go to Permissions tab and put a check mark next to
Allow executing file as program.
Alternately, in a terminal enter:
chmod +x hailmary.sh

To run the script in a terminal, enter:
./hailmary.sh

The ./ before the name is necessary, and assumes the file is in the current directory location. If you put the file in a folder that is in the path, such as /home/<userid>/bin, then you won't need the ./. If you put it somewhere else you will need to write the whole path, such as:
/home/<userid>/myspecialfolder/hailmary.sh

Note, the four commands and their arguments are in four separate lines. If you want to put them in a single line, you have to separate them by && or by ;. There is no need for ; if they are in separate lines.
In any of these cases, the second command will not start until the first completes (or crashes!).
The problem with this approach is, it does not check if the first command ran successfully before running the second one and so on and so forth. So if tophat fails for some reason, the script will continue with the sequence of cufflink, cuffmerge, and cuffdiff. That is why I call this scrip hailmary.sh.
Source: https://unix.stackexchange.com/questions/184502/bash-how-to-run-a-command-after-the-previous-finished
Script with check for output of tophat
#!/bin/bash
#The first line should always be just as it is above
#This script is called hailmary2.sh
#This script runs tophat
#then checks for the existance of the output file
#If the output is found, it runs the rest

tophat -p 8 -G genes.gtf -o C1_R1_thout genome C1_R1_1.fq C1_R1_2.fq

if [[ -f "./C1_R1_thout/accepted_hits.bam" ]]; then
    echo "tophat finished. Proceeding with the rest"
    cufflinks -p 8 -o C1_R1_clout C1_R1_thout/accepted_hits.bam
    cuffmerge -g genes.gtf -s genome.fa -p 8 assemblies.txt
    cuffdiff -o diff_out -b genome.fa -p 8 –L C1,C2 -u merged_asm/merged.gtf ./C1_R1_thout/accepted_hits.bam,./C1_R2_thout/accepted_hits.bam,./#C1_R3_thout/accepted_hits.bam ./C2_R1_thout/accepted_hits.bam,./C2_R3_thout/accepted_hits.bam,./C2_R2_thout/accepted_hits.bamfi
else echo "tophat did not complete"
fi

Hope this helps until someone else provides a more elegant answer.


I'm doing this while I'm writing an answer, so I'm sorry if it's a bit messy in the end. I'm just assuming that the procedure will be the same for you.

-- I'll get stuck myself a bit further on, so this isn't a full solution. It may help you to install intltool however, wich is a depency needed for gedit 3. Sorry and good luck.

Download the gedit 3 package: http://ftp.acc.umu.se/pub/GNOME/sources/gedit/3.0/gedit-3.0.4.tar.bz2
Extract it and open a terminal in the folder where you extracted the archive.
Type ./configure.
This should be the output:

robin@Robin-Latitude-D620 ~/Bureaublad/gedit-3.0.4 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... no
checking whether gcc accepts -g... no
checking dependency style of gcc... gcc3
checking for python... /usr/bin/python
checking for python version... 2.6
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.6/dist-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.6/dist-packages
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gtkdoc-check... no
checking for gtkdoc-rebase... no
checking for gtkdoc-mkpdf... no
checking whether to build gtk-doc documentation... no
checking for sigaction... yes
checking for floor in -lm... yes
checking for Win32 platform... no
checking for native Win32... no
checking for Mac OS X platform... no
checking for native Mac OS X... no
checking whether NLS is requested... yes
checking for intltool >= 0.40.0... ./configure: line 13093: intltool-update: command not found
 found
configure: error: Your intltool is too old.  You need intltool 0.40.0 or later.
We'll have to install intltool 0.40.0 or later first. Download link: http://launchpad.net/intltool/trunk/0.41.1/+download/intltool-0.41.1.tar.gz
Extract it somewhere and open a terminal inside the folder.
Run ./configure here as well. Output:

robin@Robin-Latitude-D620 ~/Bureaublad/intltool-0.41.1 $ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.10.1
checking for XML::Parser... ok
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating intltoolize
config.status: creating tests/Makefile
config.status: creating tests/cases/Makefile
config.status: creating tests/results/Makefile
config.status: creating tests/selftest.pl
Run the make command. Output:

robin@Robin-Latitude-D620 ~/Bureaublad/intltool-0.41.1 $ make
Making all in tests
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt binnengegaan
Making all in cases
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt binnengegaan
make[2]: Er hoeft niets gedaan te worden voor 'all'.
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt verlaten
Making all in results
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt binnengegaan
make[2]: Er hoeft niets gedaan te worden voor 'all'.
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt verlaten
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt binnengegaan
make[2]: Er hoeft niets gedaan te worden voor 'all-am'.
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt verlaten
Making all in doc
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt binnengegaan
make[1]: Er hoeft niets gedaan te worden voor 'all'.
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt binnengegaan
sed -e 's|[@]PACKAGE@|intltool|g' -e 's|[@]VERSION@|0.41.1|g' -e "s|[@]INTLTOOL_PERL@|/usr/bin/perl|g" -e "s|[@]INTLTOOL_LIBDIR@|/usr/local/lib|g" < intltool-extract.in > intltool-extract
chmod +x intltool-extract
sed -e 's|[@]PACKAGE@|intltool|g' -e 's|[@]VERSION@|0.41.1|g' -e "s|[@]INTLTOOL_PERL@|/usr/bin/perl|g" -e "s|[@]INTLTOOL_LIBDIR@|/usr/local/lib|g" < intltool-merge.in > intltool-merge
chmod +x intltool-merge
sed -e 's|[@]PACKAGE@|intltool|g' -e 's|[@]VERSION@|0.41.1|g' -e "s|[@]INTLTOOL_PERL@|/usr/bin/perl|g" -e "s|[@]INTLTOOL_LIBDIR@|/usr/local/lib|g" < intltool-update.in > intltool-update
chmod +x intltool-update
sed -e 's|[@]PACKAGE@|intltool|g' -e 's|[@]VERSION@|0.41.1|g' -e "s|[@]INTLTOOL_PERL@|/usr/bin/perl|g" -e "s|[@]INTLTOOL_LIBDIR@|/usr/local/lib|g" < intltool-prepare.in > intltool-prepare
chmod +x intltool-prepare
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt verlaten
Now, to make things a bit easier, install checkinstall and run sudo checkinstall. Just press enter on every question it asks and it should install intltool succesfully.
Output:

robin@Robin-Latitude-D620 ~/Bureaublad/intltool-0.41.1 $ sudo checkinstall

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs?  [y]:

Preparing package documentation...OK

Please write a description for the package.
End your description with an empty line or EOF.

 Debian package creation selected *

This package will be built according to these values:

0 -  Maintainer: [ root@Robin-Latitude-D620 ]
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ intltool ]
3 -  Version: [ 0.41.1 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ intltool-0.41.1 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ intltool ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results ===========================
Making install in tests
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt binnengegaan
Making install in cases
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt binnengegaan
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt binnengegaan
make[3]: Er hoeft niets gedaan te worden voor 'install-exec-am'.
make[3]: Er hoeft niets gedaan te worden voor 'install-data-am'.
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt verlaten
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/cases' wordt verlaten
Making install in results
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt binnengegaan
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt binnengegaan
make[3]: Er hoeft niets gedaan te worden voor 'install-exec-am'.
make[3]: Er hoeft niets gedaan te worden voor 'install-data-am'.
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt verlaten
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests/results' wordt verlaten
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt binnengegaan
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt binnengegaan
make[3]: Er hoeft niets gedaan te worden voor 'install-exec-am'.
make[3]: Er hoeft niets gedaan te worden voor 'install-data-am'.
make[3]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt verlaten
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/tests' wordt verlaten
Making install in doc
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt binnengegaan
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt binnengegaan
make[2]: Er hoeft niets gedaan te worden voor 'install-exec-am'.
test -z "/usr/local/share/man/man8" || /bin/mkdir -p "/usr/local/share/man/man8"
 /usr/bin/install -c -m 644 intltoolize.8 intltool-extract.8 intltool-merge.8 intltool-prepare.8 intltool-update.8 '/usr/local/share/man/man8'
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1/doc' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt binnengegaan
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt binnengegaan
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
 /usr/bin/install -c intltool-extract intltool-merge intltool-update intltoolize intltool-prepare '/usr/local/bin'
test -z "/usr/local/share/aclocal" || /bin/mkdir -p "/usr/local/share/aclocal"
 /usr/bin/install -c -m 644 intltool.m4 '/usr/local/share/aclocal'
test -z "/usr/local/share/intltool" || /bin/mkdir -p "/usr/local/share/intltool"
 /usr/bin/install -c -m 644 Makefile.in.in '/usr/local/share/intltool'
make[2]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt verlaten
make[1]: Map '/home/robin/Bureaublad/intltool-0.41.1' wordt verlaten

======================== Installation successful ==========================

Copying documentation directory...
./
./COPYING
./AUTHORS
./doc/
./doc/Makefile.am
./doc/intltoolize.8
./doc/Makefile.in
./doc/intltool-update.8
./doc/I18N-HOWTO
./doc/intltool-prepare.8
./doc/intltool-merge.8
./doc/intltool-extract.8
./doc/Makefile
./README
./TODO

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting temp dir...OK

Done. The new package has been installed and saved to

/home/robin/Bureaublad/intltool-0.41.1/intltool_0.41.1-1_i386.deb

You can remove it from your system anytime using:

  dpkg -r intltool

9. Back to the gedit terminal window. Run ./configure again.

I'll just stop here, as it seems that I've gotten stuck a bit further on, and I don't want to risk my system's stability just to be able to use gedit 3. Sorry I couldn't be of more assistance. I'll leave this post as it is as it at least may help you with the intltool depecy problem.


How do I permanently boot up from previous version

There are several solutions around your issue, here is some of them which I would do:

First of all as you saw yourself, the old kernel still lives in your system. you can set that entry in grub as your default entry;

sudo nano /etc/default/grub

the GRUB_DEFAULT's value should be changed to something like "2>3", 2: sub-menu number (Advanced Ubuntu options), 3: Old kernel entry number in sub-menu.

then run:

sudo update-grub

The alternative to this solution is that, instead of "x>y" use saved there and then after saving the file, run:

sudo update-grub
sudo grub-set-default

First time that you select the old kernel, it will be saved; And next time it's the default selection (Not sure if it works for sub menus).

You can also remove the running version and run update-grub again or even create a custom menu and disable others.

At the end you can use apt-mark to hold your desired kernel version.


the system network services are not compatible with this version

Easiest way to change mac address on nic is:

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether  xx:xx:xx:xx:xx:xx
sudo ifconfig eth0 up

Where xx:xx:xx:xx:xx:xx represent mac address. No need to restart pc.
If you wish to setup mac address when pc start put this comand in rc.local

sudo nano /etc/rc.local

 ifconfig eth0 down &&
 ifconfig eth0 hw ether  xx:xx:xx:xx:xx:xx &&
 ifconfig eth0 up &&

then press ctrl+O for write and ctrl+X for close.
Restart pc and will be work.


Ubuntu 13.10 won't boot and hangs on a black screen

You don't really give enough information to diagnose fully, but your symptoms sound like this issue, which can be solved by switching from UEFI to legacy BIOS mode:

Black screen after upgrading from 13.04 to 13.10
https://bbs.archlinux.org/viewtopic.php?id=167463


Why does Ubuntu still use Python2 and what are the plans for eliminating it?

You can look at Python2 demotion (moving from main to universe) in progress for recent information. A couple of quotes from there:

  Python upstream announced the EOL of Python2 for 2020

  https://pythonclock.org/

  Getting Python2 demoted has been an ongoing task for several Ubuntu releases,
  now finally having a desktop CD image in Ubuntu 17.10 which ships without a
  Python2 interpreter.  The next step is to get Python2 demoted to universe,
  before finally in the far future it can be removed entirely from the archive.

and

  ... you can find about 50 remaining issues at

  https://bugs.launchpad.net/ubuntu/+bugs?field.tag=py2-demotion

  There are now about 35 left, so please consider working on these, or commenting
  on solutions for some issue.

  It is unlikely that the demotion of Python2 will be possible for the 18.04 LTS
  release, but please work on the issues so that we are ready for the demotion
  once OpenStack is using Python3.


Can anyone decipher this kernel segfault report?

The program is hitting a segmentation fault in libgtk-3.so which is possibly caused due to accessing a memory segment which the program does not have correct permissions or access to. Check if all the dependencies are updated and correct. Sometimes using a wrong version of the library could cause similar issues.

Next check the output of ulimit -c, if this is set to 0 then you won't get a core dump instead you will have to set ulimit -c unlimited in your ~/.profile.

Once you get the core file you could possibly submit the application crash report and the core file.


HDMI monitor not working simultaneously with laptop monitor

I ran into this issue in the past but in a different direction. when you get
Failed to get size of gamma for output default Screen

The issue is that you don't have the correct drivers, this especially happens on older integrated graphics and newer amd ones. This should go away with the correct drivers.


I found myself in a similar predicament recently, and the solution I found was to load GParted from a usb drive:

http://gparted.org/liveusb.php

You can also use a cd to do so. Remember to go into the BIOS of your pc and set it to boot from the desired usb/optical drive first.

In the screenshot you anexed the drive can't be partitioned because it is in use. By loading GParted before the OS you will be able to resize it at will.

I hope that helps, good luck.


Publish own DNS Server and website with own domain name

If you want to make your web server accessible from the public internet, then you must publish its public IP address. Your zone file shows that your DNS resolves all names in the example.com.ar domain to private IP addresses. No public computer can reach those, as the 192.168/16 network is not routeable across the internet.

Your DNS records should resolve to either of the two gateway public IP addresses. Then, the gateways should NAT the traffic to the internal machines.

Tip: Unless you do it for fun and learning - which are perfectly legitimate reasons - there is no need at all to run your own DNS servers.


Go to startup applications -

Click on the Add button -

and fill out the fields in the following manner -

Name: Viber
Command: /opt/viber/Viber
Comment: Connect. Freely.

Alternatively, you can create a symbolic link between the .desktop file created by the method suggested by αғsнιη and /etc/xdg/autostart/ -
sudo ln -s /path/to/Viber.desktop /etc/xdg/autostart/


How to access Ubuntu server 12.10 via hostname,

For remote machines to be able to access your Ubuntu machine by name, those remote machines have to be able to look up the name in question in DNS. The DNS nameserver is generally not the Ubuntu machine but some other machine, e.g., your home modem-router-DHCP-DNS-server. Investigate how the latter is configured.


I found the issue! It was actually the microcode I mentioned somehow disabling proper speaker control. Uninstalling the driver makes it work fine.


What to do with java tar.gz after installation?

Certainly the standard instructions for installing the Oracle Java:

Linux 64-bit installation instructions for Java

specify in Point 4 of the Install section:

  Delete the .tar.gz file if you want to save disk space.

Another option, if disk space is not such an issue, is to archive the installation file in case reinstallation is required at a future stage...


How to open GUI folder manager in Awesome WM?

Please reflect on why you need a graphical file manager in the first place.
If you still desire graphics install a file manager such as Nautilus or Thunar and run it as any other application on your system. With Awesome you can run executables from PATH with mod+r, look at the official documentation.


It sounds like you have this combination of problems:

Your GPU overheats your computer very quickly.
You have those heat-sensitive touch controls for volume HP enjoys so much to use.

If the heat produced by the GPU is enough to activate volume controls, they will receive quasi random commands and your volume will annoyingly jitter up and down.

IF this is the case, the solution is improving heat dissipation for your laptop.


Send transactional emails from ubuntu server 12.04 LTS in intranet

I would install sendmail, if you need just the basic functionality.

But if you don't need MTA, why would install one? Production server bloating with vulnerable software is really hitting your own leg at the end.

But if you like, just install sendmail and voilá, your mail is delivered with php mail function. You don't need to create user for it, just use address you want.


Conda package installs in wrong environment

You can use the -n or --name flag of conda install to install into a particular environment.  For example,

$ conda install --name myenv pytorch torchvision -c pytorch


You don't need to install it to use it. If you are looking for ways to find it easily,

add it to the Unity side bar
Right click between the Ubuntu icon and the Applications menu at the top panel, select Edit Menus. Add LiteCoin as one of the entries.

Please see the sample below


Terminal - how to display 'shades' unicode characters properly?

The U+2500 .. U+25AF characters are drawn manually by VTE, not taken from the font. And, indeed, the three particular characters you've mentioned are drawn as single solid colors.

This is the same as the imaginary result of printing the pattern with the dots being infinitely small (and having an infinite amount of them to achieve the desired density), and applying antialiasing.

I guess the reason for this approach was that printing multiple of these characters next to each other with your preferred look doesn't look nice on the boundary of such cells at many font sizes.


How can I change the hotkey to Firefox's Search Engine field (next to the address bar)

Since Firefox isn't a GTK application, it won't work with the Editable Menu Accelerators option. Also, the Firefox help page on keyboard shortcuts says, "Firefox does not provide any method of customizing keyboard shortcuts." (It also shows you can use either Ctrl+K or Ctrl+J on Linux versions, but not Ctrl+E.)

However, there is a way to do it! There is an extension for Firefox (and other XULRunner applications) called Keyconfig (install). According to the MozillaZine post on the subject:

  keyconfig adds the ability to create new or modify existing shortcuts defined by a  element, but only changing those which itself call a function (those with a command or oncommand attribute) has an effect (all others fulfill only cosmetic purposes it seems and are grayed out).

  The configuration screen can be accessed via Tools > Keyconfig (in most Applications) or Ctrl+Shift+F12 (Command+Shift+F12 on MacOS) from the main window.

  [...]

  Don't think that changing a  will always remove the original shortcuts. For Example: You can change the shortcut for Copy in the Bookmarks Manager but the original shortcut will still work (in addition to the new shortcut).


Dell XPS13 9360 stuck at login after update to Ubuntu 17.04 because keyboard and mouse don't work

Get to the GRUB menu, and hit the e key (to edit). Using the arrow keys, find the line that contains "quiet splash" and change it to "quiet splash nomodeset". Then hit F10. See if that allows your system to fully boot and allow you to login. You may be in low-graphics mode. If it does allow you to log in, then your video card drivers probably need to be reinstalled.


Stop init process using /var partition so I can umount it?

all commands can only be done through the local terminal
the system into single-user mode. init 1
all you can see which processes are blocking files into the mount point can be so lsof -f | grep "/var/"
stop service service dbus stop
Well, in fact the very purpose unmount the /var/. umount /var/
init 1
service dbus stop
umount /var/


My wi-fi auto connect after very long time (about 5 minutes)

This could be a workaround.

Create a Upstart file in the folder "/etc/init/startup-network-reset.conf".

The content should be:

description "Network restart at system startup"

start on (started network-interface
          or started network-manager
          or started networking)
stop on runlevel [!2345]

script
  sudo -u root service network-manager restart
end script

Perhaps an delay before restarting with sleep should be added.

For further details to the Upstart functions look at this page: http://upstart.ubuntu.com/cookbook/


Boot.mount fails after upgrading to 18.04

After a lot of searching around I turned on the very handy debug logging in /etc/udev/udev.conf, and updated my initramfs.
$ cat /etc/udev/udev.conf
# see udev.conf(5) for details
#
# udevd is started in the initramfs, so when this file is modified the
# initramfs should be rebuilt.

#udev_log="info"
#event_timeout=300
udev_log="debug"

This helped me identify the problem. There were thousands of 'curls' happening early in the boot, and those were from a udev rule that was acting on adding and removing of 'sd*' devices. I commented out those rule actions and now the system boots!  The logs are viewable with journalctl -b.