ext2 root partition, incorrect mount time

First thing to check would be the hardware clock in the bios. The hardware clock keeps the current time and date even when the system is shut down, however, if it is not working properly, then this could cause problems.

Power on the laptop, but instead of booting Linux, go into the BIOS.
On the first bios panel there is usually a day-date setting.
If the system boots Windows as well as Linux then the time should be your local time.
If the system is Linux only, then the time may be UTC.
You may need to repeat this check a few times order a period of days because it may be affected by your laptop battery as well as a button cell inside the laptop.

If the hardware clock is not working correctly, that will likely be the cause of the disk checks, because the Linux system clock is set initially from the hardware clock, but then is adjusted forward after your laptop connects to the network, confusing e2fsck.

Greg


Why am I getting errors today when updating Oneiric PPAs?

The Launchpad/PPA system has recently been under heavy maintenance, and this looks like a scheduled outage, on August 17, 2012.
Everything should be fine once maintenance is complete in a few hours.
However, some recent maintenance has gone beyond the scheduled window, so please check http://blog.launchpad.net/ for the latest updates, and/or as tijybba suggests in the comments, check their Twitter feed.


man page of swapon doesn't match with what I am seeing

From man swapon it reads:

   -p, --priority priority
          Specify the priority of the swap device.  priority  is  a  value
          between  0  and  32767. Higher numbers indicate higher priority.
          See swapon(2) for a full description  of  swap  priorities.  Add
          pri=value  to the option field of /etc/fstab for use with swapon
          -a.

so, that means in your /etc/fstab you would have your lines read as follows:

UUID=<bla bla> none  swap sw,pri=20 0 0
/dev/sdb2      none  swap sw,pri=10 0 0

I just used the priorities of 20 for the first one since it reads that the "Higher numbers indicate higher priority" in the manpage, then 10 for the lower priority.  Options in the /etc/fstab file are separated by commas ,.

Technically, -1 is higher than -2 so you are probably OK.

Hope this helps!


11.10 and above

gnome-session-quit

11.04 and previous versions

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1

(via DoR, see his answer to "Reboot without sudoer privileges?" for more dbus goodness!)

or alternatively, you can use

gnome-session-save --force-logout

--force-logout in contrast to just --logout will not ask the user to deal with unsaved documents and so on.

  is this the easiest way? no simple one
  line command like sudo logout?? I will
  never remember all that.

Yes, there is a command called logout, but it concerns the Terminal. gnome-session-save is the program that actually quits the gnome-session, which you can of course kill, but that wouldn't qualify as logging out. :-)

Notice as well that these commands don't require you to be root.

You can always add an alias to your system if you want to have a shorter command.

Open ~/.bash_aliases with a text editor, or create it if it isn't there, and add something like this to it:

alias logout-gnome="gnome-session-save --force-logout"

(.bashrc is a script that is run every time a new virtual terminal is started up, you should set up all your permanent aliases there, see also: How to create a permanent "alias"?)


Cannot make mobile broadband connection in Ubuntu 13.04

Linux detected your USB-modem as disk. You need to disable CD-mode and storage-mode. It's possible with "usb-modeswitch". Or you can to use special AT-commands.

Manual in ArchWiki.


Sure you can. Just make new partition for new version of Ubuntu and install it. When you finish your installation and turn on your computer, you'll get a grub screen to choose in what version of Ubuntu do you want to boot.


Access wired network camera(s) through a switch without disconnecting from wireless internet

I arrived at a solution after watching the following video: https://www.youtube.com/watch?v=yqJ9PXhqOAQ

Launch Network Connections, e.g. by clicking on the network icon at the upper right and choosing "Edit Connections..."
Select the "Wired connection #" corresponding to the Ethernet port that will be connected to the switch. Choose "Edit..."
Under the IPv4 Settings tab, change the Method drop-down from "Automatic (DHCP)" to "Disabled"
Choose "Save..." A duplicate connection may appear in the list; choose "Close" and re-open Network Connections, and the duplicate will be gone (the duplicate item is a bug)
Choose "Add", select "Ethernet", and choose "Create..."
Type any name, e.g. "Cameras switch"
Under the IPv4 Settings tab, change the Method drop-down to "Manual"
Choose "Add" next to Addresses, and set Address to some value (e.g. 10.0.0.9) and Netmask to 255.255.255.0; leave Gateway blank. The address is for the Ubuntu computer, so it should be different from the camera addresses.
Fill the DNS servers field with some address, e.g. 10.0.0.10
Choose "Save..." and "Close"

Plug the switch into the Ethernet port. The "Cameras switch" connection should connect automatically. Now the network camera browser interface can be accessed at its IP address. Using ping followed by the camera's IP address in Terminal should also be successful. Additionally, connecting to the wireless network allows access to the internet (e.g. www.wikipedia.org) in addition to the network camera at its IP address.

(Everything works acceptably now, but if anyone could explain in the comments the Default router field in the Axis camera TCP/IP browser settings (see the second image in the question text) or the DNS servers field under the IPv4 Settings tab when creating a manual Ethernet connection I'd be grateful. I'm not sure what role those addresses play.)

Note that everything can be undone relatively easily by deleting the "Cameras switch" connection and setting "Wired connection #" from "Disabled" back to "Automatic (DHCP)"


How do I install a kernel driver so that it is not loaded at all times?

Create the driver as a kernel module, blacklist it by adding

blacklist your-module

to /etc/modprobe.d/blacklist.conf if you don't want to use it.


ffmpeg - Watermark every x second fade in/out and adjust for video resolution

One method is to use ASS subtitles with the subtitles filter:

 ffmpeg -i input -filter_complex "subtitles=fade.ass" -c:a copy output

Advantages:

Fading and timing is controlled by the ASS file.
The text will be automatically resized to fit the video size.
Subtitles are more customizable than drawtext.
Text can auto wrap if needed unlike drawtext.
ffmpeg command is simple.

Disadvantage:

Each instance is a separate line in the ASS file. Not a big deal for short videos. There might be a way to address this with an ASS or karaoke feature, but I don't know off-hand.

Sample ASS file (created in Aegisub 3.2.2):

[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None

[Aegisub Project Garbage]
Last Style Storage: Default
Video Position: 749

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00000000,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,0,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:15.00,Default,,0,0,0,,{\fad(500,500)}qwerty qwerty qwerty qwerty\Nqwerty qwerty qwerty qwerty
Dialogue: 0,0:02:00.00,0:02:15.00,Default,,0,0,0,,{\fad(500,500)}qwerty qwerty qwerty qwerty\Nqwerty qwerty qwerty qwerty
Dialogue: 0,0:04:00.00,0:04:15.00,Default,,0,0,0,,{\fad(500,500)}qwerty qwerty qwerty qwerty\Nqwerty qwerty qwerty qwerty
Dialogue: 0,0:06:00.00,0:06:15.00,Default,,0,0,0,,{\fad(500,500)}qwerty qwerty qwerty qwerty\Nqwerty qwerty qwerty qwerty


I think what happens is due to the way the System Monitor handles the tasks.
My guess is that it gets the list of processes, and then updates them for a while.
If a process does not exist anymore, it shows like no process name, no Memory in use, etc...
To know if the process exist you can do:
ps auhx | grep 123

Where 123 is your process number.
You can also:
cat /proc/123/cmdline

That will return the command that was used to execute that process.
For example:
cat /proc/1414/cmdline
dbus-run-session--gnome-session--autostart/usr/share/gdm/greeter/autostart

If the folder /proc/PID/ does not exist, the process finished execution and is not present on the system anymore.
Cheers


Correct the permissions for your home folder:

sudo chown -R $USER:$USER /home/$USER

Don't use sudo without -i and a GUI based applications. Use

sudo nano /etc/X11/xorg.conf

or

sudo -i gedit /etc/X11/xorg.conf

or

gksu gedit /etc/X11/xorg.conf


Problem with installing php on Ubuntu 16.04

I had this issue after adding and removing php5.6.  To solve, I removed all php packages and then added the ones I wanted again.

apt remove php*
apt install php ...


Core of the issue: your script cd back to  dump, not to dump/'s parent.

On first iteration:

You start out in dump's parent directory, where dump/ exists
dump/var1 is created
you cd into dump/var1.
when cd .. occurs you go back to dump/. Current working directory is dump and there's only var1 there, nothing else.

On the second iteration:

When you try mkdir dump/var2/ you are in dump/ and there's only var1 there. The dump/ of dump/var2 is the non-existent path.  Of course it fails. Hence the error message and hence the duplicate dump/dump/var2 when you use mkdir -p flag.
Your script still does cd .., so before 3rd iteration current working directory changes from dump/ to dump/'s parent.

For 3rd iteration:

You're inside dump/'s parent directory, the path dump/ exists, hence mkdir dump/var3 won't fail.
cd dump/var3 occurs, then cd .., and what is the current working directory now ? dump/ , the one level above dump/var3, where you try to do mkdir dump/dump/var4, but there's only var1 and var3 there, no dump. The mkdir fails, you cd .. which goes one level above dump/, and the whole thing repeats again.

You can see this clearly when you execute our script with set -x for debugging output appended after #!/bin/bash line or by doing pwd as first command on each iteration of the script.

The way I'd recommend fixing your script is via cd into dump/ first, and then run the for loop. In other words:

cd "$D"
for i in {1..24}
do
    mkdir "$i"
    cd "$i"
    # do whatever you want inside "$i"
    cd ..
done

Among other things, I'd suggest using [ -d "dump" ] instead of -e, because that'll help you make sure the file that exists is actually the directory, although this might take extra considerations.


Okay, from what I read there you have /dev/sdb4 which is mounted as your root filesystem. You also have /dev/sda2 which is your swap. Otherwise there seem to be no partitions on your hard disk. Which is most likely part of the issue. Please open a terminal, type "sudo blkid" and post the output here. If you don't know how to use a terminal, use google.

Please also use pastebin.com if you want to paste code here. The idea is, that you go there, paste your code, get a link, get back here and paste the link. Keeps everything clean and readable.

Cheers


You can use command blockdev

 sudo blockdev --report /dev/mmcblk0

But you can make .img without block size with command

 sudo dd if=/dev/mmcblk0 of=~/path/USB_image.img bs=512 count=1


TOR unable to install keep recieving error msg

Look at the error message. It can't find the file you're telling it to open.

Assuming you've downloaded the file, you need to cd into the same directory in your terminal. So if you saved the file into ~/Downloads:

cd ~/Downloads
tar -xvJf tor-browser-linux32*


Fuji AV-150 camera doesn't work with Ubuntu 14.04 as it did with 13.10

It's a bug
The camera will be detected after executing following commands
Option One
echo 'ACTION="add", ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP", MODE="0664", GROUP="plugdev"' | sudo tee /lib/udev/rules.d/40-libgphoto2-6.rules

Then unplug/replug the camera.
Option Two
sudo -H gedit /lib/udev/rules.d/40-libgphoto2-6.rules

and make the file look like this:
ACTION!="add", GOTO="libgphoto2_rules_end"
SUBSYSTEM!="usb", GOTO="libgphoto2_usb_end"
ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP", MODE="0664", GROUP="plugdev"

LABEL="libgphoto2_rules_end"

thanks to Martin pitt


ImportError: Gtk* backend requires pygtk to be installed (python3.4)?

I could solve this issue by changing the backend to TkAgg. Simply go to your .matplotlibrc file and change the backend.

Usually the file is saved in home directory: ~/.matplotlibrc

If it is not there, you can try to look into:

/usr/local/lib/python3.4/dist-packages/matplotlib/mpl-data/matplotlibrc

Here you need to replace the python version 3.4 by yours.


Sudo must be owned by root, and have the set uid bit set. The set uid bit of the permission mask effectively makes the binary run as the user that owns it, no matter who invoked it. Thus sudo can change uid of whatever process it spawns.

By changing ownership on /usr/bin you've pretty much hosed your installation. A lot of binaries rely on suid, and having them owned by the user anyway opens you to a lot of interesting attacks.

https://en.wikipedia.org/wiki/Setuid has a good explanation of how suid works in detail.

At this point the best tip is to reinstall ubuntu... :)


800 X 600 cannot select higher resolution

Now that you've added the xorg-edgers PPA, you have a lot of drivers to choose from:

apt-cache search nvidia-3 | sort

Currently I'm running the nvidia-settings --version

nvidia-settings:  version 346.22  (buildd@lgw01-10)  Tue Dec  9 08:42:45 UTC 2014

and it seems to be running 10°C cooler (+/- 18°F) then the nvidia-340, so try that one first.

Steps to follow:

Disable the nVIDIA card in the BIOS and reboot (so that any old drivers lingering around can be removed successfully)
sudo apt-get install nvidia-346
sync
sudo shutdown -h now (full shut down as soft reboot gave me a problem)
Turn on the computer, enable the NVidia card in the BIOS and reboot (For sake of completeness: here I had to do another full shutdown)
Check the driver version with nvidia-settings --version only!  The "Additional Drivers" doesn't show the correct settings.
System settings - Displays should now allow you to take the highest resolution (if not already detected automatically)

That's it!

If your card still gives you a walk down memory lane (Windows 95 behaviour), go to step 2 and try the next (lower) version using the same system


What could cause network transfer stalling in ubuntu server 18.04 running on Raspberry Pi 3B+?

I ended up switching to raspbian buster and there the networking works as expected. There might be a way to make the ubuntu server networking work on pi properly but I have nor time nor knowledge to do anything about it.


Rename files of the same name in multiple subdirectories

Since the intermediate directory name is apparently constant, it should be straightforward with a shell loop:

for d in A???; do echo cp "$d/files/aseg.mgz" "collated_aseg/$d.mgz"; done

Remove the echo once you are happy that it's doing the right thing. The collated_aseg directory must already exist. Replace cp with mv if you really want to rename (move) rather than copy.


Cannot Write Data to My External Disk When I Give Executable Permission

My drive did not have an execution permission. Even chmod could not solve the problem

Those 2 only work on a filesystem that is POSIX compliant (ext2/3/4, reiserfs and the like; none of the Microsoft filesystems though). If not chmod can not work. And then execute permissions also need to be set when mounting.

  fat32

is not POSIX compliant.

you need mount option users to allow others than root to mount and unmount.
you need mount option umask=000 for RWX permissions for user, group and others. (umask works the other way around from chmod so umask 000 = chmod 777). Lower permissions to umask=007 or umask=077 to lock out group and others.


Ubuntu as domain Controller and how to add ubuntu machine to that domain

Take a look at Samba. It should do exactly what you want.


How can I have Rythmbox controls on Xubuntu desktop/Xfce?

Use the plugin from http://code.mendhak.com/rhythmbox-tray-icon/ which should help.


Badum, have you tried doing this?

sync; echo 1 > /proc/sys/vm/drop_caches

sync; echo 2 > /proc/sys/vm/drop_caches

sync; echo 3 > /proc/sys/vm/drop_caches
You can find the explanation here. Also, I got the commands from the same website.


Use this in the terminal, it will give you your username:

whoami


To get the other indicators, run:

sudo apt-get install indicator-sound-gtk2 indicator-application-gtk2 indicator-datetime-gtk2 indicator-session-gtk2 indicator-messages-gtk2

Once these are installed, remove the indicator applet from your MATE panel and add the "Indicator applet complete" applet to the panel to reload the indicators. The ubuntu one icon is in the message icon's menu.


Download speed decreasing slowly before stop

After a half of day of research, i discovered that WLAN power managment is on.
First of all, i checked the device name:
$ iwconfig
lo        no wireless extensions.

wlo1      IEEE 802.11  ESSID:"INTERNET_O_SUL_ADRIANA_5G "
          Mode:Managed  Frequency:5.18 GHz  Access Point: XX:XX:XX:XX:XX:XX
          Bit Rate=6 Mb/s   Tx-Power=30 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=30/70  Signal level=-80 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:27   Missed beacon:0

lxcbr0    no wireless extensions.

anbox0    no wireless extensions.

veth5TGA4C  no wireless extensions.

As you can see, my device is wlo1.
Then I turned off Power Managment by doing:
sudo iwconfig wlo1 power off

Finally, i applied the changes for the next reboot:
sudo gedit /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

On this file, i just changed:
[connection]
wifi.powersave = 3

by:
[connection]
wifi.powersave = 2

Well, i hope no one more gets this issue. Also, i dont know why this setting is activated on my Ubuntu, probably its the default setting.


Editing Photoshop (PSD) files on Ubuntu?

You can have a look at Krita, even its look is close to Photoshop so you might feel at home easily when switching. Of course it is maybe not so blown up as Photoshop but it does its job well.

Screenshot:

Homepage:

https://krita.org


The driver iwlwifi usually creates an interface wlan0, not eth1. Check:

ifconfig

If you have no wlan0, something else is wrong and we should diagnose and correct it first:

dmesg | grep iwl
rfkill list all

If there is a wlan0, then the correct sequence is:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode master

Please note that not all wireless device and driver combinations can be switched to all modes. Please see: http://wireless.kernel.org/en/users/Drivers/iwlwifi

  AP mode (experimental; only on some devices/firmware versions)


apt-config dump not returning cache information?

These values are some kind of fallback which get set when there is no desired configuration in place. If you look into source code:

apt-pkg/pkgcachegen.cc

map_filesize_t const MapStart = _config->FindI("APT::Cache-Start", 24*1024*1024);
map_filesize_t const MapGrow = _config->FindI("APT::Cache-Grow", 1*1024*1024);
map_filesize_t const MapLimit = _config->FindI("APT::Cache-Limit", 0);

FindI Looks for the setting in configuration space, if it's not there it set the default value.

apt-pkg/contrib/configuration.h

int FindI(std::string const &Name,int const &Default = 0)

And apt-config dump only dumps the configuration space. Your config should be there to appear in outputs which it's not. And it's obvious that apt-config is not able to go and look into its own binaries to find out what are the default values.

You might say, well there are other lines in dump which I can't find any configuration file related to them. like this one:
Binary::apt::APT::Cache::ShowDependencyType "1";

Again if we look into source code we find:
_config->CndSet("Binary::apt::APT::Cache::ShowDependencyType", true);

In this case, this one is being configured. CndSet is conditional set. It sets some default configs without overwriting the existing ones.

So there are two things to keep in mind here.

There is a function which looks for a config and if it was not able to find it considers a default (Fallback) value for it.
There is another function which actually is manipulating a set of configurations giving them some values.


Did you first started a session with the user you wish to login?
I suggest you to follow some tutorial on how to run tigervnc server.
VNC servers are by default not daemons like apache2, mysql for example. It means that you must start first the server manually. But some tutorials will show you also how to "daemonize" them.


how to run command from terminal while keeping terminal free?

For detached start try

 nohup <program> &!


No Wifi in Qualcom Atheros - Ubuntu 16.04 - Acer Aspire E 15

Your driver requires firmware that is missing:

  Direct firmware load for ath10k/QCA9377/hw1.0/firmware-5.bin failed
  with error -2

With a working internet connection by ethernet, tethered or whatever means possible, please open a terminal and do:

sudo apt-get update
sudo apt-get install git
git clone https://github.com/kvalo/ath10k-firmware.git
sudo mkdir /lib/firmware/ath10k/QCA9377
sudo mkdir /lib/firmware/ath10k/QCA9377/hw1.0
cd ath10k-firmware/QCA9377/hw1.0
sudo cp *  /lib/firmware/ath10k/QCA9377/hw1.0
cd /lib/firmware/ath10k/QCA9377/hw1.0
sudo mv firmware-5.bin_WLAN.TF.1.0-00267-1  firmware-5.bin

Reboot and your wireless should be working.


When an application crash without output an error, is there a log that i can check?

Depends on the application. Different applications have different logging systems; there's no one central log that contains all the output from all the programs that run on your system.

That being said, a lot of programs do put their log files in the directory /var/log. The file /var/log/syslog (or maybe /var/log/messages), in particular, contains output from the "system logger", which is a service made available by the system that programs can use (if they choose to) for logging. But not all programs use it. Mostly, you'll find messages from low-level system services in that file, not the graphical applications you probably use normally.

You may want to read more about the locations of standard log files.


What is the name of the program that displays the notifications?

The program is called notify-osd, you can use the tool notify-send to send messages to it from scripts and your programs and so on:

How do I send text messages to the notification bubbles?
Where can I find documentation for notify-osd?


How to get the 'right click + scroll' feature of VistaSwitcher in Ubuntu?

In CompizConfig Settings Manager  activate the plugins "Ring Switcher" or "Shift Switcher". You can set your preferred shortcuts there, too.

Screenshot of Shift Switcher in action from compiz.org:

(More about these plugins on compiz.org.)

But be aware: CCSM is an advanced tool. Use with caution. This tool allows you to deeply configure Compiz's settings. Some options may be incompatible with each other. Unless used with care, it is possible to be left with an unusable desktop.


Grub freeze, Live-USB freezing, BIOS-Setup freezing, Windows (dualboot) working fine

Which version of Windows? Do you use Bios or Uefi.

There may be easier solutions but a reinstall should work for you.

Start Windows.

Right click on My Computer or This PC

Select manage.

Choose Disk Management.

Right click on the Ubuntu partition and select delete.

Make sure you don't choose any other partition.

Plug in the USB and format it as FAT32.

Check the md5 checksum of the iso you downloaded.

Make a bootable USB again with the iso.

Try reinstalling Ubuntu with the new USB drive.

While installing, choose Ubuntu partition preferably as ext4.

To remove grub after removing Ubuntu -->

Boot with a windows disc or USB.

Go to repair this computer.

Choose Command prompt.

Run this command

  bootrec /fixmbr

Reboot.


Connecting cable/fibre internet using PPPoE in Ubuntu

I believe you can set up your non-DSL PPPoE using networkmanagerin your gui or you can use pppoeconf

further details can be found with the command man ppoeconf


I can't syntonize free-air channels in VLC UBUNTU

That capture card is analog. It can only be used for analog TV.
It is based on SAA7134 ? Run in a terminal sudo lspci | grep Multimedia. If so you'll have to configure the driver. I'm not actually sure if the following commands (some of them are based on Ezequiel A. Ribeiro video tutorial on Youtube) will still work on the latest Ubuntu but you can try.
Install:
sudo apt-get install alsa-oss tvtime

Edit this:
gksu gedit /etc/modules

Add at the end and save:
saa7134

Now, edit this file:
gksu gedit /etc/modprobe.d/saa7134

Add in that file and the save:
options saa7134 card=3 tuner=37 ir_debug=1

This should be all to get the video working (after a restart *). Only if the audio doesn't work proceed to the next part.
For audio:
Run tvtime first. Ignore any errors.
Edit this:
gedit ~/.tvtime/tvtime.xml

And add:
 <option name="MixerDevice" value="hw:0/Line"/>

before the last line
</tvtime>

Now run tvtime from terminal (no sudo). The only otuput should be:
Running tvtime 1.0.2.
Reading configuration from /etc/tvtime/tvtime.xml
Reading configuration from /home/..../.tvtime/tvtime.xml

If there are errors, post them in the question to see what can be done.
VLC doesn't work for me either. When trying to open the capture card (similar to yours) and set the frequency I get:
[0x7fb340000e68] v4l2 demux error: unknown video standard "PAL_BG:v4l2-tuner-frequency=191250"

But TVTime works great.

* To skip restart just run in the terminal
sudo rmmod saa7134
sudo modprobe saa7134


Ubuntu installation botched up, and now it won't install

You can.  When you get to the installation Type screen, just choose One of the three option as seen in the image below.

Keep in mind that choosing the Erase Ubuntu 13.04, and reinstall will delete all programs, and data, but since you really didn't finish the installation that shouldn't be an issue.

I would recommend using either the third option or the first option.


Wired USB mouse stops working on desktop

Try this command:

echo "on" | sudo tee /sys/bus/usb/devices/usb*/power/level

You may need to redo this command after you reboot. To verify the setting is still in place after you reboot, run the following command:

cat /sys/bus/usb/devices/usb*/power/level

The output should say "on" and should not say "auto". If the output says "auto", you will need to run the first command above again to prevent autosuspend.

modified from source: https://stackoverflow.com/a/1164895

EDIT:

If the above doesn't work. You can try setting a command for the kernel by running the following commands:

sudo sed -i 's/quiet/usbcore.autosuspend=-1 quiet/g' /etc/default/grub
sudo update-grub

Reboot and then run the following command:

cat /sys/module/usbcore/parameters/autosuspend

and the output should now be -1

Other methods include the following:

echo "-1" | sudo tee /sys/module/usbcore/parameters/autosuspend

or

echo 0 | sudo tee /sys/bus/usb/devices/usb*/power/autosuspend_delay_ms

and some systems may require this instead:

echo "-1" | sudo tee /sys/bus/usb/devices/usb*/power/autosuspend_delay_ms

unix.stackexchange.com/questions/91027/how-to-disable-usb-autosuspend-on-kernel-3-7-10-or-above


How to find a lost laptop with Ubuntu installed?

No, and anti-theft software only works if the person using your notebook is also an idiot.

Generally I would assume that the person that got hold of your notebook will remove or format the hard disc. There is also the idea to put a bios password onto the system but those can be circumvented with default passwords. Even prey will not help you there.

Prey only works if someone decides to boot into the system and get on-line using the operating system you installed but that would be the most stupid thing to do.  He would need to reset the admin password, then log into your system, set up wireless and go on-line. That is not very likely to happen.

Only thing you can do to protect your data is to use encryption, but you should consider the hardware gone. Unless the person finding it is someone that is willing to get it back to you (by finding a phone number or email address with, or stored in the notebook).

The only thing that would work is a hardware based solution: an independent SIM card in the notebook that can connect to the wireless and phone home when asked. That SIM could be impossible to remove without actually destroying the machine. But this too is something that should be created when you purchase it.


Ubuntu Server 16.04: static IP will not be static

You have to flush your current ip settings (DHCP based) and restart the networking service (or reboot) to make the settings apply correctly.

Running sudo ip addr flush enp1s0 on your terminal you can flush your current ip settings.
You can restart the networking service  by running sudo systemctl restart networking.service on your terminal.

If you are running from a remote ssh session, maybe its better to run them in a single statement, like sudo ip addr flush enp1s0 && sudo systemctl restart networking.service, to avoid lossing conection at the middle of the process without restarting networking service (and setting up the new ip). Then you'll have to update you port forwarding rule on your router to be able to connect on the new (static) ip.

As a footnote, also keep in mind that some routers doesn't provide a true DNS service at all (they provide ISP's DNS ip address via DHCP), so I'll suggest to add Google's DNS open server (or other of your choice, maybe on your LAN) at least as secondary nameserver, for somehow failover pruposes due to the possible inability of your router.

Example:

auto enp1s0
iface enp1s0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        network 192.168.0.0
        gateway 192.168.0.1
        broadcast 192.168.0.255
        dns-nameservers 192.168.0.1
        dns-nameservers 8.8.8.8

Hope it helps.


Manually restore graphics in my Ubuntu 16 that doesn't boot after upgrading from 14?

Well, I was able to get the grub to work and system to boot.

The keyboard was disabled from BIOS. So I just went into the BIOS and from Integrated Peripherals enabled USB keyboard.
Then, once in GRUB screen, selected Ubuntu advanced options > recovery > root mode and from there I ran dpkg-reconfigure lightdm. Selected lightdm and Ubuntu 16 booted.


What is the best way to move my installed ubuntu form one disk to another

Use the Backups program to backup the OS you want to move.
Install Ubuntu on the new hard drive.
Restore the backup on the Ubuntu OS running on the new drive.

Hope that helps.


edit /etc/network/interfaces and change the IP's below to suit your needs.

once complete, /etc/init.d/networking restart

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.0.1.14
    netmask 255.255.255.0
    network 10.0.1.0
    broadcast 10.0.1.255
    gateway 10.0.1.1
    subnet 10.0.1.0/24


Backups tool does not show the hard drive

You can't backup the system partition with deja-dup (the name of the backup tool), this tool can be used for backing up your personal stuff. When you want to backup the Ubuntu system partition, you can use Clonezilla. Download the ISO file and create a bootable media from it.
Boot from the CD/DVD/USB media you created - here you see how to perform everything :

Clonezilla : How to backup (operating system) partitions

Clonezilla : How to restore (operating system) partitions


Take a look at Dan's question.

It appears you've somehow ended up with two different versions of PHP installed.

This is why Dan asked how you installed.

My suggestion is however you installed, deinstall PHP completely + start again, only using one installation tool. I'd suggest apt or apt-get only... till you get a working install.

You'll know you've successfully deleted all of PHP when /etc/php is completely empty.

You can refer to Installing Apache-2.4.28 + PHP-5.6 which I posted earlier today about how to install latest stable packages from the Launchpad PPA, which contains latest stable releases.

Since your referencing the /opt/lampp, this indicates you've attempting to use some custom installation tool or method, so you're mixing your custom install with the system install, which is doomed to instability.

This means you should also likely rm -rf /opt/lampp as part of your cleanup process + remove any related systemd files + any other non-apt cruft you've installed + remove any related, system wide, PATH settings.

Mixing install methods tends to either fail completely or randomly during various runtime operations.

Best to only use the normal system install methods, which will never reference /opt/lampp directories.


Files has the "Bookmarks" feature. Move into the folder to which you want to have quick access from the left side. Press Ctrl+d. This "bookmarks" the folder, adding it to the left side.

For users of Ubuntu 19.10 and later, a bookmark may also be set from right-clicking the folder button in the top and selecting "Add to Bookmarks". Ubuntu 18.04 also will have it somewhere in a right-click menu, but I cannot currently test.

In general, you can learn about all available shortcut keys from the menu (button with 3 vertical dots): "Keyboard Shortcuts", or by pressing Ctrl+Shift+?.


Create a bootable USB from iso file in Linux

First use gparted to find if your usb stick is named sdb/sdc or something else. In a terminal

cd to the folder where the *.iso is located. In my case

cd Downloads

write the iso to the usb stick and make sure it was written with sync

sudo dd if=file.iso of=/dev/sdX bs=1MB && sync

where sdX refers to your USB drive.

In my case

sudo dd if=debian386.iso of=/dev/sdb bs=1MB && sync

It is done or it should be done, but in the Linux/GNU world it might not be.
Check if it is done by rebooting or booting the computer where you want to run the installation or live-usb

if you do not know what dd or sync is then

man dd && man sync

Be careful with dd because it is powerful and will wipe your drive without asking for permission. It thinks you are God and like a slave executes your commands. It means you have to know your tools or they will bite you hard.

IMPORTANT: make sure you refer to the correct drive in your command otherwise it is possible that you lose your data.


A single-core Intel Atom N270, paired with the Intel Graphics Media Accelerator 950 provided by Intel 82945GSE Graphics and Memory Controller, supports at most 480P videos for online video streaming or reproducing local files.

Due to limited hardware it may work better if using a dedicated client. Two alternatives suggested in comments:

VLC

sudo apt install vlc

File -> Open Network Stream...
YouTube-Viewer

sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install youtube-viewer


How do I set a network connection as a "system connection" from the CLI in 16.04 (LTS)?

First, your wireless will never connect unless you specify the SSID (router) you want to connect to, as well as supply the WPA2 password. Also, it will often be difficult to ssh to your computer that gets a dynamic, probably changing, IP address. Let’s create a proper interfaces file.

First, find the relevant interface name, if not wlp2s0, with the terminal command:

iwconfig

Second, I suggest a static, never changing, IP address. Pick one outside the range used by the DHCP server in the router. Here is an example: http://www.abyssunderground.co.uk/images/router/dhcp.gif

In this example, the DHCP range is from x.100 to x.159. Therefore, static IP addresses in the range of x.2 to x.99 or x.160 to x.253 are safe.

Ideally, you can check the DHCP range in the administrative pages of the router. If you are unable to do so, check the IP addresses of other connected devices in the network; phones, iPads, etc. You may see them all in a close range, say x.2 to x.10. Then you may probably be safe setting a static IP address far away, say x.200.

Now let’s set up /etc/network/interfaces. I suggest:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

#auto enp0s25
#iface enp0s25 inet dhcp

auto wlp2s0
iface wlp2s0 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8
wpa-ssid <your_network_name>
wpa-psk <your_secret_password>

Of course, substitute your exact details here. Restart the interface:

sudo ifdown wlp2s0 && sudo ifup -v wlp2s0

The -v for verbose should produce output that tells if there is a successful connection.

Test:

ping -c3 192.168.1.1
ping -c3 www.ubuntu.com

If you get ping returns, you are connected.

Reboot. Can you ssh into 192.168.1.200?


Mate snipping tool faster to display than "mate-screenshot"/Eye-of-Mate

OK, got tired of the problem...
Shell script:
#!/bin/bash
f=$(mktemp)
import $f.png
eom -n $f.png
rm $f*

Launcher:
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=applets-screenshooter
Icon[en_US]=applets-screenshooter
Exec=/home/<accountname>/Documents/Scripts/SnipTool.sh
Name[en_US]=Snip2Eom
Name=Snip2Eom


Assuming from the given commands you mean shell commands:

Depending on which value you want you can use something like

free -m | awk '/^-/ {print $4}'

The regex between the two / selects the line you want (here it's the one starting with -), the number after the $ denotes the field you want (here it's the 4th).


Your folders need to have x bit set. So set your permissions as 775 (or 755) as you see fit to all folders. You can do a chmod -R 755 ~/Music, that will change permissions recursively on all files inside too. An explanation of how permission bits are treated differently for directories can be found here; in our case:

  The execute bit allows the affected user to enter the directory, and access files and directories inside.


Node.js NVM causes Xubuntu login loop with ~/.profile line

I posted your solution in NVM github, they have already a issue of this:

https://github.com/creationix/nvm/issues/334

EDITED:

It seems that sh can't do dynamic substitution with variable, when loading profile.When execute with bash (terminal) it works.

So u could move this to your ~/.bashrc, also you can put this:
source ~/.nvm/nvm.sh to your ~/.bashrc

I did the second and it works fine!


How to perform detail packet capture on Ubuntu firewall?

Iptables is not the best tool for packet capturing and I am not sure that capturing packets will answer your (routing) questions.

You can use one of many tools, wireshark, snort, or tcpdump (to name a few). Your router may be able to track / log this as well.

The details of packets is moderately complex and somewhat lengthy to expalain. Take a look at the existing documentation and ask a more specific question. As this is not ubuntu specific, you may be directed to other stack exchange Q&A - Unix and Linux for example.

http://www.slashroot.in/packet-capturing-tcpdump-command-linux

http://wiki.wireshark.org/Tools

http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/


Can I uninstall & replace Firefox with another browser of my choice?

There can be some packages that depend on (or recommend) a browser, in the form of a virtual package (firefox provides the virtual packages www-browser, iceweasel and gnome-www-browser) or through an alternative (some package depends on firefox | chromium-browser).

To solve your problem you can use aptitude that provides more choices to as to proceed. The package aptitude is not installed by default, so you need to install it

sudo apt-get install aptitude

then you can do

aptitude --simulate remove firefox

and see what it suggests. This is what it says on my system

enzotib@laptop:$ aptitude --simulate remove firefox
The following packages will be REMOVED:
  firefox
0 packages upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
Need to get 0 B of archives. After unpacking 30.6 MB will be freed.
The following packages have unmet dependencies:
  icedtea-plugin: Depends: firefox (>= 4.0~b7) but it is not going to be installed. or
                           chromium-browser but it is not going to be installed. or
                           epiphany-browser but it is not going to be installed. or
                           midori but it is not going to be installed.
  firefox-globalmenu: Depends: firefox (= 5.0+build1+nobinonly-0ubuntu0.11.04.2) but it is not going to be installed.
  firefox-gnome-support: Depends: firefox but it is not going to be installed.
The following actions will resolve these dependencies:

      Remove the following packages:
1)      firefox-globalmenu
2)      firefox-gnome-support
3)      icedtea-plugin
4)      icedtea6-plugin

      Leave the following dependencies unresolved:
5)      totem-mozilla recommends epiphany-browser | www-browser
6)      ubuntu-desktop recommends firefox
7)      ubuntu-desktop recommends firefox-gnome-support
8)      moonlight-plugin-mozilla recommends firefox | abrowser | iceweasel | xulrunner-1.9.2
9)      ubuntu-restricted-addons recommends icedtea6-plugin
10)     xul-ext-ubufox recommends firefox (>= 4.0~b6) | abrowser (>= 4.0~b6)
11)     mozilla-libreoffice recommends iceweasel | firefox | iceape-browser | konqueror-nsplugins

Accept this solution? [Y/n/q/?]

This way you can see removing firefox what packages breaks. If you choose n, another possible solution is suggested, ans so on.

When you have a best understanding of the problem, and you have selected your way, run aptitude without the --simulate option.


Aspire one 722 graphics driver installation boots and freezes to blank screen?

Can you get to the console by pressing Ctrl+Alt+F1? If so login to the console and uninstall the drivers by typing:

sudo apt-get remove fglrx fglrx-amdccclete

This will remove the AMD/ATI graphics driver and revert back to the open source one. The reboot the computer by typing

sudo reboot

If you cannot get to the console, choose recovery mode at the boot loader (GRUB) menu. using this guide. Then choose "Drop to root shell prompt." There you can use the above commands without sudo in the beginning.

Hope this helps


From my experience, it is generally a bad idea to flash supersu on a CM13 install, because supersu is already supported by CM13 (in the developer options, the "root access" item), and there are some know issues with doing so. Here are some things that I would try :

First, make sure USB debugging is on for adb. You can enable it in Settings > developer options > Android debugging. You can also try to enable root access for ADB. Boot into recovery and try "adb devices". If this does not work, you can try the following steps :

1- If you can detect your device in fastboot mode (fastboot devices), flash a new recovery (TWRP or clockworkmod).

2- Reboot into fastboot

3- Go into recovery

4- Try adb devices. If it works, format system, data, cache and reinstall everything (except supersu ;p).

If this does not work, I would suggest you flash the factory Motorola image from fastboot mode and then try steps 1-4 again.

If all fails, I would suggest consulting the associated page of your ROM on XDA.


Any way to see "Optional add-ons' list of a software in new Ubuntu Software center in Ubuntu 16.04 LTS?

Ubuntu software center in 14.04 does not same with 16.04.
Package name in 14.04 is software-center, in 16.04 ubuntu-software.

In my case, I just install the old ones.
sudo apt-get install software-center


Error while unzipping: need PK compat. v5.1 (can do v4.6)

Try installing 7z sudo apt-get install p7zip-full and then extract the file with it 7z x 00000018.zip


Cannot make NVIDIA driver work with Ubuntu 12.10

The working solution can be found at the link below:

Make sure to have the system up to date first (so the new kernel is applied first).

https://askubuntu.com/a/202680/111057

It allows nVidia driver deb to compile the kernel boot module as it's installing, but it fails without the correct packages (that are not included by default and not a dependency of the nVidia drivers deb/package directly). After I did the above fix I had full resolution on Ubuntu 12.10, Mint v14 and Kubuntu 12.10.


How to prevent the recorded video using ffmpeg get corrupt

You should try a different output container format such as MKV.

Your -f mp4 seems superfluous (unless this is part of a script where the output name is or part of a variable), but if you wanted to continue using this option the change it to -f matroska and give your output the mkv extension instead of mp4.

MP4 requires additional information to be written to the file, but this can only occur after encoding is completed properly. If the encoding does not complete properly then the information may not be present resulting in a non-playable output.


Do we have a Ubuntu Base image that we can use for creating a custom ISO?

Step 1: Add the bootloader, kernel, filesystem, and your other customizations. See https://wiki.ubuntu.com/Base and https://askubuntu.com/a/70139/19626
Step 2: Wrap your system into a .iso image. See https://wiki.debian.org/RepackBootableISO
Step 3: Test, debug, repeat.
Ubuntu Base is an informal project that Canonical engineers use to simplify their various cloud and specialty-hardware projects to provide a uniform Ubuntu experience.
It is not a "real" flavor of Ubuntu. It is not intended to replace the discontinued Netinstall (Minimal) image. It is not designed for easy installation by normal users who can boot PC Hardware from a USB port.
Generally, folks who need to ask "how do I..." about Ubuntu Base should avoid Ubuntu Base; use a more appropriate tool or workflow for your skill level instead.


Error launching JabRef under Ubuntu 18.10

Maybe you can try to install Oracle JRE. This way you will have JavaFX inside and no need to install it separately.

Apart from that if you want to continue trying with OpenJDK.
I am not sure if you have 1.8.0_191 (8u191) can use openjfx version 8u161.

By the way your java can be headless because it is written OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Then it does not have part of the GUI libraries. This can be a problem.
You have to install not a headless java.

For more information: https://stackoverflow.com/questions/24280872/difference-between-openjdk-6-jre-openjdk-6-jre-headless-openjdk-6-jre-lib

https://stackoverflow.com/questions/32862344/what-is-the-difference-between-openjdk-7-jre-headless-and-openjdk-7-jrejdk/32862422

Good Luck!


This mostly happens with a directory permission issue, apt-get is very conscious on what the permission is set for keys and cert file, so setting a mere 777 or 644 would never work.

Steps described in https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1668944 was very helpful to narrow down this issue.

I did the following steps to address this,

add _apt user to group ssl-cert

~# usermod -G ssl-cert _apt

Change the group of certs directory

~# chgrp ssl-cert /opt/CA.crt /opt/user.crt /opt/user.key

Fix the file permissions

~# chmod 655 /opt/CA.crt /opt/user.crt /opt/user.key

Also if this doesnt work for you, you can su as _apt and try to read your cert and key files, if you can then apt with client cert should work as expected.

Just to make sure if you are using self signed certificate, make sure you run

~# sudo update-ca-certificates

once you moved your ca certificate /usr/local/share/ca-certificates/


How to resume from suspend after open lid on Ubuntu 20.04

I had the same issue but happened to find the solution inspired by this thread: Enabling keyboard backlight on Sony VAIO on Ubuntu 19.10
Following the same procedure:
sudo nautilus

Then navigate to "/sys/devices/platform/(*your laptop OEM, in my case, sony-laptop)"
You'll find the file named "lid_resume_S3" "lid_resume_S4" and "lid_resume_S5": S3 is suspend, S4 is hibernate, S5 is power-off. Check the value, if it's -1 or 0, it means the function is disabled. You can change the value to 1 accordingly. My laptop resumed from suspend when the lid is opened after I made changed on files for S3 and S4.
Meanwhile, directly from Terminal:
sudo nano lid_resume_S3

should also work, but I didn't try.
Good luck.


Some keyboards have dedicated multimedia keys to launch applications. Launch (C) is one of 16 symbolic codes for such launchers: XF86Launch[0-9A-F].


Yes of course you receive errors. Your script is a mess. I can't understand exactly what you intend to do, but maybe this variant will give you an  idea where are you wrong:

#!/bin/bash

for User in $(cd /home;ls --hide=lost+found); do
    echo "$User online since:"
    who | awk '{ print "\tUser: "$1" - Terminal: "$2" - "$3" "$4}'
    NOW=$(date +%s -d "Jan 1, 1980 00:00:01")
    USR=$(lastlog |awk ' {print $1, ":",$5,$6,$9 } ' | grep $User)
    USRDATE=$(echo $USR | cut -d ":" -f2)
    (( USRDATE = $(date --date "$USRDATE" +%s) / 86400 ))
    (( NOW = NOW/86400 ))
    (( DAYS = NOW - USRDATE ))
done


Ubuntu 12.10 freezez on startup, ocassionally

Google says you just have to explicitly set it in /etc/apache2/httpd.conf:

  ServerName localhost

Restart apache afterwards.


Firstly, the use of wlanXmon instead of monX is not an error. This is a new feature, added with the current version of Aircrack-ng.

Secondly, despite the effects those processes may have had before you updated, a network process is now interfering with your Aircrack installation. You can fix this easily by running sudo airmon-ng check kill all, but be aware that this is very likely to temporarily break your networking settings menu.

It is better to learn how to use this new version, rather than downgrading, because downgrading will inevitably bring a downpour of broken dependencies.


Cannot see Apache2 in Browser Ubuntu 20.04lts

The standard path inclusions are in five files wrote
/etc/apparmor.d/abstractions/web-data.dpkg-dist
/etc/apparmor.d/abstractions/web-data
/etc/apache2/apache2.conf
/etc/apache2/sites-available/default-ssl.conf
/etc/apache2/sites-available/000-default.conf
all entries with

#/var/www/html

should be uncomment to

/var/www/html

also should there in /var/www/html a file to be
which is telling you all is right if you enter the address http://localhost
please use the complete address than any browsers are toggling alone to https://
if you use only localhost


GRUB menu entry for booting Ubuntu on a USB drive

Boot USB from Internal GRUB
I have three flash drive menuentries in my grub.cfg file:
menuentry "Ubuntu - flash drive" {
    set root=(hdX,Y)
    set gfxpayload=keep
    linux ($root)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash ---
    initrd ($root)/casper/initrd
}

and
menuentry "Ubuntu - flash drive" {
 search --set=root --fs-uuid xxxx-xx-xx-xx-xx-xx-xx
    set gfxpayload=keep
    linux ($root)/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash ---
    initrd ($root)/casper/initrd
}

If the first does not work, (sometimes got to fiddle with (hdX,Y) if 0,1 is not right), I add the correct UUID to the second.
I did not need to edit edit /etc/defaults/grub
If your USB is an ISO booter a standard menuentry including set root  for loop mounting ISO's should work
menuentry "Ubuntu-20.04 64-bit ISO" {
    rmmod tpm
    set root=(hd0,1)
    set isofile="/ubuntu-20.04-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash --
        initrd (loop)/casper/initrd
}

Again you may have to fiddle with set root location.
You can also add fsck.mode=skip after quiet splash if you want to get rid of the file check.


1. You can add this line using nano or vim from terminal (ctrl+alt+t):

sudo nano /etc/sysctl.conf

where you then scroll down and add the line by hand then press ctrl+x to end editing. You will be asked if you want to save, confirm that by pressing y and then once return to save.

Same way you can reverse your changes.

2. You can add it as well this way:

echo "net.ipv4.icmp_echo_ignore_all=1" | sudo tee -a /etc/sysctl.conf

For reversing this refer to solution 1.


How to fix additional STA driver installation error on 12.04

Please try:

    sudo apt-get install --reinstall bcmwl-kernel-source

If there are errors, please post them here.


There is a known bug for Intel Baytrail graphic, also for a nVidia GeForce GT 630M [10de:0de9] graphic card.

If you're using the nVidia graphic card, the solution is easy, just install the proprietary driver from the "Additional Drivers"

Another workaround is to edit your "/etc/default/grub" file, change

GRUB_CMDLINE_LINUX=""

into:

GRUB_CMDLINE_LINUX="video=VGA-2:d"

(Since the bogus unknown display is connected to VGA2 in your case)

After that, run sudo update-grub and reboot

Reference:

An "Unknown" display appears with no external display connected on 12.04.5
[Dell Inspiron 3531] "Unknown" display found in display utility [8086:0f31]
Unknown display besides laptop Built-in display. Old question but with no answers


Bluetooth speakers do not appear in Sound Settings

Steps you can try

Try to disconnect and connect again
Check if you are using the correct mode of pairing. Different devices have different methods
Initiate the connection once from the speaker side and also once from the computer side. Do this multiple times. It has often worked for me after a number of attempts
Change sound output from mono to stereo and vice versa(basically change the Bluetooth sound profile. A2DP is Stereo). This does the magic many times


As of now, updated Steam works without problems, guess this can be closed.


Custom Keyboard shortcuts not working in Ubuntu 20.04

While you have a valid bash command, the "Set custom shortcut" dialog does not support some features of it, among others concatenating two commands. You can have it work by specifying your command as following:
sh -c "cd /home... && libreoffice ..."

Here, you launch the shell and pass a command to it as an argument.


Possible? OpenSSL server listens on 2 ports, but only one with 2-factor authentications

It actually  appears as though this will require two completely separate ssh daemons to make it work rather than adding an additional port to the current ssh daemon.  Detailed instructions are here: 2 sshd configurations 1 for internal and 1 external
.  The basic premise seems to be copying the /etc/ssh/sshd_config file and the systemd config file as well.  Then setting up the copied systemd file to use the new sshd_config file.


Ubuntu 20.04 Freezing right after logging in. Only mouse movement is possible

I asked an IT center. Among their suggestions, I did the item #1 of the first bullet below and it worked.

using the administrator account, to try renaming some of the other account's startup files to start with an initial configuration.

Start with .bash_profile, .bashrc, .inputrc, and .profile
If this is not helping continue with the directories .cache, .config, .dbus, and .local
If that doesn't help, create a temporary directory in the home folder and move everything from the home directory to that directory to start with a basic environment.
If either solution works, copy or rename the files or directories back to find the problem.

If you are still having problems, hardware in the laptop may also be defective. In that case, the machine needs to be investigated further.


Unable to dual boot ubuntu 16.04 with windows 10

Was there space for Ubuntu before you installed it, or did the install resize the partition first?  If you have space for ubuntu, it should install it, then as part of the grub setup, detect the windows install and add it to the menu.

You should be able to update the grub menu with the command [see below] it might put the option back in for you.

sudo update-grub


Why can't I update my system via shell script?

udpate and udgrade are wrong!

try this :

#!/bin/bash

echo "Updating system..."
sudo apt-get update
sudo apt-get upgrade


If compiled and installed via make install, you will need to manually remove the following entries:
/boot/vmlinuz*KERNEL-VERSION*
/boot/initrd*KERNEL-VERSION*
/boot/System-map*KERNEL-VERSION*
/boot/config-*KERNEL-VERSION*
/lib/modules/*KERNEL-VERSION*/
/var/lib/initramfs/*KERNEL-VERSION*/

Then update the grub configuration:
sudo update-grub2

If compiled via the debian method, you can see the installed kernel with the following:
dpkg --list | grep kernel-image
And then uninstall the desired kernel package with apt-get:
sudo apt-get remove kernel-image-your-kernel-image


HELP My wifi adapter is not working Unbuntu 20.04.2 lts

The simplest way to fix this, while not ideal, is to use a custom driver for the RTL8812AU chipset that is in your wireless card.
Here's how:

Open Terminal
Ensure you have git and dkms installed on your machine:
sudo apt install git dkms

Download the RTL8812AU driver:
git clone https://github.com/aircrack-ng/rtl8812au.git

Change to the directory:
cd rtl8812au

Compile an install the driver:
sudo make dkms_install

Once this is done, your wireless card should pick up properly. If not, you may need to reboot.


There is information about what Matlab versions compatible with Ubuntu 12.04 at the Platform Road Map for the MATLAB and Simulink Product Families. Look under the heading called Linux® 64-Bit MATLAB and Simulink Product Families.

In the Ubuntu Software Center for Ubuntu 12.04 there is a package called matlab-support. This package does not provide MATLAB. Instead it configures an existing MATLAB installation to integrate more comfortably in a Debian installation.

There are installation instructions for MATLAB in Ubuntu at the Ubuntu Documentation MATLAB wiki. Installation instructions for a specific version of MATLAB in Ubuntu can sometimes be found (depending on the version) by searching Ask Ubuntu for that MATLAB version.


Is there a way to know if transmission-daemon currently active?

Sure. The first one is with transmission not active, the second one is.

rinzwind@schijfwereld:~$ ps -ef | grep transmission | grep -v grep

rinzwind@schijfwereld:~$ ps -ef | grep transmission | grep -v grep
rinzwind 10490     1 11 22:04 ?        00:00:00 transmission-gtk

  Is there a way to check whether transmission daemon is downloading or not?

Yes. There is an API and here is an old script from 2013 doing a shutdown for a MAC. Requires 1 change:

subprocess.call(['osascript', '-e','tell application "Finder" to shut down'])

needs to be something like this:

subprocess.call(['shutdown', '--now','turn off'])

It assumes you set up the web interface on port 9091

Pre req:

cd ~
virtualenv .transmission_env
source .transmission_env/bin/activate
pip install transmissionrpc
deactivate

and the script:

#!/Users/fots/.transmission_env/bin/python

import subprocess

import transmissionrpc
from transmissionrpc.error import TransmissionError

def main():
    all_done = True
    try:
        tc = transmissionrpc.Client('localhost', port=9091)
        for torrent in tc.get_torrents():
            if torrent.status == 'downloading':
                all_done = False
                break
        if all_done:
            subprocess.call(['osascript', '-e',
                             'tell application "Finder" to shut down'])
    except TransmissionError:
        pass

if __name__ == "__main__":
    main()


From reviewing the systemd source code, the only reason that a timer would emit "refusing to start" is if there was a problem with the service unit it needed to activate. Confirm that both your .timer and .service files are valid:

systemd-analyze verify /etc/systemd/system/letsencrypt.service
systemd-analyze verify /etc/systemd/system/letsencrypt.timer

Also confirm that you can start the letsencrypt service manually:

systemctl start letsencrypt
journalctl -u letsencrypt


How do I combine an SSD and HDD for existing setup on Ubuntu 19.10?

Make a backup of your important data
Create ext4 partition using the whole hdd disk for this in GParted.
Log off from desktop environment
Switch to tty3: Ctrl+Alt+F3
Log in as root
Mount your hdd to /mnt: sudo mount /dev/sdXX /mnt
Move everything from /home on ssd to your hdd in /mnt/: mv /home/* /mnt/
Umount hdd partition: umount /mnt and /home if it is present in fstab. Also comment out current mount point record for /home on SSD in fstab.
Add hdd /home mount point to /etc/fstab

/dev/sdXX /home           ext4    defaults        0       2

where sdXX - your hdd partition.


You need to specify private key for IdentityFile option, as described in manual page for ssh_config(5):

IdentityFile /Users/mehdibenchoufi/.ssh/id_rsd

If ssh does not recognize the key typ, it tries to decrypt it regardless the content of the file, which ends in nonsense (regardless the passphrase).


Just Loaded Trusty tahr where is the update manager

UPDATE MANAGER LINK QUESTION:

Select the search icon  (top left) in the sidebar (launcher) and type updater.

You will be presented with the software updater icon.

Select this and notice the icon is available in the left hand panel. Right click on the icon and select Lock to Launcher and voila!

You can select the various options you require by selecting Software & Updates from System Settings.

When there are updates, the colour of the icon background changes to green to alert you.


Lenovo e531 - Fn keys don't work properly

I got the same problem under 12.04.3 amd64.

I found a post with a similar problem: 12.04 - How to control Brightness

There is a workaround described :

Login as root (or use sudo vim) and open "/etc/default/grub"
Change the line (line# 11 or near)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

Save and close
Execute grub-update
Reboot

With this the keys work properly but only the brightness bar has still the wrong behaviour.


Vim refuses to start with "error while loading shared libraries: libperl.so.5.14" after upgrade to Ubuntu 14.04

Just create a shortcut:

ln -s /usr/lib/x86_64-linux-gnu/libperl.so.5.20 /usr/lib/x86_64-linux-gnu/libperl.so.5.14


How can Ubuntu update running applications without having to close them while Windows cannot?

For Example-Updating in MS Windows 7 , it asks for closing the Active Instance of same application (if active) for updating.
How does Ubuntu replaces the active working application to newer version without interfering with its active Instance. [Noticed for many Packages]

I'll try to explain this as simply as possible. Most Linux filesystems are slightly different from Windows' filesystems (NTFS). At their core, both essentially contain an index table of file names (entries) pointing to the actual data stored on the disk. In NTFS this is called the MFT (master file table) -- you may have seen that name scroll by if you run a chkdsk.
However, the "slight difference" I mentioned is that Linux's index tables, if you will, consists of two levels: the index, and inodes. The inodes contain the actual file metadata, including its physical location on disk; the "file name" in the index is simply a (hard) link to the inode.
When you update/upgrade a running application, the updated files are written to disk, inodes pointing to the new data created/updated, and the file names are also updated to link to these new inodes. But, for any files that already in use by a running application (i.e. file handles exist), their file names will continue to point to the old inodes (which contain the old data) until the file handles are closed. This usually happens when you exit the application, or for some system files, when you reboot. At this point, the old data is actually removed from your disk.


How can I change the resolution of Avadon: The Black Fortress

After first run a new file called ~/.local/share/Avadon/Avadon.ini will be generated. You can edit this to change the game settings. Here's what the stock version looks like:

screenwidth=1024
screenheight=768
fullscreen=1
gamespeed=0

So just play around with screenwidth, screenheight and fullscreen.

In order for the game to pay attention to this, the option Resolution and Window Size must be set to Ask at Startup in the in-game settings.


Putty works but ssh from terminal fails after SSH2_MSG_KEXINIT

My own question was answered on the duplicate question on serverfault (first answer). I added:

HostKeyAlgorithms ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss

to ~/.ssh/config


you should not change these settings especially for mounted partitons at / aka root. Any wrong tinkering with the fstab file may make your system unable to boot.

nosuid means  Block the operation of suid, and sgid bits. So if instead you set it to false i.e not having it in the fstab file, then during boot the volume wont mount properly and your system may enter in shell mode.

Example : /proc volume has the task of allocating and storing a cache like database for all the running process. It gets every permission i.e 777 and has root privileges. If by chance someone managed to unount it by setting other permission then your kernel would panic and your system would get crashed.


The default character encoding for the mounts in Linux is iso8859-1. This encoding is legacy and only supports 256 characters. All modern systems should be using utf-8 but I think default is left at ISO8859-1 for compatibility reasons. So it's always good idea to add iocharset=utf8 when mounting Windows share. Also, lot of websites enforces filemode/dirmod 777 when mounting which I think are unnecessary. The mount command that I use is,

sudo mount -t cifs //SERVER/FOLDER /mnt/FOLDER -o username=USER,domain=DOMAIN,iocharset=utf8


Fresh install of 14.04 LTS without disturbing Windows

Goto to Ubuntu.com website and download the desktop version of the current OS. It will download the iso image of the OS.

Start up the DVD burning software that you use and burn the iso image to the DVD (I believe the OS is too large to fit on a CD now).

Restart the computer from the DVD you created and follow instructions.

For the flash drive, you need to convert the iso file. Here is an outline of the process.
Windows would use Universal USB Installer to create the USB bootable image.
Ubuntu would use Startup Disk Creator or UNetbootin.
Set the BIOS to boot from USB and reboot.


how to disable gnome lock screen curtain in ubuntu 17.10?

I have a workaround for this.

Uninstall or disable light-locker in autostart.
Install xscreensaver
On the XScreensaver settings screen unselect screen locking.
On the advanced tab tick power management enable and set 0 for standby after and check Quick power off in blank only mode.


Why does Perl always need the "-p" option to be given even when the input file is stdin?

The perl --help command states that -p assumes a loop like -n but prints line also, like sed. sed is a stream editor, and is used to manipulate text much like how the -p option works with perl. -p is the only option for perl to print the processed output.  Without the -p option, the processed output cannot be printed. So as it's shown in my example below, if the print doesn't happen, the string is not replaced.

WARNING: DO NOT REPLACE THE -p WITH -n AS IT WILL BLANK OUT YOUR FILE!

~$ sudo grep "CMDLINE_LINUX_DEFAULT" /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="nosplash"

~$ sudo perl -pi -e 's/nosplash/splash/' /etc/default/grub

~$ sudo grep "CMDLINE_LINUX_DEFAULT" /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="splash"

~$ sudo perl -i -e 's/splash/nosplash/' /etc/default/grub

~$ sudo grep "CMDLINE_LINUX_DEFAULT" /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="splash"


Download Manager for 19.04 and Clipboard Manager for 19.04

Uget for download management and copyQ for clipboard management


how to split all the files in a directory in to 4gb files to a different directory?

My suggestion would be to first create a tar file:

tar -cf /tmp/bigfile.tar /var/lib/backuppc/images/*

then split that:

cd /usbdrive
split -b 4G /tmp/bigfile.tar

If you want to avoid use of the temporary tar file you can pipe tar directly to split:

tar -cf - /var/lib/backuppc/images/* | split -b 4G

To reconstruct this when you get to the destination, recreate and unarchive the tar file:

cat /usbdrive/x* >bigfile.tar
tar -xvf bigfile.tar

Again, to do this without the temporary file:

cat /usbdrive/x* | tar -xvf -


Upgrading from 12.04 LTS to 14.04 LTS Issues

Thank you for taking the time to reply. I have now successfully installed 14.04 LTS -but I have an issue.

I put my password in during the installation but now it is not recognised when we get to the initial sign in page and I have had to log in as a Guest User.

I am totally sure that the password I have entered during the installation of 14.04 LTS is correctly typed to what I am now currently entering - can anyone advise if this is a common issue and how it is resolved please?


Can I use Ubuntu for Clojure development

Yes, you can (or in the case of Cursive soon be able to) instal these.

Clojure is available in the Universe repository, which should be enable by default. The most recent version available is 1.4, available in 13.10 and 14.04.

sudo apt-get install clojure1.4

12.04 has version 1.2.

sudo apt-get install clojure1.2

The most recent version of Clojure is 1.6. If you really need the newest version, you can download a binary in a jar file, which you can easily run from your home directory. It is also available in the official repositories from 15.04 onwards.

IntelliJ Idea is a commercial product, but Community edition is free. Even through it is free, it needs to purchased through the Software Center.

One note of warning, when starting IntelliJ you are likely to see a warning message saying that it should work with OpenJDK, but that it expects Oracle Java and that using OpenJDK is unsupported.

According to the Cursive website , is not yet available. It will be also be a commercial product, but they say it will work with the IntelliJ Community edition.


When do apt-mark show architecture in package name?

apt-mark shows architecture, if the package has different architecture than the native architecture of the OS.


Disable "middle click to lower window" behaviour on gnome

For 14.04 (Trusty Tahr) it could be disabled with the command:
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'none'

Restore original state:
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'lower'

Also, the following variants are possible:
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-shade'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'maximize'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-maximize-horizontally'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-maximize-vertically'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'minimize'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'shade'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'menu'

But the bug is still there, option from the Google Chrome Settings "Use system title bar and borders" could lower the impact...


It actually caches the right to elevate, but not your password, and has done so for quite a while. However, it does so for only fifteen minutes, by default. This is by design:

From  http://linux.die.net/man/8/sudo:

  Once a user has been authenticated, a time stamp is updated and the user may then use sudo without a password for a short period of time (5 minutes unless overridden in sudoers).

and as a note of security from man sudoers:

  sudo will check the ownership of its time stamp directory (/var/db/sudo by default) and ignore the directory's contents if it is not owned by root or if it is writable by a user other than root. On systems that allow non-root users to give away files via chown(2), if the time stamp directory is located in a directory writable by anyone (e.g., /tmp), it is possible for a user to create the time stamp directory before sudo is run. However, because sudo checks the ownership and mode of the directory and its contents, the only damage that can be done is to "hide" files by putting them in the time stamp dir. This is unlikely to happen since once the time stamp dir is owned by root and inaccessible by any other user, the user placing files there would be unable to get them back out. To get around this issue you can use a directory that is not world-writable for the time stamps (/var/adm/sudo for instance) or create /var/db/sudo with the appropriate owner (root) and permissions (0700) in the system startup files.

and from the same page:

  Since time stamp files live in the file system, they can outlive a user's login session. As a result, a user may be able to login, run a command with sudo after authenticating, logout, login again, and run sudo without authenticating so long as the time stamp file's modification time is within 5 minutes (or whatever the timeout is set to in sudoers). When the tty_tickets option is enabled in sudoers, the time stamp has per-tty granularity but still may outlive the user's session. On Linux systems where the devpts filesystem is used, Solaris systems with the devices filesystem, as well as other systems that utilize a devfs filesystem that monotonically increase the inode number of devices as they are created (such as Mac OS X), sudo is able to determine when a tty-based time stamp file is stale and will ignore it. Administrators should not rely on this feature as it is not universally available.

As seen here, this behavior has persisted for a long time.

If you want to change this, use visudo to set the timestamp_timeout option.


Alternative printing method(s) for an unsupported printer

Once your unsupported printer is recognized either from USB or if setup as network printer from the appropriate network setting you are asked for a driver. If your printer is not listed you can alway select "Generic" to give you a choice of standard printing methods depicted below:

In this example on the left hand side a "PCL6/PCL XL Printer" is selceted and gives you again a variety of selections of PCL6 subsets on the right hand side. Depending on your model your Konica/Minolta printer may be a PCL6 printer and this entry may work, but you will have to simply try out what subsets are appropriate. If it's not PCL6 you may also try out if a generic GDI driver works.

Fancy special things your printer may be capable of will not work with a generic driver but at least you can print out something.


Startup problem, system preferences set to default?

After doing some more digging, I discovered that this error occurs when Ubuntu is shut down prematurely. I am still unsure as to why all of my system settings were reset to their defaults.

Now the question is, why didn't my system get past the BIOS screen the first time this happened?


How can I remove Windows and upgrade Wubi install to a full install without a CD or USB stick?

I want to remove Windows XP and upgrade the Wubi install to a full installation.

Which means you want to keep all your installed applications and settings of Wubi install of Ubuntu in full installation, and I'm afraid its not possible, since Wubi installation within Windows creates a virtual filesystem in a single .disk (not sure of this extension) file in Ubuntu's installation folder within Windows, which will be of the size that you chose from the installer during Wubi installation, while full installation involves having a dedicated partition (of type EXT4 or btrfs) specifically for Ubuntu.

You can still keep application settings of existing Ubuntu installation by copying every file and folder from your home directory and pasting it back to same place in new installation (only recommended if version of Ubuntu is same in both old and new installation). Also, you may want to look into your /etc directory and save the configurations of certain software packages.

Hence, if you want to completely drop your Windows XP and use Ubuntu full-time then, a clean install is much viable option for you. You can get a complete PDF guide on installing and using Ubuntu 12.04 here (includes screenshots and dead simple to understand).


Why make file is not generated while installing mvapich2

You should check your network adapter. From http://mvapich.cse.ohio-state.edu/support/mvapich2-2.0a-quick-start.html:

  If you’re using a Mellanox InfiniBand, RoCE, or iWARP network adapter you can use the default configuration…

$ ./configure

  If you’re using a QLogic InfiniBand adapter you should
  use…

  $ ./configure --with-device=ch3:psm

See also: http://mvapich.cse.ohio-state.edu/support/user_guide_mvapich2-2.0a.html#x1-50004


Option 1:

Add directory option to Apache configuration file /etc/httpd/httpd.conf or /etc/apache2/apache2.conf:

sudo nano /etc/apache2/apache2.conf

And add Following code:

<Directory /var/www/domain.com/pdfs>
Options Indexes FollowSymLinks
</Directory>

Save and close the file.

Then restart Apache:

/etc/init.d/httpd restart

OR

/etc/init.d/apache2 restart

Option 2:

You can place config line Options Indexes in .htaccess file. Make sure .htaccess file support is enabled.

sudo nano .htaccess

Append following apache directive:

Options Indexes

Save and close the file.

Taken from This Page (written in 2007)


Grub-n-ISO

You can boot from an iso file via grub in your installed system. It is possible to configure it in the file /etc/grub.d/40_custom and make it active by running

sudo update-grub

which copies its menuentry to /boot/grub/grub.cfg.

This is described in detail via the following links and links from them,

help.ubuntu.com/community/Grub2/ISOBoot
help.ubuntu.com/community/Grub2/ISOBoot/Examples with content to add to the file /etc/grub.d/40_custom

Modified example (updated to Xenial alias 16.04.1 LTS). Use the actual path and name to the iso file and the actual partition in the loopback command.

menuentry 'Ubuntu Xenial alias 16.04.1 LTS' {
 set isofile="/iso/ubuntu-16.04.1-desktop-amd64.iso"
 loopback loop (hd0,5)$isofile
 linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
 initrd (loop)/casper/initrd.lz
}

www.howtogeek.com/196933/how-to-boot-linux-iso-images-directly-from-your-hard-drive with detailed tips
wiki.archlinux.org/index.php/Multiboot_USB_drive with more examples and links
help.ubuntu.com/community/Installation/FromUSBStick#Chainloading how to use the file /etc/grub.d/40_custom


I'm looking for materials or links about cross-compiling, like eabi, etc

From Install the ARM cross compiler toolchain on Ubuntu:

  How to install on Ubuntu the complete toolchain to cross compile the
  Linux Kernel, the Linux device drivers, the Linux applications and the
  boot loader like as AT91Bootstrap and its derivatives like AcmeBoot
  and AriaBoot.

  This procedure has been tested on Linux Ubuntu 16.04. The same ARM cross compiler toolchain
  is in the default Ubuntu repositories up of Ubuntu 16.04-20.04.

  Install the Cross Compilers, utilities, etc.

  Install the GCC, G++ cross compilers and support programs by typing:

sudo apt install libc6-armel-cross libc6-dev-armel-cross
sudo apt install binutils-arm-linux-gnueabi
sudo apt install libncurses5-dev

  If you are using an Arietta,
  Aria or FOX
  G20 board:

sudo apt install gcc-arm-linux-gnueabi
sudo apt install g++-arm-linux-gnueabi

  If you are using an Acqua or
  RoadRunner board:

sudo apt install gcc-arm-linux-gnueabihf
sudo apt install g++-arm-linux-gnueabihf

  Now you are ready to cross compile on your PC all the source available
  for the Acme Boards based on Microchip MPUs.

  Try the cross C compiler

  Let's try to cross compile a Hello World example in C and running it
  on an Acme board.

  This is the example:

#include "stdio.h"

int main(void) {
  printf("Hello world!\n");
  return 0;
}

  Compile it typing:

arm-linux-gnueabi-gcc hello.c -o hello

  As you can see we are using the ARM version of gcc just installed on
  your PC. It will generate an executable file for your Linux board.

  Copy the executable file on the board via ssh:

scp hello root@[your_board_ip]:/root

  Then open a command session on your board and run the example:

./hello
Hello world!

  Try the cross C++ compiler

  Let's try to cross compile a Hello World example in C++ and running it
  on an Acme board.

  This is the example:

#include "iostream"

using namespace std;

int main(int argc, char *argv[]) {
    cout << "Hello world!" << endl;
    return 0;
}

  Compile it typing:

arm-linux-gnueabi-g++ hello.cc -o hello

  As you can see we are using the ARM version of gcc just installed on
  your PC. It will generate an executable file for your Linux board.

  Copy the executable file on the board via ssh:

scp hello root@[your_board_ip]:/root

  Then open a command session on your board and run the example:

./hello
Hello world!

All of the packages in this tutorial are also in the default Ubuntu 14.04 repositories.

Links specific to nRF51, LM35 and Arduino

nRF51 microcontroller - https://arduino.stackexchange.com/search?q=nRF51
LM35 temperature sensor - https://arduino.stackexchange.com/search?q=lm35
Arduino - What does it take to compile Linux on Arduino, if at all possible?


Snapshot in BTRFS is a form of subvolume. By default, your Ubuntu installer on BTRFS created two subvolumes - @ and @home. If you create there a snapshot, say @backup, then you can boot from it by editing grub settings during boot to change the root subvolume name from @ to @backup. You may need to edit @backup/etc/fstab too.


Dropbox desktop app on Ubuntu 14.04 does not sync correctly

My Dropbox in my Ubuntu station was also unable to synchronize events....

What worked for me is:

uninstall Dropbox
Turn off the fire wall
Install Dropbox
Turn on the fire wall


What should I install on 12.04 for a school?

Maybe you could put Ubuntu restricted extras (mainly for playing MP3), VLC (can read most formats of video and audio), Google Chorme (kids love this browser), and Microsoft core fonts (some teachers make kids type with the Times New Roman font.


Actually, you're missing some steps...

First of all, 1.58 is fine for other software in your version of Ubuntu.  Indeed, if you're developing something yourself, then having the latest might be a good idea.

What you downloaded from sourceforge should not be the "boost binary".  It should be all source code.  The steps you gave would setup the build's configuration files and perform the build, but you then have to install it.

See these instructions http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html .

You are missing this instruction:

sudo ./b2 install

Nevertheless, you should read through all of it.  You should pay particular attention to the point about "Header only".  Only some libraries actually need to be built.

Also, it is not quite correct that you should not put it in /usr/include.  It's fine if you do -- you will just have to be sure to include it in the directory search in your compilation line.  Putting it in /usr/include does make things a lot easier.  (--prefix is a useful option if you don't have sudo access on the computer)

PS:  Remember to set the BOOST_ROOT environment variable!


If your board has a slot for a ps/2-type keyboard, use that, as you probably set the legacy USB options off and you have a USB keyboard, that now does not work until after the boot screen is gone. (yes, it boots a second faster, but you lose the keyboard.) I suggest resetting the BIOS with the jumper and start over.
(certified MSI tech)


I want to download Ubuntu 13.04 but I can not to do it

Unfortunately, Canonical no longer sends free CDs. However, you can buy CDs from Canonical's shop but they only send packs of 5, 20, 100 or 200 CDs.

Alternatively, some of the commentators seem to be willing to send you one. You didn't mention how the download failed, but you could also try to download the file again from Ubuntu's website and then create a live USB disk, the link has instructions for both Windows, and OS X.


I have permanent connections to Canonical servers, what are they for and how can I turn them off?

One is a Ubuntu GeoIP Provider and the others are scopes.

To list what services are connecting to IP addresses try sudo lsof -n -P -i +c 15

Ubuntu GeoIp Provider

I don't know what the geoip provider connection is for, what it does, or why we've been told we need it. I can find little information about it, and any attempted explanations about what it is for are ambiguous, at best. This is the only rogue connection I have left.

What I do know, is that geoip calls home every time you connect to the internet, and also at seemingly arbitrary times too. In 12.10 these connections increase.

What is the value of this connection? Who knows. Ubuntu, in its infinite wisdom, obviously feels there is a value. Why else would they implement a connection that always calls home, is enabled by default, and does not have an option to disable?

Changing Settings > Time & Date > Automatically from the internet -> Manually will not stop geoip connections.

For more on ubuntu-geoip-provider read Is ubuntu-geoip geoclue used for tracking. Apparently if you want to disable it you can do so by removing the datetime indicator.

-- update -- I seemed to have stumbled upon a way to disable this connection. * **

Open your dconf editor: $ dconf-editor
Navigate to the com/ubuntu/geoip option
Set the value of geoip-url to nothing "".

or

$ gsettings set com.ubuntu.geoip geoip-url ""

# check success
$ gsettings list-recursively | grep geoip
com.ubuntu.geoip geoip-url ''

Done. Happy days, no more geoip connections.

* Disclaimer: I don't know if there any negative effects of disabling geoip provider connections in the way described above.

** This may only apply to 12.10

Scopes

A scope is essentially a data provider. Example, open your dash, then click on the video icon (Super+v), then search for a video. If you have a video scope installed, you will see an "Online Videos" section in the results that are displayed. Those results are from your video scope!  The video scope has queried its video data provider and returned videos relevant to your search.

You may have other scopes, e.g. music (super+m), photos, amazon, ebay, etc.

A scope is used with a lens.

For more information: What exactly is a lens and What's the difference between a lens & scope.

To check what scopes and lens are currently installed you can use dpkg with grep:

What scopes are installed? dpkg -l | grep scope
What lens's are installed? dpkg -l | grep lens

Example:

$ dpkg -l | grep lens
ii  unity-lens-applications    5.12.0-0ubuntu1    Application lens for unity
ii  unity-lens-files           5.10.0-0ubuntu1    File lens for unity

What do the various dpkg flags like 'ii' 'rc' mean?

To see what scopes and lens you can install search the Software Center for Unity Lens & unity Scope, or use apt-get:

$ apt-get install unity-lens-<Hit Tab Twice For Auto Complete>
unity-lens-applications  unity-lens-files
unity-lens-music         unity-lens-wikipedia
unity-lens-askubuntu     unity-lens-gwibber
unity-lens-video

$ apt-get install unity-scope-<Hit Tab Twice For Auto Complete>
unity-scope-musicstores   unity-scope-video-remote

Removing Scopes

You can remove scopes with no problems, after all, they are just data providers.

sudo apt-get remove unity-scope-video

I removed the video scope and I don't have any PID/python connections anymore. I can't search for online videos from the dash, but I never used that feature anyways.

Scopes in 12.10

12.10 introduces an option to disable network connections when seaching in the dash. To disable go to System Settings > Privacy > Search Results and turn off the option "When searching in Dash: Include online search results."

This does not disable geoip connections, which are not part of the dash.

There's now a legal notice about this data collection. You'll find a link to it in the bottom right of the dash. I figure I'll post the notice here in full for posterity (see notes section) and here's the part I always love best:

  Canonical may change this legal notice from time to time, and at
  Canonical's sole discretion. Please check this page from time to time
  for any changes to this legal notice as we will not be able to notify
  you directly.

Notes on updating to 12.10

On updating to 12.10 I found a new scope installed unuty-scope-gdocs and several new lenses, one of which I guess triggered the introduction of the option to disable connections: unity-lens-shopping.

$ dpkg -l | grep scope
ii  unity-scope-gdocs

$ dpkg -l | grep lens
ii  unity-lens-applications     ...     Application lens for unity
ii  unity-lens-files            ...     File lens for unity
ii  unity-lens-gwibber          ...     Gwibber Lens for unity
ii  unity-lens-photos           ...     Unity Photos Lens
ii  unity-lens-shopping         ...     Shopping lens for unity

You might want to uninstall some these — the shopping lens for a start [rolls eyes].

Searching in the dash - Legal notice - 21 Oct 2012

  Searching in the dash - Legal notice

  This search function is provided to you by Canonical Group Limited
  (Canonical). This legal notice applies to searching in the dash and
  incorporates the terms of Canonical's legal
  notice (and privacy policy).

  Collection and use of data

  When you enter a search term into the dash Ubuntu will search your
  Ubuntu computer and will record the search terms locally.

  Unless you have opted out (see the “Online Search” section below), we
  will also send your keystrokes as a search term to
  productsearch.ubuntu.com and selected third parties so that we may
  complement your search results with online search results from such
  third parties including: Facebook, Twitter, BBC and Amazon. Canonical
  and these selected third parties will collect your search terms and
  use them to provide you with search results while using Ubuntu.

  By searching in the dash you consent to:

  the collection and use of your search terms and IP address in this way; and
  the storage of your search terms and IP address by Canonical and such selected third parties (if applicable).

  Canonical will only use your search terms and IP address in accordance
  with this legal notice and our privacy
  policy. Please see our
  privacy policy for
  further information about how Canonical protects your personal
  information. For information on how our selected third parties may use
  your information, please see their privacy policies.

  Online Search

  You may restrict your dash so that we don’t send searches to third
  parties and you don't receive online search results. To do this go to
  the Privacy panel and toggle the ‘Include online search results’
  option to off. The Privacy panel can be found in your System Settings
  or via a dash search. For a current list of our selected third
  parties, please see www.ubuntu.com/privacypolicy/thirdparties.

  Changes

  Although most changes are likely to be minor, Canonical may change
  this legal notice from time to time, and at Canonical's sole
  discretion. Please check this page from time to time for any changes
  to this legal notice as we will not be able to notify you directly.

  How to contact us

  Please submit any questions or comments about searching in the dash or
  this legal notice by contacting us at the following address: Canonical
  Group Ltd, 5th Floor, Blue Fin Building, 110 Southwark Street, London,
  England, SE1 0SU.

Remote Login Service

When LightDM starts it pings uccs.landscape.canonical.com to make sure the service exists and is usable before prompting the user to interact with it.  To disable this feature (and remote login profile storage access in general) you can edit /etc/remote-login-service.conf and remove the Canonical entry from the list of servers in the Remote Login Service group.  The original looks like:

[Remote Login Service]
Servers=Canonical

[Server Canonical]
Name=Remote Login
URI=https://uccs.landscape.canonical.com/

The edited version should look like:

[Remote Login Service]
Servers=

[Server Canonical]
Name=Remote Login
URI=https://uccs.landscape.canonical.com/


Starting on October 7, and after extended testing via the comments, it was determined that there was an application in the Startup Applications that was causing the problem immediately after logging into the system.

The BricsCAD and LibreOffice application problems were solved with support team help, and with updating the software.

Software Updater does not have to be done manually. If you open Software & Updates, and go to the Updates tab, you can set your software update frequency to your desire.


Read lines from a text file in QML Qt/Quick

QML provides a partially-functional version of XMLHttpRequest.  It's good enough to load text files from the local files system, but that's about it.  An example:

var request = new XMLHttpRequest()
request.open('GET', 'test.txt')
request.onreadystatechange = function(event) {
    if (request.readyState == XMLHttpRequest.DONE) {
        lines = request.responseText.split('\n')  // Assuming you've defined
    }                                             // lines as a property
}
request.send()

Note that only a portion of the XMLHttpRequest1 interface is supported.  Notably, only asynchronous requests are allowed.  I've written some more details here.


Is there a way that I can have more OSX styles quick launch bar in Ubuntu 15?

There are a few OS X Dock clones for Ubuntu, but no real themes for the built-in launcher. It's also nearly impossible to change it position. Auto-hiding the Unity Launcher and installing an alternative will be easier. Here are some third-party dock utilities with an OS X style.

I personally think Docky is the best launcher alternative. It has a bunch of themes, can be placed on any side of the screen, and even supports multiple docks at once. It's highly customizable. Website: http://wiki.go-docky.com/index.php?title=Welcome_to_the_Docky_wiki
Install it by running sudo apt-get install docky in a terminal.

Another nice alternative is Cairo Dock. I haven't used this one very much, or very recently, but I remember it being stable and simple. Wesbsite: http://glx-dock.org/
Install it by running sudo apt-get install cairo-dock

There are probably quite a few others, but these are the ones I know about, and the ones that work pretty well.


Installed 11.10 Help! cannot find chrome after install

Chrome, or chromium (which is chrome with all the required plugins as flashplayer etc..) must be installed from software center. When you are sure that the installation is complete and successful, you must go to the launcher in unity, and search for "chrom". Chrome, or chromium should appear in the list. Then, open it, and create a shortcut in the launcher so u can enter it easily afterwards :D

(chrome must be downloaded manually here: https://www.google.com/chrome?platform=linux)


What file search tool can be used to track files based on creation date?

I think you should try search functionality of

Krusader (sudo apt-get install krusader)
or
DoubleCommander (sudo apt-get install doublecmd-gtk).


This is a problem with the mirror. Both packages rhythmbox and rhythmbox-plugin-magnatune version 2.96-0ubuntu4.3 are available in the repositories as can be seen in the Launchpad page. For some reason or another the mirror doesn't have properly synced. You should update your lists:

sudo apt-get update
sudo apt-get install rhythmbox

Or change to another mirror.


According the this tutorial you can easily do it.
http://www.dreamingisdigital.com/2011/05/20/install-lightdm-on-ubuntu/


This is just a warning, the webserver usually works fine if you ignore this warning. IIRC you can resolve the warning by entering a hostname in the configuration file in /etc/apache2/apache2.conf


The bug was fixed in the Unity 5.8 according to ZDroid:

  All of problems are Unity version. That is bug fixed in Unity 5.8.

– ZDroid Dec 28 '12 at 12:15


When booting from USB, how can I leave grub and boot to hard drive?

With Syslinux type USB boot drives such as MultiBootUSB, MultiBoot USB, Unetbootin, etc make there is generally an option in the boot menu to Boot the First Hard Drive.

With Grub2 type USB boot drives such as mkusb and the original MultiBootUSB make, a menuentry to boot an internal drive can be added to the USB's grub.cfg located on the usbboot partition:

menuentry 'Ubuntu 16.04.2 LTS (16.04) (on /dev/sdxy)'  {
    insmod part_msdos
    search --no-floppy --fs-uuid --set=root uuuu-uuuu-iiii-dddd
    linux /boot/vmlinuz-4.4.0-87-generic root=UUID=uuuu-uuuu-iiii-dddd ro quiet splash
    initrd /boot/initrd.img-4.4.0-87-generic
}

If Windows is the OS on the internal drive it is beyond the scope of this answer.

With a Full install type USB boot drive, open terminal and  run:

sudo update-grub

and it will add any OS's on the other drives of your computer including Windows.


zoneminder on 13.10 cannot click on add new monitor

Solved!

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:iconnor/zoneminder
sudo nano /etc/apt/sources.list.d/iconnor-zoneminder-saucy.list

change 'saucy' to 'precise', ctrl-o to save, ctrl-x to exit

sudo apt-get update
sudo apt-get install zoneminder

select 'I' to overwrite existing file and 'y' to convert tables to InnoDB


It was an issue with the API calls in GUI version 2.14.0. It has been fixed in v2.15.0. Upgrade the GUI using juju upgrade-gui


In alarm-clock-applet I try to play sound, I get this error: Your GStreamer installation is missing a plug-in

You can try

sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
sudo apt-get install gstreamer0.10-plugins-ugly

(as suggested in this answer and also this one on Stack Overflow).

Otherwise, can you add the output of gst-launch -m?


List files having more than 100 lines in a directory and in all it's sub directory

You can count lines with wc, the word count utility:

find . -type f -print0 | xargs -0 wc -l | sort -n