How to find the path of an mounted iso file?

Run the below command on terminal to view the original iso file path which is mounted inside /media/iso directory,

mount | awk '/\/media\/iso/ { print $1}'

To see the whole line(iso path location and the mount point),

mount | awk '/\/media\/iso/ { print $0}'

OR

mount | grep /media/iso

In the above /media/iso is the mountpoint where the iso file is actually mounted./\/media\/iso/ in the awk command is a regular expression to grab a line which contains the name /media/iso.You have to escape the forward slahes(like /\/media\/iso/) while you give it on an awk search regex.

$ mount | grep /media/iso
/usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)
$ mount | awk '/\/media\/iso/ { print $1}'
/usr/share/virtualbox/VBoxGuestAdditions.iso
$ mount | awk '/\/media\/iso/ { print $0}'
/usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)

You can also search by the file type as,

$ mount | awk '/iso9660/ { print $1}'
/usr/share/virtualbox/VBoxGuestAdditions.iso
$ mount | awk '/iso9660/'
/usr/share/virtualbox/VBoxGuestAdditions.iso on /media/iso type iso9660 (ro)


The easiest case is when they are all in the same network segment.

And that is the case when they are all connected to the same router to the internet.
Hubs or switches somewhere in between are no problem.

The usual default setup is just right for the case - the router should run DHCP to tell all connected computers which common network address, and which IP addresses to use.

Using the router configuration, you can assign names to the computers, which will be associated with the MAC hardware address of the network interfaces.

The router will assign IP addresses to the computers, but in case the IP addresses get changed later, the router can just map the name to the new IP address.

That should be all you need!

Your internet provider will normally change your IP address seen from the internet from time to time, because it makes thir life easier.

To easily reach your router from outside interenet anyway, use a dynamic DNS service, that will keep track of your IP address and let the iinternet know if someone asks.
(They are usually free of charge or very cheap.)

From the internet, you do not see the individual computers. There is just the router. But the router can be configured to forward connections to a certain port to a certain computer, which is called network address translation, NAT. So you can share the connections from outside too.

For example, if Alice and Bob want to run a web server, the can run it on their port 80 both on their computers, and the router gets configured to foreard connections to port 80 to alicesbox:80, and connections to port 8080 to bobsbox:80.


Block Ping Replies from Only One IP or Interface

Let's start

Delete curent rules and chains

sudo iptables --flush
sudo iptables --delete-chain

allow loopback

sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT

drop ICMP

sudo iptables -A INPUT -p icmp -d <your_ip_address> -j DROP

or/and

sudo iptables -A INPUT -i eth1 -p icmp -j DROP

or

sudo iptables -A OUTPUT -p icmp -j DROP

allow PING for rest

sudo iptables -A INPUT -p icmp --icmp-type any -j ACCEPT

allow established connections

sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

allow SSH

sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

allow HTTP

sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

allow OpenVPN

sudo iptables -A INPUT -m state --state NEW -m udp -p udp --dport 1194 -j ACCEPT

default policies

sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT

Save

sudo iptables-save

This is it. I think :)


How to get Alt+Tab on active monitor (Ubuntu 18.04 LTS)

Assuming you are using Gnome-shell, you should have a look at the extension called "Multi monitor Add-on"
Here is a screenshot of the feature you may be looking for:


Cannot get rid of "The system is running in low graphic mode"

Try following the instructions at this link "https://forums.virtualbox.org/viewtopic.php?t=56159", courtesy of user claytoncarney.

At the appearance of the ...low-graphic mode... message:

Ctrl + Alt + F1 to switch to a command line (tty mode)
Login with password
cd /etc/X11
sudo cp xorg.conf.failsafe xorg.conf
sudo service lightdm restart

I found this worked for Ubuntu 16.04 running inside VBox-6.0 on Windows 7.


Could not see my Ubuntu after upgrading my windows 10

Unfortunately the Windows update killed your Ubuntu partition. This has been happening with the major Windows updates, and when users have MBR formatted hard disks. Microsoft has known about this problem for years, and has chosen not to fix it. Thanks Microsoft!

Recovery can be complicated, and fraught with possible error... but it is possible to get Ubuntu back.

You'll need to boot to a Ubuntu Live DVD and install testdisk. Read these instructions on the procedure. You'll need to have some technical knowledge of disk partitioning to resolve the problem.

Search here on AU for "testdisk" and read other users experiences with this tool.


Is there any software for bypassing the firewall?

First, your best bet is to approach the school administration and explain your position. Your desire to view videos on YouTube relevant to your studies is a good thing. Downloading Ubuntu ISOs might be made simpler if a copy is cached locally, only the university admins could do something like that. You don't know if you don't ask.

A 'quick and dirty' solution is to set up SSH tunneling to a proxy server, there are paid and free options. This isn't really an Ubuntu question though. Maybe you could re-post another question about setting up SSH tunnels in Ubuntu? That would be welcome here. From there, you are on your own selecting a proxy, there are too many to cover here. Your question may get closed as off-topic but don't get discouraged by that. This is a community site and everything is shaped by various members of the community. Just stay on-topic to Ubuntu and read the FAQs on questions.

Don't ever be afraid to ask questions here and at school.


nginx on Ubuntu Server in VirtualBox on Windows 7, how to access localhost:8080

Check the nginx.conf file and look for the listen address.
It might be set to only listen on 127.0.0.1, check the documentation for available options, but usually changing the listen address (or adding) 0.0.0.0 will make it listen on all interfaces and you'll be able to access the webserver on your guest's ip address at the appropriate port.
Don't forget to restart nginx after editing its .conf file to activate changes.

Alternatively you could create a port forwarding over SSH using PuTTY, and you could access your guest's webserver via localhost on your host, but it's the more complicated option here I think.


Ubuntu on Windows 10 has 100% CPU usage with "init" processes

I had the same issue. Reinstalled windows subsystem for linux and that solved the problem.


How to migrate a bootable ubuntu installation from one partition to other

You can indeed use dd, and directly, if your current installation is on partition /dev/sda1 and you wanted to move it to /dev/sdb2 the command would be:

dd if=/dev/sda1 of=/dev/sdb2

Just be very careful when you issue the command, it's very powerful, and if you get the input file (if) and output file (of) wrong, you'll end up overwriting your useful partition with the blank one!

Alternatively you can make an image of the partition with:

dd if=/dev/sda1 of =/home/user/disk1.img

then restore it with

dd if=/home/user/disk1.img of=/dev/sdb2

The path and name of the image file are just examples, you can put it where you like, and call it what you like, so long as you use the .img file extension.

EDIT:

There's a useful link here, which will take you through generating a new UUID updating the MBR, grub, mtab and fstab, it should leave you with a working system. As it seems like you've already set up and cloned the partition, you probably only have to do some of the steps.


How to switch back to default booting process?

It sounds like your grub is setup to always boot to a specific menu option. Taking this answer:

Edit grub from Windows?

You can always have grub remember the previous boot option each boot. Use sudo -H gedit /etc/default/grub, comment the line below and insert two lines below it:

#GRUB_DEFAULT=0 # Rather than first menu option, we'll default to last  OS.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Save the changes and run sudo update-grub.

The first time you boot Recovery will be the default option and you will need to press Escape again but now whatever option you select will be the default for the next boot.


How to prevent Tor from starting automatically on Ubuntu server?

This is quite confusing. But generally you can edit /etc/default/tor and change RUN_DAEMON="yes" to RUN_DAEMON="no". Now Vidalia should start its own tor and tor should not start at startup.


system tray icon disappears while installing google chrome

To return icons I have just killed 'indicator-application-service' and icons network, bluetooth and skype appear again. I use xfce on amd64.

killall indicator-application-service

You may also try to install sni-qt package:

sudo apt-get install sni-qt:i386


Weird sda3 partition - did Ubuntu intentionally reserve space on SSD drive?

Well I checked /etc/fstab:

# swap was on /dev/sda3
#UUID=b04d45f1-b892-4700-8f68-f1ad1ca21fbf none  swap sw 0 0
#/dev/mapper/cryptswap1 none swap sw 0 0

Turned out it was a swap partition. I solved all my problems using Ubuntu bootable USB stick and gparted.


I can see that the drive is not mounted. Maybe you should mount it first.


you could determine where korganizer is in your system with:

whereis korganizer

then due to output you could check file-permissions with:

ls -al /name-of-path/bin-or-else/korganizer

what output does korganizer have after ls -al ?!

This is what I got:

jeads@james-X201EP:~$ ls -al /usr/bin/korganizer
-rwxr-xr-x 1 root root 61608 Sep  8  2012 /usr/bin/korganizer


How to: Command line directory duplication?

You can do it simply:

cp -r path/to/original/dir1 path/to/original/newdir1

e.g: directory_A1 does not exist but is created when specified in the command:

cp -r /home/me/Documents/directory_A /home/me/Documents/directory_A1

If you want 'directory_A(1)': Surround the second path in quotes.

cp -r /home/me/Documents/directory_A "/home/me/Documents/directory_A(1)"


How to install Ubuntu LTS (Desktop) without unsupported components?

Universe / Multiverse

When installing, at the Updates and other software window, do not check Install third-party software ...

Open Software and Updates

Click Ubuntu Software

Confirm that Community-maintained ... (universe) is not checked.

Confirm that Software restricted ... (multiverse) is not checked.

Close and reload.


Extracting a tar ball fails with "Cannot open: Not a directory"

According to here you can do tar -xvzf location.tar.gz. Try that


Postgresql package not found in ubuntu 15.04

Ubuntu 15.04 has PostgreSQL version 9.4. So it should work if you change the 9.3 to 9.4, try again with:

$ sudo apt-get install postgresql postgresql-contrib postgis postgresql-9.4-postgis-2.1


I'd check what's lurking in your Downloads folder. That's typically the #1 offender when it comes to low disk space.

Clear your browser cache manually e.g. ~/.mozilla/firefox/Cache or ~/cache/google-chrome/Default/Cache. This can free up 1GB sometimes.

You can also run from a command line sudo apt-get purge to remove old configuration files then go into Software Center or Synaptic and select apps you know you don't use.

The Disk Usage Analyzer is available under Ubuntu > Accessories > Disk Usage Analyzer. It shows which files and folders take up the most space.

Removing the old kernel is explained at How do I remove old kernel versions to clean up the boot menu? and can make space.


14.04 Thinkpad T450: Text getting messed up on large screens

Thanks all for your support. Luke put me on a track that solved the problem in a easy way. The issue relates to issues using SNA (Sandybridge's New Acceleration) with the Intel Graphics and need to revert back to UXA (Unified Acceleration Architecture). The way to do this is pretty simple:

Put the following:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "uxa"
EndSection

in file /etc/X11/xorg.conf.d/20-intel.conf, create the directory /etc/X11/xorg.conf.d/ if it does not exist. This must be done as root:

$ sudo mkdir /etc/X11/xorg.conf.d/
$ sudo cp  20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf

Assuming you created the file 20-intel.conf in the local directory.

Hope that help others!

BTW, here's the source for the solution: https://wiki.archlinux.org/index.php/Intel_graphics#SNA_issues


I'll show you an example of how you can set your monitor resolution.

Get the Modeline with the following command. 60 is the monitor refresh rate in Hz. You have to know your monitor refresh rate!!!

cvt 1360 768 60

The output looks like this. Copy the modeline after Modeline to use it in the next command.:

# 1360x768 59.80 Hz (CVT) hsync: 47.72 kHz; pclk: 84.75 MHz
Modeline "1360x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

Create a new mode with the copied modeline and xrandr.:

xrandr --newmode "1360x768_60.00"   84.75  1360 1432 1568 1776  768 771 781 798 -hsync +vsync

With the following command, you get the connected port.

xrandr --query | grep connected

The output looks like this. As you can see, in my case the connected port is DVI-0.:

HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
VGA-0 disconnected (normal left inverted right x axis y axis)

Add the new mode using your connected port.:

xrandr --addmode DVI-0 "1360x768_60.00"

Change the monitor resolution.:

xrandr --output DVI-0 --mode "1360x768_60.00"


After upgrade to Ubuntu 17.10 Suspend, Restart and Power Off does not work

After many tests the following solution works for me:

Login using Xorg does not use Wayland has many errors yet, anyway the login screen still uses Wayland, to disable the Wayland in the login screen:

sudo nano /etc/gdm3/custom.conf

Uncomment the line WaylandEnable=false to force the login screen to use Xorg

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

Restart!


Firefox is slow after upgrade from Xubuntu 17.10 to 18.04

Go to the firefox > Edit > Preferenses > privacy & security panel and under permissions check the setting to prevent accessibility services from accessing your browser


I cannot get ubuntu to boot up on windows 8

I agree with the comment.  If your system cannot see Ubuntu on a Windows 8 computer it's most likely because of UEFI.  You can disable UEFI by going Legacy Boot, but I don't think that's the right answer.  If it's not because of UEFI and it has to do with your USB key formatting... I apologize this answer will not help you, but UEFI seems to be the cause of this problem normally... and even if it's not understanding UEFI and Ubuntu is to install the two side by side.  Last little bit of info, I use LiLi USB creator and have no issues with Windows 8.

To really understand how UEFI and Secure Boot affects users and Ubuntu, I think it's helpful to understand what UEFI is and what it changes. Then discuss the features of secure boot, and how it may affect installs:

UEFI is a specification that defines a software interface between an operating system and firmware

It is designed to replace the BIOS.  The BIOS is old, and it was designed for older hardware.  It can only support a 16 bit processor mode, only 1MB Addressable space, only boot maximum of 2TiB drive, 4 Partitions, etc.  DOS and older OS's used to rely on the BIOS for basic I/O... but the boot loaders importance once an OS is running is greatly reduced today.  Realize many people will still refer to UEFI as the BIOS.

Some major changes with UEFI are:

Processor independent architecture and drivers

Network capability before the OS loads.

Since UEFI can be 64 bit it allows it to read all memory which can be addressed by a 64 bit computer

a GUID Partition Table instead of a MBR which allows more than 4 partitions and over 2TiB from a boot drive (8ZiB)

provides runtime options for the OS such as getting date/time/NVRAM access

UEFI allows for SECUREBOOT:

Secure Boot stops drivers and OS loaders from being loaded by the firmware unless they are signed with a digital signature written to the firmware.  This can be very useful for stopping rootkits.  You can add more keys to allow other software to run in "Custom" mode.

That being said, you can read lots of limitations about Secure Boot, how it can be used to allow one OS to dominate a system, etc. Because of this Windows 8 required SecureBoot to be able to enter custom mode or be disabled to be Windows 8 certified.  With it disabled, you lose all the benefits of secure-boot but you can still use UEFI.  With it in Custom Mode you can add public keys which do not match the private key in the system so that other software can run besides just those with the private key

For Ubuntu

When you install Ubuntu, if your system is set to boot in UEFI, it will install as an EFI.

As of Ubuntu 12.10 it has supported Secure Boot

If you are adding Ubuntu as a 2nd OS it's important to have the same type of OS as your boot loader (ie. 64 bit or 32 bit). So if you have a 64 bit Windows and you boot UEFI you should choose 64 bit Ubuntu.  If you do not, it will not load.  I tried to boot UEFI with a 32 bit Ubuntu (13.10) and couldn't even get it to read the USB until I disabled UEFI.  I installed the 32 bit version with it disabled.  When I realized my mistake, I reloaded the 64 bit Ubuntu to the key, enabled UEFI and it detected it great.  I then reinstalled.

Using UEFI allows you to have lots of primary partitions when you install, so don't worry about guides that make you start using logical after you have 4 partitions.

Everything isn't perfect yet.  For example, GRUB has an issue booting Windows 8 with secure boot.  I can choose to boot from the Windows drive first, it works fine.  I can load GRUB first and boot Ubuntu under secure boot just fine.  But when GRUB loads, it will not load Windows 8 with secure boot.  Here is a good site about this issue, and at the bottom is the bug report which is confirmed: http://falstaff.agner.ch/2012/12/18/ubuntu-12-10-and-windows-8-with-secure-boot-mode/


Remote backup with a file by file encryption?

Unfortunately not so much response on my question. Still my time searching and puzzling might be helpful to others who want to do the same so I answer my own question.

Like I said, duplicity works fine, does its encryption on the fly but creates encrypted backup sets with fixed file sizes. To me the disadvantage is that I don't know how it will handle file-corruption so I prefer single files.

The solution I came up with works with rsync and encfs. Encfs creates a virtual partition to which I can rsync my local data for backup. Encfs encrypts on a file by file basis so the encrypted data is just an encrypted direct copy of your original data. This encrypted backup is then rsynced to the iMac. By default Encfs encrypts the filenames to prevent data leaks which might weaken the encryption, however you can disable this encryption if you want to.
For decrypting you will need a small static options file (make an extra copy on usb-stick), your password and the encrypted file itself.

The differences between the two methods:

Duplicity works on the fly, Encfs does its encryption beforehand.
Duplicity makes backup sets, Encfs makes a file by file encrypted copy. (So no incremental backup, though you can still do this with rsync options)
The solution which I use makes a local backup also, this increases execution time and diskspace needs. But you can also skip the local backup and use the virtual partition as your data partition, so only have the encrypted data on hdd.
With Encfs you need just the file itself to restore, with Duplicity you need the whole set.

I also checked:

Rsyncrypto, file by file encryption but file names always encrypted and a seperate keyfile per file.
Cryptsetup / dm-crypt, better suited for disk/partition encryption.
Truecrypt, preallocated partition space, not file by file.
eCryptfs, almost the same as encfs but does not work very well with sparse files and looks less flexible.


Unable to open software-center in ubuntu 13.04

i have installed a Zope module from some other source than the official repository, to fix this i run the following commands:

cd /usr/local/lib/python2.7/dist-packages/zope
sudo ln -s /usr/share/pyshared/zope/interface/

Source: https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1085425

now it works for me. :D


Why BenQ monitor shows blank screen eventhough xrandr shows as connected?

Try 1920x1080i or 1280x720 on the BenQ monitor.
I've got BenQ monitor too (different model) and the highest resolution simply does not work. I suspect there is problem in the EDID.

Your system has 2 GPUs which indicates Optimus technology and the displays are most likely connected to the Intel gpu. Then you don't use xorg.conf but bumblebee package to make use of nvidia rendering power.


You installed autodns-dhcp, a tool that tries to update the DNS record for your computer when you are using DHCP. In that case it is possible that your IP-address changes and so the record would point to a wrong IP address.

The line you showed us does two things:

it checks if the file /usr/sbin/autodns-dhcp_cron exists (the /usr/bin/test -x /usr/sbin/autodns-dhcp_cron part)
if it exists it executes that script


How to change Guake cursor from block to I-Beam?

There is a patch at guake.org, which you can download to patch the source code, compile and install the program. This is the only way at present to get the option you want; it does work though (see screenshots below). This is how I did it.

The patch should be downloaded from here as a file; it is designed to work with the 0.42 source code, but could be tweaked to work with any source code available, such as the more recent 0.4.4. (Inspecting the 0.4.4 source code suggests that the patch might be implemented in that version, but when compiled, the option to switch to i-beam cursor didn't seem to work.)

However, it is straightforward to use the 0.42 source code, so download that file, cd to the downloads folder with terminal and unpack it with:

tar xzvf guake-0.4.2.tar.gz

Before you do anything else, remove the current version of guake if you have it installed, and then install the build dependencies and other tools with:

sudo apt-get install build-essential checkinstall
sudo apt-get build-dep guake

As noted in my comment, to get the build-dep feature to work, you need to go to software sources and enable source code by checking the box. Then run sudo apt-get update and any build-dep commands should work. The build dependencies are also listed in the Readme file with the source code download as python-dev, libgconf2-dev, libgtk2.0-dev, python-gtk-dev.

Now, while in the folder in which you downloaded the files, copy the patch to the guake folder with

cp CursorShape.patch guake-0.4.2/

Next, cd to the guake folder and patch the source code with

patch -p1 < CursorShape.patch

Then configure and build the files with

./configure && make

The final step is to run

sudo checkinstall

but when you install it, make sure you specify the version number in the checkinstall menu as not 0.4.2, but 0.4.3 or something similar, as you will constantly be prompted to overwrite your custom version with the package version (0.4.2) if you don't specify a higher version number.

Screenshots showing the patched version preferences and the guake terminal respectively.


What do these symbols in some Linux terminal commands mean?

See The Bash Reference Manual section called Shell-Operation and the Advanced Bash-Scripting Guide Chapter 3 (Special Characters).

I refer to those anytime I need to learn something new about shell scripting in ubuntu/linux.

I think you will find ABS Chapter 3 the easiest to navigate for your purposes. All the symbols are seen on the far left of the page with a description immediately below them.


Observing garbage file names after restoring back an encrypted partition (using ecryptfs)

I was able to overcome this issue by clearing all contents of my /home directory after taking backup of it.

rm -rf /home/*
rm -rf /home.* 2>/dev/null

I did this as a part of step 2 above. From debug information, I came to know that step 2 was failing with error rm failed because of "directory not empty". Once after deleting its contents with above commands, I was able to delete it and recreate a new one. From there on, I dont see above error.


printf "%x\n" `stat -c "%s" {filename}`

%x shows it in hex.
based of "stat" where %s is the number of bytes.

Random example from my anime shows:

$  printf "%x\n" `stat -c "%s" "[HorribleSubs] Alderamin on the Sky - 13 [1080p].mkv"`
21ed7688


Update default python3 version from 3.2.3 to 3.3.x version in Ubuntu 12.04

While relatively little in 12.04's core system relies on Python 3, I would always and in the strongest terms recommend that you leave the default Python environments to themselves.

That is to say:

Don't mess with the /usr/bin/python{,2,3} etc links.
Don't sudo {pip install,easy_install} anything into the system's site packages.

This is contrary to what you say you want to do but seriously, given you don't already know how to do this, you're a very long way away from knowing how to fix a broken system.

In your case, I'd recommend compiling your version of Python (in your home directory or even in /opt/) and then creating a virtualenv (venv) from that.
Inside the virtualenv, python (and everything that uses it) will refer to the version of Python used during the creation of that environment.

cd project_directory
/path/to/python -m venv venv
. venv/bin/activate
pip install whatever


Running Windows Steam on Linux (Using Wine)

I would recommend PlayOnLinux as a front end for Wine.

To install PlayOnLinux run the following commands from a terminal window:

sudo apt-get update
sudo apt-get install playonlinux

Note, PlayOnLinux installs Wine if it is not installed.

After it is installed and you run it for the first time, you will see an application that looks like this:

Click on the Install button.  In the search box, type in Steam.  Select Steam.  Then click Install in the lower right.  PlayOnLinux should download the needed files to install Steam.  Note: Unfortunately, not every application is downloaded like this.  Some applications will have to be downloaded manually, or you need the installation media.

PlayOnLinux should configure Wine for the application if it is found in the install menu like Steam is.  Sometimes you might need to search https://www.winehq.com for tweaks to games to make them work correctly.

When it is completed, all you should have to do is to click on Steam in the box, then click Run above, or you can double-click on Steam to launch it.

Hope this helps!


Is there a replacement for python-appindicator?

I think python-appindicator package is deprecated and GObject bindings are recommended. There are GObject bindings for appindicators and they should be used AFAIK.
There are two packages in ubuntu for python bindings for appindicator.
One is based on libappindicator and another is based on libayatana-appindicator
I donot know the core difference between the two but my guess is ayatana-appindicator is latest ones for clarity of names and are also available in other distros.
The package names are:

gir1.2-appindicator
gir1.2-appindicator3.
gir1.2-ayatanaappindicator
gir1.2-ayatanaappindicator3.

The 3 suffix one are for gtk3 and can be used for gtk3 related apps.
Here is my own use case which shows my native calendar in panel. Shown below is usage in gnome-shell with kappindicator extension along with dropbox.

Basically, for documentation see https://lazka.github.io/pgi-docs/AyatanaAppIndicator3-0.1/index.html
P.S. The image is from fedora as I am currently in fedora desktop with gnome-shell 3.38.
I think ubuntu ships with https://packages.ubuntu.com/focal/gnome-shell-extension-appindicator which can be used to show status tray and appindicators for already existing ones. I currently use it for zoom, dropbox etc


Booting ubuntu of a usb 3.0 pen drive. Is it using the superspeed

a simple test:

USB 2.0 is defined as a technologie which can transport data from a to b with a speed up to 60 Megabytes per second. (We are talking about Megabytes, not Megabits.) But You will seldom find an USB 2.0 device that needs this speed and never find an USB 2.0 pen drive that can reach this speed.

So make the following test:
Just take some big files like movies or so and copy them from your pen drive to your computer hard drive. You should take more than 1 Gigabytes. Before starting, you check how big your package of files is. Then you start and observe the seconds on your watch.
When it is finished, you can calculate how much Megabytes per second this operation has reached.

When it is more than 60 MB/s you can be sure that USB 3.0 is supported.

A good 3.0 pen drive should make 100 MB/s or more in this test.
(In this direction)

Be careful:
Copying the files from the hard drive to the pen drive will normally take more time than the other direction. "Reading" from the pen drive can be more than twice as fast as "Writing" on the pen drive.

The "reading" speed of your hard drive should normally be much faster than the "writing" speed of your pen drive. So the copying of data from hard drive to pen drive can show you the writing speed limit of your pen drive.

But a good 3.0 pen drive reading speed can be faster than a hard drive writing speed.

When the "reading" speed of your pen drive is faster than the "writing" speed of your hard drive, this simple test can not show you the reading speed limit of your pen drive.

An other problem: The NTFS file system, which is normally used on Microsoft Windows computers can be a brake for linux operating systems. Copying files from a NTFS drive to an other NTFS drive with a linux operating system can take twice as much time as copying exactly the same files from a linux ext4 drive to an other ext4 drive.

Have fun on testing

Ulrik


Apparently, the sky2 0000:02:00.0: PCI hardware error (0x2010) is, in fact, a PCI hardware error.

The two lights on the Ethernet ports indicated that the power was turning on, then off, on, off, etc. Because the Ethernet was supposedly working a few years ago, I've narrowed it down to two issues:

1.) The computer was originally merged with another computer, so that plus moving the computer around may have jostled the cord loose. I'm going to try opening up the desktop and fiddling with it a bit.

2.) The Ethernet is simply broken. That's okay too, since I'm going to get two wireless adapters for Christmas (one for my Raspberry Pi, one to replace the Ethernet if the other solution doesn't work).

I'll comment with an update in case anyone needs it.

UPDATE: The Ethernet port is integrated as part of the motherboard. However, I remember reading something about losing Ethernet after upgrading RAM. The box advertises 1 GB RAM, but I see 4 GB...

UPDATE 2: Downgrading to 2 GB RAM worked!


I found a solution.  I can alter the behavior of the key with the code:
[CODE]
xmodmap -e "keycode NN = Begin KP_5 Begin KP_5"
[/CODE]
where NN is the keycode of the key in question.  Apparently, KP_Begin is what was causing problems, so changing it to Begin solved things.


How to Change the message from policykit authentication agent?

You should be able to change the "System policy prevents setting proxy settings" message in those .xml files just as you said.

You cannot simply change the "An application is attempting ... this action." message because that message is hardcoded into the gnome authentication agent. source code. You have to modify the source code and recompile the gnome authentication agent for yourself if you want to change that message.


Does Cppcheck has a gui for ubuntu 14.04?

You have to build it from source for 14.04. There are pre-built packages for latest ubuntu versions though Link


Desktop install with Audigy Soundcard - no sound & errors in syslog

I finally figured out what to do by reading a five year old post on linuxquestions.org.

Apparently there is a problem with system/sound settings which should do this.

I tried to use gnome-alsamixer, it installed but would not launch.  So back to the terminal....

Update gnome-alsamixer has been fixed and may be an alternative to this approach.

First, open a terminal and type in  alsamixer

This screen will open (you may have to install it, the prompt will tell you how)

Press F6 to select the soundcard...

And pick the one you use.... &

This is now the alsa mixer panel for your card
But what is needed is hidden on the FAR side, tab-over several times.
Then tab until you find the right one (trial & error) for me it was Audigy A

[The Item listed at the upper left is helpful]

Hitting the M key (M for mute?) toggles on the sound

MM (muted) <-"m"-> 00 (unmuted)

You should hear the changes immediately.

Good luck!

UPDATE: QasMixer is an advanced ALSA mixer, better for this sort of thing.


How can I switch from intel integrated graphics to nvidia GeForce 940mx without breaking X?

First you need to install the driver by

sudo apt install nvidia-367

and reboot.

You can check the status and switch adapters in the Nvidia X Server Settings application (PRIME Profiles).

Also you can check the status in a terminal by

prime-select query

Switch to Nvidia by

sudo prime-select nvidia

Switch to Intel by

sudo prime-select intel

You need to log out and it to apply the setting.


How do I install Ubuntu on to a second Hard Drive?

Boot up your Ubuntu install media and choose instal Ubuntu. When it gets to the Install Along Side Windows options screen, pick the one at the buttom saying something like "Something Else". This will get you to the partitioner, where you can select the drives and installs as you want. Select your 1 TB drive (probably called /dev/sdb and format it so it uses the ext4 file system. This will make Ubuntu get on the 1 TB drive without touching the 2 TB drive.
After this it gets tricky.
The black screen you refer to is the Windows Boot Manager. I don't know how to get that to show up instead of Grub.

If you want Grub Bootloader instead, always install it on the first drive (usually /dev/sda).


I seem to be having the same problem, when i am playing videos in ubuntu 17.10, on both youtube and amazon prime, everything will be fine and then all the sudden chrome will freeze the entire os, yet playback works just fine with firefox on same sites...it happens otherwise but the best way to guarantee a crash is to start playing videos within 10 minutes i will be forced to do the alt-prtscreen-b keyboard combination to force linux to reboot.


You need to run below command so it will install dependencies of java.

sudo apt-get install -f


Ubuntu 12.04 LTS crash when starting a guest on VMware 9.0.2

The main reason for Causing this problem is python 3 version. Ubuntu 12.10 has latest python 3 but VMware work station build requires python 2 for running. This is common Bug as also mentioned in ubuntu 12.10 Bugs. Wait till it be fixed.
Also, I suggest you to install 64bit version of Ubuntu.


Just like with python (and Java) if you use the default installation on a Debian based system you will get massive problems. Every language seems to want to make a big deal about having an automated system for installation, instead of working with existing systems.

The real solution is to install ruby and rubygems via apt and if the packages don't exist then you create the packages and host them in a ppa for others to install.


Fixing 800x600 resolution in Toshiba NB510 (GMA 3650) with vesa driver

The black-screen problem is in fact a backlight brightness issue. If you look closely you can see the screen actually displays what it should, but the backlight is off.

Here are the steps I followed with the help of @pablomme to fix the issue using daily build of Quantal on new generation Atom Netbook. I tried it on N2800 and should be same for N2600 with the infamous GMA36x0 integrated graphics card, hopefully when using either the binary driver from Sarvatt's PPA or the gma500_gfx driver:

At the GRUB prompt, select the Ubuntu entry and press e.
Using the cursor keys, move to the line containing quiet splash and delete $vt_handoff from it.
Press F10 to boot.
At the desktop press Ctrl+Alt+T to open a terminal, type:

sudo gedit /etc/default/grub

press Enter, enter your password when prompted and press Enter.
In the editor that opens add the following line at the end of the file:

GRUB_GFXPAYLOAD_LINUX="auto"

Then save the file and close the editor.
In the terminal type:

sudo update-grub

and press Enter. Once it's finished you can close the terminal.

With the above the brightness should no longer be reset to zero at boot-time, so you'll be able to see the screen. If you would like to change the brightness, open a terminal and enter:

sudo setpci -s "00:02.0" F4.B=BB

where CC is the value of the brightness (hexadecimal, going from 00 to FF; e.g. 00=minimum, 33=dark, 77=medium, BB=light, FF=maximum).


I know it's an old question, but I just experienced the same problem myself on a fairly recent Mint 17.2 installation.

I used apt-file search article.cls to see which packages have that file - and confirmed that it's present in the texlive-* series of packages.  I then did apt-get install texlive - which pulled a few dependencies with it - and the problem was solved.


Linksys ae6000 wireless usb adapter don't work

Cisco never released a linux Driver for this Dongle USB.

Thankfully, some folks worked on drivers themselves and published them. You will have to compile and install the driver for yourself. I use a fork (Viish) of the ones from xtknight (https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes) which I hope will get merged soon.

I suppose you have git installed and can access internet somehow (e.g. Cable network, or your cellphone through USB using Thethering). Unplug the USB key, open your terminal and enter the following commands one by one (some require your sudo password):

sudo apt-get install build-essential linux-headers-$(uname -r)
git clone https://github.com/Viish/mt7610u-linksys-ae6000-wifi-fixes.git
cd mt7610u-linksys-ae6000-wifi-fixes
make clean
make
sudo make install

Then restart your system with your USB key connected. If nothing happens, open a terminal again and use:

sudo ifconfig ra0 up
sudo service network-manager restart


The dynamic statistics that Ubuntu shows normally when you log in are contained in the file /run/motd.dynamic. This file is normally displayed when you log in, but as you correctly noticed, byobu clears the screen so it can't be seen. What you need to do is arrange for that file to be printed when the first byobu shell is started.

One way to accomplish this that works for me is to add the following shell snippet to your ~/.bashrc file. It will run for every new shell process, but the motd will only be shown once in the first tmux window that is started.

if [ -z "$_motd_listed" ]; then
  case "$TMUX_PANE" in
    %1) cat /run/motd.dynamic
        export _motd_listed=yes
        ;;
    *)  ;;
  esac
fi


Cannot Boot Up After Crash During 18.04 Install

You can go to recovery mode (described in detail in another askubuntu thread:
How do I boot into recovery mode?)
and then finish installing the packages by enabling network and entering root console.

If that fails, option is to boot from USB stick, and chroot into your laptop hard disk, and fix packages from there. chroot-ing is described on ubuntu docs:
https://help.ubuntu.com/community/LiveCdRecovery


Ubuntu + Windows 8 -> Dell 14z 5423 AHCI / ISRT

You said "Nothing has changed. I could say that i installed some updates, by I had tested and it was ok." Those two sentences directly contradict each other, and the second is unclear -- in which OS did you install updates, and what type of updates were they? If I had to guess, I'd say that you installed Windows updates, and as a result, the Windows boot loader was re-registered as the primary boot loader for the computer.

If I'm right, this is relatively easily fixed within Windows:

Launch an Administrator Command Prompt window. (You must have administrative privileges for this to work.)
Type mountvol S: /S
Look over the S: volume. There should be an EFI directory that contains various subdirectories, including EFI\ubuntu, which should have one or more files with names that end in .efi. Take note of what they are.
Type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi. Note, however, that you may need to change the filename. If Secure Boot is disabled, change shimx64.efi to grubx64.efi; and if you've installed another boot manager (such as rEFInd or gummiboot), you should change the entire pathname to refer to it. Whatever you use as a filename, be sure that it exists on S:.

There are other ways to deal with this problem, too, such as running Boot Repair from a Linux live CD or installing rEFInd. However you handle the problem, it's possible it will recur, so you should be prepared to repair the boot system in the future.


Fresh Install of Ubuntu 14.04 LTS (No Dual Boot) - Getting No Bootable Device

Try running boot repair as a first step.  Google for the official boot repair ubuntu page.  Sorry I can't post a fancier answer, I am on a phone.


How to get html content of web page from command prompt

Use wget (you may have to sudo apt install wget).

   GNU Wget is a free utility for non-interactive download of files from the Web.  It
   supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.


To remove VirtualBox, I actually recommend running this command and not replacing * with anything (just run it exactly like so):

sudo apt-get remove virtualbox-\*

If you want to remove global configuration files too (this does not remove your virtual machines), run exactly this instead:

sudo apt-get purge virtualbox-\*

That method is OK, but this way may be more thorough.

Explanation

You may have multiple VirtualBox-related packages installed. Assuming your machine no longer needs to be a VirtualBox host or guest machine, all these packages can go. For example, on the 11.10 box I'm using right now, there are 18 such packages available for installation (your machine might have some or even all of them, or other packages from your release or a PPA):

virtualbox                      virtualbox-ose
virtualbox-dbg                  virtualbox-ose-dbg
virtualbox-dkms                 virtualbox-ose-dkms
virtualbox-fuse                 virtualbox-ose-fuse
virtualbox-guest-additions      virtualbox-ose-guest-dkms
virtualbox-guest-additions-iso  virtualbox-ose-guest-utils
virtualbox-guest-dkms           virtualbox-ose-guest-x11
virtualbox-guest-utils          virtualbox-ose-qt
virtualbox-guest-x11

Some are probably already not installed, and some may be removed automatically as a consequence of removing others, but some would not.
apt-get accepts * characters and treats them as part of a regular expression. This is in some ways similar to the way a command-line shell processes *. When used in an apt-get command, virtualbox-\* (see below for why the \, which is not being used as regular expression syntax) actually matches any package whose name contains virtualbox.

(Be careful with this as applied to packages with shorter names! For example, wine\* matches every package with win--not just wine--anywhere in its name.)

So you don't have to manually expand *. It can stay, and it will catch the various related packages as described above, as well as packages with explicit versions in their names as discussed there.
However, the shell itself, which executes apt-get with the command-line arguments you specify, also accepts wildcards. Therefore, you should escape the wildcard (and one way to do that is with a \ character before the *). Otherwise, if your expression matches a file or folder in that current location, the shell would give its name to apt-get, which would be wrong.

What does purge do here?

purge removes global configuration files only. It does not remove virtual machines, so it's safe to use. However:

It also doesn't remove most of the settings you might think it would. Remember, it removes global configuration files only. It does not remove any configuration files created by users that exist in their home directories and define how VirtualBox is configured for them.
Configuration files rarely take up a lot of space. If your goal is to free space but you think you may want to use VirtualBox again, you might prefer not to use purge.

Also, please note: apt-get --purge remove ... is the same as apt-get purge ....


There are many apps, tools and solutions for this purpose in the Linux world in general and  Ubuntu in particular, some of which might suit you, while some others might look too complicated ;-)

So, among a number of possible answers, I would cite just one of them; hostsblock which you can find here: github.com: gaenserich/hostsblock

It has an easy manual installation procedure, but I've also created a deb package (which you can simply click and install) which should be in both ZIP and TAR files you can download from there. (Note: The deb file is under /pkg/ subfolder, but it contains an old version (0.12.3) of hostsblock, which is now at 0.999.x)

It does more or less the same job as hostsman (updating your hosts file to prevent access to "undesirable" sites) but it only does it in the background almost without you noticing it ever ;-)

UPDATE: Now there's a new DEB package including a simple GUI -app indicator- with kwak daemon as well which is available here:

https://github.com/Sadi58/hostsblock/tree/master/indicator


Delete link to command to retry ImageMagick installation

I have managed to resolve the problem after using hash -r as suggested in the comments. I also discovered there were other imagemagick packages installed which I needed to remove before installing everything else again.


Natural scrolling doesn't work in evince

This problem occurs on all Gnome3\gtk3 apps, for instance Nautilus. The problem fixes by running gnome-settings-manager, but it is better not to do it. I got a lot of new bugs after it and removed it with all dependencies and cleared config files...


Elementary OS website spontaneously opens up in Chrome throughout the day. I have no idea why or how to stop it. Any solutions?

Cause of the problem

When you have installed the elementary Pantheon desktop environment you have installed the elementary captive portal assistant too, which helps you to connect to different public WiFi networks. Its job is to open the portal website so that you can log in to the network. Actually it opens the https://elementary.io website. (It is the network's job to redirect you to their sign in portal.)

This logic is contained in this script /etc/NetworkManager/dispatcher.d/90captive_portal_test,
which is being executed by the network assistant.

Solution

sudo chmod -x /etc/NetworkManager/dispatcher.d/90captive_portal_test

This will prevent the network assistant to execute the script.

Behind the scenes

This is the piece of the code, which causes the annoying popups:

#launch the browser, but on boot we need to wait that nm-applet starts
start_browser() {
    local user="$1"
    wait_for_process nm-applet
    $logger "Running browser as '$user' to login in captive portal"
    su "$user" -s /bin/sh -c "captive-login 2>/dev/null || sensible-browser start.elementaryos.org 2>/dev/null"
}

References:

elementary OS Launchpad bug report
Answer on elementary OS's stack exchange
Disabling captive portal detection on elementary OS Freya


Hiding files and directories in Linux is very simple. All you have to do is append a period at the beginning of the name of the file/directory.

With terminal:

mv filename .filename

(This command also works with directories)

Some additional information about the mv command; if the second argument is a directory, the first argument will be moved into that directory, rather than being renamed to it (regardless of whether the first argument was a file or a directory). If the first argument is a directory and the second is a file, you will get an error. If both the first and the second arguments are existing files, the second will be overwritten without prompting you! If you wish to be prompted before overwriting, add -i to the command before either argument

To view hidden files and directories in a terminal, use ls -a.

Without terminal:

Click on the file, press the F2 key and add a period at the beginning of the name. To view hidden files and directories in Nautilus (Ubuntu's default file explorer), press Ctrl+H. The same keys will also re-hide revealed files.


Can't stop mirroring in dual monitor setup

Two monitors on a single VGA port?  That's kind of like putting two lightbulbs in a single socket and expecting them to blink on and off separately.

Outside of certain DisplayPort configurations, each monitor has to be on a separate physical port, especially of that port is an analog connection like VGA.

One monitor on VGA and one on DVI should work, depending on your video card, one one on DVI and one on HDMI.

Changing the configuration and losing the mouse sounds more like a display configuration issue unrelated to hardware.  You may need to go in to your display configuration panel and change things.


12.04, mapping network drive from windows server 2003

Having had the exact same problem, installing the package samba4-clients resolved everything and now everything works as before the upgrade when I was on Oneiric Ocelot

so, all I did was:

    sudo apt-get install samba4-clients


Where are the case sensitive and whole words search options in Evince document viewer?

On the left side of the search box there is a magnifier icon. If you click on it, it will display a drop down menu where you can activate the Case Sensitive and Whole Words Only search options.


The way to change the default priority of system processes is through the renice command. From a terminal window, use renice to change your own processes' priority. Use sudo renice to change system process priorities. Read the manual page about renice first:
man renice.


Did you restart the server afterwards?

sudo service apache2 restart

Check this out too on Ubuntu forums. It looks like a similar problem to yours and is easily fixed.


I don't think those rules do what you think they do.

sudo ufw allow from 192.168.1.1 to 192.168.1.100

allows connections to ANY port with ANY protocol FROM the single address 192.168.1.1 TO the single address 192.168.1.100 - unless your interface is actually configured on 192.168.1.100 and you have a client at 192.168.1.1 this will have no effect.

On the other hand,

sudo ufw allow 3389

will allow connections to port 3389 with ANY protocol from ANY remote address to ANY local interface.

Probably what you want is either

sudo ufw allow from 192.168.1.0/24 to any port 3389

or (slightly more restrictive)

sudo ufw allow from 192.168.1.0/24 to any port 3389 proto tcp

which will allow any clients on the local CIDR subnet 192.168.1.1 to 192.168.1.254 to connect to the RDP port using TCP:

$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    192.168.1.0/24
[ 2] 3389/tcp                   ALLOW IN    192.168.1.0/24


TLP trouble with udev events. Ubuntu 19.04

I'm running an older version of tlp on Ubuntu 16.04 where udevadm is working properly. The rules are stored here:

$ ll /lib/udev/rules.d/*tlp*
-rw-r--r-- 1 root root 1221 Aug 11  2015 /lib/udev/rules.d/85-tlp-rdw.rules
-rw-r--r-- 1 root root  440 Aug 11  2015 /lib/udev/rules.d/85-tlp.rules

There have been recent bug reports of your situation:

AC not detect when plugged in
AC mode not detected with USB charger

All bugs were reported on your TLP version 1.1 and fixes were released under version 1.2.

See the bug reports for instructions to fix.


Do you have a configuration similar to:

If yes, according to this thread that is what confuses tint2. So the idea is the have the first dipsplay positioned in the topleft corner and everything should be fine. Like:

Note: The application in the screenshots is called arandr and it is responsible for writing xrandr configuration files.


According to the NVIDIA developer zone: Create a file:

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

With the following contents:

blacklist nouveau
options nouveau modeset=0

Regenerate the kernel initramfs:

sudo update-initramfs -u

Finally, reboot:

sudo reboot

Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ixzz4rQODN0jy


Plymouth check gets stuck, preventing service operation

Turns out, when I was debugging by removing splash and quiet and replacing them with plymouth:debug in /etc/default/grub as adviced in Plymouth Debugging, all my issues seem to be gone. No need to edit logging scripts like above.

It might have been some race condition with plymouth on ubuntu startup which causes plymouth to get stuck. By avoiding splash I am able to avoid the problem.

Before I found that out, I was hacking by editing /lib/lsb/init.functions.d/50-ubuntu-logging to always return 0 for plymouth usage (first function). That didn't help with restart/boot issues though.


Booting fails on ThinkPad x1 - USB and DVD

Eureka! (or something like that)
Finally found the issue was with the BIOS on the Thinkpad X1
I was running N14ET32W (1.10) from 8/13/2015 as reported by msinfo32.
After going to the Lenovo support site and searching - I found N14ET49W (1.27) and ran through the update.
Booted successfully into 18.04-2 and the install went perfectly.
Hope this may help someone else.

Jim


The fault is with the omegat shell script which tries to find out java version. The script is supposed to start the program only if it finds an openjdk or a sun java implementation on the machine. For this, it tries to look at the path where java is installed using below line:

JAVA=$(which java | xargs readlink -f)

Then checks whether the "path" contains the name openjdk or sun in it by

echo "$JAVA" | grep -q -e '\(openjdk\|sun\)'

Now, here's the problem. You may not always install java at a location having the name "sun" in it, as in my case it was at /usr/local/java/jdk1.7.0_07/bin/java.

So, the solution lies in simply correcting this script as you already HAVE the suitable java version installed.

Here's my working /usr/bin/omegat file.

#!/bin/sh

JAVA_OPTIONS='-Djava.library.path=/usr/lib/jni'

JAVA=$(which java | xargs readlink -f)

echo "$JAVA" | grep -q -e '\(openjdk\|sun\)'
#CHANGE 1, just use your java here.
JAVABIN=$JAVA
if [ $? -eq 0 ]
then
    JAVABIN=$JAVA
elif [ -x /usr/lib/jvm/java-6-openjdk/bin/java ]
then
    JAVABIN="/usr/lib/jvm/java-6-openjdk/bin/java"
elif [ -x /usr/lib/jvm/java-6-sun/bin/java ]
then
    JAVABIN="/usr/lib/jvm/java-6-sun/bin/java"
elif [ -x /usr/lib/jvm/java-1.5.0-sun/bin/java ]
then
    JAVABIN="/usr/lib/jvm/java-1.5.0-sun/bin/java"
else
    echo "Suitable java binary not found."
#CHANGE 1, comment out the exit line below.
   # exit 1
fi

exec $JAVABIN $JAVA_OPTIONS -jar /usr/share/omegat/OmegaT.jar $*

Notice the 2 "#CHANGE" lines in the script. Oh yes, you need to edit the file as root.


I was just working with OEM installs with server over the last couple of days, and you're right.  It seems that OEM install just plain does not work on server 14.04.

I perform the same OEM install using 15.10 and everything works as expected.  Running "oem-config-prepare" sets it up to run through the install steps again after reboot.


The java wiki page does tell you how to install sun-java6-jre manually if you choose to do so. https://help.ubuntu.com/community/Java

32-bit

$ wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jre-6u31-linux-i586.bin
$ chmod u+x jre-6u31-linux-i586.bin
$ ./jre-6u31-linux-i586.bin
$ sudo mv jre1.6.0_31 /usr/lib/jvm/
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_31/bin/java" 1
$ sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/usr/lib/jvm/jre1.6.0_31/lib/i386/libnpjp2.so" 1

Then

$ sudo update-alternatives --config java
$ sudo update-alternatives --config mozilla-javaplugin.so


Well, I fixed the IPv6 problem by upgrading to a 802.11n usb wireless card, the Asus USB-N10. Now it goes like this:

[00:06:40] domitille:~
alisonc $ rdisc6 wlan2
Soliciting ff02::2 (ff02::2) on wlan2...

Hop limit                 :           64 (      0x40)
Stateful address conf.    :           No
Stateful other conf.      :          Yes
Router preference         :       medium
Router lifetime           :           30 (0x0000001e) seconds
Reachable time            :  unspecified (0x00000000)
Retransmit time           :  unspecified (0x00000000)
 Prefix                   : 2001:470:xxxx::/64
  Valid time              :        86400 (0x00015180) seconds
  Pref. time              :        14400 (0x00003840) seconds
 Recursive DNS server     : 2001:4860:4860::8888
 Recursive DNS server     : 2001:4860:4860::8844
 Recursive DNS server     : 2001:470:20::2
  DNS servers lifetime    :           10 (0x0000000a) seconds
 MTU                      :         1480 bytes (valid)
 Source link-layer address: 10:BF:48:xx:xx:xx
 from fe80::12bf:48ff:fexx:xxxx
[00:06:47] domitille:~
alisonc $ lsusb | grep -i net
Bus 002 Device 004: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]

It's weird to me how switching wireless cards from one 802.11g to an 802.11n could have fixed the problem, but it did.


I have resolved this. Because it happened inadvertently the details are incomplete, but there it is.
I had upgraded to 18.04 as per the auto recommend. The problem persisted with the same behaviour, but a slightly different error message.
I installed pulseeffects. Following another Ubuntu post,
pulse audio equaliser not working in ubuntu 18.04
So as root:

wget https://launchpad.net/~yunnxx/+archive/ubuntu/gnome3/+files/pulseeffects_1.313entornosgnulinuxenial-1ubuntu1_amd64.deb
dpkg -i pulseeffects_1.313entornosgnulinuxenial-1ubuntu1_amd64.deb

The dpkg install failed lacking python-cairo, so

apt install python-cairo

That failed also, but suggested:

apt --fix-broken install

which installed python-cairo and a various other stuff (that is where I lack detail here - I didn't save the list).
Then I re-tried the dpkg install and it worked.
I now had pulseeffects installed and working.
I tried pulseaudio-equalizer again out of interest and it now worked. I guess that python-cairo or the stuff that got installed with it fixed the problem.
BTW I would recommend pulseeffects. The up/down keys can be used to make precise 1Db changes in each frequency range bar, and the 'tone' facility has enabled calibrating a 'flat' response from my amp & speakers. It revealed a massive hole in the response at 250cps. It all sounds so much better now.


How do I verify DDCLIENT is using SSL and if it's not, how do I force it?

I have found the answer and I feel very silly not figuring it out earlier.

daemon=60                               # check every 60 seconds
syslog=yes                              # log update msgs to syslog
mail=root                               # mail all msgs to root
mail-failure=root                       # mail failed update msgs to root
pid=/var/run/ddclient.pid               # record PID in file.
ssl=yes                                 # use ssl-support.  Works with
                                        # ssl-library
use=web, web=https://myip.dnsdynamic.org        # get ip from server.
server=www.dnsdynamic.org               # default server
login=USERNAME                          # default login
password=PASSWORD                       # default password
server=www.dnsdynamic.org,              \
protocol=dyndns2                        \
YOUR DOMAIN GOES HERE

The above will force SSL and will connect over SSL. There are two changes I have made.

The line use=web, web=myip.dnsdynamic.com should be use=web, web=https://myip.dnsdynamic.org. Changing from .com to .org stops connection failures. Adding https:// prior to the connection string allows it to connect over SSL.

Output from use=web, web=myip.dnsdynamic.org shows:

use=web, web=loopia address is IPADDRESSISHERE
CONNECT:  myip.dnsdynamic.org
CONNECTED:  using HTTP
SENDING:  GET / HTTP/1.0
SENDING:   Host: myip.dnsdynamic.org
SENDING:   User-Agent: ddclient/3.8.2
SENDING:   Connection: close

Output from use=web, web=https://myip.dnsdynamic.org shows:

use=web, web=loopia address is IPADDRESSISHERE
CONNECT:  myip.dnsdynamic.org

The verification of cert '/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA/CN=www.dnsdynamic.org'
failed against the host 'myip.dnsdynamic.org' with the default verification scheme.

   THIS MIGHT BE A MAN-IN-THE-MIDDLE ATTACK !!!!

To stop this warning you might need to set SSL_verifycn_name to
the name of the host you expect in the certificate.

CONNECTED:  using SSL
SENDING:  GET / HTTP/1.0
SENDING:   Host: myip.dnsdynamic.org
SENDING:   User-Agent: ddclient/3.8.2
SENDING:   Connection: close

I am still unsure why forcing ssl=yes does not cause it to use HTTPS automatically but it is connecting over SSL now and the command as seen by @George helps me verify it is: sudo ddclient -verbose -debug -noquiet -query


compare contents of two text files in ubuntu?

Since the order does not matter, you can use awk for printing unique lines, but with whitespace separating lines:

awk -v RS='[[:space:]]+' 'FNR==NR {a[$0]++; next} {a[$0]--} END {for (i in a) if (a[i] != 0) print i}' file1 file2

Here:

-v RS='[[:space:]]+' sets the record separator (RS) to any whitespace, so all each "line" will be separated by any whitespace (including newlines).
FNR == NR - FNR is the record number (NR) (or, line number, if you will) for the current file, and NR is the overall line number in all input files. So, whenever these two are equal, we're dealing with the first file.
{a[$0]++; next} - set and increment the count of appearances of the current "line", then move to the next line without processing any more rules. This block is only run for the first file, so the effect is that this rule applies to lines from the first file, and the next block applies to to all other files.
{a[$0]--}, decrement the count of appearances of the current "line".
END {for (i in a) if (a[i] != 0) print i} - at the END of all input, for each entry in the array a, print that entry if the count of appearances is not 0. So, any "line" which was seen an equal number of times in both files will be skipped.


How to link, and compile, a C++ code using GNU Octave functions?

Working with GNU Octave's own minimal example, you should be able to compile and run it without problems using
$ mkoctfile --link-stand-alone standalone.cc -o standalone
$ ./standalone
Hello Octave world!
 11 12
 21 22

In order to be able to use mkoctfile, you need to install the liboctave-dev  package
$ sudo apt-get install liboctave-dev


Can't figure out how to run eclipse (missing JDK/JRE)

You need to install Java Development Kit (JDK) on your Ubuntu. Open some terminal program and use the following command: sudo apt-get install openjdk-7-jdk


USB devices don't work after installation of Ubuntu 14.04

I had the same issue (Network and USB failure with trusty) - but I'm not sure which of the following fixed it:

This is the last few lines of my root console history:

 1989  apt-get install linux-image-generic
 1992  depmod -a
 1993  update-initramfs -k all -c
 1994  apt-get install linux-firmware
 1995  apt-get update
 1996  apt-get upgrade
 1997  apt-get install linux-firmware
 1998  apt-get install linux-firmware-nonfree
 1999  update-initramfs -k all -c
 2000  reboot

I'm guessing it'll be #1998 (firmware for network card) and #1989 (Installs the linux-image-extra-generic package; USB support) and #1999 (Rebuild the initramfs files; insert new modules/firmware into initrd)

Hope that helps.


How do I get Grub2 to boot a Truecrypt-encrypted MBR?

@stefan.at.wpf's solution is the one recommended all over the Internet.  It would not work for me.  At all.  But I found another solution, which did work for me.

Essentially, you chain-load GRUB2 to load SYSLINUX, which in turn boots the TrueCrypt Rescue ISO image, which allows you to boot into Windows.

I have documented the full details here.  The summary version, though, would be:

Install syslinux:

sudo aptitude install syslinux

Copy files into place:

sudo cp /usr/lib/syslinux/memdisk /boot/
sudo cp TrueCrypt\ Rescue\ Disk.iso /boot/truecrypt-rescue-disk.iso

Determine the UUID of your boot partition:

sudo blkid /dev/sda2

Output should look something like this:

  /dev/sda3: UUID="12345678-1234-1234-1234567890"

Configure GRUB2:

Add the following to /etc/grub.d/40_custom:

menuentry "TrueCrypt ISO boot" {
    insmod part_msdos
    insmod fat
    insmod ext2
    insmod search_fs_uuid
    search --fs-uuid --no-floppy --set=boot [UUID without quotes]
    linux16 ($boot)/memdisk iso raw
    initrd16 ($boot)/truecrypt-rescue-disk.iso
}

Re-load GRUB2 configuration

sudo update-grub

Note that this will show you the [F8] Repair options every time you boot into Windows, as we're fooling the system booting the TrueCrypt Rescue CD image from the hard drive, rather than the "normal" TrueCrypt boot method. But it seems like a small drawback to me (and might even be considered an added feature!)


How to change all purple color during login?

In the end I installed gnome-session and it fixed the problem.


How to prevent animation during Compiz viewport switching?

A previous question, Turning off the transition animation when changing workspaces in GNOME2, has an answer that partly solves the problem.

First, install ccsm (the CompizConfig settings manager) if it isn't present, either via Ubuntu Software Center or with apt-get:
 sudo apt-get install compizconfig-settings-manager
Next, run ccsm, and click Desktop, Desktop Wall, and Viewport switching in turn.  Set Wall sliding duration to 0.  (On my Ubuntu 13.04/Unity/Compiz system, that duration defaulted to 300 ms.)

This still leaves the following problem that occurs when I run the test script shown in the question.  When wmctrl issues a command to switch to a different viewport, that viewport is immediately displayed (as desired) but also a scaled-down viewport-indicator box animation appears.  In a fraction of a second that box shrinks and disappears.

To deal with that issue, in ccsm click Desktop, Desktop Wall,  and Viewport switch preview in turn.  Change Switch target preview visibility time from 0.2 to 0.  After that the test script runs cleanly.


Windows 7 partition not showing on Ubuntu 13.04

From the comments, here's what I suggest adding to your /etc/fstab file:

UUID=BA361D27361CE5E3    /media/Data    ntfs    ro,auto,user,exec,umask=003     0    0

The explanation of the options are as follows:

ro mounts it as read-only.
auto ensures that it's automatically mounted. You may wish to remove this.
user allows other users to mount the filesystem. This option automatically implies noexec, nodev, and nosuid.
exec allows you to run executables from the drive. Putting this will override the automatically implied noexec from the user option. You may wish to remove this if you don't plan on running executables (i.e. applications, and installations).
umask=003 sets the permissions to rwxrwxr--. It's just a set of relaxed permissions that allow you to basically have access to everything.

The last option (umask) sets the write permission, but you already have the drive mounted as ro, so you won't be able to write anything. But this makes it simpler if you ever want to mount it as read-write in the future; just do sudo mount -o remount,rw /media/Data.

Don't forget to make sure that /media/Data is created.

Once you've added your fstab entry, do sudo mount -a to apply the settings.


How can I pass parameters to a python script when running it with a bash script?

Because shell script has no way of knowing that you want to pass arguments to your Python script. Use

./Main.py "$@"

Also don't use cd. It's redundant.  Just use full path to ./Main.py , or even better avoid having a wrapper script altogether, unless necessary. Just put ./Main.py into one of the directories that are part of your $PATH variable and call your Python script directly.

The main point is that what you're trying to do is probably wrong and unnecessary, and there are better ways to do it


Synaptics touchpad stops working after hibernating a Dell XPS 16

You may be hit by this bug instead:

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

A workaround is suggested, to restore touchpad functionality reload the psmouse module, in a terminal do:

sudo rmmod psmouse; sudo modprobe psmouse

If this solves the problem then this is likely the bug affecting you. Note that a fix is in recent kernels, so upgrading to either Ubuntu 11.10 (with kernel 3.0.0-16) or 12.04 should solve the issue.


What is the purpose of the package emacs24-common-non-dfsg?

You can use apt-cache show <package_name> to get the basic information about that package along with the description.

From apt-cache show emacs24-common-non-dfsg

Description-en: GNU Emacs common non-DFSG items, including the core documentation
 This package includes the core Emacs documentation: the Emacs Info
 pages, the Emacs Lisp Reference Manual, and the Emacs Lisp Intro.
 .
 GNU Emacs is the extensible self-documenting text editor.  This
 package contains the architecture independent infrastructure that is
 not compliant with the Debian Free Software Guidelines.  In
 particular, this includes some of the GNU Emacs info pages, as they
 are covered under the GFDL, and specify invariant sections.  See
 http://www.debian.org/vote/2006/vote_001 for more information.

This package is needed for Emacs Manual.

It is a non-free package i.e packages that do not meet the Debian Free Software Guidelines.


how to get rid of web eula notification?

You cannot get rid of such kind of notifications. They are bound by legal requirements. It is signing a contract for obtaining a service. You have to accept these terms if you want to use a service, otherwise don't use the service. For info about how to accept them see: How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

From Eula.com:

  An end user licence agreement (EULA) is a contract between one or more
  parties based on the proprietary rights of a licensor to grant a right
  to the licensee to use or access the subject matter of the licence.

(Most Linux designed software don't have such legal requirements, because they are open-source.)


How can I install Ubuntu 12.04 on external HDD?

just go through the same process you did for 11.10. You would just choose erase entire disk. you'll loose files though so I would click try Ubuntu and see if you could move any wanted files to a thumb drive or something.


Am I in error attempting to mount /dev/sdd ? Should it be one of the partitions?

Yes, your drive sdd (like most drives) is partitioned. Unpartitioned drives do exist, but aren't very common, and make things harder to change/move in the future.

PS. there are good GUI's for this stuff, like Disks / gnome-disk-utility, try it instead. Or lsblk is handy too.


Use the packages from the repository.

Use and install tomcat7 and you get one server up and running.  You might also want to check that package tomcat7-admin, tomcat7-examples and tomcat7-doc are installed.

If you just want to develop and run a couple of Tomcat7 servers, just install package tomcat7-user, tomcat7-examples and tomcat7-doc and you then can create many different Tomcat 7 servers with the command tomcat7-instance-create.  Look into /usr/share/doc/tomcat7* for documenation and the man pager for the command tomcat7-instance-create.


I am trying to install forever on ubuntu

I ran into the same issue after following this tutorial to install NodeJS.

I was able to get it work by installing a more recent NodeJS.

Follow these steps:

Uninstall NodeJS:
sudo apt purge nodejs
sudo apt autoremove
Install curl to download latest NodeJS setup:
sudo apt-get install curl
Check out https://nodejs.org/ to see what is the latest LTS version.
Download it:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
(replace "12" with the current LTS major version number).
Install NodeJS (incl. npm):
sudo apt-get install nodejs
Install forever:
sudo npm install forever -g


If you look at the answers to this question, it may provide some pointers:
How do I install an older 2.6.37 Kernel Version?

As far as I can work out, if you go into the Grub menu at start up, just after the BIOS screen, you then have a number of options for booting.

If your Grub menu does not show when you boot up, then the simplest way to display your Grub is to press and hold the SHIFT button while booting.

As an alternative, you can always displays Grub without it booting any particular kernel:

gksudo gedit /etc/default/grub

change grub_timeout to -1

finish off by running

sudo update-grub


The reason is quite clear. You did not set mounting rules for this disk in /etc/fstab/.

When system starts, the disk is not mounted.

Just add a line to /etc/fstab for a permanent rule and the problem will be solved.

This is a guide.


Move a partition out from under scp: why does it carry on?

It looks like some/most/all of "x.tgz" was loaded into ram for the scp'ing. I would suggest though killing the process and running it again. Though it would be interesting to see if it really worked, you could wait it out or even run a parallel scp and when the original one is done run a md5sum x.tgz on both the remote and the host. If the hex outputs match up then they are the same.


Some users experience issues connecting to Git servers due to network restrictions or firewalls on their end. The guide you are following also provides links to "source snapshots" as an alternative, and a link to the fdk-aac snapshot has just been added. The snapshots will provide recent code but you will have to download and extract each archive. Example using the link in the guide that states, "Note: You can download the nightly x264 source snapshot as an alternative to using git.":

wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjvf last_x264.tar.bz2
cd x264-snapshot-*

Then continue with the guide starting with the ./configure line for the appropriate section.


Check (vi/nano) /etc/network/interfaces I willing to bet you only have lo interface.

If so run dmesg | grep "eth0" it may tell you that eth0 has been changed to new name, then you will have to add the new interface name to /etc/network/interfaces.

If above does not work try ifconfig to see if there is a new name.

hope this helps!!


I am unable to get proper resolution after installing ubuntu 16.04 alongwith window 10 dualboot

You can add missing resolutions to Ubuntu 12.04 using xrandr.

First, use cvt to create a new resolution mode

sudo cvt 1920 1080 60

Part of the output should be similar to this: "Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync" (w/o the quotes).

Next, declare a new resolution mode.

sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

Next, find out the name of your video device.

sudo xrandr -q

For me,It was VGA1.Your name should something like this.
Once you know the name of your device, you can, finally, add your new resolution mode to the device/system.N.B.YOu need to change VGA1 as yours.

sudo xrandr --addmode VGA1 1920x1080_60.00

Expecting this will help you.
If you want more Adding Undetected Resoulation


I just solve it. I tried different solutions so maybe some steps are redundant or missing:

Boot from Ubuntu Live USB (in my case it was 18.04 LTS).
Open Nautilus.
In left bottom side click on "Other locations"
Select your old Ubuntu drive and open it (you will be in the root folder of your old Ubuntu, in my case it was something like /mnt/f3kljjhfu23oghggnmnjyy)
Open terminal in this folder.
Make mirrors for folders:

sudo mount --bind /dev ./dev
sudo mount --bind /sys ./sys
sudo mount --bind /proc ./proc

After this command you will be like root for old Ubuntu:

sudo chroot .

Open a browser and download deb file of libargon2-0 for your OS from Debian packages repository (in my case file was named like libargon2-0_0~20171227-0.1_amd64.deb).
Copy the downloaded file to tmp file of your old Ubuntu (/mnt/f3kljjhfu23oghggnmnjyy/tmp)
Install the downloaded deb file using the terminal from step #7 (so it will be installed to old Ubuntu):

dpkg --install /tmp/libargon2-0_0~20171227-0.1_amd64.deb

After successful package installation restart your computer and boot to your old Ubuntu (you may want to press Esc on Ubuntu's loading screen to watch the status of loading)

PS. You may like an instruction from this guy, which helped me a lot -
Install package to Ubuntu 16.04 installation while booted into live cd


The following helped me. You will need somehow:

    onContentXChanged: {
        if(activeFocus){
            p2list.contentX = p1list.contentX
iterate all list
for (var i=0; i<listOfListView.children.length; i++){
    if(listOfListView.children[i].activeFocus) {

    }
}


Can I view the history of connected usb?

You can get something by using the dmesg command and filter it to only keep USB events.

dmesg | grep usb


When does the live USB ask if I want to re-install?

It seems I should get the option to reinstall on the "Installation Type" menu.

I've since confirmed Ubuntu is installed, the installation from the live USB did not detect the current installation and did not show the options in that picture. I have since simply blown away all fglrx drivers using these instructions. Default drivers are now displaying the gui.


Convert only characters to decimal in hexa string

Could do it with sed:

$ printf %d $(sed 's/./0x& /g' <<< 17a26b12)


I faced a similar problem (see screenshot) - Installation with Internet connection solved it.


I suggest creating a function:

#!/bin/bash

function mygammu()
{
    sudo gammu sendsms TEXT "$1" -text "$2" | xargs "$1"
}

Put it in your .bashrc, then use the command like this:

mygammu "08539032xxxx" "Testing sms dari aplikasi gammu modem" >> logfile

the output would be:

08539032xxxx Sending SMS 1/1....waiting for network answer..OK, message reference=145


Maven: JAVA_HOME is not defined correctly

You will probably want to edit your sudoers file with sudo visudo, find the line Defaults        env_reset and add a line Defaults        env_keep = "JAVA_HOME" below it. See below for explanation, details, and alternatives.

Why sudo Is Clearing JAVA_HOME

When you run a command with sudo, by default your environment is not passed intact. Most environment variables are removed, for security, and this is usually desirable. As man sudoers says, in the section on "Command environment":

  Since environment variables can influence program behavior, sudoers
  provides a means to restrict which variables from the user's
  environment are inherited by the command to be run. There are two
  distinct ways sudoers can deal with environment variables.

  By default, the env_reset option is enabled. This causes commands to
  be executed with a new, minimal environment. On AIX (and Linux systems
  without PAM), the environment is initialized with the contents of the
  /etc/environment file. The new environment contains the TERM, PATH,
  HOME, MAIL, SHELL, LOGNAME, USER, USERNAME and SUDO_* variables in
  addition to variables from the invoking process permitted by the
  env_check and env_keep options. This is effectively a whitelist
  for environment variables.

  If, however, the env_reset option is disabled, any variables not
  explicitly denied ....

Letting JAVA_HOME Through One Time

One option, if you rarely run mvn spring-boot:run as root and prefer not to change your configuration at all, is simply to pass on the value of JAVA_HOME manually:

sudo JAVA_HOME="$JAVA_HOME" mvn spring-boot:run

When you run that:

The shell performs parameter expansion and quote removal, replacing "$JAVA_HOME" with the value (i.e., contents) of JAVA_HOME. If that contains no blank spaces, the quotes are not necessary (their purpose here is to prevent word splitting).
sudo is called with three arguments: JAVA_HOME=..., where ... is the value of JAVA_HOME when you ran the command; mvn, and spring-boot:run.
sudo recognizes variable=value syntax, and knows to run mvn with JAVA_HOME set to the specified value. (spring-boot:run is passed as the first command-line argument to mvn).

To pass all your environment variables through, you can run sudo -E mvn spring-boot:run, but this is potentially less secure and not ideal because JAVA_HOME is the only variable whose value you need preserved (besides the handful of variables whose values are automatically preserved even with env_reset).

Letting JAVA_HOME Through Every Time

Although you could disable env_reset in your sudoers file, this would pass almost all a user's environment variables through every time sudo is run, and for this reason is not recommended.

Instead, I recommend you edit your sudoers file and add an appropriate env_keep line after the env_reset line.

Please do not edit /etc/sudoers directly. Instead, you should always use the visudo command for this, which checks to ensure your syntax is correct (preventing the creation of an invalid sudoers file which locks down sudo until fixed).

Run:

sudo visudo

This will use your default command-line text editor. If you want to use a different editor, you can run visudo with it assigned to the VISUAL environment variable. For example:

sudo VISUAL=nano visudo
sudo VISUAL=gedit visudo

(VISUAL isn't so named after the "vis" in visudo; instead, it's the environment variable for specifying default text editors. You can also use the EDITOR variable, but VISUAL takes priority if set.)

Running visudo opens up a temporary copy of your sudoers file in a text editor; on exit, changes made to this copy are written to /etc/sudoers.

Find the line that says:

Defaults        env_reset

Add a line just under it, saying:

Defaults        env_keep = "JAVA_HOME"

(If you already have an env_keep line, add JAVA_HOME to the quoted list of allowed variables. The variable names are separated from one another with spaces.)

Save the file and quit the text editor. Now, when users run commands with sudo, the JAVA_HOME environment variable will be preserved.


Try to force the removal with sudo aptitude -f purge plexmediaserver If it doesn't work, try these commands:

sudo rm -f /etc/init.d/plexmediaserver
sudo dpkg --purge --force-all plexmediaserver


Card reader only works for SD not xD cards

lshw's website says

  a node is marked as UNCLAIMED if no specific support for it has been loaded (or lshw has been unable to identify the driver)

So I conclude that yes, it means the xD part (and presumably the other bits) are unsupported; no (working) kernel driver.


From my standpoint... if you don't want a user to be changing things as sudo, you should NOT be granting sudo access in the first place.  This is for the same reason you don't give your bank account information to Nigerian prince scammers - if they have your information (or access) they will have access beyond what you probably want to grant the individual.

Giving sudo access in a way that lets them use any command except some commands ("blacklisting" commands) is MUCH harder to implement, and in fact the sudo and sudoers mechanisms are not really built to do this kind of blacklisting in a safe way.

Conversely, giving this hypothetical user sudo access for only some commands (and not all commands), by specifically specifying the things they can execute as sudo on the sudoers line, is the proper way to really do this type of restrictions with sudo ("whitelisting" commands instead of blacklisting them)

This said, if you REALLY want to go this route, then...

In the second method, he's not using the full path.  The command blocks you've initiated here deny access when the command and arguments are identical matches.  The utilities are unfortunately stupid and don't actually equate arguments passed in as fully qualified on-disk paths and need to be exact matches to what's being executed.

Add to the list such that you get this:

Cmnd_Alias BLOCK = !/usr/sbin/visudo, !/bin/nano /etc/sudoers, !/bin/nano sudoers

... however there are a trillion ways to circumvent this, so you really should be whitelisting access to commands rather than blacklisting commands that sudoers are not supposed to use.


well as you can easily use it with sudo ,just create a netbeans.desktop by

sudo gedit /usr/share/applications/netbeans.desktop

and then enter these lines

[Desktop Entry]
Name=Netbeans
Comment=Netbeans IDE
Exec=env UBUNTU_MENUPROXY= netbeans
Icon=netbeans  (or path of your icons .xpm file in the installation folder)
Terminal=false
Type=Application
Categories=Development,IDE;
X-Ayatana-Desktop-Shortcuts=NewWindow
StartupNotify=false
[NewWindow Shortcut Group]
Name=New Window
Exec=env UBUNTU_MENUPROXY= netbeans
TargetEnvironment=Unity

save it and then restart your PC once .press power key for dash and search for netbeans open it. hope it will work ,if it wont then register it as a bug as its a known issue on 13.10.


How do I remove the proprietary ATI drivers?

Try to completely remove your ATI drivers from your system:

sudo apt-get purge "fglrx.*"

Remove your xorg.conf

sudo rm /etc/X11/xorg.conf

Reinstall xorg completely

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64

Re-configure Xorg

sudo dpkg-reconfigure xserver-xorg

Reboot

sudo reboot

You should be greeted with lightdm, this will default everything x the same way a fresh install would.


I'm getting «exec format error» when I try to run an executable

Run

uname -m

and check if the programs you're trying to execute have the appropriate architecture. ie., 32 vs 64 bit.


Again I answer myself for any other one encountering such problems (and for future reference if it happens again to myself! :-) ).

The trick was, for me, to modify some options in the NX server configuration file, which is /usr/NX/etc/server.cfg

Here you can find lots of stuff and options like "Allow every user (not only NX user) to have a session" and other options pertaining session shadowing and physical display usage: by enabling those options (allowing any user to use the physical display and "steal it" even without spawning a new session), I was able to solve the "cannot share session with user lightdm".


What's the best clipboard manager that doesn't need the panel?

Glipper can be called with a keystroke combination, Ctrl+Alt+C by default, but you can change it in the settings. It will pop up with your clipboard contents and settings menu and doesn't need the panel at all, though it does have a panel icon.


It appears that Python isn't installed for you by the looks. Or it was and has been removed but remnants left behind.

First, run the following commands:

sudo apt update
sudo apt install python -y

Then try again. If that doesn't work, please post the output of which python and ls -al /usr/bin/python*.


Using sudo means you are running as the root user for that command.  Any files or directories you create will be owned by root.  If you want to give your normal user access, you need to change the permissions and/or ownership

something like chown <yourusername>:<yourgroupname> <filename>

when mounting the smb server, try setting the ownership/permissions on the mountpoint first, before mounting the drive.


How to bypass “Try it / Install” screen when booting from USB Live Session of 14.04 LTS?

how to customize your live CD:
https://help.ubuntu.com/community/LiveCDCustomization

a short version of the above:
http://nathanpfry.com/how-to-customize-an-ubuntu-installation-disc/

I suspect that if you use the stuff you linked to, looks like editing CFG files, then you will get to where you want to be.


How to force my system to see my hdd as 4096-byte?

Your drive is already using 4096 byte sectors. It's a function of the hardware.

It's asking you to create a smaller hidden volume, but you've already created a 3.7T partition. Make it less than 2T. Or... if you manually created that partition, let VeraCrypt create the partition for you.

See here for some instructions.

Note: Understand that encrypting your data can cause serious backup and restore issues if you have a drive failure.


It might be a flash plugin. For Google chrome there is a build in flash plugin. Try to install another one and activate it. In your web browser type

  about:plugins

and choose details. There should be an option to activate/deactivate any of your plugins.


Grub2 does not have entry of ubuntu 12.10 at boot menu in UEFI system?

It looks like you've got both BIOS-mode and EFI-mode installations of GRUB on your disk. If I had to guess, I'd say that you installed Ubuntu in EFI mode but it didn't quite work for some reason, and then you booted the Boot Repair tool in BIOS mode and it got a little confused and installed a BIOS-mode GRUB; however, it could be that they installed in the opposite order.

In any event, you should probably do what the error message suggested:

Please write on a paper the following URL:
http://paste.ubuntu.com/1552313/

In case you still experience boot problem, indicate this URL to:
boot.repair@gmail.com

Beyond that, you could try downloading the CD or USB flash drive image of my rEFInd boot manager and write it to a disk. It's possible, but far from certain, that it will get Windows and/or Ubuntu booting from rEFInd. If you have luck with it, you can then work from there on a longer-term recovery. To boot Ubuntu, you'll need to:

Launch rEFInd
Highlight one of the Linux kernel options (to boot vmlinuz-{something})
Hit F2 or Insert twice to open the kernel options editor
Add ro root=/dev/sda1 to the options
Press enter

If this works, you can run the install.sh script to install rEFInd on your hard disk. I'm far from certain this will work, but it's worth a try....


apt-get stuck at 0 [Connecting to us.archive.ubuntu.com] in ububtu 16.04.4

Try this .
The solutions above relate to a common ipv6 related issue. If it still doesn't work can you provide the exact error msg. I have tried & that solution worked fine for me.


wifi not working asus x550cc it is hard blocked

Is the module asus_nb_wmi  loaded? Check:

lsmod | grep asus

If so, try a temporary fix:

sudo modprobe -r asus_nb_wmi
sudo modprobe asus_nb_wmi wapf=1
sudo rfkill unblock all
rfkill list all

Any improvement? If so, make the driver parameter permanent:

sudo -i
echo "options asus_nb_wmi wapf=1" | sudo tee /etc/modprobe.d/asus_nb_wmi.conf
exit

If the parameter 1 is ineffective, we can also try 0 and 4.


How can I get Ubuntu 12.04 to boot on a Gigabyte 990Fx MB (efi problem?)

You'll need to do some troubleshooting of the boot process, beginning with two related questions:

Is the computer's firmware attempting to start the boot process in BIOS mode or in EFI mode? (Either is possible on most modern EFI-enabled machines.)
Did the problem OS(es) install BIOS-mode or EFI-mode boot loaders?

Basically, the boot loader installed by the OS must match the boot mode used by the motherboard. If they don't match, the system won't boot. Unfortunately, the EFI specification includes no standardized rules for determining the boot mode used by the computer, so manufacturers have been free to make up their own rules. These manufacturer-specific rules vary from one product to another and are seldom well-documented, so you may end up having to run experiments to figure out how to coax your board into booting in one mode or the other.

Generally speaking, if the computer boots Windows 7, the easiest course of action is to install Linux in a way that's compatible -- that is, in EFI mode if Windows is booting in EFI mode, and in BIOS mode if Windows already boots in BIOS mode. You can determine your Windows boot mode in various ways, such as by looking at the partition table -- if Windows is booting from an MBR disk, it's booting in BIOS mode, and if it's booting from a GPT disk, it's booting in EFI mode. See here for more details.

Fortunately, switching the Linux boot mode is usually just a matter of uninstalling the non-functional boot loader installing a suitable boot loader in its place. For Ubuntu, grub-pc is the usual BIOS-mode boot loader and grub-efi is the usual EFI-mode boot loader; but in my experience, GRUB's EFI version is pretty flaky, so I personally prefer to use others. Switching out the Linux boot loader may require using an emergency boot disk. See my Web page on the topic for a more thorough coverage of this topic.


How to get out of tty1 when you don't know your login and password

And where do you want to go? The desktop? If so Ctrl+Alt+F7  is probably where the desktop is (some desktops reside on Ctrl+Alt+F1  but since you already see that I assume you need tty7).

If there is no desktop on your system you can do Ctrl+Alt+Del. That often is set as a reboot

Sidenote:

If Ctrl+Alt+Del does not work but you do have a login in the future you can set this in either /etc/inittab with

 ca::ctrlaltdel:/sbin/shutdown -t3 -h now

or /etc/init/control-alt-delete.conf with

start on control-alt-delete
exec /sbin/shutdown -h now "Control-Alt-Delete pressed"

Use a live session to reset your password. It likely is not what you believe it to be. See How do I reset a lost administrative password?


How to install Ubuntu while keeping my files' backup disk partition I made with windows (D:)?

A) UEFI/BIOS

Set to "UEFI mode only" (no legacy/CSM).

Disable "secure boot"

Disable "Intel Rapid Start" (if equipped)

Disable "fast boot" in UEFI (note this is different than the "fast startup" setting in Windows 8/10). The options in your UEFI/BIOS might say something like Full/Minimal/Automatic for boot mode. Select Full (or thorough, or complete, etc whatever your UEFI vendor has chosen to call it).

B) Advanced Power Options (Fastboot)
Disable fast startup in Windows 8/10 under "advanced power options". Restart the computer to ensure that this subsequent boot and the next reboot/shutdown will be in "normal" mode.
C) Bitlocker (For Windows 10 Pro)
If you have Windows 10 Pro and encrypted the drive with "Bitlocker" remove the encryption.
D) Rufus / Bootable USB stick
Use Rufus to create a bootable USB stick with your choice of Ubuntu based distro. Make sure in Rufus that you CHOOSE the option UEFI/GPT only. This ensures the Linux environment boots only into UEFI mode during your install.
E) Boot Menu
Reboot your computer and press key for one time boot menu (Dell is typically F12). Select your USB stick from the boot options.

Note:
Make sure it says UEFI in front of the USB stick in the boot menu.
If not, return to Windows and recreate your USB stick with Rufus ensuring you choose the UEFI/GPT (only) option.

F) Boot into USB Stick
Boot into Linux live environment and begin the install.
G) Installation type
When you get to the installation option, choose "Something else" at the bottom of the Ubiquity installer.
H) Create partitions
Find your C: partition. It will be called something like /dev/sda1
Select it and press the "-" sign to delete it and create "free space".

1st Partition / Root (All the software you install are stored here)

Select "free space" that you created by deleting the C: drive.

Select "+"

Partition the target drive as follows:

Size: min. 10 GB (25GB+ recommended. I have 40GB)
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/"

2nd Partition / Swap (Only needed if you want to Hybernate)

Select "free space"

Select "+"

Partition the target drive as follows:

Size: Depends on your RAM. See Swap FAQ.
Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: swap

4th Partition / Home (Only needed if you want to keep your personal files separate from / Root partition. It seems you save your personal files in D: so you may not need this.)

Select "free space"

Select "+"

Partition the target drive as follows:

Size: Remainder of "free space" or any size you want. (You will need to leave some space if you want to make another partition. Of course, you can always shrink "/home" partition later)

Type for the new partition: Primary
Location for the new partition: Beginning of this space
Use as: ext4
Mount point: Choose "/home"

I) Installation & Reboot

Finish the installation process and reboot (removing the USB stick when your UEFI/BIOS screen logo appears).

J) Upon reboot

Boot into Linux

Install any updates

**K) Setup Automout for D:

Open the "Disks" utility.

Select the partition you want to automount. (D:)

Click the icon with 2 cogwheels. (Additional partition options)

Select "Edit Mount Options".

Turn the "User Session Defaults" option to "Off".

Check the box "Mount at system startup" Make sure "Show in the user interface" is also checked.

Replace the line that says nosuid,nodev,nofail,x-gvfs-show to users,uid=1000,dmask=027,fmask=137,x-gvfs-show,utf8.

Change the "Mount point" to something less complicated like /mnt/D or /mnt/MyFiles.

Change the "Filesystem Type" to ntfs-3g.

Click "OK" and you are all set!

Borrowed and edited from user613363's answer. (Dual Boot Windows 10 and Linux Ubuntu on Separate Hard Drives)


How can I configure vnc-server remotely via SSH

You should be able to manage the dconf settings remotely using gsettings, using the org.gnome.Vino schema

$ DISPLAY=:0 gsettings get org.gnome.Vino require-encryption
true

$ DISPLAY=:0 gsettings set org.gnome.Vino require-encryption 'false'

$ DISPLAY=:0 gsettings get org.gnome.Vino require-encryption
false


Ubuntu 19.10 upgrade has destroyed my laptop. Is there any way to recover?

It looks like the problem is that 19.10 will not boot on the Dell xps15-9560.  I've done a fresh install of 19.10 from a bootable USB stick and get the same problem.

Ubuntu should pull 19.10 before it causes more destruction.


If you used dd to copy the entire flash disk to the hard drive, then you still have partitions sized appropriately to fit onto an 8GB drive.  You'll need to boot using an Ubuntu CD (instead of into the OS itself), and use the utility gparted to expand the partitions appropriately to fill the drive.