Weird hostname resolving to my localhost

This isn't a security problem. It's perfectly possible for anyone to set up any domain name and have its A record point to 127.0.0.1, or a CNAME to localhost or localhost.localdomain.

If you have a security problem, it is due to an assumption that others cannot do this. Nothing should rely on this assumption, since they can.

A DNS entry can point to anything.


locate not returning files residing on mounted disks

As @muru said, it turns out that updatedb is a batch updater. My indexing job which was running for about 10 hours just completed and I get results on mounted drives (and previous jobs that I thought succeeded failed unattended).

In case you're wondering why my job takes 10 hours, I have some large terrabyte disks with huge hierarchies (from backing up old computers).

Moral of the story : be patient :)

Followup

I wonder if there's a way to run updatedb on one disk at a time.


Cannot install Teamviewer_linux.deb package on linux 64bit

Try this

dpkg --add-architecture i386
sudo apt-get update
wget http://www.teamviewer.com/download/teamviewer_linux.deb
sudo dpkg -i teamviewer_linux.deb
sudo apt-get install -f

it is answered here: Installed Teamviewer using a 64-bits system, but I get a dependency error


error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory

Whatever is ncl (I suppose it's some kind of proprietary software), it seems it is linked to an old version of libssl. Of course, you are sure as hell not going to find this old version of the library in your Ubuntu.

What you can try, though, is creating a symlink with the respective name that would point to your "real" libssl. To do that, you will need to do a couple of tricks with command line, though.

Run this:
sudo ls /lib/x86_64-linux-gnu/libssl*

That will return something in line with /lib/x86_64-linux-gnu/libssl.so.1.0.0

Note the "libssl.so.1.0.0" part or however that name may differ in your installation.

Now, enter this command:
sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/x86_64-linux-gnu/libssl.so.0.9.8

Change the "libssl.so.1.0.0" to whatever you found in your system.

After you're done, try running that damn "ncl". :)

EDIT: Best of all, you can try to install the libssl package from older Ubuntu version, such as 14.04.

First, download the libssl-0.9.8 package from the Ubuntu 14.04 version:

wget http://security.ubuntu.com/ubuntu/pool/universe/o/openssl098/libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb

Then, just install it:

sudo dpkg -i libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb

This should do the trick.


Can't install any programs on Ubuntu 16.04 after trying to use command to install runescape

Somehow you didn't follow the instructions on how to install runescape. You ended up coping the install instructions file to /etc/apt/sources.list.d, instead of executing the file or the commands contained therein.
So, do the following (best to use copy and paste for the blue commands):

start terminal from the Unity dashboard and enter the commands in blue, shown below.

sudo mv /etc/apt/sources.list.d/runescape.list ~/Desktop/runescape_install.sh

sudo rm /etc/apt/sources.list.d/runescape.list.bk
If you get errors in step #2, stop here. Report back.

cd ~/Desktop

sudo chown camshas:camshas runescape_install.sh

sudo apt-get update
If there are any further errors in step 6, report back with exact details.

cd ~/Desktop

cat runescape_install.sh

select all of the text output, right-click on the selected text, and choose copy

right-click on any blank area in the terminal window, and select paste, and hit the enter key. Enter your password when prompted.

update: the user was changing things on his own while I was trying to assist. Ignore steps 1-10, I deleted the runescape files in /etc/apt/source.list.d, and instructed the user to start install from the beginning, following the instructions found at https://www.runescape.com/download.


How to make tab completion append slash for directory symlinks?

Enable the mark-symlinked-directories option for READLINE. There are few ways to do that:

Customize your readline by putting commands in an .inputrc file:

Create or edit ~/.inputrc and add these lines:

$include /etc/inputrc
set mark-symlinked-directories on

Log-in/Log-out or press ctrl+x and ctrl+r to reload the settings.

Customize your readline by putting commands in the .bashrc file (or in the .profile file):

Edit ~/.bashrc and add this line:

bind 'set mark-symlinked-directories on'

Log-in/Log-out or source the file:

source ~/.bashrc

Customize the readline for all users by creating a .sh file into the directory /etc/profile.d:

Create a file /etc/profile.d/mark-symlinked-directories.sh which should looks like:

#!/bin/sh
bind 'set mark-symlinked-directories on'

Executable permissions to this file are not needed.
Log-in/Log-out. That's it.

Further reading:

READLINE section in the manual page of Bash
The source of the first two ways
The source of the idea for the third way

One simple way that I found is double tab for completion:

c d space D o
 c tab tab

The first tab will append uments, the second one will append / and the third will print the list of contained directories.


SSHFS messes up everything if i lose connection

How to setup sshfs with the "reconnect" option

Pulled from this answer.

You can run sshfs with the "reconnect" option. We use sshfs with PAM/automount to share server files for each workstation in our network. We use -o reconnect as parameter for sshfs, mostly because our users suspended their computers and on wake sshfs would not reconnect (or respond, or anything).

For example:

sshfs mvaldez@192.168.128.1:/home/mvaldez/REMOTE /home/mvaldez/RemoteDocs -o reconnect,idmap=user,password_stdin,dev,suid

Just a note, if the remote computer is really down, sshfs may become unresponsive for a long time.


A search on Duck Duck Go brought me to http://answers.launchpad.net/ubuntu/+source/cups/+question/226171 where I managed to add another repository and managed to install the printer driver that way.

The repository is https://launchpad.net/~michael-gruz/+archive/ubuntu/canon-trunk

Add the repository using these commands

sudo add-apt-repository ppa:michael-gruz/canon-trunk
sudo apt-get update


does anybody knows a good currency widget for ubuntu 14.10

Ubuntu Software Center has only one Currency Converter and it only converts to and from Euro: KEuroCalc

But you can also use a multi-feature calculator like Qalculate to do the job (although it can only be added to Unity Launcher, and not the Top Panel or SysTray.

The application downloads the latest currency rates, and then  all you need is to type in something like GBP 1 to USD and press Enter to convert.

More info here: http://www.maketecheasier.com/qalculate-powerful-calculator-for-linux


Desktop doesn't remember brightness settings after a reboot

The file /etc/rc.local should look like this:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo 0 > /sys/class/backlight/acpi_video0/brightness
exit 0

Per @zerdo: In my dell studio 1558 the brightness setting is stored in /sys/class/backlight/intel_backlight/brightness.  Just change the path if your computer doesn't use the acpi_video0 folder.

Also, per @Nick :
If this is the only answer you read, note that the 0 in echo 0 is going to be your default brightness setting. I had set this up and it was driving me crazy for a long time : every time I booted up, it would set it to the lowest brightness setting. I prefer mine to start at max brightness, so I used echo 10 instead. Your hardware might vary in brightness scale.


~ is a shortcut to your home directory. So you'd type cd ~ to get to your home directory, or cd ~/Desktop to get to your desktop.

However, if you've used sudo su to become root, this won't work - it'll take you to root's home directory.

cd /home/<your username>/Desktop will always take you to your desktop folder if you have access permissions. I'm not sure if there's a faster way while logged in as root.


How to connect to other Ubuntu machine as X Server?

You can either simply open a Terminal window on your local machine and use the command

ssh -X user@remote

The $DISPLAY variable is automatically set to route via the SSH connection (i.e. it will be something like localhost:10.0).

Alternatively you can install the Linux version of Putty on Ubuntu and enable X11 forwarding under Connection->SSH->X11 exactly as you do for Windows (which also sets the $DISPLAY variable as above).


How to launch a VM inside a VMWare player with a shell script?

It is possible, although somewhat complicated as the documentation for performing this is a little obscure to me.

First, you must ensure that the VMWare tools are installed and running on your guest machine.  In Linux, this does mean compiling them, and in Windows, they can be installed from the disk.

Secondly, you must have the vmrun utility.  This might be included with vmware plaer, if not, you will need to find and download it from vmware.com

An example command that I used to test the feature is this:

vmrun  -T ws -gu username -gp password runProgramInGuest ./vmware/Ubuntu/Ubuntu.vmx -noWait  /usr/bin/X11/xclock -display :0

As you can see from the picture below, this was successful


Probably you are downloading the wrong file.

Just go to the Downloads page and download cwb-3.0.0-linux-i386.tar.gz if your OS is a 32bit one or cwb-3.0.0-linux-x86_64.tar.gz if you are using a 64bit Ubuntu version.

If you dont know which architecture you have you can write in a terminal uname -p to find out.

After that, just extract that file to some place (your desktop, for example), and use a terminal to navigate there and run the installation script:

$ cd ~/Desktop/cwb-3.0.0-linux-x86_64
$ sudo ./install-cwb.sh

Hope it helps.


is my ram usage natural? (clean ubuntu install by vps provider)

100Mb out of 2Gb of Ram is about 5% usage - it would probably be fine even if it was using 90% - even if it was 100%, it should use any swap space that is available

The desktop environments themselves use up to 500Mb (½Gb), and any programs that are running use it as well on top of that.

It should be fine - don't worry about it


Installing GRUB boot Loader freezes when Running "grub-install dummy"

This is not an answer, but rather a request for more information. I'm using the answer format to make the request easier to read.

I (still) can not determine from the log messages you added to your question what is happening.

Could you please copy the entire contents of /var/log/syslog to a pastebin, for example  paste.ubuntu.com, so we can look it over?

One way to do this is to

Boot your 12.04 Live CD or USB and select Try Ubuntu
Use the file manager to open the (root) folder of the partition into which you are attempting to install Ubuntu.
Open var/log/syslog on your install drive in a text editor. Select and copy all the text in the log file to the clipboard.
Open Firefox and go to http://paste.ubuntu.com and paste the text of the syslog file into the Content: box. Then click the Paste! button.
The page will refresh and the URL of the page will change to something similar to http://paste.ubuntu.com/1001713/ Save this URL!
Add it to your question by editing/updating it so that we can look at your syslog entries.

Below is another way to accomplish the same thing as above. The only difference is that the method below installs and uses a utility named pastebinit. I suppose the above method might be considered easier. But I rationalized that there may be some slight educational value to showing how to do the above with pastebinit.

Boot your 12.04 Live CD or USB and select Try Ubuntu
Open a terminal window.
(Note: you can use the keyboard shortcut CtrlAlt+T to do this.)
Run the command gksudo software-properties-gtk to open the Software Sources window. Make sure universe is checked as a source. (See example screenshot below). Then close the window.

Run the command sudo apt-get update
Run the command sudo apt-get install pastebinit to install the pastebinit tool.
Enter the text pastebinit -i into the terminal window, but do NOT press Enter.
Use the file manager to open the (root) folder of the partition into which you are attempting to install Ubuntu. Navigate to the var/log folder. Select the file syslog.
Use your mouse to "drag and drop" the syslog file from the file manager window to your terminal window. You should end up with a command on the command line in the terminal window similar to the one below.
pastebinit -i '/media/0fbd8146-bba5-4754-b7e6-c3e63f415566/var/log/syslog'
If the command looks correct, then press Enter
The output from the command should be the URL of the pastebin. It should look similar to this: http://paste.ubuntu.com/1001713/
Add the URL to your question by editing/updating it so that we can look at your syslog entries.


How can I use sed to remove all characters before a specific symbol?

To delete everything before the first equal sign:

sed 's/^[^=]*=/=/' everyone.pls

If the file everyone.pls looks like:

$ cat everyone.pls
File 1515 = foo.txt
File 1516 = foo=.xls

The the above command produces:

$ sed 's/^[^=]*=/=/' everyone.pls
= foo.txt
= foo=.xls

In the regex ^[^=]*=/, the leading caret means that the regex has to match starting at the beginning of the line.  The expression [^=]*= matches every character up to and including the first equal sign.   Because we want the equal sign in the output, we need to substitute for all that an equal sign.


What version of Ruby am I really running?

If you have installed two ruby version, like in your case you installed ruby 1.8.7 and ruby 2.0.0.

Now if you want to use ruby2.0.0 then type following command in your terminal:

rvm use 2.0.0

Then check ruby version by typing following command :

ruby -v

Now If you want to use ruby 1.8.7 then in  use 1.8.7 instead of 2.0.0

If you want to install ruby1.9.3 then type following command in your terminal :

rvm install 1.9.3


Is there any way to install Windows 8 without touching Ubuntu partitions?

You could resize Ubuntu's partitions from a Live CD/USB using gParted and then install Windows in the free space.

Windows will likely munch Ubuntu's bootloader, which you'll need to reinstall after installing Windows, again from the Live CD or USB. This is covered in the documentation here:

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


Any reason to NOT install both bootloader and Ubuntu to external HDD?

It doesnt sound logic to me because the whole point of grub is to load different OS from a drive at boot up.

If you have an external drive just make it bootable. I don't see how could grub be useful.


In Right bottom click on the wifi signal bar, it will show nearby wifi networks.
or
Type
nmcli dev wifi
or
nmcli -f ALL dev wifi
in  qterminal to get more details on wifi networks around


How can I use sudo after locking my password?

After running passwd -l on a user, that user can't set their password (until after it's set back to something usable).

Since you cannot use sudo, you'll need to reset your user account password, the same way as if you'd just forgotten what it was:

How do I reset a lost administrative password?
Or How do I reset a lost password (using recovery mode requires me to type the password)?

Then you can use sudo again, and you can set PasswordAuthentication no as explained in steeldriver's answer.


png terminal is related with gd library so I have to :

install gd library
reinstall gnuplot from source file


How do I segregate multiple files based on file size into a sub directory?

I suggest to loop over all files in the current directory with this for loop:

for i in *; do
  size=$(stat --printf="%s" "$i")
  if [ $size -lt 100000000 ]; then
      mv "$i" A/
  elif [ $size -lt 500000000 ]; then
      mv "$i" B/
  else
      mv "$i" C/
  fi
done

You requested Megabyte, if you actually wanted 100/500 Mebibyte use 104857600 and 524288000 accordingly.

If the directory contains other files and you just want to process e.g. .avi files, use:

for i in *.avi; do …

Explanations

for i in *; do … ; done – loop over all files in the current directory
size=$(stat --printf="%s" "$i") – get the file size in bytes using stat and save it as variable size
if A; then B; elif C; then D; else E; fi – if A is true do B, else if C is true do D, else do E
[ $size -lt X ] – test whether size is less than X
mv "$i" Y/ – move the currently processed file inside folder Y


Ubuntu doesn't seen to recognize language

Finally! I got a way to solve the problem. First of all, thanks Gunnar for your dedication haha.
So, the only way I could resolve it was:
 1 - I took another machine with Ubuntu 19.10 just installed and checked if it works.
 2 - I've made a copy of 3 files from the other machine and used overwrote in mine. They where: /usr/share/X11/xkb/rules/evdev.xml, /usr/share/X11/xkb/symbols/pt.txt and /etc/boot/environment.d/90atk-adaptor.conf
 *The first file, evdev.xml, tells the system all the existent keyboard layouts
 *The file pt.txt, is the configuration to all portuguese layouts
 *The file 90atk-adaptor.conf, turns on the caracter "Ç" when pressing " ' " + "c"
 3 - Rebooted my laptop to aply changes

Now it works: ã á ç


Delete lines in several files in a folder once (avoid infinite loop)

You can use a for loop, so the command is executed for every file exactly once:

for file in *.dat; do sed -i.bak '1,2000d' "$file"; done

Notice, -i.bak backs up the original file with .bak ending.


Well thats was a bad idea using disk management of windows xp

What Happed is that Windows disk management has created partitions in the wrong sectors or is ailed them wrong when changing the partitions table.
I have had this error before and it is fixable you need to re make the partitions to the right sectors you're data should be still there if no formating took place.

The same problem is addressed here


You can do it with sed with the -i command to edit in place.

Example:

$ cat testfile
A2245 4764ABC0000342

$ sed -i 's/0000342/0000992/' testfile

$ cat testfile
A2245 4764ABC0000992

Hope this helps!


How to make ClickButtons work without affecting the Touchpad (X1C)

Starting with Ubuntu 15.04, ClickButtons seem to work automatically, so there's no longer any action needed to make them work.


Crackling Sound when playing two distinct Sounds Ubuntu 15.10

Ok, I 'fixed' the problem by turning down the (master) volume at the soundcontrol - I think my onbaord soundcard had problems with an amplitude this high.


The command glxinfo will give you all available OpenGL information for the graphics processor, including its vendor name, if the drivers are correctly installed.
To get clock speed information, there is no standard tool.

For ATI/AMD GPUs, aticonfig --odgc will fetch the clock rates, and
aticonfig --odgt will fetch the temperature data.
For NVIDIA GPUs, the nvclock program will fetch the same information.

I am not aware of an equivalent tool for the open source drivers or for Intel or other GPUs.
Other information on the hardware can be fetched from the lspci and lshw tools.


How to allow other machines in my network to use postfix email on my machine? (CCDC)

Postfix is daemon that handle SMTP(S) protocol and using for sending mails only: somebody can send messages to you and you (or your users) can send messages to anybody.

For get access to received mails you need another program which handle POP3/IMAP protocol. For example Dovecot.

As example, you can use next tutorial for configure your mail server.

https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin

As result, you should have accounts (virtual mails) for all your users.
They will use SMTP protocol for sending and POP3/IMAP for receiving mails using your server.


"The program 'tex' is currently not installed" error after texlive installation on ubuntu 12.04

It's important that you just don't follow instructions blindly and also that you make decisions that are appropriate for you. If you're just a beginner choosing the default options and preferring (TeX) packages from the Ubuntu repositories over external sources is the best option.

Stop here and read the last paragraph again...

Really.

Cause

The instructions you probably followed suggested to not install symlinks, which is why all the resources, like binaries and manpages, are not in your environment (PATH variable) and Ubuntu doesn't know where these are installed or even if they are installed installed.

Also note the directories in the screenshot for a hint if you don't know where you installed TeX live (assuming that these aren't customized).

Correcting the mistake

As the instructions don't seem to provide how to setup the missing symlinks¹, reinstalling to the same location as before, but this time with creating symlinks option enabled, would be one option.

The other option would be to remove what TeX live installed (seems to be in /usr/local but /opt is also a possible location, only remove files and directories related to textlive, other programs may have stored files there too, more details see FHS) and install the version from the repositories. Upgrade to a newer LTS release if you need a newer version of TeX Live

¹ Possbily related: How to install “vanilla” TeXLive on Debian or Ubuntu?


Pressing "q" did the job. Brings me right back to the choices.


I know this isn't a fix (I too have issues with the shell freezing, but not on the search iteself), but you can do the following to restart the shell:

Alt+F2, type 'r' and press return.  Even if the alt+f2 dialog doesn't show, it will still take your command and run it.  This restarts the shell but doesn't log you out or anything.


How to change mounting point or resize root partition

According to the image you have provided, there is still more than 27GB of free space on sda2, which is the root drive, which is normally plenty, unless you're using very large applications, or MANY MANY applications.
If you still feel you need to repartition the root drive, you need to do the following:

Boot from your install media (DVD, or USB that you used to install ubuntu)
Choose the option to try Ubuntu (Not install). This should load to a desktop environment.
Use GParted in this temporary session to resize, and move partitions on your system as needed.
Reboot your system, when you're done.

For changing the size of the root, or home partitions on an existing installation, this is the only way, because you can't moved, or resize partitions that are mounted. Root, and Home are always mounted on normal boots.
Changing the mount point is more complicated, requiring much more work. (creating new partition, moving files from root to new partition, while keeping all permissions intact, editing fstab, and telling Grub where to find the new root.)
In my opinion, this is the easiest fix for your situation, based on the requirements of not doing a full reinstall.


How do I install Lazarus in Ubuntu 17.04?

Be sure that libgtk2-dev is installed, and then open a terminal. Use cd to go to where you downloaded the 3 files and install them using this command:

dpkg -i fpc_3.0.2-170225_amd64.deb fpc-src_3.0.2-170225_amd64.deb fpc_3.0.2-170225_amd64.deb

This method worked for me in Ubuntu 17.04.


How do I find out what is running immediately following login?

You use the terminal and look up the processes manually. For that, type in the console:

  ps aux

The use of grep is very usefull in combination with that e.g.

ps aux | grep dbus


Here is a solution. Hibernate option in desktop session and login screen as below:

Desktop Session :

Login Screen :

First open your terminal and add the following :

sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

A txt file now is opened add the following lines :

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

Save and reboot your system after that hibernate should appear and function well.


Just watch an Alsamixer Tutorial.

...try going to alsamixer (type alsamixer in terminal).

I found many bars having their right channel lower than their left. (In this image you see only one bar). So I just lowered all their volumes to zero and back up again so they became even.

(Navigation in alsamixer is easy. Just use your arrow keys. Right and left to select the bar, up and down to lower/raise the volume).

Make sure your sound card is the one selected. Pressing F6 will show you a list for the available sound cards. Select yours! ...If you're not sure try them all. It's not dangerous ;)

...It's a bit odd that balance wasn't showing this difference in channels in the sound settings nor in pulse audio volume control. alsamixer did the trick however. Hope this helps.


Unable to install Ubuntu on Lenovo Yoga 310

I was able to install Ubuntu and Zorin 12 in my Lenovo yoga 310. I went to the BIOS and enabled Legacy booting and made Legacy the priority. Inserted my bootable USB and installed Ubuntu.


Reminder that pops up even after the set time has passed?

TkRemind (GUI for the Remind program) almost fits the bill so it's what I'm using for now - if I put my computer into suspend at 9 AM and turn it back on at 10:30 AM it will tell me about the 10 AM reminder. It doesn't work if my computer was off, but you CAN tell it to give you all of the day's reminders when you start the program, which means I'm not missing anything anymore. More info on Remind: Linux Journal article


Safe to create a swap partition using GParted?

You probably want to look at this question: Creating a Dedicated swap hard drive

You won't have to use a partition for swap, a swap file is totally fine, no performance penalty at all. See the abovementioned question, use fallocate or dd to create a swap file and swapon to use it. To make it survive reboots, add it to /etc/fstab.


Disable and Enable Internet without disconnecting wifi

Removing your default gateway should do the trick, you'll still be able to reach everything in your subnet, but not outside of it. IIRC this should work, cannot try it atm, replace the IP with your routers IP (in the same subnet):

 sudo route del default gw 192.168.1.1

Edit: To undo it, this should work:

 sudo route add default gw 192.168.1.1

To find your default gateways IP:

route -n|grep "^0.0.0.0"


Deluge tray icon is not clickable in KDE since 12.04

That is the application indicator which is default now for Ubuntu and as with all indicators there are no right-click or tooltip options.

The previous functionality which you are referring to is from the older systray which can be reverted-to in Preferences -> Interface by un-checking Enable Application Indicator.

There is a forum post where this was discussed in a bit more detail.


Some keyboard keys not working in Ubuntu 16.04LTS and none working on Windows. But working fine in BIOS

Check your keyboard by booting into the BIOS.
If it works there, then your hardware is OK.

Then run

sudo dpkg-reconfigure keyboard-configuration

in the terminal and choose the appropriate keybord. Asus should be in the list.


You can use the command in the terminal find for searching an folder:

find / -name tuxpaint

or you can be more accurate in your research by specify an repertory

find /usr/ -name tuxpaint


Can I Recover Firefox and Tor Bookmarks?

In fact, you just have to copy the folder "firefox" and all its content.
This folder is located in the hidden folder ".mozilla" of your personal folder (/home/username/).

On another operating system (Linux, Mac or Windows), you just have to launch Mozilla Firefox once. Then close it and copy the profile folder (xxxxxx.default) from the "firefox" backup folder in the corresponding "firefox" folder for your platform. After that, I recommend you to edit "profiles.ini" and replace the "Path" value by the name of the profile folder copied instead of overwriting that file with the one from the backup.

On Windows 7/8/8.1, you'll find "firefox" folder (containing profiles) in "C:\Users\username\AppData\Roaming\Mozilla\".

That's what I use very often to do the contrary (migrating from Windows or Mac to Linux).

P.S.: Please note that you may have to replace add-ons which are designed for Linux by the ones designed for your platform.


17.10. Disable LShift + RShift switching of keyboard layout

Similar to the problem described in "Problem with shorcuts using Alt key", a possible explanation might be that you have Alt+Shift set up as keyboard layout change shortcut.


Did you try "ctrl+alt+f1" when you are on the black screen ?

It does not take care of the problem but at least it made it possible to install openssh and use the server remotely without having to ctrl-alt-f1 everytime.


How to automate execution of commands in separate terminals?

You can make a shell script, to do so, open a Terminal with Ctrl + Alt + T and type:

touch daily-script.sh

Now we need to edit this file contents

xdg-open daily-script.sh

Next copy paste the below code to your file:

#!/bin/bash

cd $HOME
xterm -hold -e "roscore" &
xterm -hold -e "rosrun nodelet nodelet standalone velodyne_pointcloud/CloudNodelet" &
cd $HOME/Desktop/OpenC
xterm -hold -e "source setup.bash; rosrun pcl_tutorial front_view_bag input:=/velodyne_points" &
cd /media/BE8C6D3A8C6CEDF9/Users/KARTHICK/Desktop/project/ros_datas
xterm -hold -e "rosbag play file2.bag"

exit 0

Once you save the file open a Terminal and type:

chmod +x daily-script.sh

Finally your file is executable, to run it:

./daily-script.sh


Downloaded g++ 4.8 from the PPA but can't set it as default?

You need to let update-alternatives to know that you have 2 C++ compilers, create a record for each one, and then configure which one you want to use. This is done with the following:

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6.3 60
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40
sudo update-alternatives --config g++

From this point forward, the only thing required when switching compilers is this command:

sudo update-alternatives --config g++

See man update-alternatives for more info.

Source: How to use multiple instances of gcc?


Disable monitor dimming in lock screen on Ubuntu 18.04

The solution that finally worked for me after a LOT of research is

xset s off; xset s noblank; xset -dpms


How do I fix problem with trying to install Ubuntu? Black screen appears

Just a thought what happened  to me one time is the disk was bad  and it took me two days to figure that out crazy me  I don't know if that is your problem but might be


You can connect to the activate-uri signal to perform actions on a result displayed in a lens.

Using Python

First, you need to connect the activate-uri signal in the Daemon's init function (where you connect the search-changed and filters-changed)

self.scope.connect ("activate-uri", self.activate_uri)

Then, create a activate_uri function in the Daemon.

def activate_uri(self, scope, uri):
  #Do stuff with uri here
  return Unity.ActivationResponse (handled = Unity.HandledType.HIDE_DASH, goto_uri = '')

This function takes the scope object and the url parameter from the result.  url does not necessarily need to be a uri, but must be text.  You can do whatever you want with the text in the function.  At the end of the function, you need to return the Unity.ActivationResponse as detailed above in order to close the dash.

Have a look at http://bazaar.launchpad.net/~markjtully/+junk/calendar-lens/view/30/calendar-lens-daemon.py line 101 & 274-296 for an example of this in action.

Using Quickly or unity-singlet

With quickly, it is even easier: Add a function

def handle_uri(self, scope, uri):
  # Do stuff with the uri here

to your lens class (in __init__.py). It will be automatically connected to the signal, you do not have to take care of this. Don't forget to add from gi.repository import Unity to your import statements.


IMO, you should first go to the disk manager in Windows and erase the partition you want to use for Linux, before booting from the flash drive. Then installation program should accept to use this free space to create the needed partitions.

HTH


You probably need to load the kernel modules ashmem and binder by running

sudo modprobe ashmem_linux
sudo modprobe binder_linux


The answer is very simple.

Nvidia proprietary driver does not build for this custom kernel. You have options:

Use a standard kernel with mptcp patch.
Use this kernel and uninstall Nvidia drivers.
Fix the build issue in Nvidia module or the kernel.

I am afraid that further questions regarding "how to do one of those" is at the edge of off-topic here.


How to make a launcher(.desktop file) for a binary file?

Here's an example - it starts xnview.sh:

[Desktop Entry]
Encoding=UTF-8
Terminal=0
Exec=/home/pierre/Desktop/XnViewMP/xnview.sh
Icon=/home/pierre/Desktop/XnViewMP/xnview.png
Type=Application
Categories=Graphics;
StartupNotify=true
Name=XnView Multi Platform
GenericName=XnViewMP

Edit:

If You have a nasty complex command to be run - put it all in script and run the script. For example if You have to cd there first, and run the script from there make a script:

#!/bin/bash

cd /to/YourDir
./YourBinaryFile


How to install Visual studio 2012 in Ubuntu

Visual studio works only on windows. Even if you can run it with wine you won't be able to debug or build you code. If you are .NET devlopper you can program C# with monodevelop.

http://monodevelop.com/


The proposed answer was checked out and found irrelevant. Thanks anyway. What I suggest is to control the settings made in the program "Software & Updates" as it apparently was in my case.


I'm trying to install Sublime Text 2 on my Ubuntu machine

Linux isn't very friendly with spaces in file names. In the old days, operating systems couldn't support spaces in file names and spaces in file names can be problematic when programming.

In the command line, a space in a file name is equal to a backslash then a space.

For example, to go to Sublime directory, you would type:

cd Sublime\ Text\ 2/


Where are iptables's rulesets stored on Ubuntu 12.04?

iptables stores the rules in memory but the ruleset created by iptables-save ruleset-name can be found in the file

/var/lib/iptables/ruleset-name

These can be restored by invoking iptables-restore <ruleset-name>.

I can only confirm this for Ubuntu 12.04.03 LTS - maybe this location has changed in later versions of the iptables-package.

I think something like /etc/iptables/rulesets.d would have been a more logical place to store these.

The save-path is configured in /etc/init.d/iptables at line 27 and afterwards used by initd_save() which invokes initd_counters().

libdir=/var/lib/iptables

# ...

initd_counters () {
 if test "${enable_save_counters:-false}" = true; then
    echo -n " with counters"
    $iptables_save -c > "$ruleset"
  else
    $iptables_save | sed '/^:/s@\[[0-9]\{1,\}:[0-9]\{1,\}\]@[0:0]@g' > "$ruleset"
  fi
}

initd_save () {
  rm -f $autosave
  ruleset="${libdir}/$@"
  echo -n "Saving iptables ruleset: save \"$@\""
  initd_counters
  echo "."
}


No, it's not normal, it shouldn't have any bad sectors.

If the drive is new then returning it to the seller makes sense.

If the drive has been around awhile then repairing it is worth a try using fsck.


Upgrade Ubuntu option not availiable when installing from USB stick!

Upgrading from the install medium is only available if you have internet access during the install. The source you are referring to had internet access during the install, that is why he had that option. But gaining internet access during install won't help in your case, because you don't want to rely on your not reliable internet connection.
Official source for the above: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1170531

Dimitri John Ledkov (xnox):
It is correct, we do not support offline upgrades via ubiquity/desktop CDs. And even for servers, it is not recommended to use new server CD to do offline upgrade.
The support upgrade methods are with internet connectivity or a local mirror / package pool. One can for-example use tools like aptoncd to snapshot all installed packages, download them on a machine that has internet connectivity, bring them to the offline machine and upgrade it.
The reason behind this move, is enourmous amount of support cases of broken and partial upgrades since newer installation media will be missing manual additionally installed packages; packages that have now transitioned to new names; packages that have been removed from the default installation. Thus default install media for next release simply doesn't contain everything one will reasonably need to upgrade, hence the internet connectivity requirement.


Moving from SVN to GIT , best way to copy full repos?

Best and natural way is cloning repository with git-svn

git-svn-tutorial


For me, the command killall /opt/google/chrome/chrome closes Chrome properly.
To schedule the command to be run at specific time, you should use cron. There is a lot of instructions on Internet since it is an ancient thing. Or you may create a shutdown script like this

#!/bin/bash
killall /opt/google/chrome/chrome
sleep 5
shutdown -hP now

and use it for shutdown.


You're probably looking for Ubuntu One. It's Ubuntu's cloud service and it works fine for me ^_^ You can also try dropbox but I don't know how integrated it is.

More information and downloads:
Ubuntu One: https://one.ubuntu.com/
Dropbox: http://www.dropbox.com/


I just solved the problem by myself.

I once edited /etc/pulse/default.pa to disable the module-suspend-on-idle, because the first 0.5-1 second of each sound output was cut off. Guess I rather accept that than no sound.

As it turned out, I did this just before I launched VLC for the first time. Sorry for blaming you VLC ;)

YouTube now works again as well.


Gnome and Unity are running at the same time

1) We will need Compiz Settings Manager.

You can install this from the Ubuntu Software Center or by clicking  here (Compiz)

2) Open Compiz (Alt + F2 and type ccsm and hit Enter)

3) Go to Unity plugin and disable it.


Ubuntu and internal WD Digital Black2 Dual Drive -- Did anyone managed to make it work?

Another poster on  askUbuntu seems to have it running. I to am in the same boat as you and could love a confirmation before buying it.


Is there a way to provide serial tasks on terminal while a task is executing (without using a file)?

Yes you can:

Pause the currently running job with the suspend character by pressing Ctrl+Z.
Type fg or %, add what you want to the list and execute it, e.g.:

fg ; systemctl suspend # or
% ; systemctl suspend

Since fg returns the return value of the job it resumed, list operators like && and || work as expected:

fg && echo "Finished successfully!" # or
% && echo "Finished successfully!"

man bash/JOB CONTROL says about the suspend  character:

  Typing  the  suspend  character
         (typically  ^Z,  Control-Z)  while  a  process  is  running causes that
         process to be stopped and returns control to bash. (…) The user may then manipulate the state of this
         job, using the bg command to continue it  in  the  background,  the  fg
         command  to  continue it in the foreground, or the kill command to kill
         it.  A ^Z takes effect immediately, and has the additional side  effect
         of causing pending output and typeahead to be discarded.

fg is explained in man bash/SHELL BUILTIN COMMANDS:

  fg [jobspec]
                Resume jobspec in the foreground, and make it the  current  job.
                If jobspec is not present, the shell's notion of the current job
                is used.  The return value is that of the  command  placed  into
                the  foreground,  or failure if run when job control is disabled
                or, when run with job  control  enabled,  if  jobspec  does  not
                specify  a valid job or jobspec specifies a job that was started
                without job control.

Further reading (aside from man bash) on job control:

TLDP Advanced Bash-Scripting Guide Chapter 15.1. Job Control Commands
DigitalOcean tutorial on How To Use Bash's Job Control
Article “Prozesssteuerung” in the Ubuntuusers Wiki (German)


Can't mount or unmount virtual discs- gives option for "force unmounting"

First, when I restart my computer, it just goes straight to Windows 7, as normal. Is there a separate step to have a selection menu at start-up or does this not apply for VirtualBox runs of Ubuntu?

That's normal. A virtual machine will not come up as an option in the physical host's boot menu. You must start the host OS and the virtual machine manager (hypervisor) before that can happen.

  And I get a choice to "Force Unmount" the mounted ISO file within (which is indeed the VBoxGuestAdditions).

Try ejecting the virtual drive from within the OS first:

You can also use sudo umount /media/title-of-cd from the terminal.
Then try unmounting from VirtualBox. Sometimes that may still give you the warning, but just override it so long as you ejected from Ubuntu first.

.....................


I cannot boot into ubuntu 12.10 after installing it on windows 8

Do you mean 13.10? If so I recommend you edit your question. Otherwise I would try using 13.10, 12.10 was the first ubuntu to support UEFI so I imagine they have improved support a lot since then.


No suspend option in UI on Bionic Beaver

Open the status menu (upper right corner) and hold alt, the shutdown button will turn into a suspend button as long as you're pressing alt (or long press with the left mouse on the shutdown button and it will turn in to a suspend button). There are also extensions that provide both buttons at the same time without requiring this extra step.


Try to check the samba logs for more details about the error. Make sure that you have  created the samba user and password correctly and added it the valid_user list. Try to reset the smb passwd for the user which is giving error.

In the samba configuration file /etc/samba/smb.conf, look for the folder share parameters. Ex. abc xyz and pqr users have the write permission to the share called sales:

[salesdoc]
path = /home/shared/sales
write list = abc xyz pqr

Likewise you can use following options:

read list: This option accepts a list of usernames or a group as its value. Users will be given read-only access to the share.
valid users: You can make a share available to specific users. Usernames or group names can be passed on as its value.
invalid users: Users or groups listed will be denied access to this share.


Keyboard has different layouts while startup and while running

I have checked, you have installed the English (Queens own Great Britain) keyboard.  What you need is the American English Keyboard, which is the one coming closest to the original IBM Selectric keyboard layout!
Great Britain English keyboard layout:

As can be seen the At '@' sign is on top of the single quote button to the far right.
Check your keyboard and load the right one (be sure to test it) take notice the keyboard do not in any way depend on the language or local settings!
Happy Ubunting


How can I install protobuf in ubuntu 12.04?

Taken from http://www.confusedcoders.com/random/how-to-install-protocol-buffer-2-5-0-on-ubuntu-13-04:

  Protocol buffer is a serialization format developed by Google. It is
  Interface driven and is useful for applications that communicate over
  the wire. Below are the steps for protocol buffer installation.

  Download protocol buffer. Protocol buffer libs can be downloaded here. Download protocol buffer.
  Check if g++ compiler is installed on box. Protocol buffer needs g++ compiler to be present on your box before it can be built. This is
  a crisp post on how to install g++ compiler on your box. Install g++
  compiler.
  Extract the protocol buffer archive and switch to the extracted directory.
  Inside the extracted directory hit the below commands to install protocol buffer. These may take a while, kindly be patient.

./configure
make
make check
sudo make install
protoc --version

  That's it. Protocol buffer version 2.5.0 is installed on your box.
  Note: Sometimes the latest version of protocol version does not load up. So we can do it manually by this command

sudo ldconfig
protoc --version


How to backup MAAS 1.5.4 before upgrading to 1.7.1

I think you need to backup the MAAS database (postgres), bits in /etc/maas/ as well as any custom templates or other changes you might have made in /var/lib/maas/.

Sorry to be so vague, I did this upgrade a long time ago :)


No dual boot option, no boot priority order

It sounds like you didn't install Grub to the correct location. You can do this by booting the USB again and do it manually, or run a tool like boot-repair if you're not sure you want to mess with Grub.

Manual method:

Boot from your Ubuntu USB
Select "Try Ubuntu"
Identify the partition you installed Ubuntu on, mount it and install Grub to the drive MBR:

e.g.

ubuntu@ubuntu:~$ sudo fdisk -l | grep '[\t ]83[\t ]' | awk '{print $1}'
/dev/sda5
ubuntu@ubuntu$ sudo mount /dev/sda5 /mnt
ubuntu@ubuntu$ sudo grub-install --boot-directory=/mnt/boot /dev/sda

Notes: the first command identifies any linux partition (MBR disk only), but only works with a single all-in-one partition (which you apparently have). The argument for fdisk is lower case -L. In my example I've set the linux partition to /dev/sda5. If this is different for you, make sure you adjust the next line.

PS even though you tagged your question as Wubi, I am ignoring that as it seems irrelevant. If you actually installed inside Windows with Wubi, then your question is unclear and should be edited. In this, case ignore my answer.


Command `open` not working on Ubuntu Terminal

In linux, xdg-open will open a file with the associated application.
xdg-open ~/.bashrc

will open the configuration file .bashrc located in your home folder (represented here by the shortcut notation ~/ with your default text editor.


Download failed : Oracle JDK 7 is NOT installed

as you know oracle bans some countries and ...
first add the key:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

then use apt-install to install the package:
sudo apt-get install oracle-java7-installer

after getting error 403, use ls:
ls /var/cache/oracle-jdk7-installer/

jar.binfmt  javaws-wrapper.sh  jdk-7u55-linux-x64.tar.gz  wgetrc

copy .tar.gz filename and search/download it on the web (http://enos.itcollege.ee/~jpoial/download/jdk7/).
then copy downloaded file to cache:
sudo cp ~/Downloads/jdk-7u55-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/

to ensure that you download the correct file, use md5sum:
md5sum jdk-7u55-linux-x64.tar.gz
9e1fb7936f0e5aaa1e64d36ba640bc1f jdk-7u55-linux-x64.tar.gz

the result must match with oracle checksum at http://www.oracle.com/technetwork/java/javase/downloads/java-se-binaries-checksum-1956892.html
after this if you run the install command, the installation will be done correctly using cached file:
sudo apt-get install oracle-java7-installer


Using bash, you can use echo "$filename" (between double quote), it will solve your problem.

Otherwize, you can always use, for looping on lines:

mycommandgeneratinglines | while read line; do something_with $line; done


How to convert a mp4 video to MPEG-1 Layer 1?

ffmpeg
can do this easily from command line
ffmpeg -i input.mp4 output.mpeg

There are felt one million additional options to change the output format.


How to enter email adress pressing function key

The idea is to have a custom Keyboard Shortcut (settings, keyboard  shortcuts) and use terminal commands...
How to get a command to output the contents into Terminal, and my system clipboard
using xsel   -
echo "myemail@dada.com" | xsel -ib && xsel -ob
you  might have trouble customising to F1 and need another key combo

make an alias for the above command, then the custom keyboard shortcut to run it as
bash -i -c "aliasname"

then ctrl-v to paste


This is likely an issue with UEFI.  See if you can disable UEFI and boot using Legacy.  Your Windows 8.1 will have to use UEFI if you installed it using UEFI (I think), so you might have to switch between those constantly in your BIOS when you want to change OSs.  Please let me know if you do not know how to disable UEFI and enable Legacy, or run into further issues doing so.  I will be happy to assist.


Dark desktop theme with visible text fields

I use arc-theme since a long time ago and I am pretty happy with it.

Dark version :

Darker version :

Here how you can install it:

sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_15.10/ /' >> /etc/apt/sources.list.d/arc-theme.list"
sudo apt-get update
sudo apt-get install arc-theme


upgrading to Ubuntu Studio from ubuntu 14.04

Well the low latency kernel for one. It comes preloaded with a lot of programs for artists. And then the neat xfse desktop. You will still use Ububtu Software Center for programs or synaptic like usual, but the sound dosn't st studder when under heavy load.
So give it a try, you might like it, like some of us.


how do i change the password prompt format

Edit the /etc/sudoers file using the sudo visudo /etc/sudoers command.

Add a line:

Defaults passprompt="Using username %u. %u@%h's password:"

to it. Save. (Using Ctrl+O) And then exit (using Ctrl+X).

Note the %u and %h values. They will be replaced with the username and hostname respectively.

UPDATE: So, this won't change the PuTTY password prompt. This will only change your system's password prompt when you use sudo.

To change the PuTTY prompt, you'll have to change the prompt in the PuTTY source code.


Yes you can...

This command sets all directories to permissions 755

find /your/selected/dir -type d -exec chmod 755 {} \;

and this one sets all files to permissions 644

find /your/selected/dir -type f -exec chmod 644 {} \;

For better understanding of this command I suggest ExplainShell: http://explainshell.com/


ubuntu 16.04 laptop connects to wireless router but not always to network

For WPA identification (substitute <wifi name> and <wifi key>)

nmcli connection add type wifi ifname wlan1 ssid <wifi name>
nmcli connection modify <wifi name> wifi-sec.key-mgmt wpa-psk
nmcli connection modify <wifi name> wifi-sec.psk <wifi key>
nmcli -p connection up <wifi name>


PUT and DELETE methods are enabled by default and are only usable with handlers.

Example

> a2enmod actions ; service apache2 reload

<Location />
 Script PUT /handler.php
 Script DELETE /handler.php
</Location>


Problem with wine application and unity launcher + dash. Ubuntu 16.04

Ok so SOLUTION was given here. Locking Wine applications in the launcher is not permanent

I am trying to recreate steps one by one as above was difficult for me to understand.

Ok my aim. To show everything at dash and lock it to the launcher.

Location of wine app:  /home/android/.wine/drive_c/Program Files/everything.exe

location of everything_exe.desktop:

android@android:~$ locate everything
/home/android/.local/share/applications/everything_exe.desktop

Ok so if i drag the .desktop file to the launcher to lock then its not working.

android@android:~$ cat everything_exe.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=everything
Icon=c__program_files_everything_everything_exe.png
Path=/home/android/.wine/drive_c/users/android/Temp/nsnb31.tmp/everything (deleted)
Exec=C:\\Program Files\\everything\\everything.exe
StartupNotify=false
StartupWMClass=everything.exe
OnlyShowIn=Unity;
X-UnityGenerated=true

I modified the above to

android@android:~$ nano everything.exe
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=everything
Icon=everything_exe.png
Exec=wine '/home/android/.wine/drive_c/Program Files/Everything/Everything.exe'
StartupNotify=false
StartupWMClass=everything.exe
OnlyShowIn=Unity;
X-UnityGenerated=true

Ok Now when i drag the file to launcher it is now locking to launcher. The file is LAUNCHING

now left to solve is why is it not showing in my dash.........


cron php command causes CIFS NT_STATUS_LOGON_FAILURE

This is likely not caused by PHP5 and instead caused by a samba setup.  Check to see if you have a share in your /etc/fstab which might be attempting an SMB mount to a windows volume/server on a 30min refresh.  My guess is you are seeing two different errors.  Session garbage collection on PHP would not cause the NT_STATUS_LOGON_FAILURE unless you moved your session storage to a Samba-mounted share.

You could determine your session path with this:

php -i|grep -i session.save_path

However, the error you outlined is coming from something else.


Syncing much faster on 11.04 than in 10.10

We've made a lot of improvements to file sync speed that landed in 11.04; we'll be making those changes available to everything back to 10.04 in a few months' time.


Is new Multi-Monitor feature on 12.04 working with nvidia binary driver?

Could you try logging out then logging back in using Ubuntu/Unity 2D (this is an option at the login screen when you click on the gear icon).

Original suggestion found here:
http://ubuntuforums.org/showthread.php?t=1945891


Apache/Flask: Permission denied writing to /var/www even though the folders are set to 777

Okay so I figured out the issue. Answering for anyone else that may face it. The permission issue was probably not from linux. It was from Apache's own security measures.

Basically the folder I was trying to write to was not explicitly added to list of directories in the .conf file, so it wasn't recognized by apache. If you are facing this issue, open the YourAppName.conf file in Apache (usually in /etc/apache2/sites-available/YourAppName.conf>

Add the following lines to it before the '</VirtualHost>' :

    <Directory /var/www/YourAppName/YourDirectory/>
        Order allow,deny
        Allow from all
    </Directory>

YourDirectory will now be accessible for Apache and you will be able to read from and write to it.


You can, but you won't be able to save any data. If you want a portable installation that you can save data on, you can use a USB drive.

To install ubuntu on a CD, follow the directions here to make an installation CD or USB drive. When you boot from this CD/drive, you will be asked whether you want to "Try Ubuntu" or "Install Ubuntu". Choose "Try Ubuntu" to run Ubuntu from your CD/USB drive.


"Boot Error" on live-usb flash drive with 15.10

According to the release notes at https://wiki.ubuntu.com/WilyWerewolf/ReleaseNotes you can't use usb-creator from lower version of Ubuntu ( including 15.04) to make live-usb of Ubuntu 15.10

  Due to changes in syslinux, it is not currently possible to use
  usb-creator from 14.04 and earlier releases to write USB images for
  15.04 or later; we believe that it is also not possible to use usb-creator from a 15.04 or later system to write USB images for
  earlier releases. For now the workaround is to use a matching release
  of Ubuntu to write the images, but we intend to issue updates soon to
  work around this incompatibility

You may still make it from 15.10 or from Windows(universal-usb-installer for example)

I tested usb-creator-gtk from ubuntu 15.10 in my virtualbox, it crashed at the end of the process! So we have to say NO to usb-creator-gtk! Tested with unetbootin 608-1 installed through USC, writing to usb succeeded but usb is not bootable!

However, I found away that worked perfectly inside ubuntu, even with older ubuntu version.

Right click your ubuntu-15.10-desktop-amd64.iso > Open with Disk Image writer
Choose your usb drive and click Start Restoring... and follow the instruction.

That usb is bootable without any error. After installing ubuntu, you will need to format that usb with gparted if you want to store data on that usb again.


How to highlight a searched text in vim editor?

It is an option

open VIM and run

:set hlsearch

To turn it off

:set nohlsearch

See http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches for details


Ubuntu 14.10 LTS 64 bit wont boot without live usb

First boot the machine with USB, open the terminal and add the below commands,

sudo apt-get install efibootmgr

sudo modprobe efivars

sudo efibootmgr

After this remove the USB and check whether the issue goes off.


/usr/bin/X11 is a symlink pointing to /usr/bin/. So if you open /usr/bin/X11 you actually open /usr/bin/, and that still contains the symlink X11 pointing to /usr/bin/ ...

This symlink is used as the folder /usr/bin/X11 isn't really used any more by Ubuntu and all the files it used to contain are really in /usr/bin/ now. Thanks to the symlink they are still found in their old place if a program or user is expecting them there.

The file /usr/bin/synaptic-pkexec is part of the package synaptic so it should be there if Synaptic is installed. As there are a lot of files in /usr/bin/ it may take some time for the file manager to show them all.

On the command line you can use

ls -l /usr/bin/synaptic-pkexec

to check if the file /usr/bin/synaptic-pkexec is there. The output should be something like

-rwxr-xr-x 1 root root 43 Jan 30  2012 /usr/bin/synaptic-pkexec


I think I found the solution here on Ubuntu forums

In short:

echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf

It disables some power management thing (I don't know the details), and it seems to have fixed my issue (although I think it means my battery drains when on standby :-/ ).


My only account is not in the sudo group

You will likely have to boot off a live CD or some other medium, mount the root partition of your main install, and edit the /etc/group file and add your user name to the admin group (that is, find the line starting with admin and add your user name to the fourth field).

Once that is done, you should be able to boot normally and have sudo privileges.  You'll probably want to reinstate your other group memberships.  On my system, I have the following:

james (which is also my user name: you should have a group based on yours, and it should be your primary group membership)
adm
dialout
cdrom
plugdev
lpadmin
admin
sambashare

You should be able to make these changes in the normal way.

To add a group membership without replacing all the others, the command you should have used is:

sudo usermod --append -G vboxsf fooname


Unlocking laptop appears to open the HUD

There is known bug and this workaround works fine for me:

mjh (moonbug1970) wrote on 2013-10-21:
My workaround was to disable the "Left Alt" shortcut key for the HUD.


I have 2 wifi cards and want to route all web trafic through 1

I figured it out, and it is really easy to do using Ubuntu's wifi gui.

For the following explanation My_Network_SSID = the isolated IoT network. There might be two networks of the same name because you may have established connections with both cards and so a configuration has been made for each card. Ubuntu just appended a 1 at the end of the correct SSID (because the network card I want to configure was the second card to access that SSID).

I click WIFI_SYMBOL->Edit Connections->My_Network_SSID->Edit->IPV4 Settings->Click "Method:" dropdown and select Automaic (DHCP) Adresses Only.

This will stop DNS requests from being routed through that router.

While still on IPV4 Settings, click Routes(Button on bottom right)->Use this connection only for resources on the network(Check Box). Then save the settings and connect!


firefox asks me to download json file containing the search results each time google

This issue is not Ubuntu-related, it happens to me when running Windows too. It happens when Google's instant search becomes unavailable and you have press enter to search. In other words, it's not you or your computer's/browser's fault.


terminator terminal issue are F12 quake mode hide

You could have simply killed the process like so... (often useful)

sudo pkill -9 terminator

Back to the terminator problem... Did you right click on it to try to maximize it, did you accidently use roll-up instead? (roll-up has gotten me)


I want to connect to my ubuntu terminal using putty. I have installed putty already. How can I do it?

127.0,.0.1 is the loopback address, meaning the machine "talks to itself" You need to enter the address of the ubuntu machine you want to connect to. You can find out on your router, or from a terminal prompt (on the ubuntu machine) with ifconfig and look for an ip address near one of the interfaces (wlan0,eth0 etc..) (not interface lo)


How to use StarTech USB32HD2 with Ubuntu 18.04?

From official site of a product:

Compatibility:
Windows® 10 (32/64)
Windows 8 / 8.1 (32/64)
Windows 7(32/64)

There is no Linux, so where did you find an info about Ubuntu?


Webdevelopment

You can develop web applications the way like you would do on any other OS.
Install LAMP

Default you've to store all webfiles in /var/www folder.

You can use the default editor Gedit, but their are enought (better) editors.

Ubuntu Server

Ubuntu server guide

Ubuntu Desktop

Ubuntu desktop help

Community Help wiki


Optical character recognition for LibreOffice

The Scanning and OCR page on Ubuntu Apps show us several alternatives, of which I suggest you to use XSane Image Scanning Program or Simple Scan (usually pre-installed in 12.04 and maybe earlier versions too) and/or gscan2pdf, to get your documents scanned.

My favorite is gscan2pdf, which allow you to follow the Scan/OCR process in the same GUI with no problem.

Please notice that I am attempting to run a OCR to a screenshot.

You simply Scan or Import the documents/images and go to the Tools Menu, choose the OCR Option and you'll be asked for a OCR Engine, simply choose the one that gives the best results for you and click "Start OCR".

You'll find the OCR Output in the tab with the same title as shown in the next screenshot.

Please note that even with good quality images the OCR may fail interpreting certain characters, which may result in misspelled words or simply Egyptian hieroglyphics. The process to OCR a large set of documents may delay for a while.

Here is a link to a comprehensive video which explains the process to Scan and OCR in GScan2PDF: http://www.youtube.com/watch?v=UjjogfWfWsQ

Good luck!


How do I safely run a graphical application as a normal user while root?

sudo -i should work in reverse too but you need to state which user you want to run as:

DISPLAY=:0 sudo -i -u oli zenity --info --text "Oh hai!"


Can't see the windows partitions from Ubuntu

Dell laptops come with BitLocker enabled from the factory and it causes no end of problems.  Loads of reports of people unable to access their data because of faults with it. The encrypted drive meant that Ubuntu could not read.

I disabled BitLocker in Windows (which took forever) and now the OS drive appears in the "Other Locations" part of Nautilus.


I had the same issue which got resolved by downgrading my libbsd0.
sudo apt-get install libbsd0=0.6.0-2ubuntu1

My libbsd0 was versioned 0.7.0-2+deb.sury.org~trusty+1 which is probably incompatible.


External monitor slow/laggy when in standlone mode

I encountered the same problem (Ubuntu 18) and could solve it by selected the 'proprietary, tested' driver for my graphic card!
In other words, the recommended one.
You should check if you are using the 'official' graphic driver or another one / old one like this:

Open the "Software & Update" app
Click on the "Additional Drivers" tab and wait a bit for it to load
Make sure to select the driver with the "(proprietary, tested)" text!
Click on the "Apply changes"
Restart computer

In my case, I was using the "X.Org X Server - Nouveau" driver (I can't remember how/when I selected this one..)
I switched to "NVIDIA driver 440 (proprietary, tested)" an rebooted my PC: no more issue / lags when using external screen only!


If you run

sudo apt-get update
sudo apt-get install -f

this should be resolved. But you need to be connected to internet.


How to add the town name to the conky Harmattan configuration?

Open the ~/.conkyrc file. This is a hidden file in your home directory. You can see the hidden files by hitting Ctrl+H.

In this file, find a line that says

# The "conditions" section of the conky #

3 lines below the above line, there's a line beginning with

${goto 46}${voffset 14}${font Droid Sans :size=12}

We will use this line later.

Make a new text file using your favorite text editor and add the following in it:

#!/bin/bash
grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" |tr -d '\n' && echo -n " - " && grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"

Save the file in your home folder. I saved it in ~/.conky-weather/town_descr. Remember to  mark it as executable by going to Properties->Permissions->Execute file as program.

Then go back to that line you've found into ~/.conkyrc and edit it to be like this:

${goto 46}${voffset 14}${font Droid Sans :size=11}${color1}${execi 300 ~/.conky-weather/town_descr}${font}${color}

Notice we've reduced the font side to 11 because now the town name will be displayed as well and we need more space.

Result:

Notice the "Patra - Partly Cloudy"


Gimp uses only one CPU when applying a Gaussian Blur

Multi-threading for GIMP filters will be introduced with GEGL support in future releases. At present there is work in progress to port Gaussian blur but this is not yet available.

As an alternative we can use the third-party plugin G'MIC which claims to at least partially support multi-threading. This plugin is available through the gimp-plugin-registry  or newer version from ppa:otto-kesselgulasch/gimp.


Window buttons have suddenly changed to the right side

You can easily fix this using Ubuntu Tweak>Tweaks>Windows and change from left to right or vice versa.


Solution

I also changed something and it was looking like loop back always when I tried to log in, but the solution is next:

When you are on login screen open TTY by pressing Ctrl+Alt+F1, if you have enabled functional keys press Ctrl+Alt+Fn+F1. Login to your account on TTY session using your login credentials.
In TTY session type command: sudo su and press Enter.
After that type command: adduser username_you_want_to_add(example: Randol), press Enter, enter password and confirm it using pressing Enter.
Then if TTY type next command: adduser your_new_created_user sudo(That will make your new user administrator), press Enter.
Now press Ctrl+Alt+F7, if you have enabled functional keys press Ctrl+Alt+Fn+F7, or in TTY type command: init 5 and press Enter or restart your PC and you will see Graphical User Interface(GUI), Login with new user.

Optional

If you want to delete your user open Terminal by pressing Ctrl+Alt+T

In terminal enter command: sudo deluser your_old_user, press Enter.
Type exit to close terminal.


Ubuntu 18.04 - Ethernet disconnected after suspend

The main Ubuntu bug tracking this issue, at least for network kernel module r8169, seems to be:

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

I'd encourage everyone that is affected by this issue to go there and mark that it affects you, so that the maintainers have a better sense of how serious it is.

I'm running a fresh install of Xubuntu 18.04, and my Ethernet interface uses kernel module r8169, which I discovered running:

sudo lshw -C network

There'll be 2 groups of info, one starting with description: Ethernet interface, and another with description: Wireless interface. Under description: Ethernet interface, look for a line starting with configuration:, like this:

configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.100.6 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s

The driver will be here: driver=.

Systemd runs all executable scripts under /lib/systemd/system-sleep before and after suspend, passing 2 parameters, $1 is the state (pre, before suspend, or post, after suspend), and $2 is the action (suspend, hibernate, hybrid-state, or suspend-then-hibernate). This is documented in the man page for systemd-suspend.service.

We need to reload the module for the Ethernet interface when resuming from suspend, after suspend. So I created script /lib/systemd/system-sleep/r8169-refresh:

#!/bin/bash

PROGNAME=$(basename "$0")
state=$1
action=$2

function log {
    logger -i -t "$PROGNAME" "$*"
}

log "Running $action $state"

if [[ $state == post ]]; then
    modprobe -r r8169 \
    && log "Removed r8169" \
    && modprobe -i r8169 \
    && log "Inserted r8169"
fi

and made it executable:

chmod +x /lib/systemd/system-sleep/r8169-refresh

The messages logged from the script will go to /var/log/syslog tagged with the name of the script and its PID. This way you can check whether the script reloaded the kernel module:

grep r8169-refresh /var/log/syslog


MSI RX1950 Pro-Series PCI-E video card - Is there a way to make 3D functions work?

I successfully managed to make my X1550 work perfectly using the 300g Gallium driver, it involved installing from Xrog-edgers PPA, but I did all that in Ubuntu 10.10. Now, the 300g drivers come by default with Ubuntu 11.04, so that's strange!

First let's see what's being used, open a terminal and type:

sudo apt-get install mesa-utils

Then, run: glxinfo | grep -i opengl

Normally you should get:

OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RVXXX
OpenGL version string: 2.1 Mesa 7.11-devel
OpenGL shading language version string: 1.20
OpenGL extensions:

Now let's make sure the drivers are in place, type these in the terminal:

sudo apt-get install xserver-xorg-video-ati xserver-xorg-video-radeon libgl1-mesa-dri


no sound via headphones with ubuntu 13.04

I faced similar problem. After many hours spending on configuring, reinstalling and installing different versions of alsa (using many guides from www) I broke my system... :/

After reinstalling ubuntu I founded "stupid" solution. I went to alsamixer (terminal function) and change Auto-Mute-Mode. It disabled digital output. Problems have gone.


No longer see Bash warning messages for Shellshock after update

According to this Fedora Magazine post:

env x='() { :;}; echo OOPS' bash -c :

  This will print “OOPS” on a vulnerable system, but exit silently if bash has been patched.

This is the behaviour seen on:

Debian squeeze (bash package 4.1-3+deb6u2)
CentOS 6.5 (bash package 0:4.1.2-15.el6_5.2)
Arch Linux (bash package 4.3.026-1)

I speculate that this is how the fix is intended to make it behave, but for some reason, Ubuntu's initial bash patches produced the error instead of ignoring the extra code silently.

mattdm's comment:

  The initial patches were actually intended to produce the error when a bad function definition was found in an environment variable. The updated patches only even look in specially-prefixed variables, which eliminates all most all of the real-world risk. Try env 'BASH_FUNC_x()'='() { :;}; echo OOPS' bash -c : — you should see an error.

I have verified this:

$ env 'BASH_FUNC_x()'='() { :;}; echo OOPS' bash -c :
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `BASH_FUNC_x`
$ bash --version | head -1
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
$ apt-cache policy bash | grep Installed
  Installed: 4.3-7ubuntu1.4


When I've seen such things, I select the option I want with the up and down arrows. Then I use the Tab key until the "OK" button is highlighted. Then press Enter.

I can see this isn't obvious if you're not used to terminal conventions.


Difficulty installing Epson XP-432 printer

To list all of your installed packages which match 'cups', run

  dpkg -l | grep cups

Then just remove them with

  apt-get purge "packages"

Even after that, there could be some cups processes running. A simple reboot will eliminate them (an alternative would be to manually kill them).

  apt install lsb


How do I find out which software/packages are installed from the date of installation of ubuntu?

dpkg --get-selections > installed-software

creates a text file named installed-software with all installed software. Move that file to a backup.

dpkg --set-selections < installed-software
deselect

will install all the packages that have not been installed (in case you want to install them)

If you want to make a list of the differences you make another file after you installed Ubuntu again:

dpkg --get-selections > installed-software_new

and you can diff the 2 files.

If you installed the same version Ubuntu the result should be a list of packages from the old version that was not installed in the new version. Newer Ubuntu will have other package versions so it will not work.


Stuck at "unpacking" while trying to install or remove a package

If you haven't already, press CTRL+C to terminate. If it doesn't work, try to kill the apt and dpkg process.
sudo pkill apt
sudo pkill dpkg

Now run the following command before proceeding to force-remove
sudo dpkg --configure -a

Force to remove the package
sudo dpkg --purge --force-remove-reinstreq <name of your package>

Make sure you still have space left on your device. It's sometimes the reason why the installation is failing.

Clean the cache and update APT
sudo apt-get clean
sudo apt-get update


Looking at your top output it appears the CPU is running at 313% which is impossible right?:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
10101 ppito     20   0 2196704 164884  63072 S 313,6  4,2   1:45.42 totem

By default top adds up all your CPU percentages. Your i5 has 4 CPUs so the actual percentage is approximately 313/4 or 79% CPU utilization. This is still phenomenally high. To get top to show a an average percentage of all CPUs type Shift+i.

Googling high cpu usage totem returns many results which you can try. There are too many to include in this answer.

If none of the solutions presented by other totem users work I would suggest an update to Kernel 4.7.3 which reduced CPU usage for me versus Kernel 4.4 that Ubuntu ships with.

You might want to update your question with additional top output when firefox is running at a high CPU percentage and comments about what you were doing at the time, ie watching video or flash player in firefox.

As commented by @Pilot6, "And what is the problem?" you never responded with reports of "choppy video", or "loud fan", "high temperature" or anything like that. If your machine is running ok there really isn't a problem other than 313% CPU usage which is impossible and which I hopefully explained is misleading within top before pressing Shift+i.


By default, minidlna is configured to not follow symlinks.
To allow minidlna to follow symlinks, edit /etc/minidlna.conf and add the line wide_links=yes to the end of the file.
If your /etc/minidlna.conf has a line that says wide_links=no, you will need to remove or comment out this line (by adding a # to the beginning of the line).


If I only use when needed, does enabling the "su" account present dangers?

I have no fear of hackers because I'm such a discrete/boring internet user

welcome to the botnet. ;)

Having limited privileges while using the system is a part of the security concept implemented with access rights.
If some part of software is overtaken e.g. by using a buffer overflow, the attacker will have the privileges of the process he overtook. So having limited privileges is better.


I think your rewrite rule is written upside down.

You currently rewrite URLs from the form rest/myrequest to index.php?request=myrequest.

I don't understand clearly what you want to achieve, but if you want to rewrite urls like /myrequest to /rest/index.php?request=myrequest, you should wrote:

  RewriteRule ^/(.*)$ /rest/index.php?request=$1 [QSA,NC,L]

If you want to prevent the directory listing, add to your .htaccess :

Options -Indexes


Intercept shutdown call and run script to allow or prevent shutdown

Use systemd inhibitors
Original Post is in section below and details how to intercept /sbin/shutdown command. This section is based on systemd inhibitors.
From systemd inhibitor:
Name
systemd-inhibit — Execute a program with an inhibition lock taken
Synopsis
systemd-inhibit [OPTIONS...] [COMMAND] [ARGUMENTS...]
systemd-inhibit [OPTIONS...] --list
Description
systemd-inhibit may be used to execute a program with a shutdown, sleep, or idle inhibitor lock taken. The lock will be acquired before the specified command line is executed and released afterwards.
Inhibitor locks may be used to block or delay system sleep and shutdown requests from the user, as well as automatic idle handling of the OS. This is useful to avoid system suspends while an optical disc is being recorded, or similar operations that should not be interrupted.
For more information see the Inhibitor Lock Developer Documentation.
Options
The following options are understood:
--what=

Takes a colon-separated list of one or more operations to inhibit: "shutdown", "sleep", "idle", "handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch", for inhibiting reboot/power-off/halt/kexec, suspending/hibernating, the automatic idle detection, or the low-level handling of the power/sleep key and the lid switch, respectively. If omitted, defaults to "idle:sleep:shutdown".

--who=

Takes a short, human-readable descriptive string for the program taking the lock. If not passed, defaults to the command line string.

--why=

Takes a short, human-readable descriptive string for the reason for taking the lock. Defaults to "Unknown reason".

--mode=

Takes either "block" or "delay" and describes how the lock is applied. If "block" is used (the default), the lock prohibits any of the requested operations without time limit, and only privileged users may override it. If "delay" is used, the lock can only delay the requested operations for a limited time. If the time elapses, the lock is ignored and the operation executed. The time limit may be specified in logind.conf(5). Note that "delay" is only available for "sleep" and "shutdown".

--list

Lists all active inhibition locks instead of acquiring one.

-h, --help

Print a short help text and exit.

--version

Print a short version string and exit.

Exit status
Returns the exit status of the executed program.
Example
# systemd-inhibit wodim foobar.iso
This burns the ISO image foobar.iso on a CD using wodim(1) Note: link is broken in systemd documentation, and inhibits system sleeping, shutdown and idle while doing so.
See Also
systemd(1), logind.conf(5)

Original Post
In concept it seems pretty easy. Simply find the command, rename it, and replace it with your own script that calls the renamed version:

$ type -a shutdown
shutdown is /sbin/shutdown
$ sudo mv /sbin/shutdown /sbin/shutdownoriginal

Then edit your own script in /sbin/shutdown containing at the very least:
#!/bin/bash
/sbin/shutdownoriginal

Then mark your script as executable for everyone:
$ sudo chmod a+x /sbin/shutdown

Voila! Everything that calls shutdown now calls your script which then calls the original commmand.
In reality by the time your script gets called things may not be in the state you expect. For example I put in some commands to record the shutdown but they do not appear to work:
echo "/sbin/shutdown custom script calling /sbin/shutdownoriginal"
shutdowntime=`date`
echo "Last shutdown: $shutdowntime" >> /home/rick/shutdownlog.txt

The first echo should have appeared in /var/log/syslog but it did not. The second echo should have appended a line to the log file but it did not. This tells me that by the time the /sbin/shutdown command is executed system logging is already turned off and the file I/O system is shutdown.
A better approach would be looking at systemd shutdown target and/or input inhibitors. I'll leave this answer here though for others that might think it could/would/should work.
As always remember YMMV--Your Mileage May Very.


You can't import a file with argparse in global namespace.

For example, you may have following codes in dlc_practical_prologue.py:

import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--seed', default=1, type=int)
opt = parser.parse_args()
train(opt)

You should move the codes under an if statement:

if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('--seed', default=1, type=int)
    opt = parser.parse_args()
    train(opt)


Black screen on boot with Ubuntu 14.04 LTS and Kernel 3.15

Not shure what was the issue, but now I'm running 3.15.3-031503-generic and all goes well. But I've purged old kernels with Ubuntu Tweak.


Test this:

Switch on your computer.

Press and hold the Shift key, which will bring up the Grub menu.

Select the line which starts with Advanced options.

Select the line ending with (recovery mode)

Press Return and your machine will begin the boot process.

Your computer should display a menu with a number of options.

One of the options will be Enable networking. Press Return with this option highlighted.

Other of the options will be Drop to root shell prompt. Press Return with this option highlighted.

In the terminal enter the commands:

mount -o remount,rw /
mount --all
apt-get update
apt-get install --reinstall aptitude deborphan
aptitude remove '?and(?reverse-depends(gnome),?not(?reverse-depends(?exact-name(xubuntu-desktop))))'
apt-get install --reinstall xubuntu-desktop
apt-get dist-upgrade
deborphan
apt-get --purge remove $(deborphan)
deborphan --libdevel
apt-get --purge remove $(deborphan --libdevel)
deborphan --find-config
dpkg --purge $(deborphan --find-config)
apt-get autoremove
apt-get clean
reboot


HP Microserver Gen10, Marvel chipset, will it work in Raid1 with Ubuntu server?

There is no driver AFAIK in linux but you can setup a software RAID array. I did this for my box and set up Debian Jessie and OpenMediaVault. So far it has run everything like a champ for me but YMMV.


Bluetooth not finding any devices ( Ubuntu 18.04 )

In my case the BCM43142A0-0a5c-21d7.hcd was missing. Try this command dmesg | grep -i 'blue' there if you find Bluetooth: hci0: BCM: patch brcm/BCM43142A0-0a5c-216c.hcd not found then you have same problem.
Download the BCM43142A0-0a5c-21d7.hcd file from this github repo.
After that perform
sudo cp  BCM43142A0-0a5c-21d7.hcd /lib/firmware/brcm/BCM43142A0-0a5c-21d7.hcd
sudo modprobe -r btusb
sudo modprobe btusb
Shut down your pc and restart and it should work.
You might find these answers useful as well 1 2


How to access system preferences in Ubuntu 12.04

I know it seems strange that ibus settings are not under 'System Settings' but you can open the dash and type ibus and it will come up.

Alternatively you'll find all your 'System Preferences' applications in the Dash by navigating to the 'Applications view' (little icon on the bottom displaying a ruler and two brushes) then click on 'Filter Results' and then toggle 'System'.


how do you format a usb stick in ubuntu server

You can use the fdisk command.

You can also use the mkfs command

Here is a link on using the fdisk command in Ubuntu

Using mkfs in Ubuntu (here)


mysql_config_editor not included in MySQL APT Repository?

The easiest way:

apt-get install libmysqlclient-dev


Ubuntu for Android on the ASUS Transformer Prime

First you need to understand the Ubuntu For Android (UFA) is not to provide two operating system in android device which can be used simultaneously. Ubuntu is activated only when you connect a keyboard,mouse and display and at that moment you cannot use the device rather your device works as CPU for Ubuntu with access to android contacts and other things.

And as far as I know, it will be integrated and shipped by the device manufacturer. So you can get it only on the new devices preinstalled.


Lenovo C940: disable temperature shutdown

This issue is tracked in ubuntu bug tracker Lenovo Yoga C940 frequently does thermal shutdown .
The thread contains several workarounds. For me generating thermald configs has helped.
sudo apt install acpica-tools
git clone https://github.com/intel/dptfxtract.git
cd dptfxtract
sudo acpidump > acpi.out
acpixtract -a acpi.out
sudo ./dptfxtract *.dat

If that doesn't help, to completely disable thermal shutdowns it is possible to disable thermald shutdowns
echo "disabled" | sudo tee /sys/class/thermal/thermal_zone0/mode
for the thermal zones that are mentioned in shutdown messages.


Problem in running eclipse from the shortcut in ubuntu 11.10

Make a script for it, or if one is provided, link to that.

In your script you can export path before executing eclipse.

I'm not sure what the name of the eclipse jar is, but you can put in your script the explicit path of the java executable (/usr/bin/java), and have it run eclipse that way.


Any way for ubuntu to use more than one core of i7 cpu on my Asus laptop?

Open a terminal and run sudo apt-get install htop

Then run htop. It will show you all your cores and there usage. If it does then don't worry about it.

You can also use the standard top utility, press 1 and it will display all cores.

If it still shows one check your BIOS in case there is a settings disabling other cores.

Any Linux distro needs no config for multi cores, and I would seriously consider the entire install as suspect if this is really the case.


Screen flashes when typing if touchpad accidentally touched

I have had exactly this issue.

That is to say when keying text into terminal/vim/whatever any inadvertent touch of the touchpad doesn't just move the cursor but also causes the screen to flash.

Yes, it is possible to disable the touchpad when typing and there are good reasons to do this if palm detection isn't enough to stop the cursor flying about as you type. But I agree with the original post: doing this doesn't fix the underlying issue, it just makes it less likely to happen because it becomes impossible to register a keystroke and a cursor movement at the same time.

It's also worth pointing out that I am not talking about 'flickering' here (as reported elsewhere) but an effect akin to a  visual bell i.e the whole screen flashes. Perhaps this is in fact what is happening: making a keystroke and a cursor movement via the touchpad at the same time is an illegal operation?

Re-installing 14.04 completely resolves the issue for me.

I am/was running 16.04 on a  Dell Latitude with i5.


First of set your $HOME/.vimrc to follow specific pattern. Mine is something like this:

" (sw)shiftwidth: how many columns text is indented with reindent operations
" (sts)softtabstop: how many columns vim uses when you hit tab
" (ts)tabstop: how many columns a tab counts for
set ts=4 sw=4 sts=2

" expandtab: appropriate number of spaces in insert mode
set expandtab

" theme and colors
set t_Co=256
colorscheme desert

" Prevents keeping of backup after overwriting the file
set nobk

" To see line numbers on the left
set number

" autocomplete parenthesis, brackets and braces
inoremap ( ()<Left>
inoremap [ []<Left>
inoremap { {}<Left>

" Syntax highlighting on
syntax on

" share windows clipboard
set clipboard+=unnamed

" Hightlight the curent column
set cursorcolumn

" Hightlight the current line
set cursorline

I recommend going through this.
Some of the scripts that I recommend are:

NerdTREE

taglist(Requires exuberant-ctags)

bufexplorer

snipMate

As for your personal needs. You should search for suitable script here and follow instructions.


switching from ifconfig to ip but still not seen by router

as far as I can deduce from your interfaces file, your router is in a completely different subnet (192.168.1.0) and thus not reachable by your NAS, which is in 10.0.0.0/24.
I'm assuming the router also uses a /24 netmask.

Try giving your NAS an IP in the 192.168.1.1-253 range, but make sure you don't assign one that is already in use. Also make sure you are using the same netmask as the router (which I presume will be 255.255.255.0).
If you have a PC connected to the router, or access on the router itself, you can use a simple ping to check if the address you want for the NAS is replying or not. If you get a reply, don't use that one.

e.g.:
router at 192.168.1.254
NAS at 192.168.1.15

Removing /etc/network/interfaces on Ubuntu 16.04 is not a good idea.
The default network config has been switched to netplan.io in Ubuntu 17.10 and later, if I recall, but not on 16.04.
The ifupdown package (with ifconfig) is still available for those versions, however, but no longer installed by default.

For 16.04, I recommend you keep using the tool you are most comfortable with.


You have to pull up a console with:

CTRL+ALT+F2

and then install the Guest Additions:

mount /dev/cdrom /mnt
cd /mnt
sudo ./VBoxLinuxAdditions.run

Then restart the Guest.


I am currently looking into this too. I found KernelCare from CloudLinux that works on Ubuntu, I have tested it successfully now only for a month with the free trial, I like it more then livepatch from Canonical. Good thing is that if you don't like it you can turn live updates off. It also has an option to run automatically. Your non-kernel apps are updated like before with apt update.

Because of Canonical's crazy pricing, 3 machines free but after that $750 / year / server I will never consider that fair pricing. $750 is more than I pay for rent per server per year and I have many servers now, I could not find any information about buying just the livepatch service on buy.canonical.com.

I found an article about a downside to KernelCare: The downside though is that KernelCare appears to rely upon some binary blobs as part of its service., but I am not sure what it really means and if it is still true, I am going to give it a try anyway.

I am not affiliated with KernelCare, and to be honest, I would rather pay Cannonical $2.25 / month to livepatch my kernel, but I am not there yet to pay $62,5 / month / server to Canonical, with minimum invoice of $2500, but you also have to buy it in bulks of 10, so $7500 / year minimum for standard dedicated servers.


Grub not showing after dual booting ubuntu

I remember getting this error whenever there was some sort of Windows update.

I solved it by booting into Ubuntu live USB, and do:

sudo update-grub

Additionally, you can check out this solution from windows: https://itsfoss.com/no-grub-windows-linux/


Prevent www-data from running scripts and programs

If you do not need something, better turn it off, indeed.

There are two things that you can generally do:

1) If you do not need PHP, then turn it OFF. Under Ubuntu you can see the list of modules that are turned on under /etc/apache2/mods-enabled/

Try:

ls /etc/apache2/mods-enabled/

If you see entries such as php5.conf and php5.load, delete them. Similarly, you can find cgi*.* modules, and if installed others like ruby and perl (not installed by default). As mentioned by someone else, the suexec is also a potential problem because with "su" capability you can see the whole world.

2) If you do use PHP, then you can try to run mod-security. That will prevent a lot of things, assuming you turn on most of the checks they have there. However, it will also prevent a lot of legal things (i.e. if you have bash code on a page, that page may not get served at all!)

Of course, the main idea is to be able to install systems such as Drupal or Wordpress. Such use PHP and thus you are forced to use it. Now note that a system such as Drupal has a full security team working on issues that present potential danger to the server or the client using Drupal. So it is generally secure.


Ubuntu 16.04 - No sound on HP Pavilion notebook

I apologize for this imperfect answer:
I experienced the same problem on a HP Pavilion Notebook with Ubuntu 16 LTS in a dual boot with Windows 10.
Following the instructions I found on the web :
https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/
no sound on ubuntu 16.04.In setting it says dummy sound
I have not been able to solve the problem and I remained persistently with a "Dummy output" for the sound.
I realized that the sound was also desactivated under Windows. When I de-installed the provided audio driver and installed the Realtek one : https://realtek-download.com/wp-content/uploads/2017/08/0008-Win7_Win8_Win81_Win10_R282.exe, the sound was working again and switching back to ubuntu, an audio output was now present and the sound worked.


How do I make Guake use my Zsh command history?

Guake is a terminal emulator. As such, it doesn't store the command history anywhere (it doesn't even have a clue what a command history is). It launches your shell, and the shell does the rest.

It could be that, for whatever reason, Guake launches a different shell, e.g. bash instead of your preferred zsh. It could also be that it launches zsh with some different settings, e.g. different argv[0] which causes zsh to behave differently (e.g. bash behaves differently if you start it as sh; not sure if zsh has something like this too).

Another explanation could be that when Guake hides its window it doesn't terminate the shell running inside, the same zsh keeps running there and is shown you again when you invoke Guake again. That is, zsh did not write its history in between and did not read what other zsh instances wrote there (exactly as if it was a "regular" terminal emulator whose window you minimized but didn't close).


Full internal harddrive converted to ext4 file system, how to install Windows back again?

Boot from your installation media (live USB or live DVD). Run gparted and reduce the size of the Ubuntu partition. Add another partition and format it to NTFS).

Install Windows.

At this point, Windows will load but not Ubuntu, because Windows removes Grub the Ubuntu boot loader.

So again boot from your live USB or DVD and repair grub.

Install and run boot-repair and choose "recommended repair".

Source site: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


At which frequency is the /etc/profile file modified by the system

Never. Well it will when you re-install your system. Never during an upgrade or update. You can expect a big fat warning prior to the installation if /etc/profile would become obsolete.

/etc is used for host specific files. So configuration files.

Addition. There are some alternatives:

/etc/profile.d/: Contains system-wide configuration files for specific programs
~/.profile:
Insert user specific configuration for login shells here


How to record a screencast with audio in gnome shell

An alternative is to use this Gnome Extension EasyScreenCast, it uses gnome-shell's screencast
It handles audio and many more options
You need to choose what audio source to record from, as shown here:


Looks like editing /usr/share/autostart/plasma-desktop.desktop is what you need.

AFAIU you just need to add DRI_PRIME=1 right after Exec=

The file found by looking into /usr/share/xsessions/kde-plasma.desktop and /usr/bin/startkde


Need help (again) on routing through Server with 2 NICs

Thanks for the image, which makes things clearer.

First, as your clients are in network 9.0.0.0/24, they need to have a default router in the same subnet (they would not know how to reach another subnet), so the DHCP entry should read option routers 9.0.0.5 - the address of 'My Server' in that subnet.

Now they should send packets for any other network (except from 9.0.0.0) to the address 9.0.0.5 in the hope that would know how to route them.

As 'My Server' has a default route to 10.0.0.1, it will pass those packets to 'Gateway' if the destination is outside its direct attached networks. And hopefully 'Gateway' will pass them further, using NAT. Up to now it's OK.

When the target host (say 151.101.65.69) tries to respond, it sends the response to 'Gateway'; this one knows that the request came from say 9.0.0.10. But now there is a problem: 'Gateway' does not have a route to 9.0.0.0/24, and so again passes the packet to its default route (or drops it maybe, as your private network is not routed at all).

If you have no access to change the configuration of 'Gateway', there are two solutions:

If 'Gateway' listens to any sort of router information protocol on the inside, say RIP2, OSPF or BGP, 'My Server' should announce its routing information on the network. How to do that see e.g. Dynamic Routing or How to Turn....
If this does not work, your only chance is to use NAT on 'My Server' instead of routing. This is done by 'masquerad'ing; it is described in How to Turn... as well.


Brightness keys not working ASUS ROGg531

sudo apt install brightnessctl
sudo chown root:root /usr/bin/brightnessctl
sudo chmod 4775 /usr/bin/brightnessctl

Use the following commands:

/usr/bin/brightnessctl set 2400- # To Decrease
/usr/bin/brightnessctl set 2400+ # To Increase


Ubuntu 18.04: Audio doesn't work unless I switch between outputs

Option # 1:
Please, run in the terminal:
sudo alsa force-reload

This will reload ALSA sound driver modules in case they were modified by  an upgrade, reinstall or install for example and the old ones are still in use as users tend to avoid reboots sometimes or do not think a reboot is needed after such upgrades.

Option # 2:
Please, run in the terminal:
alsamixer

You will then be presented with a screen like this:

Please, check if the speakers or any audio output is muted and unmute it.
MM means mute and OO means unmute.
Then exit when done by pressing Esc

Option # 3:
Old pulseaudio configuration files can sometimes get corrupted or conflict with newer versions of pulseaudio after package / system upgrades. To fix this please follow the steps below:

Back up ~/.config/pulse/ configuration directory to ~/.config/pulse_old/ by running the following command in the terminal:

mv  ~/.config/pulse/ ~/.config/pulse_old/

After that, reboot your system to build new pulseaudio configuration files. A new ~/.config/pulse/ directory will be created automatically.

Test your audio now.

If, somehow, after applying this fix you decide to go back to the previous state before applying the fix, please follow the steps below:

Run the following command in the terminal:

rm -r  ~/.config/pulse/

Run the following command in the terminal:

mv  ~/.config/pulse_old/ ~/.config/pulse/

Reboot your system.

However, if all is okay and the problem is fixed, you can remove the backed up old configuration directory ~/.config/pulse_old/ to free space ( if you wish ) by running the following command in the terminal:
rm -r  ~/.config/pulse_old/