Xbindkeys launches correctly application for the first time only

Workaround

Tried it on Ubuntu 19.10

contents of myscript.sh file.

#!/bin/bash

notify-send "Script Ran Successfully"

contents of .xbindkeysrc file.

"/bin/bash $HOME/myscript.sh"
XF86Calculator

Once you logged in,

run xbindkeys --poll-rc. the key XF86Calculator should run your script.

Reference for --poll-rc option https://wiki.archlinux.org/index.php/Xbindkeys and see the comment below the answer in this link https://askubuntu.com/a/1126410/739431


Variables can't be used in range expansion {INT..INT}, so fallback to that is to use seq as show in related post. Alternatively, use C-like for loop since you're using bash anyway:

#!/bin/bash
echo $1
echo $2
echo {1..$1}
for((i=1;i<=$1;i++)); do
   printf "'%s'\n" "$2"
done

Or POSIX-ly:

#!/bin/bash
echo $1
echo $2
i=1
while [ $i -le $1  ]; do
   printf "'%s'\n" "$2"
   i=$((i+1))
done

Note I changed printf part for testing purposes. Adapt it to your needs.


Broken Display After Installing Kubuntu on Older Mac Pro

The problem might be in using proprietary NVidia drivers, there are few ways how to solve it:

Use the recommended way of installation. Check the Mac Pro documentation page:

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

(or MacBook Pro apporoach might be also helpful: https://help.ubuntu.com/community/MacBookPro)
Install Linux with the old school way from DVD, which installs grub-pc and boots Linux in BIOS compatibility mode (without (U)EFI)
Use alternative drivers (might depend on specific (k)ubuntu version and MacPro version)


How to determine gnome-terminal window ID in Ubuntu 17.10?

wmctrl doesn't work properly in a Wayland session as controlling windows is against Wayland's security policy.

wmctrl may work with the application windows running under the XWayland compatibility layer (for example Firefox). But gnome-terminal is an official GNOME app which doesn't run under XWayland so it fails.

You may try to switch to an Xorg session as a workaround.


How to open an .html or .css file in Brackets from the terminal

Brackets only supports opening files from the command line in Windows and Mac, not in Linux. According to Brackets Command Line Tools:

  Linux support is still in progress - Brackets can be launched from the command line, but it does not accept arguments.

Opening an html or css file in Brackets by selecting File -> Open -> browse to a file and select it -> click Open button works properly.

Opening files/folders in Brackets from the terminal in Brackets is a feature request at Adobe Brackets Trello board. Need to implement GetPendingFilesToOpen() in appshell_extensions_gtk to read files from command line arguments.


How to make a video for YouTube on Linux?

I personally use the same I'd use on windows :
OBS studio.
the setup of desktop + webcam or just webcam is intuitive.
in a terminal type
sudo apt install ffmpeg -y

then install obs Studio from flatpack or snap in software center.
personally I record sound separately (when I want to have high quality) using Audacity (I would do the same with windows) and I use audacity's noise reduction method to clean up the audio.
then I put the audio and video together in an editing app. Kdenlive in my case.
it's a bit more work but if you're not willing to invest in better hardware (good sound card or external mixer for static-isolated audio + good microphone) that's what it'll be.


Issues installing Dwarf-Fortress libSDL_ttf-2.0.so.0 => not found

Are you trying to run the most current version of Dwarf Fortress (0.43.05)? I was having the same problem as you. I created a soft link to libSDL_ttf-2.0.so.0 and it didn't work, because it was looking for a 64 bit file.

Try installing the 64 bit version instead:

sudo apt-get install libSDL-ttf2.0-0

You should see the file appear in your x86_64-linux-gnu directory. The game ran for me after I installed it.


GUI DPI scaling on certain apps very small

The skin (the accepted answer) is deprecated by the author, and it does not scale perfectly.

For those who are still looking for a good solution, there is actually a setting in steam to do that.

Simply check Steam->Settings->Interface->Enlarge text and icons based on monitor size and restart steam will give you a perfect text size.


Solved the problem with patience!
The recanning took 5 hours!  After that, worked fine.


Upgrading To 14.04 LTS (Trusty Tahr) Blew Up Grub

Am on the correct path to fixing my issue?

Yes. It's possible reinstalling GRUB to the MBR won't fix the problem, but most likely it will, and it's the place to start.

  how can I fix the GRUB OS loader using my portable OS (that is on my thumb-drive)?

What you want to do is usually called "repairing GRUB" or "reinstalling GRUB to the MBR." (It's called these things because it usually achieves the first, and it consists largely of the second.)

There are several techniques for this. Any should work. But if one does not, you can try another.

Some are detailed in How can I repair grub? (How to get Ubuntu back after installing Windows?). While your problem was not caused by a recent Windows installation, the solutions there will still likely fix it. (The parenthesized part of the title is an example of when repairing GRUB is needed, but there are other cases, like this one.)

I'd suggest trying with the Boot-Repair utility. (More information on that here.)

Another good resource is the Fixing a Broken System section of Grub2/Installing.


Partitions in the traditional partitioning scheme (MSDOS table, not GPT) is working with primary and extended partitions. One can have four primary partitions at maximum, or three primary and an extended in which the extended partition can hold a few more (inside it).

The kernel represents all primary partitions as 1-4 and all extended from 5 and up. The sda2 you're seeing is the extended "umbrella" partition, which holds just one more partition: sda5. This numbering scheme is just the way it's being represented.

In your case with just two actual partitions it wouldn't have been necessary to create an extended partition - as you're not hitting the amount of primary partitions limit.

Further readings

Wikipedia: PC Disk Partitioning types
Why am I unable to do anything with my extended partition?


How do I turn off WLAN automatically when LAN is connected?

I think you might be making this harder than it has to be. I have the same situation with my laptop (except it's a normal ethernet port instead of a dock). When I plug in the wired network, it automatically takes precedence over the wireless and everything goes over the (faster) ethernet cord. The wireless was connected all along, but unused. When I unplug the cable it falls back to using the wireless connection.

So, have you tried to see if this does what you want already? I'm using nothing more than the standard network applet that comes with Ubuntu.


The best way to automate any task under any OS is shell scripting

Alternatively, ask Apple to release the source code to automator so we can compile it and include it in Ubuntu...


Does Update Manager show updates for software in PPAs?

Update Manager will show it, but only when it next attempts to retrieve update information.

Typically when you add a PPA to your sources, what happens is your computer treats that as any other repository.  If it has a higher version number than what's in the normal Ubuntu repositories, it'll supersede whatever's in the repositories and that'll be the "updated" version.

If the version in the Ubuntu repositories is newer than what's in the PPA, then you have to manually tell Ubuntu "I don't want what's in the Ubuntu repositories, I want this specific version from this specific location." and then it will install that version from the PPA specifically.  (Typically, you either have to use Synaptic, or a long command entered into Terminal, to "force" lower version numbers to be installed)

However, this is still dependent on automatic update checking through update-manager.  To force the update, you can open that and do "Check for Updates" which will effectively force apt and dpkg to pull new data from the repositories and the PPA, and update available software.

Do also note, that if the PPA is stale (i.e. not updated by its owner/maintainer anymore) you won't see any updates from the PPA.  Updated packages in a PPA, as well, will only be available if the maintainer of the PPA uploads new packages.

The above also makes the assumption you added the PPA, then either used Synaptic, Software Center, or a command entered in the Terminal (command line, such as sudo apt-get install PACKAGENAME) to install the program in the PPA.  After its installed, apt and update-manager will correctly check for updates on that package from the PPA and the main repository sources.

If you didn't actually install the script and/or program that's in the PPA, then the system won't get updates for it.


Did you have a look at troubleshooting section?
Taken from their troubleshooting site:

  There are a few ways to debug this. First, a blank screen is good.
  That means bspwm is running (usually).

  I would confirm that your xinitrc looks something like

sxhkd &
exec bspwm

  The ampersand is important. Next, try spawning a
  terminal in your xinitrc to see if its getting positioned properly. It
  should appear somewhat "centered" on the screen. To do this, use this
  .xinitrc:

sxhkd &
urxvt &
exec bspwm

  If nothing shows up, that means you
  probably forgot to install urxvt. If it shows up but isn't centered or
  taking up most of your screen, that means BSPWM isn't starting
  properly. Make sure that you've chmod +x ~/.config/bspwm/bspwmrc.

  Next, type pidof sxhkd in that terminal you spawned. It should return
  a process number. If it doesn't, that means sxhd isn't running. Try to
  be explicit and run sxhkd -c ~/.config/sxhkd/sxhkdrc. You could also
  try changing the Super key to something like Alt in your sxhkdrc and
  see if that helps. Another common problem is copying the text from the
  example files instead of physically copying the file over. Copying /
  pasting code usually leads to indentation issues which sxhkd can be
  sensitive to.

I hope this helps!


How to use Telnet through wlan0 when eth0 is default device?

You cannot have the same subnet on both interfaces! Essentially you're telling your PC that all 192.168.1.X computers are located off your eth0 interface and then again all 192.168.1.X are located off of wlan0. Change either of your subnets to 192.168.X.0 where X is not 1


Programs may have access to the clipboard, for example you copy some text from a webpage and paste it to gedit. This should never happen without user interaction, unless KeePassX has a security vulnerability which another malware (very rare on Unix systems) could then use. Don't use software which you don't trust.

If you want to decrease the probability that your passwords go to someone else, encrypt your home folder, swap and ram, use a good login password, disable user name list in login manager (like gdm). That way the only possible way to get access to your passwords is when KeePassX is running, ie. when you are logged in and have some old insecure programs running.


Apparently the new decrypt tool for 11.04 didn't work correctly on my system. With Marco Ceppi's help in the chat room, we walked through the manual steps instead, and that worked.

The steps have been updated and can be found in this answer:
How do I recover data from an encrypted Home directory


Is GCC 4.5 still required to build biarch (Shared WoW64) Wine on Ubuntu?

Actually I got an answer from a Wine developer. He said that it is gcc 4.8 .0 which is an issue. gcc 4.8.2 is OK. So I used it to compile my biarch Wine, and indeed it's OK.


I would suggest that you uses two different SSID for each owner.  Then you can set up good enough security of their WLAN (WiFi).  Give each SSID an own network, like Owner A 192.168.10.0/24 and Owner B 192.168.20.0/24.

After that, you can set up the router to route between them and controll access with a firewall between the two networks.  Basicly exchange the VLAN with the SSID.  If you want to use wired network, you set up a switch in the router and bridge the SSID with the right switch.

I do belive that there can be problems with VLAN over WLAN.  But my memory could be wrong there.


Pulseaudio lags horribly only when Android Studio is running

Finally I found the root of the issue - it's the ADB daemon.
Killing the daemon fix the problem, but AS will restart it anyway (and for sure it's a bad solution).
The right way is to check the Use libusb backend option in Settings > Build, Execution, Deployment > Debugger > Android Debug Bridge


Anyway to install both MAAS controller and computing node on a single node?

I have a doc for testing maas that demonstrates how to do this.  It doesn't make sense other than for testing, but it is generally functional.  The nodes are kvm, and you dont have ipmi support.


How can I set a limit for incorrect password attempts for GDM lock screen before action is taken?

Some background info:
User log-ins are handled by the PAM system (Pluggable Authentication Module) and in this particular case by the pam_tally subsystem (to tally the user accounts).
As pam_tally itself will be deprecated, you should use pam_tally2, which comes in two parts:

pam_tally2.so being the module that does the authentication itself and which you need to add to the PAM system
pam_tally2 being a stand-alone program that you'll need to display, change and clear individual counts

The parameters of pam_tally2 you're interested in are:
deny=n
    Deny access if tally for this user exceeds n.
lock_time=n
    Always deny for n seconds after failed attempt.
unlock_time=n
    Allow access after n seconds after failed attempt. If this
    option is used the user will be locked out for the specified
    amount of time after he exceeded his maximum allowed attempts.
    Otherwise the account is locked until the lock is removed by a
    manual intervention of the system administrator.
magic_root
    If the module is invoked by a user with uid=0 the counter is
    not incremented.
even_deny_root
    Root account can become unavailable.

The configuration:
Add the following lines to /etc/pam.d/login to lock the account after 3 failed logins (also for the root account) and have it unlocked automatically after 50 minutes.
auth     required       pam_securetty.so
auth     required       pam_tally2.so deny=3 even_deny_root lock_time=60 unlock_time=3000
auth     required       pam_env.so
auth     required       pam_unix.so
auth     required       pam_nologin.so
account  required       pam_unix.so
password required       pam_unix.so
session  required       pam_limits.so
session  required       pam_unix.so
session  required       pam_lastlog.so nowtmp
session  optional       pam_mail.so standard

After adding the above congiguration, test it and log out and do try to log in 3 times with a bogus password: 60 seconds to wait after first and second attempt and 50 minutes after the third try.


Where can I download Ubuntu logo assets?

All the brand assets are on design.ubuntu.com.

Logos


How to fix OutofMemoryError: Java heap space on Lubuntu?

I don't think the issue is Lubuntu, you can try this link and see if it helps.

https://stackoverflow.com/questions/1596009/java-lang-outofmemoryerror-java-heap-space


What may cause Ubuntu to not be able to shut down and limp in the logout screen?

I believe that there is some active program that is not terminating during the Shutdown process.


What is the correct way to create partitions for both Windows and Linux on an Western Digital’s Advanced Format 1 TB Hard Drive?

im not really sure on how to partition in ubuntu, as I am still new to learning ubuntu however, may I ask you this, does it have to be partitioned in ubuntu? if you are having trouble with it you could always back everything up, you could uninstall ubuntu and install windows 7 which would be really simple to partition in the disk management, and then you could reinstall ubuntu


Ubuntu 14.10 server with LTSP and AMD Geode GX-MMX

Geode-GX are processors from 2002. I think that you should use i386 architecture.


Is it required to merge hard drives when you install Ubuntu?

How it works is by mounting the partitions in logical locations within the operating system.

On Windows they use locations labelled C:, D: etc for each partition or hard drive and these appear separately.

In Linux there is a single filesystem tree and all partitions/drives are mounted on it somewhere. In Ubuntu you may mount a partition at /home to have all of the home directories stored on one partition or a separate hard drive


Most if not all useful and stable Open Source software for Ubuntu is available through our well maintained distribution's software repositories.

How do I install applications in Ubuntu?
What's the difference between multiverse, universe, restricted and main?

This means that other than from Windows all software is already included when installing Ubuntu. Less often used applications will however be downloaded to be able to use them.

The easiest way to do so is the Ubuntu Software Center which allows to search for applications and then download and install them. Applications listed there generally are tested and stable.

This is also the case for LuckyBackup , the graphical frontend for the powerful command line tool rsync.

You may also be interested in other backup solutions:

Comparison of backup tools


What are the different "Click Methods" available through the gnome-tweak-tool?

Here is the bug report that got it added
It points to this document (The link has images to explain it). From the link:

Software button areas
On most clickpads, this is the default behavior. The bottom of the touchpad is split in the middle to generate left or right button events on click. The height of the button area depends on the hardware but is usually around 10mm.
Left, right and middle button events can be triggered as follows:

if a finger is in the main area or the left button area, a click generates left button events.
if a finger is in the right area, a click generates right button events.
if there is a finger in both the left and right button area, a click generates middle button events.

= area = default for non-Apple

Clickfinger behavior
This is the default behavior on Apple touchpads. Here, a left, right, middle button event is generated when one, two, or three fingers are held down on the touchpad when a physical click is generated. The location of the fingers does not matter and there are no software-defined button areas.

= fingers = default for Apple

The other 2 have not got a definition on it. "default" will be what the hardware is expecting. So when you use a none-Apple it does "fingers" otherwise it does "area". "none" I would guess it disables clicking the touchpad.


How do I change the keymap of a single device (Logitech presenter)?

I never did that but I think you need to create a keymap file in /lib/udev/keymaps/ and add a rule for your device to /lib/udev/rules.d/95-keymap.rules

Details:

An udev keymap maps scan codes to key codes, so you need to find both to create the keymap file. To find the scan codes run the following and press the buttons on the device:

sudo /lib/udev/keymap -i input/event5

You might need to try different numbers for event*. The output should look like this:

scan code: 0x70037   key code: dot
scan code: 0x70029   key code: esc
scan code: 0x7003E   key code: f5
scan code: 0x7004B   key code: pageup
scan code: 0x7004E   key code: pagedown

A list of key codes can be found here.

Now create the keymap file (I'm storing it as /lib/udev/keymaps/logitech-r400):

0x70037 brightnessdown
0x70029 brightnessup
0x7003E brightnessdown
0x7004B brightnessup
0x7004E brightnessdown

Doesn't do anything useful - just a test to easily see if it works.
To test the new keymap temporarily, run:

sudo /lib/udev/keymap input/event5 /lib/udev/keymaps/logitech-r400

which should result in output like this:

Remapped scancode 0x70037 to 0xe0 (prior: 0x34)
Remapped scancode 0x70029 to 0xe1 (prior: 0x01)
Remapped scancode 0x7003e to 0xe0 (prior: 0x3f)
Remapped scancode 0x7004b to 0xe1 (prior: 0x68)
Remapped scancode 0x7004e to 0xe0 (prior: 0x6d)

The buttons should now change the brightness.
If you want to make that change permanent, you need to add an udev rule to /lib/udev/rules.d/95-keymap.rules that applies the keymap file to the device.

Open the file: gksudo gedit /lib/udev/rules.d/95-keymap.rules
At the bottom of the file, but before the LABEL="keyboard_end" line, add:

ENV{ID_VENDOR}=="Logitech*", ATTRS{idProduct}=="c52d", RUN+="keymap $name logitech-r400"

Save, close, and after a reboot the buttons should change the brightness.


You should install GRUB to your boot partition (if you are booting Windows successfully). Obviously, your BIOS settings is configured to boot from that drive, thus it posses bootable flag partition. GRUB should not fail booting Windows if your external drive is not present, but logically it will be unable to boot ubuntu if external drive is not connected. If you connect external drive, it should be able to boot into both Windows and Ubuntu.


How to delete temp files created by Archive Manager?

Temporary files are usually stored in /tmp, and that's the case even for Archive Manager. Anyway it's not a good practice to batch remove them, since running applications might be using the folder to store temporary files necessary to their current instance to run (as it's the case for Archive Manager), and removing them could break the current instance. So you better either remove the files manually or just reboot, which automatically clears the folder.


Ubuntu with python 3.7 installed by default with fresh install

Simple Answer : Ubuntu 19.04 and Ubuntu 19.10 come with Python 3.7 as default Python version.


Wickr 2.6.0-4 Installed but Unable to Open

I had the same problem after resolving my install dependencies. I was able to locate what was missing after attempting to start the app from terminal:

  wickr-me: error while loading shared libraries:
  libgstreamer-0.10.so.0: cannot open shared object file: No such file
  or directory

The fix (from terminal):

sudo apt-get install libgstreamer0.10-0
sudo apt-get install libgstreamer-plugins-base0.10-dev

This installed the shared libraries and the plugins. Wickr was then able to open.


How to remove all i386 packages from Ubuntu 64bit?

The other automated solutions are dangerous and not always working (1), so here another way
sudo aptitude purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'`

or
sudo apt-get purge `dpkg --get-selections | grep ":i386" | awk '{print $1}'`

(Try to use always and only one of the tools. Since aptitude is better when having dependency trouble, I prefer that.)
Good idea to also
dpkg --remove-architecture i386

and maybe
dpkg --print-foreign-architectures

(1) The other commands also lists packages having only i386 in their name (although they are for 64bit architecture), the regular expression didn't work and dpkg shows packages which are already removed, but still have configuration files left (dpkg -l  shows "rc" instead of "ii" as status).


Can't make a shortcut to work (properly)

Replace sudo in the .desktop file with gksudo.

This is because sudo cannot ask you the password outside the terminal, but the command needs sudo access so it freezes on the sudo step (apparently still waiting for the password).

gksudo will graphically prompt you for the password.

Update: To execute without password:

We need to set nopasswd on that script.

Edit /etc/sudoers with the command sudo visudo /etc/sudoers
Add the line:

%sudo ALL=NOPASSWD: /full/path/to/script.sh

Replacing /full/path/to/script.sh with the actual full path.
Save (Ctrl+O) and quit (Ctrl+X).

Now you should be able to run it without password. Also, you can now even use sudo instead of gksudo.


The extension you're trying to compile was designed in the days of Banshee 1.5.3. We are now up to Banshee 2.4.1 and the API is changed. banshee-1 is now simply banshee, and the libraries are provided by the banshee package itself.

From a fresh git clone, change occurrences of banshee-1 in configure.ac to banshee and BANSHEE_1 to BANSHEE. That will let you get past this hurdle.


Keyboard shortcut for rotating Ubuntu 17.10 Screen

I'm not sure if there's any by default, but You can easily set the one You like!
Just tap Super to open Dash, search for Keyboard, go to hotkeys tab and create new one.
The commends You need are: xrandr -o inverted and xrandr -o normal.


youtube-dl has a command line option to extract the audio into an mp3 and discard the video downloaded:

youtube-dl --extract-audio --audio-format mp3 -l [YOUTUBE VIDEO LINK]

This works in my version of youtube-dl, which is 2012.09.27. Download youtube-dl from its website.


install pantheon desktop on ubuntu 16.10

To install Pantheon DE on 16.10, run following command in order:

sudo add-apt-repository ppa:elementary-os/daily
sudo add-apt-repository ppa:elementary-os/os-patches
sudo add-apt-repository ppa:elementary-os/testing
sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install elementary-theme elementary-icon-theme elementary-default-settings elementary-desktop

Various user reportedly has encountered couple of bugs, since this procedure will install the unstable version. Other than that, it's completely usable and working fine.


Why is software slow to install using Ubuntu Software Center?

Although this might be a dodgy answer (as in "do it this way instead"), I've always found it a lot easier to install and update from the terminal. You can even tab complete the names of the packages you're looking for, in case you're not entirely sure what they're called. Installing VLC is as simple as:

sudo apt-get install vlc

When you want to look for updates, you'll simply write

sudo apt-get update

To get the new lists of packets, and then do

sudo apt-get upgrade

To perform the actual upgrade.

Another advantage of the terminal is that you actually see what's going on all the time, it tends to be a bit more obscured in the software center, which might give the impression that it's hung when it's actually just installing a lot of packages.


The ipv6 addresses shown there are link-local addresses, not DHCPv6 addresses.  To disable link-local addresses, set link-local: [ ] instead of the default which is link-local: [ ipv6 ] as described in the netplan(5) manpage.


Can a script that is run as root, run another script as normal user?

That is basically what sudo does. You can run a command as another user by typing:

sudo -u [user] <command>

or

sudo --user=[user] <command>

The sudo command is very flexible, and you can find out the many options you have with it using the man pages or the help option:

sudo --help
man sudo


Disable animations when opening applications

I am not sure about 13.04, but on 12.04 I had similar annoyances. So the way I did:

1) Installed Compiz Sttings Manager
2) Compiz Setting Manager -> Unity -> Experimental tab
3) Launch Animation: None
Urgent Animation: None
Hide Animation: Fade Only
Dash Blur: No Blur
4) CSM -> Effects
5) Disabled everything except Windows Decoration
6) Installed few unity tweakers and made sure that settings there match ones in CSM. In my case MyUnity still was showing Hide Animation set to Fade and Slide, so I changed it to Fade Only there as well.


How can I install canon mx360 on ubuntu 18.04

so from the Canon Singapore site that you cite;

I get cnijfilter-mx360series-3.50-1-deb.tar.gz downloaded and saved

if you open a terminal and copy the commands below and do

cd Downloads

tar -zxvf cnijfilter-mx360series-3.50-1-deb.tar.gz

cd cnijfilter-mx360series-3.50-1-deb

sudo ./install.sh

does that not run an install script for you?


Using Xsane with HP network scanner results in JPEG artifacts

Although you selected PNG as a lossless format to save the scan, there is an advanced option —Menu: Show advanced options (Ctrl+6)—where you can set the compression used for transmission from the scanner to the client from JPEG to None. You should see better results on higher resolutions now, I did.

I looked at LP:192176 and spend to much time trying to understand what the different parties where talking about when the bug was apparently solved, but users are still experiencing this behavior by default.
Therefore I'm putting this answer here and hope people don't have to waste anymore time trying to edit files, updating packages, reading walls of text or else.


get the path of moved directory/file (source path and destination path)

I did this small script.

$1 $2
mv $1 $2
d1=($1)
d2=($2)
echo ${d1} + "was move to " ${d1} >>log.txt

Save it with the NAME.sh where name can be the name you want.

Take in consideration that the file log.txt has to exist. Also you should put the absolute path Ex. /home/user/log.txt

It should work, I test it and works. On the backgroud it is the same mv command.
If you want to se nice the code, here is a link on paste ubuntu


Cannot boot LiveCD/USB sessions on a particular machine ("Kernel Bug" error)

Solved by the OP

  I used F6 and selected acpi=off, I dont know why it works, but works!!


Switch layout by CapsLock and do nothing by Shift+CapsLock

Your best option would probably be to disable the Shift+Caps Lock key combination by mapping it to doing nothing. That way every time you mistakenly type it does nothing. I haven't tried it but here's something that might help.

After a few trials, I can recommend the following alternatives:
1. Set your "Key(s) to change layout" to "Caps Lock (to first Layout), Shift+Caps Lock (to last Layout)" and put your 2 languages in the correct order so that your Caps Lock changes and Shift+Caps Lock changes back. (However I'm assuming this won't do either since you mistakenly press Shift+Caps Lock)
2. Set your "Key(s) to change layout" to "Shift+Caps Lock" instead. At least this way you're more conscious of your error.

Hope I helped.


How do I remove Ubuntu dual-booted with Windows 7?

Well, you must first fix your MBR so that windows7 boot loader can act. in order to do that there is a nice tool in HirenCD named Fix MBR. Try to download it and use it. Then you must format your Ubuntu partition with any tools you know. There are also some partitioning tools in that CD, I recommend Paragon partition manager ;)


I also noticed reduced battery life from like 5hrs to 2hrs max. Did some research and installed TLP. That kind of helped but not much. Some people advised to downgrade to kernel from 14.10 but I didn't want to do it.

Instead, I preferred to update to kernel 4. Installing it manually didn't do it so I did some research and found the script that works for whatever version you've got. I downloaded it from https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater and installed it. Than on next reboot info of new available kernel appeared so I run it:

sudo /tmp/kernel-update

Reboot and voila. back to 5-6hrs battery life with TLP enabled and nvidia drivers using intel integrated graphics card (power saving mode). happy days

oh btw my specs:

laptop dell 7537
Intel i7-4500U CPU @ 1.80GHz
8GB ram
Ubuntu 15.04
kernel 4.0.0-040000-generic
graphics card nvidia gforce 750m 2gb dedicated ram


GSConnect drops connection and WhatsApp not working

unluckily I only have 1 point and I can not comment your post.

please generate the support log as explained in their wiki and share with us the result. We will help you troubleshoot the issues.

The possible reasons could be

1) Intereference with other Equipment

  Some users have reported that KDE Connect broadcasts (UDP Port 1716) can interfere with some equipment. The cause is unknown, but seems to only affect very very network connected devices such as PLCs and WiFi repeaters.

Could be possible that activating other equipment is the cause of your connection instability.

2) Issues related to the distribution package.

Ubuntu 19.04 is incompatible with many apt packages which have not yet been troubleshootet, we would need information on how did you install gnome-shell-extension-gsconnect and all the relevant software.

I remain available for additional information.

The wiki has several information about the extension, please include any other relevant link to packages and software.


Find out what filesystem a file or directory is part of

This is not probably the best or the correct answer, but df can do it:

javier@todocolor:~$ df /boot/grub/
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/sda2               918354    184202    685154  22% /boot
javier@todocolor:~$ df .
S.ficheros         Bloques de 1K   Usado    Dispon Uso% Montado en
/dev/md0              75532064  13930424  57795044  20% /

Take the first and the last column.


How to add a second hard drive to an already installed Xubuntu 14.04?

Step 1) Connect the drive. Wipe the drive if desired.

a) If you have data on the drive that you need to keep, back it up.

b) Fill the drive with zeros which will blow away the MBR and all data by:

sudo dd if=/dev/zero of=/dev/sdX

**or** if you want a progress report as you wipe the drive use

sudo dc3dd wipe=/dev/sdX in both cases sdX should be changed to sda, sdb, or whatever drive you are wiping.

If you are not certain, you can identify the drives using fdisk -l

source: Remove lvm to install Ubuntu

Step 2) Partition the drive. I use gparted.

a) open gparted - your password will be required

b) select the drive you are working with in the box on the upper right

You will see similar to this:

c) create a new partition table. I won't be discussing partition table types here as that's beyond the scope of this answer.

From  the menu choose device and then create partition table.

Click apply - Gparted will apply the change and rescan the disks

d) format with a filesystem of your choice. I will use ext2 in this example. choose the filesystem that you prefer. ext4 is my preferred filesystem.

Right click on the unallocated line and select new, adjust settings if necessary here then click add.

Step 3) Format the drive (put a file system on it) I used ext2 (the default)

Click the green check mark to apply the format. You will be warned. Click apply

When the process is complete you'll get the below. you can expand details as needed then click close.

source: experience - full manual is here: http://gparted.org/display-doc.php?name=help-manual

Step 4) Mount the drive: Where you mount it is where the space will be. I will mount to the empty directory at /srv using old-school methods. You can use blkid as covered elsewhere on the site if you so choose.

In the image below you can see that I ran fdisk -l to insure I had the right drive designation prior to running the mount command `sudo mount /dev/sdc1 /srv

Step 5) Set permissions at the mount point properly so that the appropriate users/groups can use the drive - currently only the owner root has full access.

sudo chmod -R 777 /srv will give full read/write/execute access to the drive for everyone. Restrict as you see fit. for more information on permissions see the chmod man page.

source: experience, man chmod

You can also change ownership on the drive with chown if desired. See the man page for chown by running man chown in a terminal. If you wish to have the drive mounted every time you boot, you'll need to edit fstab (some would call this a permanent mounting). Editing fstab has been covered in great detail both here and elsewhere on the site. for an example issue the command cat /etc/fstab which will show you the current list of drives and with what options they are mounted at boot. cat /etc/mtab will show you all current mounts.


telnetd: getpty: No such file or directory

this helped me to install telnetd on the vm = > http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux


I have the same problem. Discovered that it's 11 years old bug in XOrg.

Here is Ubuntu's bug discussion started in 2006:
https://bugs.launchpad.net/xorg-server/+bug/36812


How increase filesystem size on ubuntu running inside windows

Wubi? I'm pretty sure that wasn't supported for 14.04...do you mean the 'Install Ubuntu alongside Windows' option? However, Helio is right, you can't really modify a partition size once it's made.

So, you need to:

Backup everything (Windows and Ubuntu) using the backup tools (search 'Backup' in the Dash and Start Screen/Menu) to some large storage that you have (External USB storage is good).
Backup very important files separately - just copy and paste them onto some storage - it has been known for backup tools to fail.
Find a Windows Boot Disc and reinstall Windows. If it asks, tell it to use the whole hard drive for its partition.
3b. If this fails, you may need to use a tool such as Gparted Live to format the internal computer storage as NTFS first.
When installing Ubuntu, use the custom tool for partitioning when it asks you how you want to partition. This can be tricky, use this guide bearing how large you want your Ubuntu partition to be in mind.
Use the backup tools to restore your backups.
If they fail to recover essential files, copy them over.
You should now have Ubuntu and Windows partitions the size you want with all your files restored!


How to disable notifications sound while XBMC is runnig?

Ok, I've found a solution!

1) Running a script.sh while the notification is comming (possible with KDE, menuK->configuration->notifications)

2) The script .sh is:

#! /bin/bash

exec >/home/guillaume/ver-XBMC.log 2>&1
python /home/guillaume/ver-XBMC.py

3) The python script:

#!/usr/bin/env python
# coding: utf8

import psutil
import subprocess

app = [psutil.Process(i).name for i in psutil.get_pid_list()]
if "xbmc" in app:
    print "XBMC is running"
    cmd = "qdbus org.kde.kmix /Mixers/PulseAudio__Playback_Streams_3/restore_sink_input_by_media_role_event volume 0"
    subprocess.call(cmd, shell=True)

4) A log is created in the Home folder.

That's all folks!


xfce4 boots into an xterm-like environment

I tried logging in as root, as opposed to the regular user I was logging in before, and everything was working fine. This seemed to indicate that it was more of a configuration issue than an xfce4 corruption.

Therefore I logged in again as the regular user that had the problem and deleted the configuration folder, after terminating xfce4 process:

mv ~/.cache/sessions ~/.cache/sessions.bak

Then I restarted xfce4 and everything was working great! Hope that proves helpful for some people.


What's the best way to automatically apply server updates?

This answer to the desktop upgrade question will apply to servers.


I think they are part of the binary packages - all my searches for .po files (translation files) given the result:

Binary file /home/tim/path/to/anarchive.zip matches

So if you want to edit it, you need to edit the binary file.

However, you can contribute translations to ubuntu on Launchpad. This is translations for 14.10, and this is translations of German for 14.10. You have to sign in to edit translations, and first please read this Quick Start guide.


How to get rid of ubuntu Desktop window in i3 wm?

That annoying window on the side is usually due to the starting of nautilus. If you use nautilus --no-desktop to open it then there will be no such destop window.

In case that window opens up then use pkill nautilus.


Instead of using grep, you can just type alias aliasname to see what an alias is set to.

For example, alias ls will return ls='ls --color=auto'.

Also take a look at the type and whence commands, which return more detailed information about utilities, including executable files in your path, shell built-ins, aliases, and shell functions.


Seemed be lost everything after installed ubuntu in my windows 7 computer

You could have read something like this before you tried to install Ubuntu as dual boot : https://help.ubuntu.com/community/WindowsDualBoot
 If you installed Ubuntu in separate partition then you can access your windows files from ubuntu. You can find all the partitions(including windows) from the 'places' menu on the top panel


I don't think you made a mistake, since you were able to still play the game (no crash).

Chances are you were affected by what Michael over at Phoronix found out too. To quote him:

  Well, even with BioShock Infinite which is supposed to be faster on Radeon Software 15.11 for Linux, none of the three graphics cards tested saw any performance gains. The only dramatic performance differences found with this new driver was in the Metro Redux games where the performance changes were regressions.

So, yeah, sadly AMD still has a long way to go with their Linux drivers. :(


Ok I did:

sudo find / -name "cctk" (found out this is the command name)

Then apparently it is in /opt/dell/dcc/cctk


If it is a USB 3 device, be aware many systems don't support booting off USB 3 and won't detect it as a viable option. Just plug it into a USB 2 port for testing in that case.


Sed bash script iterating multiple times

Simply: you are invoking sed twice.

If you run those commands in a terminal one after the other, you will end up with two sets of output. Your script is just doing the same thing in its own shell.

You can use {} to group commands and put each one on a new line or use ; so all the commands act on the file cumulatively, calling sed only once:

#!/bin/bash
sed '{
     1i Hee hee hee\n Ho Ho Ho\n
     s/bob/Bob/g
}' "$1"

output of ./script file

Hee hee hee
 Ho Ho Ho

HRFJGEKGJHEJGKJVNEJGKJEG BOB BO B

GARY gARY gARY gary

FOG GARY Bob Bob Bob Gary gary

the the bird in the the bush!

LOL MATE!


The directory /usr/local is not used by apt or other system package managers.   That directory is for you, the sys admin, to use for installing packages without risk of colliding with the system package manager.  You will need to remove it manually, e.g. sudo rm -r /usr/local/sphinxsearch, as well as other files that may pertain to it...if you want it to be completely gone.

Do you recall how it got installed?  If it was from source (.e.g ./configure && make && make install) you'll be able to used make uninstall.

Or, check for an install.sh script.  That would give you hints to other files that may have been installed.


Ubuntu 12.10 Disks - where is connect to server?

This option got canned, together with some other options, when disk utility was rewritten bug #1004094. Add yourself to the affected and hope it gets re-instated. Sorry.

You can still access it from the panel though (see 'file').


Installation of server does not accept subnet CIDR

The prompt wants a network address with CIDR prefix.  That is, if you are using 10.16.192.251/22 for your network (255.255.252.0 subnet mask, /22 CIDR mask), you need to first calculate the network address (the first IP of the range, usually a .0 with ones like this in the last subnet, but could be a different third octet, in this case 10.16.192.0 is the network address) and then put that in for subnet with the CIDR mask.

Therefore, use 10.16.192.0/22 for the Subnet field.  This is used to autocalculate Broadcast address and Gateway address on a 'default' network, but in the case here also makes sure that the Address you enter is in fact in the subnet you're looking to add it to.


How to get rid of Grub and Ubuntu Studio on a USB drive

First to solve the booting problem, I suggest you to follow these instructions.

Second some explanation for understanding. You have two options in my opinion:

Option

Install Grub only on your internal drive, and have there two entries (one for the local os on your internal drive and one for the os on your usb drive) and always boot from internal drive. In that case you would want to have the os on your internal drive as default boot option, since it would always stuck, if your usb drive was not plugged in. Additionally you need to configure your BIOS to always boot from internal drive!

Option

Install Grub on both devices (with each having only its own os listed) and configure your BIOS to boot first from USB, if plugged in. The advantage of that option is, that you don't have to choose, what you want to boot. If your USB drive is plugged in, it will boot the USB, else the internal drive os will boot. (I'd prefere this Option)


I've installed other environment(Gnome) and now everything works fine


Install Lubuntu. It's an official alternative version of Ubuntu that is designed for older PC's like yours.


error E: Failed to stat /var/lib/apt/lists/partial while update ubuntu 16.04

Run:

sudo apt-get clean

And re-run:

sudo apt-get update

Fix the issue for me.


What are the criteria for a user background to become login background on user selection?

The image file for the wallpaper must have its permissions set to be world readable. Note however, that only the image file is used on the login screen. It does not use the background colors, gradients, transparency, or scaling mode settings which the user has chosen. Also, I don't think animated or automatically updated wallpapers (such as the "Slideshow" wallpaper selection) work for this.

To make the wallpaper world readable If you go to the file in the file manager, and open its properties, there is a permissions tab. The setting for "Others" in there must be set to at least "Read", and not "None."

The default set of wallpapers in Ubuntu, which is installed in /usr/share/backgrounds are all of course readable by everyone; as are the wallpapers in the gnome-backgrounds package. Custom images in the user's home directory shouldn't be, in general.


Upgrading Ubuntu will leave all of your personal files untouched, and it should leave almost all of your settings untouched.  If you have made low-level customizations by for example editing files under /etc, you may find that they need adjustment after the upgrade.


That is how linux works. If you ask it to do something, it does it without much ado. For example, if you copy a file using the terminal, it will silently do. If you install a package, it will silently do it. Only when there are errors or warnings, you will hear back from the system.
It is the administrator that installs applications. Linux considers the administrator to be smart. It is up to the administrator to know what he will be installing. He/she typically will know if the software is already there and in what version.
Indeed, it is also how Software is designed. If you ask it to install a .deb, it will do so. You would need to provide your own package manager or patch "Software" if you would want to implement confirmation dialogs.


How do I start certain services only when needed?

To stop mysql from starting at boot:

sudo echo "manual" | sudo tee /etc/init/mysql.override

To stop apache2 from starting at boot:

sudo update-rc.d apache2 disable 2

Whenever you need to start mysql or apache2 all you need to do is to start the service yourself (and you can also stop both manually).

You can use

sudo apache2ctl {start|stop|restart}

for that and

sudo service mysql {start|stop}

for mysql.


My mouse pointer is shredded / chopped up

This works for me when Ubuntu Mate 14.10 corrupts my mouse cursor. It doesn't require a restart.

Ctrl+Alt+F2
Ctrl+Alt+F7

I always get this bug when dragging an image with Eye of Mate image viewer, and a TTY switch makes it go away. Restarting also works, but changing the cursor in the appearance settings does not.


Files are not being sent to trash but being permanently deleted

Open nautilus file manager and goto edit => preferences => Behavior

Under trash select that option

I hope that helps


Q1

A1/Askubuntu: Minimize windows without them going black and white

If you only want to change the text color: KDE system settings > Workspace Appearance > Desktop Theme > Details > Color Scheme

Q2

A2/Askubuntu: How to change color/transparency of all desktop panels?


I changed /phpmyadmin/ to something different and now when I try to login the index.php doesn't work

You'll have to change the directory back to what it was originally.  The error you are seeing is just the beginning.  You can't login because the system can't find the installed files.  The installed directory doesn't exist if you have changed the directory name.

If you want to access the phpadmin browser by a different link you would have to configure this by modifying the /etc/phpmyadmin/apache.conf file.

The phpmyadmin part of http://localhost/phpmyadmin is an alias.  You can alias that to any name you wish.  Use this to make a change.

The /etc/phpmyadmin/apache.conf

Change from:

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

    Options FollowSymLinks
    DirectoryIndex index.php

Change to:

# phpMyAdmin default Apache configuration

Alias /mysecrettool /usr/share/phpmyadmin

    Options FollowSymLinks
    DirectoryIndex index.php

Now you can bring up Phpmyadmin with http://localhost/mysecrettool.  The http://localhost/phpmyadmin would fail.


Typing commands into SSH has noticeable lag

I have solved the problem by disabling Intel AMT on the motherboard.


It seems that this is not supported with the old XInput extension. You'll need to use XInput2 which reports the device id for each button press. The original author posted a series on his blog explaining some important aspects (part1,part2,part3) and a few complete code examples are available here. Since the xinput command line utility supports both extensions, you can look at its source code, especially test_xi2.c, to get an idea how to use XInput2.

xinput_calibrator uses the old XInput version (see here). While you could try using XInput2 in parallel, YMMV because there are certain limitations regarding interoperability of the two versions as described here.

However, since xinput_calibrator is known to do poor calculation of the transformation matrix, someone wrote a small python3 script (xcal) to calibrate touch screens. It is a lot simpler than xinput_calibrator and thus may be easier to adapt to your needs. Additonally, the python3-xlib library (available in ubuntu's repositories) does use XInput2 by default (if it is available), and therefore each button press event will contain the source device id.


SSH Error: No supported authentication methods available (server sent public key)

You need to change the owner of the file authorized_keys after it is created, since it will be owned by the user running the script.

Adding this as last line to your script should do the trick.

sudo chown hello:hello /home/hello/.ssh/authorized_keys


Grub_rescue error : unknown filesystem , error loading operating system

Boot from an Ubuntu live CD
Mount the partition. Create a new folder in your media folder. sudo mkdir /media/ubuntu. Then simple mount your partition to that folder. sudo mount /dev/sdxx /media/ubuntu
Run these commands

sudo mount --bind /dev /media/ubuntu/dev
sudo mount --bind /sys /media/ubuntu/sys
sudo mount --bind /proc /media/ubuntu/proc

Change the root directory to the one on your ubuntu partition.

sudo chroot /media/ubuntu/

Install grub2 again:

grub-install /dev/sdx

NB: replace sdx with the correct drive name


Ubuntu 14.04: Can't change AMD DPM settings (radeon)

I found the answer. Since I have a iGPU, the device was card1 and not card0. Hence why I couldn't change the power related files.


Connect to server through intermedieate computer

How about this one?

ssh 172.16.68.3 -l your_username_on_machine_2

Make sure the ssh service is started during system start, not after login:

https://help.ubuntu.com/community/SSH/OpenSSH/Configuring

For a GUI way to login to a second computer enable desktop sharing on the required machine and use remmina to connect via remote desktop.

Be sure you enable the required ports on firewall.


How do I get a Canon 8600F Scanner working?

From the SANE web-page - the 8800 and 8600 versions are in-fact very different even if they are similarly named.

The 8600F is a GL841 based scanner.

The 8800F is basically a PIXMA based scanner.

Thus, to answer your question directly - since they are quite different scanners, the 8600 driver cannot be "tweaked" to use the 8800F driver.

So - unless someone picks up the challenge (or Canon themselves start supporting this scanner), your scanner will not work under linux.


Found out this wasn't due to any software issues and that it was because I was trying to passthrough the primary GPU in my system causing Ubuntu to freak out.


You just need to edit the /etc/logrotate.conf file:

sudo gedit /etc/logrotate.conf

Mine by default looks like this:

# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0660 root utmp
    rotate 1
}

# system-specific logs may be configured here

All you have to do is changing:

/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1  <------ change this value to 12 to keep log files for 12 months
}

by

/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 12
}

to keep log files for 12 months.


how to upload any file to google drive using Ubuntu file manager

You can use grive to sync the files automaticly.
You can find a tutorial how to set it up here:
http://www.thefanclub.co.za/how-to/ubuntu-google-drive-client-grive-and-grive-tools

I don't think there is a way to do it through nautilus.


I would expect your network manager settings to apply and take care of resolv.conf.

You can alternatively manage this interface from /etc/network/interfaces, with a configuration similar to this one (example taken from "man resolvconf"):

iface eth0 inet static
               address 192.168.1.3
               netmask 255.255.255.0
               gateway 192.168.1.1
               dns-nameservers 192.168.1.254 8.8.8.8
               dns-search foo.org bar.com


Ubuntu 18.04 stuck after login in purple screen

If you installed the online updates on 08.23, then your problem is probably caused by gnome vs amdgpu not working together:

I cannot boot normally after online update 23.8.2018 from 16.04 to 18.04


How to restart Ubuntu with startup graphics

I have gotten myself back to a working GUI with the following steps, found in 3 sources: This AskUbuntu answer : How to set xforcevesa? got me out of grub recovery mode, and into a working login screen, with the following edit to /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="xforcevesa"

... but once logged in I still had a blank (but GUI) screen, and still had to get to a terminal with CTRL-ALT-F6.

Then this bit of GitHub advice: https://gist.github.com/erikvip/0e46a6d9ad742c81d148 seems to have gotten the default video driver working again, with the following commands:

sudo apt-get purge nvidia-*
sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

And then finally, I got back to a working desktop with advice from here: https://medium.com/@singh.shreya8/how-to-fix-blank-screen-no-icons-after-login-in-ubuntu-14-04-ubuntu-16-04-a5a58ba9a779

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo shutdown -r now

These steps have all gotten me back to a working GUI at login.
-- Bob


The trick was simple, I forgot to allow the masquerading from interface eth2. So I added the following line to /etc/ufw/before.rules (after the same line for eth1) :

-A POSTROUTING -s 172.16.2.0/24 -o eth0 -j MASQUERADE

That did the trick !


There are a few ways to do this.  My personal favourite is to login to the F1 text console as yourself. Then type

sudo service gdm restart

This should kill you previous X server and restart it.  Sometimes it fails to kill properly, but it will start another X server on tty8 (CTRL + ALT + F8)


Recommended partitioning for system with 40gb SSD and 500gb HDD

I have almost same parameters.

I placed / and swap on ssd and no separate /home. There is not enough space on SSD to waste it on having half-empty / partition.

I symlinked large directories to HDD.

I use very fast hybernation from SSD.

I did not place /home on HDD because in Ubuntu there are very many small configuration files stored in hidden directories of /home.

They are accessed on system startup and when you start any application. If you place them on HDD, the system will work much slower.


How do I update a third party app that does not have root permission

If you installed a program via the systems package manager (i.e. Software-Center, aptitude, apt-get, dpkg...), you shouldn't use this programs internal update mechanism to update this software (I even wonder why this is not deactivated, as it is done e.g. for Firefox). If there's a new version, you have about 3 choices:

wait for an updated package (which then would be updated using the systems own update tools -- again, the updater, Software-Center, aptitude...)
remove the package, and do a manual installation from the developer-provided sources
do a parallel manual installation

Never ever mix them up by e.g. replacing files the system (package manager) itself maintains, unless you know exactly what you are doing -- otherwise you might really mess up your entire system.

EDIT:

If there is an "urgent update" available for some software you are using (e.g. with fixes of bugs affecting you, or the new feature you urgently need), you might want to check with the community: in most cases, there's a special PPA (personal package archive) available at Launchpad (see: Questions tagged ppa + launchpad), which you can integrate with your package manager's configuration, and then receive new updates from there -- if they are not served via the "official repositories".


Send broadcast pop-up message to all network Ubuntu systems

You could send via SSH a notify popup, assuming sshpass is installed on the host and ssh/notify on both host/client

sshpass -p password ssh -X user@10.0.0.5 "DISPLAY=:0 notify-send "My message...""

where you'd substitute your own password, user, IP address and message.


You might want to double check that the name of your config file and the file name you use in the a2ensite command are identical. For example, if your config is in /etc/apache2/sites-available/my_vhost.conf, a command like a2ensite my-vhost.conf won't work.

It's been good practice for a long time to give your vhost configs the extension .conf. With Apache 2.2 and earlier, that was optional, since Apache 2.4 (which is shipped with Ubuntu 16.04) the .conf extension is mandatory.

After you enabled (or disabled, for that matter) a vhost, you need to reload Apache.


How do I use the "^" and "$" symbols with regular expressions in a bash script?

^ matches the beginning of a string. For example:

echo "A string with A" | grep ^A

matches only strings that start with A. Notice how the second A is not matched as it is not at the beginning of the string.

echo "Some string with A" | grep ^A

^A doesn't match anything because the string does not start with A.

Likewise $ matches the end of a string:

echo "A good string" | grep g$

g$ matches only the g at the end of the string.

echo "A string in which g is not the end" | grep g$

returns nothing because it does not end in g.

As muru pointed out in the comments ^ and $ don't match first and last lines in regular expressions, although that may be true in other platforms/programs.


In order to make your script executable, you need to use chmod +x and specify the file you are modifying.

So

chmod +x script_run_scrapers.sh

As it stands you have just run

chmod +x

but not specified the file that is to be made executable.

You have also typed cd to change directory, but have not specified where you want to change directory to. For example :

cd /home/victor

will change directory to /home/victor/

I think what you are wanting to do is change into the directory that holds your script, then modify the permissions of your script so that is is executable, then execute it ?

Lets assume your script is in the directory /home/victor/

cd /home/victor/

chmod +x script_run_scrapers.sh

That only has to be done once, then all you have to do is execute it

./script_run_scrapers.sh 300 10

To check the current permission of the file, use ls -la

ls -la script_run_scrapers.sh


How to measure power using Intel Power Gadget on ubuntu 16.04

I can recommend an alternative. It is a program we have been working on called s-tui. It shows, it part, the power usage of the CPU if your CPU supports it (Intel CPUs 2nd Core gen and newer).
Installation is explained on the github page s-tui on github

Here is a screenshot of what it looks like:


How do I change my monitor's resolution when working in a virtual terminal?

run hwinfo --framebuffer

and you will get a short or long list depending on what video card you have. The list will look something like this:

Mode 0x0335: 320×240 (+640), 16 bits
Mode 0x0336: 320×240 (+1280), 24 bits
Mode 0x033d: 640×400 (+1280), 16 bits
Mode 0x033e: 640×400 (+2560), 24 bits
Mode 0x0345: 1600×1200 (+1600), 8 bits
Mode 0x0346: 1600×1200 (+3200), 16 bits
Mode 0x0347: 1400×1050 (+1400), 8 bits
Mode 0x0348: 1400×1050 (+2800), 16 bits
Mode 0x0349: 1400×1050 (+5600), 24 bits

Then you take the Hex value to the right, for example 0x0346 and you write it down.

edit /etc/default/grub

the line that has ="quiet", make it "quiet vga=0x0346"

then you have to run> sudo update-grub

reboot the machine


Bluetooth on Ubuntu 13.10 Sony Vaio- Can I manage multiple USB bluetooth adapters?

No, at least I think probably you could't but because both USB Bluetooth dongles have the same MAC address. As you can notice, all Mitel Semiconductor bluetooth adapters have the same address, 00:11:22:98:76:54.
Usually, they look like:

With a different dongle, try this guide to connect device in a terminal.


My external hard drive is working fine in Ubuntu but not on Windows10

The drive has been incorrectly prepared/formatted.

The 2.2TB NTFS partition - and the unallocated space after that - strongly suggest "msdos" (MBR) partitioning method which is old, outdated and not proper for such big drives.

For drives of 2.2TB or higher capacity, in practical terms any 3TB drive or more always use GPT partitioning. The full capacity can then be used and formatting it as NTFS will work in Windows and Ubuntu.


Shell variable doesn't change with pipe-while-read combination

In your first case, all commands executed in the same shell. The content of COUNT is changed.

In your second case a subshell is started with piping |, and changes in the subshell have no effect in the current shell. But he subshell knows the variable COUNT and the first output is 2.


Installing dkms fails on bone stock Xubuntu 20.04

I figured it out. I was trying to install a package from a .deb file, which failed to configure because it was missing dkms, which is why I was trying to install dkms. When I purged the unconfigured package and tried again to install dkms, it worked fine.
Not sure why having an unconfigured package breaks the ability to install other packages....


You have hybrid graphics in your laptop.

There are two video adapters Intel and Nvidia.

i915 driver is for Intel.

If you run in terminal

lspci -knn | grep -EA2 'VGA|3D'

you will see both adapters and the nvidia driver.


Why vxlan tunnel disappear after ifdown bond?

I downloaded the source code of ifupdown to find out the reason. I found that the "/etc/network/if-post-down.d/ifenslave" script was invoked using "/bin/run-parts" when "iface_postdown". At the end of the script, the program will remove the master itself:

# Remove the master itself
echo "-$IFACE" > /sys/class/net/bonding_masters
rm /run/network/ifenslave.$IFACE

When I comment out "echo "-$IFACE" > /sys/class/net/bonding_masters", bond0 will not be deleted.


Trouble Updating to Version 13.10 (from Version 13.04)

I had the same problem trying to upgrade from 12.04 to 12.10. The issue seems to be that the "natty-backports" repositories are not working properly. If you disable them the problem gets solved.

To do so, edit the file /etc/apt/sources.list directly.

From a terminal:

sudo gedit /etc/apt/sources.list

then comment out the two lines that contain "natty-backports". Lines 34 and 35, I think.

Save and try running the update again. You may have to do a manual "check for updates".

Hope it works for you!


How to set the correct keyboard on Ubuntu 16.04 server?

You can use the following command

sudo dpkg-reconfigure keyboard-configuration

It should give you all the options, and the configuration persist on reboot


Press Windows button on the keyboard, type remote in the box and you can see Remote Desktop icon (Bash -> Desktop Sharing), where you can give permissions to others to view your desktop.

Turning Ubuntu Remote Desktop On

Simply put, turning on Ubuntu’s version of Remote Desktop could not be easier. You don’t need to install a thing: everything you need is built in. Simply click “Settings,” then “Preferences,” then “Remote Desktop.” You’ll be presented with a simple window of options.

Just check the “Allow other users to view your desktop” button. If you want other users to be able to control your computer, also click the “Allow other users to control your desktop” button.

This window also provides you with a couple of security options. It’s highly recommended that you enable a password, but at the very least you should set it so that anyone connecting to your machine needs your permission before continuing.

As soon as you enable remote connection you’ll be told your IP address on the local network. Write this down.

Ubuntu’s remote desktop technology is based on the existing VNC standard. This means you can connect to a Ubuntu remote desktop using any VNC client. There are more than a few VNC clients around, so if you have a favorite on any platform you can use that to connect to Ubuntu already.

Connecting From Ubuntu/Linux

Ubuntu, and most Linux distributions, comes with an excellent VNC-compatible remote desktop viewer by default: Vinagre. You can find this program by clicking “Applications,” then “Internet,” then “Remote Desktop Viewer.” Open this up and you’ll see all the desktops you can open on your current network. If not, you can always enter the IP you want to connect to directly.

Use this tool to connect to other Ubuntu desktops on your network and you’ll be controlling your computer remotely. Nifty, right? The tool can also be used to control any computer with a VNC client installed.

Connecting From Windows

Want to control your Ubuntu computer from a Windows computer? Don’t worry; it’s more than possible. You’ll just need to install a VNC client, such as TightVNC, on your Windows computer. Then you can connect to your Ubuntu machine just by entering your IP address. Varun wrote all about this in his article about establishing a remote desktop connection to Ubuntu from Windows.

Source: http://www.makeuseof.com/tag/ubuntu-remote-desktop-builtin-vnc-compatible-dead-easy/


How to enable generic microphone with an ALC 880 sound card?

Take a look on this:

and/or this:  which may help.

Please inform of your results in order to edit/add this answer for a better solution.

Good luck!


apt-get: No space left on device (12.04)

I just encountered this same problem.  I elsewhere came across a mention of inodes, and ran in my terminal to check inode usage :

  df -i

This showed inode use at 99%.  So, while my disk had plenty of space left, I wasn't able to create more files because of the limit in the number of inodes.  Some disk cleanup was the solution to my problem.


Printing Comment pages only with Acrobat

I was looking for a solution of the same problem (printing only PDF pages with annotations) and I'm sharing the script here so others may benefit.

Simply save the following as printAnnotatedPages.js and put it into the Javascript subfolder of the Adobe Acrobat installation:

// Print only pages with annotations in them
function printAnnotatedPages() {

    // Sync document annotations
    this.syncAnnotScan();

    // Check if printRange is available (Acrobat 11 or newer)
    var pagesRange = null;
    if (typeof app.formsVersion != "undefined" && app.formsVersion >= 11.0)
    {
        // Enable printRange
        pagesRange = [];
    }

    // Scan pages for annotations
    var startPage = -1;
    var new_set = false;
    for (var page = 0; page < this.numPages; page++)
    {
        // Check whether the current page has annotations
        var hasComments = this.getAnnots({nPage: page});
        if (hasComments != null) {
            // This page has annotations
            // Check whether this is a new set
            if (!new_set) {
                // Start new set of pages
                startPage = page;
                new_set = true
            }
        } else {
            // This page hasn't annotations
            // Print the set of pages (if any)
            if (new_set) {
                new_set = false;
                if (pagesRange != null) {
                    // Add set of pages to print list
                    pagesRange.push([startPage, (page-1)]);
                } else {
                    // Print this set (displays Print UI)
                    this.print({nStart: startPage, nEnd: (page-1)});
                }
            }
        }
    };

    // Final check
    if (pagesRange != null) {
        // Print the last set of pages (if any)
        if (new_set) {
            // Add the last set of pages to print list
            new_set = false;
            pagesRange.push([startPage, (page-1)]);
        }

        // Print using the range function
        if (pagesRange.length > 0) {
            var pp = this.getPrintParams();
            pp.interactive = pp.constants.interactionLevel.full;
            pp.printRange=pagesRange;
            this.print(pp);
        } else {
            // No pages with annotations
            app.alert({nIcon: 1, cTitle: "Print annotated pages",
                cMsg: "There are no annotated pages in this document."});
        }
    } else {
        // Print the last set (displays Print UI)
        if (new_set) {
            new_set = false;
            this.print({nStart: startPage, nEnd: (page-1)});
        }
    }
}

// Add menu item to the File menu
app.addMenuItem({ cName:"PrintAnnotatedPages", cUser:"Print pages with annotations...", cParent:"File",
          cExec:"printAnnotatedPages();", cEnable: "event.rc = (event.target != null);", nPos: 16 });

This adds a new menu Print pages with annotations... under File in Acrobat when there is a document opened; I've tested it and works with v9 and DC successfully. With versions before 11 - due to missing API - you must confirm the print dialog before each group of pages, though.


You are using Ubuntu 19.10 which is codenamed eoan, not disco, so it should be changed from disco to eoan in the third command too. winehq-stable is not available in 19.10, so instead of winehq-stable install winehq-staging which is the most recent testing wine version. Open the terminal and type:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main'
sudo apt update
sudo apt install --install-recommends winehq-staging

If apt complains about missing dependencies, install them, then repeat the last two steps (update and install).


The Solution

Use Tomcat to block all connections with the exception of administrator IP Addresses (which were static to us and known).
The Steps

Open the context.xml file, located in [Tomcat]\conf\context.xml, where [Tomcat] is the base location of your Tomcat server.

If you've never edited this file before, you should see a line like the following:

    <WatchedResource>WEB-INF/web.xml</WatchedResource>

Add the following line directly after the  tag:

    <Valve className="org.apache.catalina.valves.RemoteAddrValve"    allow="IP1|IP2|IP3"/>

...where IP1, IP2, IP3, etc. are the IP addresses you would like to allow.
Restart the Tomcat server.

Notes on How it Works

This valve uses regular expressions, so if you decided to get fancy with it, you certainly could (provided you know a little about Java Regular Expressions). For our purposes, the pipe ("|") character in-between the IP addresses works as an "or" operator. If the Remote Address Value matches any of these full strings, it is allowed.

Note that by default, this denies every other connection.

If you'd like to allow all connections except certain IP addresses, you can change the "allow" attribute to "deny"; all connections will be allowed except those in the deny attribute, which still uses Java regular expressions.

To my knowledge, this "valve" structure can't be stacked. That is to say, you can't do a "deny all" valve and then stack multiple types of "allow valves" on top of it. If anyone knows if this is possible, feel free to sound off in the comments.

Hope this helps!

source


It seems like GNOME mplayer solves the issue.


1 of 2 monitors turned of but it turns on after logout

So I conclude the monitor setting is user-bound, right?
  Sure.

If you use gdm as login manager, you can copy your current display settings like this:

sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/monitors.xml


Math is a component of LibreOffice that serves to create mathematical formulas. It is usually used from within another LibreOffice document. Because it is rarely used on its own, Ubuntu developers opted not to show it by default in the Application menu.
If you wish, you can reveal it in your own application menu as follows:

Copy the /usr/share/applications/libreoffice-math.desktop file to the folder .local/share/applications. .local is a hidden folder in your home folder.
Open the copy, ~/.local/share/applications/libreoffice-math.desktop, in a text editor.
Find the line NotShowIn=GNOME;. Put a comment character, #, in front of the line or delete the line.
Save the file and close the editor.

After saving that file, the item for Math will, after a short while, be shown in your menu.


Running terminal commands with a double click file

You need to create a .desktop file to start your filename. See How to Create a .desktop and The Gnome page.

Also read man desktop-file-validate;man desktop-file-install.


How do I install drivers for a Lexmark X6675 Printer?

This is my solution with Lexmark x4650 driver. Adjust to your needs.

Please execute the commands one by one:

sudo apt-get install ia32-libs xz-lzma
wget http://downloads.lexmark.com/downloads/cpd/lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz -O lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz
tar xzvf lexmark-08z-series-driver-1.0-1.i386.deb.sh.tar.gz
./lexmark-08z-series-driver-1.0-1.i386.deb.sh --noexec --target lexmark
cd lexmark
tar xJvf instarchive_all
dpkg-deb -I lexmark-08z-series-driver-1.0-1.i386.deb
mkdir raw-lexmark-archive
dpkg-deb --raw-extract lexmark-08z-series-driver-1.0-1.i386.deb raw-lexmark-archive
sed -i "/^ $/d" raw-lexmark-archive/DEBIAN/control
cat raw-lexmark-archive/DEBIAN/control
dpkg-deb -b ./raw-lexmark-archive fixed-lexmark-08z-series-driver-1.0-1.i386.deb
sudo dpkg -i fixed-lexmark-08z-series-driver-1.0-1.i386.deb

To remove the package run:

sudo dpkg -P lexmark-08z-series-driver:i386

all works, but when you go to add the ppd files, it's in /home/lexmark/raw-lexmark-archive/usr/local/lexmark/08zero/ect

For the x4650, choose lx36-46.ppd


Description of sign's "K" warning when performing apt command

I found the same issue reported on the snapcraft forum around two weeks ago here.

Seems to be a combination of incorrect translations in snap, causing it to print these warnings, and an incorrect script in apt that should hide these internal warnings...

A forum moderator called "chipaca" advised to change that internal apt script so that it correctly hides warnings from snap in that place, as intended. Quoting their reply:

  Ok, so the bug is in the file /etc/apt/apt.conf.d/20snapd.conf. It isn’t redirecting standard error as it should.
  It looks like this:

AptCli::Hooks::Install { "[ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap || true"; };

  and you want it to look like this:

AptCli::Hooks::Install { "[ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true"; };

  the best way would be to just edit that file and add the needed redirection. If that seems too arcane, you could also run

sudo perl -pi~ -we 's|from-apt|from-apt 2>/dev/null|' /etc/apt/apt.conf.d/20snapd.conf

  which should do the edit for you (and leave a backup of the old file in /etc/apt/apt.conf.d/20snapd.conf~ just in case). But you probably shouldn’t be running arbitrary commands from some rando on an internet forum. I hear it’s bad for your teeth.


Which file on a USB live installation made with UNetBootin persists file information?

Okay after a bit of googling to figure out what I was looking for exactly...

sudo mkdir /media/casper
sudo mount ./casper-rw /media/casper -o loop

And now I can mount it and get back at my files again.


Have you tried download the package from http://support-asia.canon-asia.com/P/search?model=imageCLASS+MF3010&menu=download&filter=0&tagname=g_os&g_os=Linux ? The driver included in the zip package in Linux_UFRII_PrinterDriver_V260_uk_EN/64-bit_Driver/Debian worked for me.


On upgrade from 13 to 14, wifi no longer works

Hard block usually means the wireless card is turned off, usually by a key combination on the keyboard or a physical switch. Make sure you have wireless enabled and then try again.


How to delete a .desktop entry for an app if it remains after uninstallation?

Try these commands:

sudo apt autoremove vim
sudo apt autoremove
sudo apt autoclean
Then do a reboot.


Using ubuntu server as host for mac/windows

The latest version of Ubuntu Server is 12.10, but this question is tagged with 12.04.

Does Ubuntu Server have a GUI for the use of VNC? No. So, are you going to jump hoops to get this done? Just using SSH is the normal method.

Dropbox/Ubuntu One may be  difficult to use on a headless server. Perhaps you could rsync from the server to one of your Macs or use a different, better backup solution.

The Mac is Darwin Unix so you could use NFS for file sharing, or maybe your IDE can log in via SFTP, or you could even use Samba because Windows is in the scenario.

Yes, it will be fast enough. I do it. :)


How to enable Bluetooth on Atheros AR5B225?

I know this might be a little late but to get reliable results from my bluetooth using that chipset I had to blacklist ath3k using echo "blacklist ath3k" | sudo tee /etc/modprobe.d/ath3k.conf then I edited rc.local gksudo gedit /etc/rc.local and added modprobe ath3k above the last line that needs to be exit 0 then save, exit and reboot

You do need firmware so sudo apt-get install linux-firmware

There is a timing issue with ath3k and the xhci drivers that usually stop ath3k from loading firmware but by delaying ath3k from loading this way gets the job done

lsusb output is:

Bus 002 Device 004: ID 0ac8:c40a Z-Star Microelectronics Corp.
Bus 002 Device 003: ID 046a:0011 Cherry GmbH G83 (RS 6000) Keyboard
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 001 Device 003: ID 046d:c050 Logitech, Inc. RX 250 Optical Mouse
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


How to add packages installed manually to the system's package database?

Use apt-mark. For example if you want to mark qtcreator as manually installed :

sudo apt-mark manual qtcreator

You can check which packages are (marked as) automatically installed :

apt-mark showauto

and which packages are (marked as) marked as manually installed:

apt-mark showmanual

Check man apt-mark to get more idea.


Is there a project to motivate schools to use Ubuntu?

The closest I have come up with is Ubuntu Insights case studies for schools.
I would advise you to contact Canonical directly on this and see how they can help out.
Edubuntu:
The edubuntu project is a grassroots movement, that aims to get Ubuntu into schools, homes and communities and make it easy for users to install and maintain their systems.
This is Ubuntu but specifically for schools and comes pre-installed with many school-related applications installed including TuxPaint, TuxMath, and TuxTyping, among others.

https://www.edubuntu.org/
What is the difference between Edubuntu and Ubuntu?

Other Nice links to check out:

http://www.ubuntu.com/desktop/education
https://wiki.ubuntu.com/Education/UbuntuSchools
https://schoolforge.net/


How do I make apt-get update download packages for earlier versions of Ubuntu?

If you added a PPA, it will have a file in /etc/apt/sources.list.d named after it, containing the source entry. For example, for the pi-rho/dev PPA on 14.04:

$ cat /etc/apt/sources.list.d/pi-rho-dev-trusty.list
deb http://ppa.launchpad.net/pi-rho/dev/ubuntu trusty main
deb-src http://ppa.launchpad.net/pi-rho/dev/ubuntu trusty main

Simply locate the corresponding file for your PPA, and edit it to replace wily with trusty or whichever version you want.

Whether this will work without causing problems, there's no telling.


When your notebook is booting, you should see the grub loader. It should look something like this

If you select "Advanced Options", you should be allowed to boot to a "recovery" section.

Please let me know if this allows the machine to boot.

Otherwise, you may need to re-insert the installation media, and select rescue a broken system.


Can I export the default programs to use for different file types?

The settings are stored in ~/.local/share/applications/mimeapps.list and /usr/share/applications/mate-mimeapps.list. So you could just copy the contents of these files.


How to install Canon pixma mx300 printer with ubuntu 14.04 LTS?

Instructions here may get you started, or at least point you in the right direction:

Adding Canon Pixma MX860 to Ubuntu 14.04


How can I be sure that Ubuntu runs decently on Dell Inspiron 660 with the following specifics?

Well without the graphics card (and other slight modifications) it is certified on Ubuntu 12.04 LTS


How to resize a crypt-luks partition that takes all hard drive?

Support for resizing LUKS partitions is being added right now to KDE Partition Manager. Grow support is already done in unreleased git versions and shrinking will be added soon. It will probably take a while until it reaches distributions and in particular Ubuntu but it will work at some point.

Growing and shrinking LUKS in action:
https://www.youtube.com/watch?v=ZwiyCC9gvHM


First, the black "screen problem" you described isn't actually a problem.  That is a part of the installation process.  You have, as you mentioned, the option to go straight to install, or to actually boot to Ubuntu and use it ("Try Ubuntu without installing it").

Also, for your convenience you can run the install process right from the Try Ubuntu environment, which is a fully functioning Ubuntu session, which the availability of all the tools of a full install.  The reason I say all the tools, is because, just as with a full install, you have the main tool apt-get with which to install just about anything you want.

Once you're at the Desktop in Try Ubuntu, you'll have a Desktop icon named Install Ubuntu.  You can click on that Icon to start the process.  During the process if you have any questions concerning any of the steps you can easily switch to another Window or browser and research the question.

The install is very seamless.  If you have a specific partition where you want to install Ubuntu, just indicate that partition.  All your other partitions will be untouched.

Ubuntu does work nicely on UEFI

You have the option of booting into Ubuntu in either UEFI or Legacy mode.  Ubuntu will recognize the mode and install the mode accordingly.  If you want to be have the option for either Booting Windows 10 (in UEFI mode) or Ubuntu, then you have to use the UEFI mode.  If you won't be using any version of Windows on now or later, it wouldn't matter which mode you select.  All the new Intel based machines have UEFI support.  So the UEFI mode installation will work in all machines from the past 5 years or so.  Older machines might not boot the UEFI operating systems.

The only part of the UEFI machine functionality that isn't currently available is the Secure Boot.  Just disable that option.  Windows 10 will still work fine and Ubuntu in UEFI will install and work fine as well.

This answer is addressing your topic Ubuntu image does not want to work on UEFI.  I hoped to clarify that it does work nicely with UEFI.  The ISO has two boot loaders, one for UEFI and one for Legacy.


Pack your_dir in a encrypted archive your_archive.tgz.gpg (symmetric encryption):

tar -cz your_dir | gpg -c -o your_archive.tgz.gpg

Unpack it:

gpg -d your_archive.tgz.gpg | tar xz

See the docs of GPG for how to use asymmetric instead of symmetric encryption.


40_custom / how to keep current with kernels

You are editing the wrong file. 40_custom is for adding a custom menu entry not found by grub2 and will add a single entry.

You need to edit /etc/default/grub

sudo nano /etc/default/grub

and add the kernel optionsacpi_osi=Linux intel_idle.max_cstate=0 processor.max_cstate=1 to the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash line, like so

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux intel_idle.max_cstate=0 processor.max_cstate=1"

Then update grub and those options will be added to existing grub entries as well as all kernels installed via apt-get , updates, or software center.

sudo update-grub

Boot repair will do this graphically if you prefer.

To install, see https://help.ubuntu.com/community/Boot-Repair#A2nd_option_:_install_Boot-Repair_in_Ubuntu

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
# The last line will install and run boot-repair
sudo apt-get install -y boot-repair && boot-repair

Use the grub options tab


Upgrade from Ubuntu 16.04 to 18.04 context menus broken

Turns out my GTK theme was broken, simply switching to any other theme did the trick.
Specifically on an LXLE installation, I ran lxappearance and chose another theme.
For other distros, simply go to ~/.config/gtk-3.0/settings.ini and edit gtk-theme-name.


Will video drivers after upgrade to 13.04 still work?

The latest version of the driver was released yesterday, it should work perfectly after the upgrade. just make sure you have the latest version.


Windows Boot Manager complains UNetbootin has some files missing

You can try to use another tool in Windows in order to create a USB boot drive with Ubuntu.

A cloning tool, that clones the iso file to a USB pendrive:

Win32 Disk Imager
An extracting tool, that extracts the content from the iso file and rearranges it when written to a USB pendrive:

Rufus

(Unetbootin is an extracting tool)
See the following link, if you want more detailed information,

help.ubuntu.com/community/Installation/FromUSBStick


How do I view files in list form and view hidden files from unity home?

This opens Nautilus file manager with folders and files shown in icon view. I would like list view and hidden files.

If you just need to get to the settings for Nautilus, just go to Edit->Preferences. There you can select to show list view and hidden files.


Did you just copy the iso file to the disk or did you burn it with an iso writer like win32diskImager?
If not, do that. If you did that, check the cd to see if you can read it.


"Operating System Not Found" error after overwriting Windows with Ubuntu

Answer copied from the comments left by OP:

Disabling Legacy/CSM did the trick.

Image credits


Check if torrent file is complete before copying

As Alex suggested put completed torrents in another folder.

Beside check your if qbittorrent has a command line option to do a recheck.

Deluge for example has a "recheck" see: https://whatbox.ca/wiki/Deluge_Console_Documentation


What does this command do (find / -name gcc 2>/dev/null)?

Let's break it up for better understanding:

find / -name gcc

searches through the root dir (the / dir, that contains /etc, /home and so forth) for a file with the name gcc. This search is done recursively, meaning subdirectories, sub-subdirectories and so on get searched as well.

The > operator redirects the output. In this case, 2> redirects the output of the standard channel for error messages, stderr.

ls > the_list.txt # writes the output of ls to a file
ls 2> the_list.txt # writes the output of ls on stderr to a file

/dev/null is a pseudo device that basically throws away everything that gets written to it. You can use it if you have to write stuff somewhere, but basically just want it gone.

So ls > /dev/null means "redirect the output of ls to /dev/null", or just "don't bother me with the output". As above, ls 2>/dev/null sends what's written on stderr to /dev/null.

The complete command

find / -name gcc 2>/dev/null

therefore means "search on the whole system for a file called gcc, but don't show me any error messages that occur while doing so".


why does grsync not appear after launch?

I've encountered me same problem. After activating the multideskop /multi workspaces (How do I turn on workspaces? (Why do I only have one workspace?)) in Unity, the GRsync Windows appears, on an another desktop. And I can move it to my main desktop.


Change Backups (Déjà Dup) encryption password

You have to start a new backup "chain", so create a new folder on your backup device and tell Deja-Dup to backup into that. It will start from scratch including asking you about the password.

If there is a way to recover the password for the old backups, I do not know it.


Where can I find dictionaries for Opendict and Goldendict?

You can use the "WordNet 3" dictionary which is supported by GoldenDict. To install it: Extract the Zip file and put it somewhere in your system then do the following:
Edit>Dictionaries>Add>Then select the extracted folder and click "Apply".

You can download WordNet 3 from this link:
http://en.sourceforge.jp/projects/sfnet_goldendict/downloads/dictionaries/WordNet3.0_1.0.zip/

Here is a collection of dictionaries:
http://www.stardict.org/download.php


To reinstall a mysql database:
(do this as root)
mysql>source /path/to/backup/mydb.sql

phpMyAdmin did tell me about a lot of errors, I think caused by None values in cells. I clicked 'Ignore all'
But my tables are back with the data!


How do I enable desktop effects with hybrid Nvidia/Intel graphic card?

I had similar problem on ubuntu 11.04 with optimus.
After fresh install there was nvidia driver (or nouveau - I dont rememeber) set in xorg.conf, but you cant directly use nvidia with optimus. Try to delete or rename the file /etc/X11/xorg.conf, or try to change the settings to use intel card. Bumblebee has its own config file for nvidia, so dont worry


How to do window placement without the numpad?

Install the CompizConfig Settings Manager.

Open CCSM and locate the "Grid" options under "Window Management". The first tab is bindings which has the key commands for window placement.


Recover deleted files in VeraCrypt container

Unfortunately, I had to give up on the remaining deleted files. About 75% were irreversibly lost, no trace of them left on the volume. Not the end of the world, but still a nuisance. Anyway, some files could be restored by using a tool named Recuva. I can recommend it! Just pay attention to what you install alongside. It might come with some adware.


indicator-cpufreq disappearing from top bar

(Unity) Press Alt+F2, type indicator-cpufreq and click on the matching result. No terminal needed.

To have the indicator-cpufreq program run at startup (so you don't need to start it yourself), go to Startup Applications (gnome-session-properties), and on the right hand side where you have Add, Remove, Edit, click Add. Make the name and description whatever you want, but make the command box contain indicator-cpufreq.

Edit: The default entry in startup applications for indicator-cpufreq is this:

Name: CPU Frequency Scaling Indicator
Command: indicator-cpufreq
Description: An indicator for monitoring and switching CPU frequency scaling


Search box missing in Ubuntu Software 20.04

as @Gunnar Hjalmarsson mentioned, there is a tiny magnifying glass icon in the top left corner when the "explore" tab is selected.


Tool for viewing available DBUS messages I can send to an application

Have you tried d-feet

sudo apt-get install d-feet

Homepage


Do find command options "-o=r" and "/o=r" give the same results?

Yes, those are the same. The difference comes when there is more than one permission listed, in which case, - will require all of the permissions be set on the files it lists, while / will require any of the permissions be set on the files it lists.

For example, -perm -o=rw will find files which others can both read and write, while -perm /o=rw will find files which others can read as well as files which others can write.

See the man find section on the -perm option.


How to enable 24bit true color support in Gnome terminal?

24bit support is enabled by default but gnome-terminal has to be in version linked against libvte >= 0.36 (as stated on the page you mentioned). Which unfortunetly is not the case in the latest ubuntu 14.04 (at the time of writing).

As a workaround you may try:

sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update
sudo apt-get install gnome-terminal
sudo add-apt-repository -r ppa:gnome3-team/gnome3-staging

Last step removes their ppa - it's optional but be carefull, there is whole gnome3 at that ppa.

Oh and the screen:


Deployment of OpenStack with Autopilot excessively slow (or perhaps nonfunctional)?

This seems to be an issue with the deployment of software by Juju, which is hardware-agnostic. It attempted to deploy Ceph on servers with a single disk. Though I'm sure this could be remedied by selecting the hosts for each program, we merely added a second disk to each server and the issues resolved themselves.


To check the file systems on your Linux partitions...

boot to the GRUB menu (where you select which OS to start)
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /dev/sdb5
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fsck -f /dev/sdb5
repeat the fsck command if there were errors
type reboot


You chose wrong package: xclock is available in x11-apps package.
Check on the https://packages.ubuntu.com.

So the correct command is:

sudo apt-get install x11-apps

Also if you do not know/remember package name you can write its executable name in terminal to get the suggestion from command-not-found tool:

$ xlock

Command 'xlock' not found, did you mean:

  command 'lxlock' from deb lxlock
  command 'slock' from deb suckless-tools
  command 'vlock' from deb vlock
  command 'flock' from deb util-linux
  command 'rlock' from deb ruby-lockfile
  command 'wlock' from deb sendfile
  command 'xclock' from deb x11-apps
  command 'mlock' from deb mlock

Try: sudo apt install <deb name>

$ xclock

Command 'xclock' not found, but can be installed with:

sudo apt install x11-apps

If you really mean xlock, then according to its Ubuntu man xlock-page it is removed after Ubuntu 12.04 LTS

I found PPA ppa:chaocrator-ppa/anarchy (it has package for 16.04 LTS, but not for 18.04 LTS) with needed xlockmore-gl package. You can install it with commands below:

cd ~/Downloads
wget http://ppa.launchpad.net/chaocrator-ppa/anarchy/ubuntu/pool/main/x/xlockmore/xlockmore-gl_5.31-0~xenial_amd64.deb
sudo apt-get install ./xlockmore-gl_5.31-0~xenial_amd64.deb


screen goes blank when loading ubuntu 12.04 LTS for the 1st time

Some nVidia graphics solutions do not work out of box with Ubuntu.
[b]Workaround:[/b] https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia
The greeter is malfunctioning.
When using lightdm, sometimes I have to restart because there's nothing on screen but it clearly booted.
[b]Workaround:[/b] Restart until it works.
Another monitor is plugged in.
Do you have a TV, or did you have another monitor plugged in? Unless I explicitly go to Settings, and disable other monitors, sometimes I get a black screen at start up.

[b]Workaround:[/b] Unplug the other monitor(s) and restart. If there's a display toggle try that.


How does tar command work for installing Node js

The tarball directory structure is like this:

$ tar tf node-v6.10.1-linux-x64.tar.xz | head
node-v6.10.1-linux-x64/
node-v6.10.1-linux-x64/bin/
node-v6.10.1-linux-x64/bin/npm
node-v6.10.1-linux-x64/bin/node
node-v6.10.1-linux-x64/share/
node-v6.10.1-linux-x64/share/man/
node-v6.10.1-linux-x64/share/man/man1/
node-v6.10.1-linux-x64/share/man/man1/node.1
node-v6.10.1-linux-x64/share/systemtap/
node-v6.10.1-linux-x64/share/systemtap/tapset/

When you extract this archive without any other options in /usr/local, you get this:

/usr/local/node-v6.10.1-linux-x64/
/usr/local/node-v6.10.1-linux-x64/bin/
/usr/local/node-v6.10.1-linux-x64/bin/npm
/usr/local/node-v6.10.1-linux-x64/bin/node
/usr/local/node-v6.10.1-linux-x64/share/
/usr/local/node-v6.10.1-linux-x64/share/man/
/usr/local/node-v6.10.1-linux-x64/share/man/man1/
/usr/local/node-v6.10.1-linux-x64/share/man/man1/node.1
/usr/local/node-v6.10.1-linux-x64/share/systemtap/
/usr/local/node-v6.10.1-linux-x64/share/systemtap/tapset/

So, a new directory is created in /usr/local, and the files get dumped there.

However, with --strip-components=1, one directory component from the extracted path is removed, so node-v6.10.1-linux-x64/bin/ becomes bin/ and node-v6.10.1-linux-x64/bin/npm becomes bin/npm:

/usr/local/
/usr/local/bin/
/usr/local/bin/npm
/usr/local/bin/node
/usr/local/share/
/usr/local/share/man/
/usr/local/share/man/man1/
/usr/local/share/man/man1/node.1
/usr/local/share/systemtap/
/usr/local/share/systemtap/tapset/

And /usr/local/bin is already in PATH, so you don't need to do anything else to execute npm and node.