Gnome 3.38 doesn't rotates screen automatically

Not an "answer," but can't comment with my rep:
This seems to be a bug in GNOME 3.38.  Screen rotation stops working even though iio-sensory-proxy and monitor-sensor indicate all is working properly.  It also appears to distribution agnostic (i.e., it occurs on Ubuntu, Fedora, and Manjaro).


I found this post reply from an earlier thread stating that the user removed and replaced their CMOS battery and everything worked fine.

Hope this helps!


The issue is now solved to a sufficient degree in the sense that the iPod is recognized by amarok and by gtkpod. (Rhythmbox still does not see that iPod on ubuntu 16.04).

Because I have tried many things to resolve the problem, I am not sure what exactly made the difference. But I believe that the following commands were important:

sudo apt-get install fuse libimobiledevice-utils ideviceinstaller
idevicepair pair
chmod 777 /media/iPod
ifuse /media/iPhone/

Further, I edited the file /etc/fuse.conf and uncommented the line user_allow_other therein. Essentially I followed the steps described in detail here.

I post this as an answer to my own question, hoping that it will be helpful for others. In any case, as far as I'm concerned, the problem is solved.


Is it possible to install Office 365 (2013) on Ubuntu 15.04 Vivid Vervet?

To my experience, the best way to use Office in Ubuntu is by just installing VirtualBox and make a new Windows virtual machine and install Office on it. From there, you have several options to integrate the Office apps more tightly in Ubuntu.

My favorite way is configure it using this solution: *snip* Unfortunately the user deleted the original video :(

Basically what you do is start Windows "headless" (that is, without a visible window) and then using an RDP client you can start all the Office apps. You can even create nice launchers for them in Ubuntu.


Can't connect to internet after starting DHCP

You should not use same IP subnet 192.168.1.0/24 for multiple network interface.

If you want to leave your WiFi (Router & wlan0) in 192.168.1.0/24 subnet, Change eth0 static IP and DHCP server to a different subnet 192.168.2.0/24 for example.


Can I use Ubuntu on this desktop (for gaming)?

Do you think I could play smoothly Source games along with steam in this computer, running Wine and/or PlayOnLinux?

Yes, I believe it will be a smooth experience.

I have a desktop here with a lesser processor and that plays games over Play On Linux perfectly. Baldur's Gate, Neverwinter Nights, Planescape Torment are not a problem.


Why removing Amazon also remove other packages?

The Amazon web app is part of the package unity-webapps-common which is needed by all other web apps. So this behaviour is intentioned.

But you can still disable the Amazon integration using dconf-editor or Unsettings as described in  How do I remove a website from Ubuntu's web applications?


Which display manager is used by default in Ubuntu GNOME 16.04?

Ubuntu GNOME uses GDM as its default display manager.

This can be verified by looking at the dependencies for the ubuntu-gnome-desktop package, which include gdm3 but not lightdm.

http://packages.ubuntu.com/xenial/ubuntu-gnome-desktop


You should add the user to the cdrom group.

This can be done from command line with the following command

sudo gpasswd -a username cdrom

Take into account that for this command to take effect, the simplest thing is to logout and login again.


Ubuntu very slow after deleting old kernel images and cleanup

Run these commands and report back any errors found:

sudo apt update
sudo apt install -f

If errors were reported as being fixed then reboot and see if speed improves.

You might consider posting a comment under the answer you followed. Briefly summarize the problem and include a link back to your question here.


How to get an icon from the current theme by name?

A search for "gnome desktop file format":

brought me here: Desktop files: putting your application in the desktop menus - GNOME
which links to here: Desktop Entry Specification
which, in the "Recognized desktop entry keys" chapter, links to here: Icon Theme Specification
which is where I gave up.


It's mentioned in the logs that "Settings schema 'org.gnome.software' is not installed"

You did the right thing.
The ubuntu-software command returns the following result if the ubuntu-software package is installed in Ubuntu 20.04:
ubuntu-software: command not found

The gnome-software command launches the Software app.
The Snap Store app  is another software center app for snap packages only.
The Snap Store app can be installed alongside the Software app  in Ubuntu 20.04 with the following command:
sudo snap install snap-store

When I upgraded from Ubuntu 18.04 to Ubuntu 20.04 the Snap Store which was installed in Ubuntu 18.04 was removed from Ubuntu 20.04. When I noticed that the Snap Store was missing I reinstalled it, and since then it has worked with no problems.


Installation is unusably slow, booting from live USB

Totty, looks like an IRQ assignment problem, probably with a memory card reader (mmc1) or the card itself.  If you have that hardware, the first thing I would do is unplug the card reader and try again.  If the problem persists, the way to go is to boot with some extra kernel params, such as acpi=noirq, acpi=off, noapic, nolapic, pci=biosirq, irqpoll or pnpbios=off.  It's much of a trial&error thing, but normally acpi=noirq, noapic and nolapic together should do the trick.

A BIOS upgrade helps too...


I have to add add PATH to /etc/environment but it breaks my machine - why?

Answer to my own question lies here: setting LD_LIBRARY_PATH for CUDA and its this post but do not forget to do sudo ldconfig


sort of a workaround, but you could install the xautomation package which provides xte. xte allows you to move the mouse (as well as simulate other inputs to the x server).

see http://linux.die.net/man/1/xte

by including xte mousermove 1 1 in your ~/.xinitrc, it may move the mouse when you log in and allow it to remain visible. I have not tested this, but it seems like it should work. Or bin d this to a key, run a script, something along those lines..


As of the Linux Kernel v2.6.31, the fallocate system call is supported by the btrfs, ext4, ocfs2, and xfs filesystems.

You can confirm which file system you have with this command (assuming the device name given above):

file -sL /dev/xvdb

Unfortunately, it appears that in some cases the instance storage is provided formatted at ext3 instead of ext4.

Assuming your instance storage is at /dev/svdb and you want to make a swap file at /mnt/swap that's 16GB in size (huge!), Putting this is /etc/rc.local will make that happen every time at boot. You should comment out the line for /dev/xvdb in /etc/fstab in that case, because now the device will be mounted by /etc/rc.local late in the boot process instead of early.

umount /dev/xvdb
mkfs.ext4  /dev/xvdb
mount /dev/xvdb /mnt
fallocate -l 16GB /mnt/swap
chmod 600 /mnt/swap
mkswap /mnt/swap
swapon /mnt/swap


Installing 32-bit Ubuntu side-by-side with 64-bit Ubuntu on UEFI system?

The Easy Way

The easy way to do what you want is to not boot the 32-bit Ubuntu directly; instead, install it in a virtual machine (in VirtualBox, QEMU, or VMware, for instance). Depending on your exact needs, this may be all you need, and it's a lot easier than trying to get everything properly multi-booting. OTOH, if you're developing, say, drivers for your computer's hardware, a virtual machine will probably not do what you want.

The Hard Way

Broadly speaking, I can think of three ways to do what you want (aside from the easy solution of using a virtual machine):

Go 100% BIOS/CSM/legacy -- You can wipe the computer and install all your OSes using the Compatibility Support Module (CSM), which enables BIOS-mode boot loaders to work. This will make it much like installing on a computer from several years ago. The trick is that it can be hard to control the boot mode of installation media, particularly if you're unfamiliar with the tools and techniques used to do so. See my Web page on the subject for more information; however, that page is written with an eye towards discouraging mixed-mode installation, so information on doing a 100% BIOS-mode setup is kind of buried amidst other things. Also, if you want to keep Windows, you'll need to jump through some exotic hoops or re-install it completely, and to do the latter you'll need to track down appropriate installation media.
Use a 64-bit EFI-mode GRUB to launch a 32-bit kernel -- The 64-bit EFI-mode GRUB 2 can launch 32-bit Linux kernels -- or at least, some of them can. (GRUB binaries vary significantly in how they're built, so I can't promise that all 64-bit EFI-mode GRUB binaries will do the job.) As a practical matter, to work in this way, you'd probably want to install Windows, then a 32-bit Ubuntu (in BIOS mode will work fine), then the 64-bit Ubuntu in EFI mode. Ideally, the 64-bit Ubuntu's GRUB should detect the 32-bit Ubuntu installation and create separate menu entries for it. They might not be well-labeled, but they should work. If they aren't detected, it might be possible to create entries manually.
Use rEFInd to boot 64-bit EFI-mode OSes and your 32-bit BIOS-mode OS -- This approach is similar to the preceding one; however, you would install my rEFInd boot manager after completing the 64-bit Ubuntu installation. You would then edit /boot/efi/EFI/refind/refind.conf: Uncomment the scanfor line and ensure that hdbios is among the options. The result is that rEFInd will enable you to launch Windows or 64-bit Ubuntu in EFI mode, and it will show a gray diamond-shaped icon that will launch the BIOS-mode GRUB from the 32-bit Ubuntu installation. This GRUB will in turn launch the 32-bit Ubuntu. (It may eventually pick up and show options to launch the 64-bit Ubuntu in BIOS mode, too.)

In theory, any of these options should work. In practice, they all present pitfalls during setup, and any might be blocked by firmware quirks or other problems. Thus, you may need to try two or even all three of them before you get something to work.


As CL suggested, I asked on jack-devel mailing ( http://jack-audio.10948.n7.nabble.com/Jack-Devel-USB-MIDI-keyboard-Akai-LPK-jackd-td18276.html ). The problem is that the zynjack is outdated. Morever, for connecting aconnectgui is not necessary.

Let me cite Jeremy from the mailing list:

  This is what I would do to get things going:

  Connect your LPK25 Install necessary software: apt-get install jackd    qjackctl zynaddsubfx
  Start QjackCtl and set it up for your soundcard, some googling should get you started
  Start ZynAddSubFX and make the connections in the Audio tab from the Zyn output ports to your playback ports.
  Do the same for MIDI, connect your LPK25 output to the Zyn input in the ALSA tab of the QjackCTL Connections window.


I haven't had any problems with that particular package. However, that being said,here are the generic apt fixes:

sudo dpkg --configure -a
sudo apt install -f
sudo apt update

and try again. If the problem persists, try removing the packages

sudo apt purge php-cgi

if that comes up with errors, use dpkg:

sudo dpkg --remove php-cgi

then try apt again:

sudo apt install -f

then try installing again.


How can I view a Microsoft Publisher .pub file?

I don't know of any applications that do this but, you can use this to convert PUB files to PDF. An alternative would be to install Microsoft Publisher through Wine (available in the repositories).


I'm having issue with rtcwake being run from a Cron job

The write error was a strange one, I couldn't fully fix it but I've solved my problem, instead of running this command:

0 2 * * * /usr/sbin/rtcwake -u -m disk -t $(date +\%s -d 'today 0730') >> /tmp/rtcwake.log 2>&1

I run this command:

0 2 * * * /usr/sbin/rtcwake -u -m off -t $(date +\%s -d 'today 0730') >> /tmp/rtcwake.log 2>&1

off is not supported by all systems so it's best you trial and error it. Server has been doing what I want now for 2 nights.


Slow file transfers through gigabit switch

This sounds perhaps like a bad port.
I searched and found differing models of your BT Hub. I note that some have only one GigE port and the rest labeled just with network symbols. They may be 10 or 100Mb.

Have you tried a different port on the switch? You likely have. Power cycle the switch if you haven't - they can get stuck. Try a different cable.
When you say 25MB windows to windows this sounds like peer to peer. If that is Samba, that is about right.

You can do some diagnostics with your cables plugged in various ways:

Open a terminal in windows (bit rusty here) but I think START | RUN | cmd will do it.
and the command
 ipconfig

Open a terminal in Ubuntu and type

ifconfig

You should get output like this:

eth0  Link encap:Ethernet  HWaddr bc:5f:f4:7b:2b:15
      inet addr:192.168.1.xxx  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::be5f:f4ff:fe7b:2b15/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:6144  Metric:1
      RX packets:1154500 errors:0 dropped:0 overruns:0 frame:0
      TX packets:2387670 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:301919244 (301.9 MB)  TX bytes:2653133922 (2.6 GB)
      Interrupt:56 Base address:0xe000

Bad connections might show as errors or dropped packets

Safe tool to install if not already is 'ethtool'. if you have an internet connection:

sudo apt-get install ethtool

Run as superuser: sudo ethtool eth0
This what my 12.04.1 server reports:

Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
                        100baseT/Half 100baseT/Full
                        1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                     100baseT/Half 100baseT/Full
                                     1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000033 (51)
               drv probe ifdown ifup
Link detected: yes

Hope that helps. cheers


how to configure alpine (pine) to open URL links with firefox?

For me, it "just works", alpine shows this:

Who should attend?
View selected URL "http://em.digium.com/NS00bKn400024hK0gQ00n3F" ?
                      Y [Yes]                                     U editURL
^C Cancel             N No                                        A editApp

when the link is higlighted or selected with the arrow keys after pressing enter; a response of Y opens the link with Firefox for me.

There's likely a configuration in .pinerc which can be configured by pressing M S C from with alpine.  Probably this:

  [ Viewer Preferences ]
      [ ]  Enable Message View Address Links
      [ ]  Enable Message View Attachment Links
      [X]  Enable Message View URL Links                                (default)
      [X]  Enable Message View Web Hostname Links                       (default)

should be sufficient.


Accessing Files in Other Users FTP Folder?

I had no responses so I'm wondering if this is a dead forum.  Is there a better place to post questions?

I did find something that worked by using groups.  see the link

how to give read, write and modify access to folders and files in my home directory mutually to other users on same computer?


The solution was to update the BIOS.

The old BIOS which didn't work was version F.19.
It worked after updating to version F.39.


Is there a way to pre-order a pack of 5 CD/DVDs for the upcoming Ubuntu 11.10?

You can purchase CDs and DVDs in packs of 5, 20, 100 or 200 from the Canonical Store, but they haven't mentioned anything about pre-order of 11.10 discs. Maybe it'll show up there once 11.10 is released. More info here - Canonical Shop

The Linux Store has an Ubuntu section, where you can pre-order Ubuntu 11.10 discs as well. Here is the Ubuntu Section at The Linux Store


The ZA8 is identical to the Gateway LT31 which I have. The problem is the x1270 graphics does not agree with kernel mode setting, you can either google how to disable mode setting with a boot option which loses you 3d acceleration, or you grab a modified bios that allows you to turn off kms and use uma instead.

This forum thread has an upgraded version of the BIOS that I'm currently using. Of course since you are flashing your BIOS I take no responsibility if you turn your computer into a brick.


How to disable Toggle Maximization State in Ubuntu 16.04?

Disableg shortcuts from cli

To disable shortcuts in gsettings, usually the value should be set to [].

In this case, in a command:

gsettings set org.gnome.desktop.wm.keybindings toggle-maximized '[]'

GUI

As always, there is also a gui-alternative: dconf-editor, installed by:

sudo apt install dconf-editor

Subsequently, browse to the key, uncheck "Use default value" and set it to []


What is the equivalent of zerofree for vfat (fat 16, fat 32)

zerofree is overkill for just one file. You want to look at shred. It makes no sense to overwrite the entire free space on the disk (possibly one more terabytes) just to overwrite one small file.

zerofree will overwrite with zeros all the free space on the disk. If that disk is a SSD or flash drive this will have a negative impact on its lifetime (solid-state devices have a limited number of writes available).

To answer the question as asked: On filesystems where zerofree is not available you just use dd:

dd if=/dev/zero of=temporary-file bs=1M
rm temporary-file


By using vlc you must trancode

See https://wiki.videolan.org/Transcode/ And https://gist.github.com/revolunet/320db93516ec19eb931b

A good alternative can be found with youtube-dl

sudo apt-get install youtube-dl
youtube-dl -f best "<yourUrl>"


Is it possible to use docker without sudo?

If you don’t want to preface the docker command with sudo, create a
  Unix group called docker and add users to it. When the Docker daemon
  starts, it creates a Unix socket accessible by members of the docker
  group.

Warning:

The docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.

If you still want to run docker without sudo:

Add the docker group if it doesn't already exist:

sudo groupadd docker

Add the connected user "$USER" to the docker group. Change the user name to match your preferred user if you do not want to use your current user:

sudo usermod -aG docker $USER

Either do a newgrp docker or log out/in to activate the changes to groups (If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take effect).
You can use

docker run hello-world

to check if you can run docker without sudo.

PS:
If you initially ran Docker CLI commands using sudo before adding your user to the docker group, you may see the following error, which indicates that your ~/.docker/ directory was created with incorrect permissions due to the sudo commands.

WARNING: Error loading config file: /home/user/.docker/config.json -
stat /home/user/.docker/config.json: permission denied

To fix this problem, either remove the ~/.docker/ directory (it is recreated automatically, but any custom settings are lost), or change its ownership and permissions using the following commands:

sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R

Source:  Docker documentation


I would use ssh, it provides secure file transfers. First, install the server on one (or both) machines,

sudo apt-get install openssh-server

Then, you can use the command line to copy files, if you use -r it will copy recursively (and -p preserves permissions).

scp -rp myDirectory/ 192.168.2.3:/home/efrisch/myDirectory

to copy from the current computer to one at 192.168.2.3; or

scp -rp 192.168.2.2:/home/efrisch/myDirectory .

to copy from a computer at 192.168.2.2 to the local computer. Or, once you have the server running, open the address with gnome like

sftp://192.168.2.2/

And, you can also use ssh-keygen to create a public/private key-pair and if you add the public key to the .ssh/authorized_keys file on the remote serve it will no longer require authentication. Or, use samba.


How to Restore Documents Store on Cloud Folder After Re-install?

During the re-installation I have used the same user-name and the same name of the computer.
My synchronized folder were in my /home. At the end of the process I could download what was synchronized


v4l2loopback device not working with gstreamer

The solution to this problem is to upgrade v4l2loopback to last version which is 0.12.5. It is fully detailled by developer and tested by me in this ticket on Github.
The only slight issue is that v0.12.5 is not officially part of 20.04. It comes only with 20.10. So, some ad hoc procedure is required: 2 different ones are proposed in the ticket


KDE 5 - How to easily switch between audio outputs?

Thanks to this answer I finally found a solution, see the below instruction

Show always HDMI output in the mixed
We will create a new profile that link both profiles "Analog audio" and "HDMI audio".

From my understanding this file
/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf list all mapping profiles between Alsa and Pulseaudio.

1.
Find the mapping that are related to your Analog profile and HDMI profile definition.
(description: should match the Device Profiles shown in Audio Volume Kde setting module )

For me are the following:

[Mapping analog-stereo]
device-strings = front:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 10

[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 2
direction = output

2.
On the base of the above Mapping definition I have created the following new profile that group both the above ones:

[Profile output:analog-stereo+output:hdmi-stereo-extra1]
description = All
output-mappings = analog-stereo hdmi-stereo-extra1
input-mappings = analog-stereo

3.
Restart pulse audio with this command:

pulseaudio --kill; sleep 1; pulseaudio --start

4.
Go to KDE phonon settings > Audio Hardware setup and select the new profile.

Now you should see both profile in the mixed and so you'll be able to switch easy:

I would suggest to use this plasmoid mixer: https://store.kde.org/p/1100894/

(extra step) Force both output enabled

If you don't mind having both computer speaker and TV output audio in the same time ( so basically you don't have to switch the audio output ever ).

You can select the below setting and then you'll have a new entry in the mixer


Formatting a drive in windows 7 before installing ubuntu from bootable dvd

You can create two partitions as you mentioned. You need not have to format it to Fat32 or NTFS.

Ubuntu will format the partition as Ext4 during installation. All you have to do is pointing to the correct partition using advanced option and mount it under"/"


Fingerprint GUI not installing in Ubuntu 20.04

Fingerprint GUI is no longer maintained and is not compatible with Ubuntu 20.04 and newer. There is a built-in fingerprint login feature in 20.04 under Settings->Users->Authentication & Login.


How can I get a list of all open windows in the command line?

You can use wmctrl to get a list of all open windows. You will first need to install it.
sudo apt install wmctrl

Then you can just run the command.
wmctrl -l

0x0080006a -1 localhost panel
0x0180007c  0 localhost Mozilla Firefox
0x02600007  3 localhost user@localhost: /home/user - Shell - Konsole
0x00600011  1 localhost KTorrent
0x02200007  0 localhost user@localhost: /home/user - Shell - Konsole
1           2 3         4

The columns:

The window ID. This is used for the [#i -i] switch.
The desktop ID. It begins counting at 0. -1 means that window is on all desktops. Used with [#d -d] and more.
The client machine
The name (long title) of the window. Used with [#r -r] mostly, and can be renamed with [#N -N] and [#T -T].

More examples: wmctrl-examples


No, decimals aren't allowed for this setting. Use 1 or 2 (or another whole number).


Moving from Ubuntu Netbook to Ubuntu Desktop

Ubuntu Desktop might already be installed, so start the application "Login Screen" (should be located under "System"), press unlock, enter password and choose "GNOME" (or Ubuntu Desktop) as default session.

If GNOME/Ubuntu Desktop is not available then you can install the package ubuntu-desktop (sudo apt-get install ubuntu-desktop) which will add the Ubuntu Desktop option to the GDM Session dropdown box at the bottom of GDM (Login Screen) and in the Login Screen area.


A little searching with Google found this site about how you might be able to do it: P5 Glove & Pure-Data in Linux.


I use http://www.nautilus-actions.org/ to add custom context menu options for special file types (i.e. to render rST files)

Update: I just realized that you don't want a list of all advanced features but the specific ones you listed. Maybe the answer is helpful anyway.


Hour wasted - but, here's what worked on Linux Mint 20.1 Cinnamon:
include these 4 lines in limit.conf:
@audio          hard    rtprio          95
@audio          soft    rtprio          95
@audio          hard    memlock     unlimited
@audio          soft    memlock     unlimited

Hawkeye posted this info about another issue here:
Original hint
Thanks to him!


Unable to install package post adding ppa

Update 2020-06-21
The PPA ppa:nilarimogard/webupd8 currently contains packages for Ubuntu up to 20.04 LTS.
So you can install WoeUSB as usual:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get install woeusb

Also the WoeUSB package exists in ppa:tomtomtom/woeusb PPA:
sudo add-apt-repository ppa:tomtomtom/woeusb
sudo apt-get install woeusb

Note: to prepare this answer I have used special PPA search page on LaunchPad.net - https://launchpad.net/ubuntu/+ppas .


How to turn on Bluetooth after turning it off in 18.04 LTS?

I "fixed" the issued by stupidly re-installing Ubuntu.

PS: When booting from the USB PE, the Bluetooth configuration appears correctly.
It seems to be a software bug that after disabling the Bluetooth under some circumstances you can never enable it again.


Ubuntu 16.04 boot stuck, recovery mode encounters kernel panic

Partial answer... work in progress...
Since you can't get to recovery mode, lets try and check your file system using external media.

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


Why is the Ubuntu-for-Windows default shell a root shell?

It's because user IDs are one of the several rough edges in this beta test level subsystem.  You are not, in fact, actually a superuser.

It just looks that way because the Windows NT Linux subsystem reports it that way to Ubuntu applications through the various system calls.  The parts of the system call layer that deal with user IDs simply say that everything is UID 0.

The Ubuntu program is running with your user process token and you do not have any abilities beyond what you could do with a Win32 program as yourself.

This is not the old (Interix) Windows NT POSIX subsystem, with its sophisticated mechanism for mapping Windows SIDs to POSIX UIDs and GIDs.  ☺

And this is in the release notes.

Further reading

Rich Turner (2016-04-06).  "Release Notes." Bash on Ubuntu on Windows.   MSDN Blogs.  Microsoft.
Charlie Russel (2004-04-22).  "Features of Services for Unix: User Name Mapping" Introduction to Microsoft Windows Services for UNIX 3.5.  TechNet.  Microsoft.
"User and Group accounts" Permissions In Microsoft Services for UNIX v3.0. 2003-05-01.  TechNet.  Microsoft.


mmm you cant move programs and expect them to work in a totally different OS unless it is the .exe installer (still not all executable programs will install easy like in windows, many even would NOT RUN/WORK AT ALL). Now if is Office package what your dad needs then you can do that no problem, there are plenty of tutorials out there but you need to have the executable file, the cd or the .iso with the installer (Though Ubuntu comes with LIBRE OFFICE but i understand why you would keep office for your dad)

About your dad's files sure can be copied back to the pc after ubuntu install, while they are all backed up in a external hdd you'll be safe. IF your dad doesn't have plenty of files like to almost fill your disk then what i would recommend is to repartition the XP pc, in the new LARGE partition (say disk D: labeled FILES) move all the files to that partition, so when your going to install Ubuntu you do it on Disk C: which contains the windows XP the the other partition "Disk D:" will be like if nothing happened because you didn't touch that partition and so you can share and access those files with ease.

Just go with what it's easier for you.


To fix this problem persistently:

Run gconf-editor and use it to change desktop | gnome | peripherals | keyboard | bell_mode from off to on
Add pactl upload-sample /usr/share/sounds/gnome/default/alerts/glass.ogg bell.ogg to the file ~/.xprofile
Add [ "$DISPLAY" ] && xset b 100 to the file ~/.bashrc

The simplest way to activate this solution is to reboot.

Further, to implement this solution immediately for a terminal window that is already open, run the pactl command and run the xset command in the terminal window in question.


How to improve the performance of Windows guests running in KVM?

Make sure you're not running other applications besides KVM (or at least nothing too resource intensive any way).

Make sure you're giving it enough memory for newer versions of Windows (at least 2 GiB for Vista and later, though 4 GiB would be better) without taking too much away from the host (I usually avoid giving guests anything more than half of the memory available on the host, and even that's pushing it for me).

If you're able to dedicate an entire disk to the guest, that would be best, and just make sure to let it have direct access to it.

Finally, consider giving a higher priority to the VM, although, in my experience, this doesn't result in any significant gains in performance, but I haven't done any testing to say that conclusively.


Radeon Top did the trick for me in the end.

Although you do have to compile it.

Bonus advice:

When compiling this edit the Makefile and change amdgpu ?= 0 to amdgpu ?= 1. This will activate monitoring of RAM usage as well as the temperature.


Why are the top application indicators (top bar icons) appearing black and white in Ubuntu 20.04?

because they are configured to show as symbolic and symbolic Icons are generally in light gray or whatever we see in actual from the gnome-shell theme currently used.
So navigate to the gnome-shell theme you are using and try to locate "symbolic"
for example the left part on top bar..
#panel .panel-button .app-menu-icon {
  margin-left: 4px;
  margin-right: 4px;
  -st-icon-style: symbolic; }

change the -st-icon-style: regular;
another example
.aggregate-menu {
  min-width: 21em; }
  .aggregate-menu .popup-menu-icon {
    padding: 0;
    margin: 0 4px;
    -st-icon-style: regular; }

in the default install of Ubuntu 20.04, the shell theme is from the gresource file /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource which can not be edited easily.
Hence the workaround is to create a custom theme in home directory.
Required: User Themes  gnome-shell-extension  installed and enabled
Install required directory's and gnome-shll.css file with below command, Change the name "MyCustomTheme" in below command to your wish.
install -D /dev/null ~/.themes/MyCustomTheme/gnome-shell/gnome-shell.css

now open the file gnome-shell.css with below command
gedit ~/.themes/MyCustomTheme/gnome-shell/gnome-shell.css

paste the below content in the opened gnome-shell.css file
#panel .panel-button .app-menu-icon {
-st-icon-style: regular; }

save the file & close.
now open gnome-tweaks and choose this newly created shell-theme "MyCustomTheme"


I experienced this problem, too.

The obvious solution would be to disabled "auto hide". You could try to display the dash by pressing the super key (Windows key) which should show the launcher symbols, too.

The last workaround could be using TeamViewer in fullscreen mode and pointing the mouse to the left. This way you would not leave the TeamViewer window and the remote system recognizes this movement.


black screen with clayton@clayton-desktop:~$ in the top left corner. I have no idea what to do

If it is possible to input text, try typing startx and then press Enter. This might give you a GUI.


ubuntu 20.04 does not connect using vpnc, but version 19.10 connected without problems. how to solve it?

Solution error NXDOMAIN:

mv /etc/resolv.conf /etc/resolv.conf.OLD
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl restart systemd-resolved


Error: 'Operation not permitted' from both insmod and modprobe

It turns out that if a module tries to initialize a device using a major number that is already taken, insmod and modprobe will fail with the error message

operation not permitted

For XAPP 1022 in particular, the driver tries to register a char device, to which it assigns the major number 240. There was already another device registered with that major number on my machine, which caused the driver to fail its init function.

The solution is to change

int gDrvrMajor = 240;

to

int gDrvrMajor = {some major number that isn't taken}

inside xpcie.c. It is then also necessary to change

mknod /dev/xpcie c 240 1

to

mknod /dev/xpcie c {same other major number as above} 1

inside make_device.


How to get Ubuntu clients to use newer SMB protocol with cifs-utils?

By adding another option to your fstab statement for that share:

vers=3.0

That will force the connection to use SMB 3.0 instead of the default.

A modern samba server is set to go up to SMBv3.


Encrypting Linux server for remote access VM

You can set up a solution with unencrypted /boot, and a LUKS key file:

sudo cryptsetup luksAddKey /dev/sdx1 /boot/random_data_keyfile1

Modify /etc/crypttab to suit:

sda5_crypt UUID=DEVICE_UUID /dev/disk/by-uuid/devicewithkey:/random_data_keyfile1 luks,keyscript=/lib/cryptsetup/scripts/passdev

This is not foolproof. Any remotely skilled attacker will find the unencrypted /boot, and the keyfile. You can obscure it to make it harder, but ultimately your problem is unsolvable.

You want the person to be able to execute the virtual machine, yet unable to access it. Execution requires access. Worst case? Pause the VM, and examine memory of the VM. Anyone that has control over the hypervisor has total control over the VM, almost no matter what you do.


Size of partition on Virtual Box guest system

Thanks @JonasC, I was able to reduce it quite easily.

First you need R.I.P.-linux or any other rescue system with zerofree util.
Boot this rescue system and run

zerofree -v /dev/sda1

Then stop virtual machine and run on host

vboxmanage modifyhd /path/to/thedisk.vdi --compact

Result is obvious:

$ls -sh Ubuntu.vdi
12G Ubuntu.vdi

$ vboxmanage modifyhd Ubuntu.vdi  --compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

$ ls -sh Ubuntu.vdi
8.2G Ubuntu.vdi


May be these links are help full to your :-

http://www.howtogeek.com/howto/ubuntu/reinstall-ubuntu-grub-bootloader-after-windows-wipes-it-out/

http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/

and try to install dual boot ubuntu because you have preinstall windows 7.

it may be possible GRUB is not properly install in your pc or is booting from directly USB.

Dowload Easybcd software it is free for home user install it open it you will see add new entry click on it go to linux tab add entry click on select "GRUB2" edit boot menu select the appropriate timeout option and save setting

Download here: http://www.softpedia.com/get/System/OS-Enhancements/EasyBCD.shtml


This is an extremly weak point in Ubuntu and Linux in general!

PDFedit is buggy and isn't suited for endusers. It is pdf-engenieering and maybe developement was stopped long time ago.

Xournal is more like drawing.

Scribus imports pdf, as other programs do, like Inkscape, Gimp etc. But this is not the same, as quickly marking some phrase.

Well, I never got Okular working. It refuses to install. Maybe you might get it and it offers what you need, but it will install lots of KDE-services on your Desktop.

I used Foxit with Wine, which was during long time the only solution for making a decent Index in pdf-files. But last time I had an error after a version upgrade. If you really have to do hardcore-pdf-reading then Virtualbox with Acrobat or Foxit Reader might be the solution.


mangled map is now deprecated and will no longer work in new versions of Samba.

You can use vfs_catia to solve the problem. Add the following lines to smb.conf:

vfs objects = catia
catia:mappings = 0x003a:0x2236,0x003f:0x0294,0x002a:0x2217,0x003c:0x276e,0x003e:0x276f,0x0022:0x02ba,0x007c:0x2223,0x005c:0x29f9

Mapping is specified with 0x prefixed hexedecimal character codes separated by a colon. The provided mapping will remap illegal characters to unicode lookalikes that are unlikely to be used in any language.

: ? * < > " | \
∶ ʔ ∗ ❮ ❯ ʺ ∣ ⧹

The code can be put under [global] or in an individual [share] section. Placing it in [global] may impact performance.

Note that any character you map to cannot be used in filenames on the server or they will be inaccessible.

Example: A windows client accessing a file named file❮name.txt on the server will request file<name.txt from the server due to the mapping, which will result in a file not found error.


Go grab a copy of LogZilla - it's free for small networks, and super easy!


Managed to fix the problem by booting from a LiveCD and copying all the files from the /etc/pam.d/ to my actual install and rebooted, fixing the problem.
I did need to change my password with "passwd" to update the files accordingly.


The problem is that my computer at work is managed by puppet. I had no idea.
Apparently somebody in the IT has changed the central configuration recently. Now puppy removes my PPA and force-installs specific versions of certain packages every now and then.


Several crashes after upgrading to 14.10 from 14.04

So I resolved the issue now, but I did not found a simple solution. I basically did a fresh install of gnome:

Used synaptic to remove anything related to gnome, ubuntu-desktop and ubuntu-session (mark for complete removal)
Ran "sudo apt-get -f install" to resolve unmet dependencies
Ran "sudo apt-get install gnome-shell" to reinstall gnome

This did the trick for me.


VMWare has the ability to convert your physical computer into a virtual machine, you can then convert it to VirtualBox (if you so choose) or KVM (again if you so choose).  In all honest opinions, right now VMWare is the best of the best when it comes to unmodified virtualisation because they support Aero at it's best and have the ability to pipe games with decent FPS.


What is `MultiProfile = multiple` in /etc/bluetooth/main.conf?

MultiProfile = x effectively declares if and what degree of MPS support your device will support.  The comments in your quote say it all.

From the specification:

  The Multi-Profile Specification (MPS) specifies the behavior for
  Bluetooth devices supporting multiple Bluetooth profiles.

  Any device claiming support for this profile shall fulfill all
  applicable requirements defined in this specification in addition to
  the requirements defined in each individual Bluetooth profile it
  supports.

See the link corresponding with MPS (Multi-Profile Service) here for more details of what MPS is.


Some command I often use:

to see dependencies and reverse dependencies:

apt-cache [--important] [--installed] [--recurse] depends $package
apt-cache rdepends $package

To remove a package, all autoremove packages, and all related config files:

sudo apt-get --purge --auto-remove purge $package

To see actual apt configuration options:

apt-config dump | less

To modify an option on the command line

$ apt-config dump | grep -i recommend
APT::Install-Recommends "1";
$ sudo apt-get -o APT::Install-Recommends="0" install $package

This was just and example of specifying APT options through the command line, to avoid installing recommended packages, you can use:

sudo apt-get --no-install-recommends $package

To see all local/obsolete packages:

aptitude search ~o

To see removed packages with residual configuration:

aptitude search ~c

and to remove them

sudo aptitude purge ~c

To obtain a list of all installed packages (dpkg -l can sometimes give truncated columns output)

dpkg --get-selections | awk '{ print $1 }'

or

dpkg-query -Wf '${Package}\n'  # other fields available, see man page

To dissasemble, modify then riassemble a package

dpkg-deb -x file.deb ./dir
cd dir
dpkg-deb -e ../file.deb
# apply your modification, then...
cd ..
dpkg-deb -b dir file-new.deb


According to the man page, axel will use multiple connections by itself, there is no need to run it multiple times.

Example download using 4 connection :

axel -a -n 4 http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso
Initializing download: http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso
File size: 1921843200 bytes
Opening output file ubuntu-18.04-desktop-amd64.iso.0
Starting download

[ 30%] [....0        .....1        .....2         ....3        ] [  11.1MB/s] [01:54]^C

The ....N shows clearly that it's using 4 connections

Example download using 6 connection :

axel -a -n 6 http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso
Initializing download: http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso
File size: 1921843200 bytes
Opening output file ubuntu-18.04-desktop-amd64.iso.0
State file found: 583252805 bytes downloaded, 1338590395 to go.
Starting download

[ 32%] [....0        .....1        .....2         ....3        ] [   9.9MB/s] [02:04]

There is still 4 connections! It seems that axel will re-use the partial download, but will continue using the same number of connections.

Example download using 6 connection (after erasing the temporary files):

rm ubuntu-18.04-desktop-amd64.iso*
axel -a -n 6 http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso Initializing download: http://mirror.switch.ch/ftp/ubuntu-cdimage/18.04/ubuntu-18.04-desktop-amd64.iso File size: 1921843200 bytes Opening output file ubuntu-18.04-desktop-amd64.iso Starting download

[  2%] [0        1        2         3        4        5        ] [     11.1MB/s] [02:40]

Now we can see axel using 6 connections.

Please note that the download speed may not be reduced because of the number of connection, and in this case you will only push more load to the network and to the remote host.


How to start a GUI application from the terminal and return immediately?

place an ampersand (&) at the end of the command, e.g.:

gksu nautilus &

to start a root file manager, or in your case, to start GIMP:

gimp &

It's really as simple as that!


No. There is too much linux only stuff in the default Ubuntu install.

It should be possible, but a lot of work, to create a distro similar to Ubuntu but based on the BSD kernel. But it's far more complicated than just sudo apt-get install bsd.


getting .desktop file to show up in launcher

Try using Arronax. It's a .desktop file editor that works well. You can create .desktop files for binary/script files, or .desktop files that run a command. You can also set the icon for the .desktop file.


NAT mode will not let you do that. In this mode:

  The "router", in this case, is the VirtualBox networking engine,
  which maps traffic from and to the virtual machine transparently. In
  VirtualBox this router is placed between each virtual machine and the
  host. This separation maximizes security since by default virtual
  machines cannot talk to each other.

Note there's an isolation between each virtual machine, so they will be unable to connect to each other.

What you need is to configure your virtual machines (go to settings, network, look at the network modes) to use either internal networking or host-only networking.

Internal networking will allow virtual machines to communicate only with other virtual machines. Host-only networking will also allow VMs to communicate with the host system.

Read here about what each mode does and how to configure them:

http://www.virtualbox.org/manual/ch06.html

configure both your virtual machines' networks to be "Internal network". Select "eth0" for "attached to" (this means the VM's network interface that will be connected to this network) and select the same  "name" for the network (think of each name as a "hub" to which virtual machines are connected). The default of intnet is fine.
Boot your VMS, and manually assign IP addresses. I tried with 10.0.0.1 for one and 10.0.0.2 for the other.
You should be able to ping 10.0.0.1 from 10.0.0.2. It works for me!


Changing Ubuntu 17.10 windows snap color

So this question is a month old but it is unanswered and I found how to do it in Ubuntu 17.10

There is a css file in /usr/share/gnome-shell/theme/ called ubuntu.css

Open it in your favorite editor, with sudo
For example:

sudo gedit /usr/share/gnome-shell/theme/ubuntu.css

scroll down to the following lines:

/* Tiled window previews */
    background-color: rgba(0, 0, 70, 0.5);
    border: 1px solid #000000; }

(For me they were around line number 646)

You can change the background-color and border properties to a color of your liking.
As you can see mine are set to dark blue and black.

The following link is a great tool to find a nice color:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Colors/Color_picker_tool

After you are done, save the file and log out and back in again for the changes to take effect.

Cheers!


I can't connect to new router with same ssid

Delete the old connection and connect again. You will find your problem solved!

You can click on the Network Icon --> Edit Connections, this will let you delete previous Wireless or Wired configurations.


Ok, I don't know how many times I tried this, but suddely it worked. I logged in using Unity. While Unity was reloading endlessly, I pressed Alt+F2 and ran

sudo dpkg-reconfigure -phigh lightdm
sudo service lightdm restart

and rebooted.
Now it seems to be stable and like it used to be.


According to this merge request on the Remmina Gitlab page:

  Desktop Scale Factor: scaling of desktop and desktop apps, range from
  100% to 500%

  Device Scale Factor: scaling of metro (appstore?) apps. Works on
  Win2012R2, windows 10 seems to ignore it. Can only be 100%, 140% or
  180%.


Canon LIDE 110 - lsusb sane-find-scanner

All my problems were gone after Oneiric (11.10) installation.

Actually I didn't test with 11.04.


Live Ubuntu Medium so as to make an another Live USB Linux Medium?

Creating Live USB using Live USB.
Download the ISO's you want, (we will assume they are official Ubuntu flavors for now), and use the built in Startup Disk Creator to make more Live USB's.
You can set Firefox to save the downloads to your other USB or copy them there by hand later.
Better yet, download mkusb and create a persistent USB to work from. See: Can I install mkusb in Ubuntu live USB? A Persistent USB can save you a lot of work.
You can also make a SDC install Persistent on a by boot basis.
Press shift at boot and esc, then F6 and esc again. then type a space and the word "persistent"
The session will persistent.
This must be done every boot where persistence in wanted.


Compiz effects not working on an Asus 1215B with FGLRX

I found a quick solution to enable compiz effects on my ASUS 1215B:

• Go to Applications > System Tools > CompizConfig Settings Manager > Effects;

• Click on Animations;

• Click on ">" until you find the "Effect Settings" tab;

• Enable (tick) "Random Animations For All Events".

Good luck!


Touchpad does not work after upgrade to disco dingo (19.04) - Solution

I've had the same issue after upgrading my Ubuntu Budgie from 18.10 to 19.04 (with the same Lenovo model). Strange, that it worked before. With a live session of Budgie 19.04 it's also not working.

For me, the solution offered in this thread worked perfectly. Just add psmouse.elantech_smbus=0 to your boot options, update grub and restart.


Create personal wireless network on laptop

If you have only one wifi card in your laptop, you cannot. Network card can only handle one connexion type (Hotspot or client) at a time.


Unmet dependencies while installing MySQL 5.7

Have you downloaded the deb package of mysql-server (5.7) from a third party side?

If yes.The most probable answer is that your version of mysql-server has dependencies that are not available in Ubuntu 14.04 repository.

One way would be to download the missing package(mysql-community-server (= 5.7.15-1ubuntu14.04)), and install it manually

$ sudo apt-get install <missing-package-1> <missing-package-2> ....

Or remove the mysql-server, sudo apt-get update and then reinstall the one from Ubuntu repositories.

Once that is done and you are unable to reproduce the error.

Follow the steps in this tutorial (If you specifically need version 5.7):

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-14-04


You should just create a patch that changes the string in the code, and the rest should be taken care of for you.

When the package is built, the translation template (the gnome-session.pot file) will be regenerated and will pick up your changed string. The template will then be uploaded into Launchpad and the new strings will be exposed for translation there. The old "Reboot Anyway" translations will be marked as obsolete.

Since it is such a visible string, I would strongly encourage you to let the Ubuntu translators know about this, to make sure they are aware of the change and that this string does not unnoticedly become untranslated. You should simply send an e-mail explaining the change to the ubuntu-translators list.

You might have already done that, but this is a really visible change, and one that will mean we'll have to carry diverged translations in Ubuntu, so I'd also encourage you to talk to the upstream gnome-session maintainers to see if the change can be accepted there first, which will make the process a lot easier, both for packagers and translators.


Is there a way to install the full versions of Thunderbird and LibreOffice, using Snaps?

Here is how to purge LibreOffice :
sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

Then goto https://www.libreoffice.org/download/download/ and download the version 6.4.6 (my suggestion). Once it is downloaded he can right-click on the file and install click on Open with Software Install
For Thunderbird, you can uninstall it in the Software Center, see this link
Then follow this link to install Thunderbird 78


ms-windows-store: how to download from on ubuntu?

When you visit the Microsoft Store site, it is really only a catalog for the real store because is you click download for their software, it will open the store on the Windows computer and download it from there. And in case you are wondering, no, you can not download the Microsoft store from anywhere because it is only available through being pre-installed on Windows 8 and 10 computers. So to summarize it, you can not do anything you asked.


How do I install the Unity desktop environment on Ubuntu Studio 13.04 (Xfce)?

Install the APT Task ubuntu-desktop. Run

sudo apt-get install ubuntu-desktop^

(The caret at the end is not a typo.)

Then at the login screen you should be able to select the Unity session rather than XFCE, like this:


How to mount S3 bucket automatically on reboot

You need to add a line to /etc/fstab similar to:

s3fs#mybucket /path/to/mountpoint fuse _netdev,allow_other 0 0

See other examples here:

https://github.com/s3fs-fuse/s3fs-fuse#examples


Logs of files added as startup application

After you added your python script to startup applications, a new '.desktop' file - corresponding to your script - have appeared in ~/.config/autostart
That file contains a line saying:
Exec=your_script.py

A simple workaround would be to change in the .desktop file your_script.py to wrapper.sh, where wrapper.sh would be a new script simply reading:
python your_script.py > your_log.txt

Then, obviously, the output of your_script.py will appear in your_log.txt.

P.S. I would have added this workaround as a comment rather, than a solution, which I cannot do as a newly registered user. Sorry about that, hope it helps.


How do I change my desktop back to the way it was in 10.10 from Unity?

Logout and choose Ubuntu Classic from the Session drop-down at the bottom.

Remember, Gnome3 and Unity is the "future".  If you like the Gnome2 style, suggest you start looking at XFCE as your desktop in the next year or so.


rm !(*.sh) is a extglob syntax which means remove all files except the ones that have the .sh extension.

In your interactive bash instance, the shell option extglob is on :

$ shopt extglob
extglob         on

Now as your script is running in a subshell, you need to enable extglob by adding this at the start of the script :

shopt -s extglob

So your script looks like :

#!/bin/bash
shopt -s extglob
rm -rf -- !(*.sh)

EDIT :

To remove all files except .sh extension ones use GLOBIGNORE (as you don't want to enable extglob) :

#!/bin/bash
GLOBIGNORE='*.sh'
rm -rf *

Example :

$ ls -1
barbar
bar.sh
egg
foo.sh
spam

$ GLOBIGNORE='*.sh'

$ rm *

$ ls -1
bar.sh
foo.sh


How to stop `clear` from clearing scrollback buffer

This took me a while to figure out so I guess I should share how I got this to work.

If you type "man clear" you will see that the manual states:

  clear clears your screen if this is possible, including its scrollback buffer (if the extended "E3" capability is defined).

We are going to remove this E3 capability:

First, find out the type of your terminal:

echo $TERM

For me this resulted in "xterm-256color". Whatever it outputs, remember it.

Now enter the command:

infocmp -x xterm-256color > tempfile

Where you obviously replace xterm-256color with the output from the first command.
This will output the extended capabilities for this terminal type to 'tempfile'.

Now edit this newly created file. You are looking for:

E3=\E[3J,

Find this and just remove it. The entire thing, so if it looked like:

    ...
    Cs=\E]12;%p1%s\007, E3=\E[3J,
    Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2 q, Ss=\E[%p1%d q,
    ...

It should now look like:

    ...
    Cs=\E]12;%p1%s\007,
    Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2 q, Ss=\E[%p1%d q,
    ...

Save the file. And from your terminal execute:

sudo tic -x tempfile

This will load your modified terminfo and store it. restart your terminal and clear should now no longer remove the scrollbuffer


Full changelog of updated packages for Ubuntu releases?

You can find all changelog on http://changelogs.ubuntu.com/, but it's difficult to see.
So the best strategy is to go to http://packages.ubuntu.com, search for interesting packages, and on right column click on "Ubuntu Changelog".


Keep the default zone apache.conf without the ScriptAlias.
Stop both zoneminder and apache2.

sudo service apache2 stop
sudo service zoneminder stop

Remove any stale sockets from /tmp/zm (default location).

sudo rm -vf /tmp/zm/*.*

Enable cgi in apache.

sudo a2enmod cgi

Start zoneminder.

sudo service zoneminder start

Start apache2.

sudo service apache2 start


How do I disable unity webapps notifications from popping up everytime I visit a supported webpage?

Open Firefox>Preference. In the "General" tab you see "prompt integration options for any website". Uncheck it and you're done.


Those mounts points are used by Ubuntu's Snap Packaging system.
That is how a snap is loaded / operates.

https://www.ubuntu.com/desktop/snappy
Snaps work on any distribution or device. Snaps are faster to install,
easier to create, safer to run, and they update automatically and
transactionally so your app is always fresh and never broken.
The public collection of snaps includes the latest and best apps from
GitHub and beyond, so you have the whole world of Linux apps at your
fingertips.


How to make Banshee notification in Ubuntu 11.04 show the playlist by default

This seems a very interesting idea. Unfortunately Ask Ubuntu isn't the place for it - I would suggest you either post it on Ubuntu Brainstorm or file a wishlist "bug" against the Sound Menu.


How to delete duplicate files with the same size and date?

copy this to a file (say: kill_dupes) and add run rights (chmod a+x kill_dupes) and run it

#!/bin/bash

ls -gGlt | sort -k4,6 -k3,3n > filelist.txt

awk '
BEGIN   {
        printf("#!/bin/bash\n\n");
        filename0 = $7;
        filesize0 = $3;
        filedate0 = $4$5$6;
    }

NF>2    {
        filename1 = $7;
        filesize1 = $3;
        filedate1 = $4$5$6;
        if(filesize1==filesize0 && filedate1==filedate0) {
            printf("rm %s\n", filename1);
        } else {
            filename0 = filename1;
            filesize0 = filesize1;
            filedate0 = filedate1;
        }
    }
' filelist.txt > rmdupes.sh

then verify the content of rmdupes.sh file

head rmdupes.sh

please check it before actually running it.

(is 502715964.M213570P5615.mail.domain.com,S=2393,W=2447:2 an actual filename?)


Open file with terminal and close terminal afterwards

Maybe I'm not understanding the question but I would use something like [program] [file-to-be-opened] & exit. So, if I have a file called something.txt and I wanted to open it from a terminal with a GUI-based text editor, Leafpad, and close the terminal, I'd open a terminal and run:

leafpad something.txt & exit

where exit is used to close the terminal.


I don't want to store passwords in an unencrypted file

Delete it. .pgpass is just a file. Enter the passwords on the command line if you don't want to store them. psql will never create or modify .pgpass, so you must've set it up yourself.

It makes no sense to store .pgpass encrypted; you'd need a password to decrypt it, and the whole point of .pgpass is for automating password logins.

The solution here is don't use a .pgpass file if you don't really need the passwordless login and aren't willing to accept the security compromises it imposes. Since it sounds like your .pgpass was created by PgAdmin-III, tell it not to save passwords and it won't create .pgpass. It gave you a big warning the first time you told it to save a password, telling you that it would store the password in clear text, for exactly this reason.

If you need strong and secure passwordless logins, use Kerberos / GSSAPI.

That said, anyone who has super-user rights can get your passwords no matter what you do. They can capture your typing with a keylogger. They can modify libpq to save the passwords to a file as they're entered. Lots of options. If you don't trust the superuser(s) on your machine, find somewhere else to work from, because you've already lost.


I think I fixed it. I changed the session to XCFE rather than Xubuntu and changed the power settings to suspend when the lid is closed. For now it works ok.


How to install Drivers for RS-232 for Ubuntu 14.04?

As you are using PL2303-based serial USB converter, then you do not need to install driver manually.

The driver is already compiled and named pl2303:

$ modinfo pl2303 | head -n3
filename:       /lib/modules/4.4.0-104-generic/kernel/drivers/usb/serial/pl2303.ko
license:        GPL
description:    Prolific PL2303 USB to serial adaptor driver

So you can simply connect USB cable to the PC and wait for appearance of /dev/ttyUSB? or /dev/ttyACM? in the system. The driver will be loaded automatically.

You can check tail -f /var/log/syslog for concrete name of the device. Below is the output just after USB-converter insertion:

  Sep  5 20:03:40 hostname kernel: [11751.607185] usb 3-3: new full-speed USB device number 3 using xhci_hcd
  Sep  5 20:03:40 hostname kernel: [11751.735834] usb 3-3: New USB device found, idVendor=067b, idProduct=2303
  Sep  5 20:03:40 hostname kernel: [11751.735837] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
  Sep  5 20:03:40 hostname kernel: [11751.735839] usb 3-3: Product: USB-Serial Controller D
  Sep  5 20:03:40 hostname kernel: [11751.735841] usb 3-3: Manufacturer: Prolific Technology Inc.
  Sep  5 20:03:40 hostname mtp-probe: checking bus 3, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
  Sep  5 20:03:40 hostname mtp-probe: bus: 3, device: 3 was not an MTP device
  Sep  5 20:03:42 hostname kernel: [11753.294821] usbcore: registered new interface driver usbserial
  Sep  5 20:03:42 hostname kernel: [11753.294871] usbcore: registered new interface driver usbserial_generic
  Sep  5 20:03:42 hostname kernel: [11753.294914] usbserial: USB Serial support registered for generic
  Sep  5 20:03:42 hostname kernel: [11753.299226] usbcore: registered new interface driver pl2303
  Sep  5 20:03:42 hostname kernel: [11753.299422] usbserial: USB Serial support registered for pl2303
  Sep  5 20:03:42 hostname kernel: [11753.299466] pl2303 3-3:1.0: pl2303 converter detected
  Sep  5 20:03:42 hostname kernel: [11753.300963] usb 3-3: pl2303 converter now attached to ttyUSB0

Please note the last line pl2303 converter now attached to ttyUSB0. It means that device is known as /dev/ttyUSB0.

Do not forget to add your user to dialout group with

sudo usermod -a -G dialout $USER


Yeah, the Viber developers are pretty lazy. But the fix is very easy.

download the viber.deb file (http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb)
unpack the .deb file with the default Ubuntu packing
manager (dpkg)
fix the dependancy in the control file
pack a new .deb file and install it

So in code:

dpkg-deb -x viber.deb viber
dpkg-deb --control viber.deb viber/DEBIAN

vim viber/DEBIAN/control

repace "libcurl3" with "libcurl4". Also remove the last empty line in the file if it gets added by vim.

dpkg -b viber vibernew.deb
sudo dpkg -i vibernew.deb

Done. Don't forget to delete all the made up directories:

rm viber.deb; rm viber -rf


Have you tried first to autoremove ?
Looks like you have a dependency problem, I would run the following commands :

sudo apt-get autoremove && sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y

I'm sure you'll get more help on the way but, that's the first
thing I would do when getting an error as yours.


Ubuntu 18.04 LTS Samba vs Windows 10 Pro

Problem solved. One word. SeLinux.

Edit:
As soon as I entered command "chcon -t samba_share_t /path" I was able to access share.


Open the Vbox Window

Select your VM
Then click on Settings
Then under "General" go to the Advanced tab.

Then on Share clipboard select "Host to Guest" [2nd option, under Disabled]

Click Accept.

(Don't mind the Spanish, it's the same for all languages)


This is the latest version reviewed on 5 April 2018 and it does include some error fixes for Unity3D running on Linux.
https://beta.unity3d.com/download/77a142ac9989/public_download.html
 Edit!: there was possible to install it using the using umake from terminal, but retesting it today seems to give errors for a lot of applications possible to be installed from umake.


Ubuntu 14 can detect wifi but cannot connect to internet

After you mentioned this occurs only after coming back from suspend, the following solution seems to work:

sudo touch /etc/pm/sleep.d/wakenet.sh
sudo chmod +x /etc/pm/sleep.d/wakenet.sh
sudo gedit /etc/pm/sleep.d/wakenet.sh

Insert the following lines:

#!/bin/bash
case "$1" in
  thaw|resume)
    nmcli nm sleep false
    pkill -f wpa_supplicant
    ;;
  *)
    ;;
esac
exit $?

Source: http://ubuntuforums.org/showthread.php?t=2218043


How to unlink/remove a directory from a symlink?

You ca either remove the file (link)

rm filename-static

or decrease the number of links

unlink filename-static

You can also force relink on this way:

ln -sf filename.2017.new filename-static


Persistance with a remastersys ISO on a USB pendrive

You need a larger usb drive. At some point along the line, Ubuntu started requiring the persistent drive be a minimum of 1gb. If your distro leaves less than 1gb of free space on the usb drive you are using, it will be grayed out.


How to keep record of Logins and Actions

Logins are traceable via last and lastb command, actions requiring sudo privilege  are traceable via /var/log/auth.log , but anything that is a normal , unprivileged action  is untraceable , at least if it's done via GUI.  Command line is traceable via user's history file, if and only if they've not fiddled with history file. You could spawn script command to be logging the  whole command-line session to a file other than history, but that is also not a bullet proof solution.

Essentially , the answer is you can trace logins , but not the unprivileged actions and only if logs were not fiddled with


You need to specify full blocks.  Try:

cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | od -c

Documentation

From man dd:

  fullblock
             accumulate full blocks of input (iflag only)

Example

Observe that, without fullblock, the byte counts are inconsistent:

$ cat testfile /dev/zero | dd bs=256k count=1 status=none | wc -c
5
$ cat testfile /dev/zero | dd bs=256k count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k count=1 status=none | wc -c
5

With iflag=fullbock, I see consistent full byte counts:

$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144
$ cat testfile /dev/zero | dd bs=256k iflag=fullblock count=1 status=none | wc -c
262144


netbios is really ancient; even m$ft stopped supporting it after w2k (win2000) as it only allowed 253 machines on the network & was not  routable or internet compatible (without ugly tricks)

if you want to use a name instead of ip.address; it's best done via HOSTS or DNS, which is the same for windows & ubuntu if you exclude the HOSTS file being stored in different places; /etc/hosts for ubuntu, for windows refer to the link @dubis provided in an earlier comment.


Run these commands:

$ sudo systemctl set-default graphical.target
$ sudo systemctl enable lightdm
$ sudo dpkg-reconfigure lightdm

The last of the three commands should be sufficient.  Run all three if there is a problem.  They all should do the same, but sometimes the first two fails.


Logitech Gamepad F310 interacts with mouse...why?

You need to look at your xinput configuration:

xinput -l

You have your gamepad plugged in and it's probably configured under the Core Pointer, not only that but instead of the inputs being button 8, 9 etc. they've been configured to the x/y axis by mistake.

Use xinput to remove the gamepad from the core pointer.


Does 12.04 need graphics drivers for NVidia?

nvidia-96 and nvidia-173 uninstallable on Precise

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-173/+bug/948053

I have same problem too, but we need wait for NEW driver from Nvidia.


"MediaTomb UI is disabled. Check your configuration." What could I be forgetting?

I haven't used it in a while, but documentation specified an IP address you need to enter in your web-browser. This takes you to a web-based configuration page where you can tell it where your media is.


How to install mysql 5.5.34 completely from shell?

To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install mysql-server

Or download you desired version from here, and once downloaded, navigate to the downloaded foleder (Probably the Downloads folder), and run the command below:

sudo dpkg -i <package_name>.deb

You may also need to install the libaio library if it is not already installed

sudo apt-get install libaio1


HELP Ubuntu 12.10 and Windows 8 dual-boot on SSD

I have read on a tutorial, that Ubuntu has problems with running next to Win8 on an SSD, is this true?

I am running Windows 8 and Ubuntu both on one SSD and I have no issues at all. Although there are a few things to consider.

make a backup before installing ubuntu!
disable Fastboot in Windows 8 because it can cause issues (you can find it in the energy options)

  how much space of the SSD should I allocate to Ubuntu (currently 120GB free space)?

My Ubuntu 12.10 installation currently takes 5,2GB with some essential programs installed. My / (root) partition has 20GB in total and I think that's fine. The rest goes for the /home partition.

I also have a 4GB swap partition (size of RAM) but this is not really necessary. You could also make a swap file on the root partition and save those 8 GB for your data. With your 8 GB of RAM a swap partition is only needed for using hibernation. I would advice some Google search for swap files in this case.

  How should I partition the SSD or HDD depending on which to use

/ ~20GB
/home available rest

  I read on this forum that Ubuntu will wear off the SSD if I don't tweak some stuff, what are those tweaks?

As far as I know Ubuntu by default mounts all partitions with the relatime (like noatime) parameter which reduces the access activity and increases the lifetime of your SSD. So there is no action required.

What you should do is triggering the TRIM command from time to time. Simply run this for all your partitions located on your SSD in your terminal:

sudo fstrim -v /
sudo fstrim -v /home

You can also let Ubuntu do this for you by creating a cronjob. Just create a file e.g. named batched_discard in /etc/cron.weekly/ for weekly execution or in /etc/cron.daily/ for daily execution. And then paste the code from above into this created file.

There is also an option to mount some of your logging folders like /var/log as a tmpfs in your RAM to reduce the write operations on your SSD. But this way all log files are gone after rebooting your system. I wouldn't recommend it. Current SSD are strong enough to handle this in my opinion.

  Are there any settings or things I should consider in the BIOS? I have looked around for Intel Rapid Technology and couldn't find it, no info on ASUS website either.

The important setting in your Bios is that the AHCI option is set for your SDD. This should be a standard setting. As far as I know you can't change it if there is already something installed on this device. So be careful with that.

  I have looked around for Intel Rapid Technology and couldn't find it, no info on ASUS website either. What other things should I consider? My memory is currently set manually to run on 2133 MHz, is that okay for Ubuntu 12.10?

I have no idea what Intel Rapid Technology is, I wouldn't bother about it. If your system runs without crashes your RAM MHz setting should be no problem. This is nothing ubuntu specific.

  Also I ran Ubuntu from the install DVD to see if it works, and I had issues with the dual monitor setup main monitor Samsung 24" (1920*1080) secondary monitor Samsung 17" (1280*1024).When I turned both monitors on to their native resolution in Ubuntu, they both lost signal.

Since you are using a NVIDIA card I would suggest using the proprietary nvidia driver and see if that works. After installing Ubuntu run

gksu software-properties-gtk

And click on the last tab called additional drivers. There you can choose the NVIDIA binary driver.


Whenever I install or update I get this error (screenshot added below) The MATLAB interface needs to know where MATLAB is installed?

You have tried to install the package matlab-support, which is available in the Ubuntu repositories. Without MatLab, it is useless, but keeps popping up.

Run the command

sudo apt-get autoremove --purge matlab-support

and you're done.


How to synchronize facebook calendar, events and google calendar in ubuntu 13.04?

You could use a program called Evolution.

While it is primarily a mail client it does feature a calendar component, with syncing from google/facebook.

Sync Google Calendar
Sync Facebook Events


Are the any commercially available, easy to use, media servers running Ubuntu?

Assuming you are talking about a piece of hardware you can buy, I'm afraid there is nothing out there (to my knowledge).

The Boxee Box does run on top of a Linux operating system, but I don't think that meets your needs. (And the underlying Linux isn't easy to get to/obvious it's there, in the same way Windows Home Server is on the system you linked to.)

However there are a number of 'Media Centre' software packages that run on top of Linux and Ubuntu that you can manually install: examples include MythTV (see also Mythbuntu), Moovida and LinuxMCE. Again though, I'm not sure if any of these directly meet your needs.


unable to set constant permissions for web files

To fix it use the setfacl comamnd to set the permissions and default owners:

sudo setfacl -d -R -m u:harleyfrank:rwX,g:www-data:rwX,o::r /var/www/html

Info:

-d: set as default so new folders will inherit it automatically
-R: recursive
-m: modify existing permissions and ownerships
u:harleyfrank:rwX: give user root rwx on the folders and files
g:www-data:rwX: give user www-data rwX on the folders
o::r: give others read rights on folders


You could try this from http://ubuntuhandbook.org/index.php/2014/12/canon-driver-scangear-mp-ubuntu-14-04/ :

  . ..

  A third-party ppa contains the driver and scangear for commonly used Canon printers, available for Ubuntu 14.04 LTS, and its derivatives, such as Linux Mint 17.

  Below devices are supported:

  bjf9000, bjf900, bjs300, bjs500, bjs700 series
  e500, e510, e600, e610 series
  i250, i255, i550, i560, i850, i860, i950, i990 series
  ip100, ip1800, ip1900, ip2200, ip2500, ip2600, ip2700, ip3000, ip3300, ip3500, ip3600, ip4000, ip4200, ip4300, ip4500, ip4600, ip4700, ip4800, ip4900, ip5000, ip5200, ip6600, ip7200, ip7500, ip8500, ip90 series
  ix6500 series
  mg2100, mg2200, mg3100, mg3200, mg4100, mg4200, mg5100, mg5200, mg5300, mg5400, mg6100, mg6200, mg6300, mg8100, mg8200 series.
  mp140, mp160, mp190, mp210, mp230, mp240, mp250, mp270, mp280, mp490, mp495, mp500, mp510, mp520, mp540, mp550, mp560, mp600, mp610, mp620, mp630, mp640, mp750, mp780 series.
  mx320, mx330, mx340, mx350, mx360, mx370, mx390, mx410, mx420, mx430, mx450, mx510, mx520, mx710, mx720, mx860, mx870, mx880, mx890, mx920 series.
  pixmaip1000, pixmaip1500 series.
  pixus250, pixus255, pixus550, pixus560, pixus850, pixus860, pixus950, pixus990 series
  pixusip3100, pixusip4100, pixusip8600 series

  Install Canon Drivers / ScanGear in Ubuntu 14.04:

  To get started, press Ctrl+Alt+T on keyboard to open terminal. When it opens, the command below and hit enter to run:

  sudo add-apt-repository ppa:inameiname/stable

  Type in your user password when it asks and hit Enter to continue. This will add the PPA repository into your system.

  After that, open Synaptic Package Manager from the Unity Dash. If you don’t find it, search for and install it from Ubuntu Software Center.

  Do:

  Click the Reload button to refresh your system cache.

  To install a printer driver:
      In Quick filter box, type in cnijfilter.
  To install a ScanGear:
      In Quick filter box, type in scangearmp.

  Select a package in the result list that matches your device.
  Right-click on the package and select “Mark for Installation”
  Finally click on the “Apply” button to install the driver.

  Once the printer and scanner drivers are installed, connect your device to the computer and start Printers utility test if it works. And launch the Simple Scan utility and select your scanner from app menu Documents -> Preferences -> Scan Source to test if the scanner works.


How can I configure a second SSH key + user for a single server?

ssh-copy-id basically starts an SSH connection and copies over any missing keys. The problem, however, is in starting the SSH connection. Since only public-key authentication is allowed, the server can only accept the public key of backups-user. However, there are no SSH keys related to backup-user on the server. Therefore, no one (remotely) can log in as backups-user.

You will need to either temporarily allow password authentication or copy the public-key file to your home directory and use sudo cp id_rsa.pub ~backups-user/.ssh/authorized_keys on the server to copy the public key to that user's home directory.


Unable to install libgtk2.0-dev on ubuntu 16.04

How i solved the problem:
I tried to install those dependencies manually. First tried to install sudo apt-get install libglib2.0-dev but it gives following error:

The following packages have unmet dependencies:
 libglib2.0-dev : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.1-1~ubuntu16.04.1 is to be installed
                  Depends: libglib2.0-bin (= 2.48.0-1ubuntu4)

Then i tried to install glibs dependency along with glib:
sudo apt-get install libglib2.0-dev libglib2.0-0=2.48.0-1ubuntu4

This time package installation successful.

After that i issued sudo apt-get install libgtk2.0-dev and it works!


In case there's still anyone using nemo on Ubuntu 12.04 (or Linux Mint 13) I've encountered the same issue.

The problem is explained here and seems to be a bug in this particular version of nemo.

As a temporary solution, you can remove the ~/.thumbnails directory and replace it with a symlink to ~/.cache/thumbnails

To do this, run the following 2 commands in the terminal:

rm -r ~/.thumbnails
ln -s ~/.cache/thumbnails ~/.thumbnails

Some in the linked post above have reported side effects like compounding thumbnails in the ~/.cache/thumbnails directory due to the symlink, but I haven't had any issue.  My guess is they were switching between using both nemo and nautilus which wrote to both directories.


I have an alternative for you.
First install pdftk via software center or:

sudo apt-get install pdftk

then export the pdf normally in Libreoffice. Create 2 identical files, a.pdf and b.pdf, and run in a terminal in the directory where those files are stored:

pdftk A=a.pdf B=b.pdf shuffle A B output collated.pdf

This will create the file collated.pdf with 1,1,2,2,3,3 etc. which you can then print duplex.

If the terminal is not your thing (though it is extremely fast for what you are trying to do) there is also a GUI frontend for pdftk http://pdfchain.sourceforge.net/ (It is also in the repos).
However, I have never used the latter.


Differences between Bonjour/Avahi/People-Nearby protocols

Bonjour is Apple's trade marked name for the Zeroconf protocols.  These protocols consist of:

A method of automatically assigning IP addresses to machines on the local network when no DHCP server is available.
A method of advertising services on the local network (service discovery over multicast DNS).

Avahi is the implementation of these protocols used by Ubuntu.

The People Nearby service in Empathy uses the XMPP Serverless Messaging extension, which entails advertising your presence over the local network via the standard Zeroconf service discovery protocols, and clients sending messages to each other directly instead of via a server.

Salut is the name of the Empathy backend that implements this protocol.

To my knowledge, there isn't a standard multicast DNS implementation on Android, so I don't know whether many clients would implement this serverless messaging extension.


How do i get alert if someone tries to access my system?

fail2ban is probably the one tool you'll want for this. It works by parsing the logs of popular services (ssh, apache, etc) and looking for login failures.

When it finds a certain number of failures (ie if it sees somebody trying to brute-force their way in over SSH) it can update iptables to block the attacking IP. It can also send out emails to notify you (as you ask).

You can read more about setting it up from here: https://help.ubuntu.com/community/Fail2ban but there are lots of pages on the internet telling you how to do more with it. It's not a simple tool.

Other than that, for any service, if you move it off to an unpredictable port, people will be much less likely to just stumble upon it and be able to start brute forcing it. I run my all my SSH servers in the 40000-50000 port range. I have fail2ban installed too but I've never had anybody find the SSH server yet.

Of course this isn't useful for any service (http will always be expected on p80 for example) so if you're maintaining other users, you have to consider how much extra effort changing the port will cause them.


Create and remove directory using Terminal in Ubuntu 15.10

The command to remove a directory is rmdir not rm.

So you just type rmdir TEST.


Re-use wifi network settings across different wifi usb dongles

The wifi connection information is stored in /etc/NetworkManager/system-connections.  You can add a new one (the syntax is clear from looking at an existing one) and restart Network Manager, and it will appear.  We can create a new one by copying an old one and changing the uuid and MAC address.

So, working as root, put the following into, say, copyconnection.sh:

#!/bin/bash

if (( $# < 1 )); then
    exit 1
fi

# Parameter is the profile to copy
ORIG_PROFILE=$1

# Get the MAC address of wlan0
NEW_MAC=`ethtool -P wlan0 | cut -d " " -f 3 | tr [a-f] [A-F]`

# Copy the profile
SUFFIX=`mktemp -u XXXXXX`
NEW_PROFILE="${ORIG_PROFILE}.${SUFFIX}"
echo "Creating $NEW_PROFILE from $ORIG_PROFILE"
cp "$ORIG_PROFILE" "$NEW_PROFILE"

# We will need a new UUID line and a new MAC address line
NEW_UUID=`uuidgen`
NEW_UUID_LINE="uuid=$NEW_UUID"
NEW_MAC_LINE="mac-address=$NEW_MAC"

# Drop the lines in
sed -i "s/^uuid=.*$/$NEW_UUID_LINE/" "$NEW_PROFILE"
sed -i "s/^mac-address=.*$/$NEW_MAC_LINE/" "$NEW_PROFILE"

Make it executable

chmod +x copyconnection.sh

Then run it, with your old profile as parameter

./copyconnection.sh /etc/NetworkManager/system-connections/MyHomeWifi

If you want to do lots of them:

find /etc/NetworkManager/system-connections/ -type f -exec copyconnection.sh {} \;

Finally, restart Network Manager:

service network-manager restart

and you're done.

Full disclosure:

I can't test this, because I don't have an external wifi dongle to hand.  I've tested a very similar thing, adding a new profile for my only wifi adapter, and that works.
The use of mktemp is hacky.  It could, conceivably, go wrong and produce a duplicate file.  It won't, but it could.  Cleaner way would be to set its tmpdir to the location of the original file, but it clutters the script up so much I thought it better to just wing it :-)


Broadcom 43142 wifi problem on HP p-011tx on Ubuntu 14.04

Ubuntu 12.04 has an updated bcmwl-kernel-source package that supports BCM43142 as reported. Broadcomm 43142 is also found in Dell Vostro 3460-3560[See the bug#923809 comment 15

Run these commands when connected by ethernet or tethering to a mobile device:

sudo apt-get install firmware-b43-installer
sudo apt-get install bcmwl-kernel-source

Total data required was about 20-30 mB...


Why my Grub background color become Grey after installing GNOME Desktop?

I believe your GRUB background changes color based on what display manager or desktop environment you use. For example, I switched to KDE a few months ago and my GRUB turned black.


How do I remotely control an Ubuntu GUI session from behind a NAT?

TeamViewer should do the job: www.teamviewer.com


New Dell XPS Developer Editiotion Keyboard Shortcut 2016

At the end was an Dell Application that was causing that Super Key to don't work properly.

The solution can be found here : https://en.cristiantala.cl/dell-xps-developer-edition-ubuntu-dash-super-key/

But debriefing :

sudo apt-get remove dell-super-key
sudo apt-get install compizconfig-settings-manager

After that just go to the Compiz Settings, search for Unity, Select Launcher and just assign the Super Key for the Dash  menu.


Installation Ubuntu 16.04.4 LTS not working

Well, it is actually very hard for me to tell, what could be wrong. I suppose you have one display. Then I suppose, you almost booted ubuntu, and you are not able to login and your mouse is not working. Then try what @eduardo-ortega102 may have suggested.

On ubuntu screen press:
 ctrl+alt+F1

if you are able to get to a command line (black screen with text). Then try to login (name and then password). If this is possible it is good sign, I suppose. If not, than I am not able to help.


How to skip filesystem checks during boot

Removing Disk Check From 20.04 Boot
The command line option fsck.mode=skip can be used to skip the disk check when booting Ubuntu 20.04.
The line Checking disks: 0% complete may still come up but fsck will not be run, nor will boot time be increased.
Add fsck.mode=skip to the linux line in grub.cfg just before quiet splash
It is recommended to add the command to grub.cfg by editing /etc/default/grub thus: GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=skip quiet splash" and then run sudo update-grub.
I have had this problem with a Live USB but not with an installed system.


Customize Ubuntu for a library Internet kiosk

I believe this great article explains what you want, with screenshots galore.  You want to create a special session in the login manager that will start a browser like Google Chrome using the kiosk option.  You can set it up so that normal users automatically log into this kiosk session, but introduce a short time delay to allow an admin user to log into the normal Ubuntu session to administer changes to the system.

The steps are fairly detailed and so I won't reproduce them in their entirety here.  But since Ask Ubuntu discourages just linking (in case the linked site goes down), I will cut and paste here the key steps.  You should go to the link for the full instructions.

The desktop file you need to create in /usr/share/xsessions/ should have:

[Desktop Entry]
Encoding=UTF-8
Name=Kiosk Mode
Comment=Chromium Kiosk Mode
Exec=/usr/share/xsessions/chromeKiosk.sh
Type=Application

The script chromeKiosk.sh should be placed in the same directory with execute permissions and look like:

#!/bin/bash
xscreensaver -nosplash &
cat ~/.config/chromium/Local\ State | perl -pe "s/\"bottom.*/\"bottom\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f2),/" > ~/.config/chromium/Local\ State
cat ~/.config/chromium/Local\ State | perl -pe "s/\"right.*/\"right\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f1),/" > ~/.config/chromium/Local\ State
while true; do chromium-browser %u --start-maximized; sleep 5s; done


How to change time format in Ubuntu 15.04?

In Ubuntu GNOME (or any Linux distro with a recent version of GNOME 3), there's no option now to choose between 12-hour and 24-hour time in the settings. However, it's possible to change this by running the following command in the terminal:

sudo -u gdm dbus-launch dconf write /org/gnome/desktop/interface/clock-format "\"12h\""

This will change the configuration data of the clock on the login and lock screen, making it use 12-hour time instead of 24-hour.

To change the format on the panel when logged in, run the following:

sudo cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override << EOF
[org.gnome.desktop.interface]
clock-format='12h'
EOF

Now, run the following command to apply this preference (otherwise nothing will happen):

sudo glib-compile-schemas /usr/share/glib-2.0/schemas


How can I install applications on secondary storage hard drive?

You cannot easily install applications in an other than default place, what you can do is having user files on another partition.

I assume your a regular desktop user, and in this case the most logical "design" (imho) is to create 3 partitions, one for swap (of cause), one for the root (/) filesystem and one for your user(s) home directories (/home).

This way you can format/reinstall the OS without erasing user data/settings.

The process of creating this setup should be quite easy in the installer, just remember that the swap partition needs to be at least as big as your amount of RAM or the computer won't e able to hibernate.


Conky dropping shadow when invoked at startup

Have you tried using "conky -p 50" in Startup Applications?

It means there will be a lag of 50 seconds before Conky is actually started and gives all other programs the opportunity to start smoothly before conky is run.
Solved a lot of issues for me.

Might be worth to try...


Since MySQL 5.1.X is only available in the repositories for 10.04 (Not 12.04), I started searching for others with the same issue. Found a script in github (Thanks kamermans)

Which shows the following:

#!/bin/bash

set -e

cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure  '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make
sudo make install

Tested the script and it works. It still downloads the 5.1.65 version and configure/makes it. you can also change that to the last 5.1.x version which is 5.1.72 and still works.

I also recommend reading "Can't connect to local MySQL server through" socket error to solve some issues regarding socket problems.


13.04 Installation not recognising current OS

This happens sometimes, long story short, you're up for some fun with partitioning your hard disk.

If you're not highly technical, an ok compromise is to install Ubuntu using "WUBI".
What that will do is install Ubuntu to a file on your Windows partition. So you won't have to do any repartitioning.

There are instructions here:
http://www.ubuntu.com/download/desktop/install-ubuntu-with-windows
It doesn't work with Ubuntu 13.04 unfortunately :o\

Otherwise:
You will need to rearrange your partitions to make space for an EXT4 partition which you will install Ubuntu on. Also you need to leave some space for a 1-2GB 'swap' partition.

But I think you'll find that if you're not already experienced in doing this, that you'll end up accidentally wiping your Windows Vista partition, and you'll loose all your data...

Normally I'd highly recommend Ubuntu 13.04 over 12.04, as there are some really nice changes, but unless you know what you're doing with your partitioning or know someone who can help you do it, I'd advise against it.

If you know someone technical who might be willing to help you I'd recommend getting them to use Team Viewer to log onto your computer remotely via the internet. They can then do whatever is necessary to get your partitions set up correctly.

http://www.teamviewer.com

Either way, I'd recommend you make a backup of your data, as computers have a way of loosing everything you have stored on them when you least expect it.
A computer can retain you're data for a decade without you ever loosing anything, but one day, something will go awry and in a flash everything you worked on is gone. Partitioning is one of the times that's most likely to happen, even when you know completely what you're doing.


Regenerate resolv.conf from dhclient.conf without releasing/renewing IP?

Just use your favorite editor to edit /etc/resolv.conf (or /run/resolvconf/resolv.conf if you are running Ubuntu 12.04 or later with resolvconf active).

After a reboot or an interface downup cycle, resolv.conf should be correctly regenerated so that you can reconnect. If that isn't the case then you have another problem.


In the above string, you don't need start-of-word/end-of-word markers and you may use:

echo 'foggy light' | sed 's/foggy//g'

For the additional question in the comment:

Indeeed, my sed version

sed --version
sed (GNU sed) 4.2.2

supports the Syntax with \<...\>

echo 'foggy foggylight' | sed 's/\<foggy\>//g'
foggylight

If it doesn't work for you, report your sed version and read its manpage. For my sed, this syntax works too:

echo 'foggy foggylight' | sed 's/\bfoggy\b//g'
foggylight

\b can be memorized as boundary.


How to run a program with SCHED_RR policy from command line?

Use the chrt command with chrt --rr <priority between 1-99> <command>

Example:

chrt --rr 99 ls

Note that setting SCHED_RR require root permissions, so you either have to be root or run it with sudo.

You can also use chrt to give a running process realtime priority:

chrt -p --rr <priority between 1-99> <pid>

The same commands applies for other scheduling classes as well, albeit with a different parameter instead of -rr:

Scheduling policies:
  -b | --batch         set policy to SCHED_BATCH
  -f | --fifo          set policy to SCHED_FIFO
  -i | --idle          set policy to SCHED_IDLE
  -o | --other         set policy to SCHED_OTHER
  -r | --rr            set policy to SCHED_RR (default)

Edit:

In the Firefox case, it must be spesific to Firefox. In a multithreaded application I wrote myself, all the threads keep the RR class. As seen in your output, two threads have class RR, so it's not only the parent thread either.

Edit 2:

Try starting the process with chrt instead of rescheduling an existing pid. It appears that if you reschedule, only the first thread gets RR class. However, if you start it with chrt, every thread gets it.


Sure, this is what you should do:

Install wmctrl

sudo apt-get install wmctrl

Startup your virtual machine, write down exactly the window name as it appears in the title bar. Mine is for example:

Windows 7 [Draaiend] - Oracle VM VirtualBox

The command to bring the VM's window to the front is then:

wmctrl <window_name>

NB: if name of the window contains spaces, use quotes around the name

so in my case it would be:

wmctrl -a "Windows 7 [Draaiend] - Oracle VM VirtualBox"

Test the command running it in a terminal window
Choose: System Settings > "Keyboard" > "Shortcust" > "Custom Shortcuts".
Click the "+" and add the command:

wmctrl -a "Windows 7 [Draaiend] - Oracle VM VirtualBox"

to a key combinbation of your choice.

From man wmctrl:

   -a <WIN>
          Switch to the desktop containing the  window  <WIN>,  raise  the
          window, and give it focus.

In case you run the machine from different snapshots

or in any other case when the window name might be extended by other strings, as mentioned by OP in a comment: copy the script below into an empty file, save it as run_vm.py. Run it by the command:

python3 /path/to/run_vm.py <machine_name>

where, like in the first example, you have to put the machine name in quotes if it contains spaces.

The script:

#!/usr/bin/env python3

import subprocess
import sys

machine = sys.argv[1]
command = "wmctrl -l"
wlist = [(" ").join(line.split(" ")[4:]) for line in subprocess.check_output(
    ["/bin/bash", "-c", command]
    ).decode("utf-8").split("\n") if machine in line][0]
command2 = "wmctrl -a "+"'"+wlist+"'"
subprocess.Popen(["/bin/bash", "-c", command2])


what extension for uploading drawings from gimp to facebook

When you go to the "Save as" the formats available are kinds that keeps all of your work in progress inside GIMP, such as layers, transparency and such settings.

If you want to share your work on Facebook you have to export your image as a bitmap-type of file. Go to "Files" > "Export" and you will have plenty of formats to choose from that will allow you to upload it to Facebook and other services, such as .png and .jpeg.


Delete user changes after the end of a session

If each user has a unique account, this is how things would function. It is the normal mode of operation for a multi-user Linux system.

If it is a shared account, (i.e. everyone logs in as something like "GenericUser") it is a bit more difficult. There are many ways it could be implemented, but most of them make more work to do and more things that can break. This adds work for the University technical support staff to keep up with, something they probably have too much of already.

The best way might be to have the /home/$user filesystem of that shared/default user load as a ramfs/tmpfs. Students can make all the changes they want, but when the account is logged out all changes are lost. Next time the account logs in, the filesystem is loaded from the disk into the ramfs/tmpfs again with none of the changes.


Try installing the Oracle Java some applications only work with it.

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


I installed ubuntu with windows, and windows don't load

I doubt if you are able to "click" on the GRUB Boot screen.  Have you already tried 'update-grub'?

However, to fix Windows boot, insert a Windows bootable repair/recovery media and attempt to fix the MBR.  There should be a utility to scan your active Windows installation and then rewrite MBR. For example, Windows 7 and 8 has a bootrec utility.

Once it is done and you are able to load Windows, then you will need to attempt to repair grub which should pick up your valid Windows entry from MBR.