Ubuntu shares not visible on the network

koogee answered this in a comment:

  Turned out to be a simple firewall issue. I disabled it on the client laptop with sudo ufw disable and everything started working. Hope this helps someone.


How do I reset my Unity configuration?

The above might be a useful thread on how to reset unity in 12.10.

My apologies; this should probably be a comment not an answer but I don't have comment privileges yet.  If someone wants to edit this answer and convert to a comment I'd be delighted.


Proxy settings for all applications

To access system-wide proxy settings, open the System Settings application from the dash, go to Network settings, and then go to Network proxy on the left.

Proxy settings for just Chrome

If you want to set proxy options for just Chrome (and not system-wide), the only way I've seen to do that in Ubuntu is by using a Chrome extension. One that I've used for a while is Proxy SwitchyOmega, which features:

Support for HTTP, HTTPS, and SOCKS 4 and 5 proxies
With the Quick Switch option, one-click switching between the proxy and a direct connection or between multiple proxies
A list of domain names that should automatically skip the proxy and use a direct connection instead
Optional Chrome Sync support so that Chrome on your other computers (or new computers in the future) can automatically get the same Proxy SwitchyOmega settings


This link provides some good (mostly still relevant) steps:

Basically, if using Chrome, go to:

chrome://gpu

You will see a list of GPU features the browser can use.  On my up to date Intel graphics system, I see this:

Video Decode: Software only, hardware acceleration unavailable

I expect you probably see something similar.  You can try the suggestions on that link of getting video decode working, but I can tell you that you might not get it all working, and it also might not be stable (graphics errors, crashes, etc).  The options to change are all in:

chrome://flags (option: "Override software rendering list")

Again, be warned, these can destabilize your browser performance.

The Ubuntu Desktop team has also been working on this problem and has a call for testing out for 18.04 for Intel.  In case anyone gets to this question/answer and has other graphics cards.


Computer goes into sleep mode, but won't wake up

Install the intel Microcode Package for your MB/CPU

Looks like you have an Intel board and might want the microcode for it:

 sudo apt install intel-microdcode

Next, make sure you have the latest Video Drivers

Updated graphics drivers, when using NVIDIA cards, will fix many problems, and so it is a good place to start. I see you are using the open source "nouveau" driver, so we will start with updating that. First add the PPA to provide latest drivers:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade

Now reboot and see if it works for you. If so, you are done! If not, try using the PRO drivers:

Install NVIDIA Pro Drivers (Optional)

If the latest neoveau drivers don't work, you can try the pro drivers instead. There are two options, 390 and 396. The 396 breaks my system, so I will give instructions on how to install 390 as well as how to try the 396 (and fix if needed).

To install the 390 driver:

sudo apt install nvidia-driver-390

And then reboot to test your system... if it works you can either stick with that or try the 396 diver:

sudo apt install nvidia-driver-396

And reboot... if this driver prevents X from starting, switch to a new TTY with "Ctrl+Alt+F3", log in and do the following:

sudo apt purge nvidia-driver-*
sudo apt autoremove && sudo apt autoclean
sudo apt install nvidia-driver-390
sudo reboot


Prevent notifications from filling notification tray

You can go to Settings, then Applications, then you press on that application you don't want to have notifications and last to turn off that is named Notifications.


Audio is no longer working, after trying to fix In-game sound for playonlinux

can you try to remove the latest 3.13.0-46 kernel and install the 3.13.0-45 kernel with the following command:

sudo apt-get update
sudo apt-get remove linux-image-3.13.0-46-generic linux-headers-3.13.0-46 linux-headers-3.13.0-46-generic

And install with:

sudo apt-get install linux-image-3.13.0-45-generic linux-headers-3.13.0-45 linux-headers-3.13.0-45-generic

Finally, reboot you computer to see if it works.


How can I make yEd look more integrated into Ubuntu?

yEd uses Java's metallic theme by default. What you want is Java's GTKLookandFeel theme. Normally you would be able to do this by starting yEd with:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar yed.jar

Due to a bug in yEd/Java this does not work currently. For now you will have to apply the
following workaround:

1.) Navigate to yEd's installation folder

cd $HOME/.yed

2.) Edit yed.jar and delete the class causing the theme issues

mv yed.jar yed.zip
zip -d yed com/jgoodies/looks/plastic/Plastic3DLookAndFeel.class
mv yed.zip yed.jar

You can now start yEd in GTK mode.

With some Java versions you might run into a scenario where all fonts in the GTK theme are formatted in bold. You can troubleshoot this by uninstalling a korean font package:

sudo apt-get remove --purge  fonts-unfonts-core

If you don't feel like removing packages just to troubleshoot Oracle's bugs you can try out the workaround outlined in this comment.

References:

http://forum.ubuntuusers.de/topic/java-programm-yed-aussehen-anpassen/#post-5244382

https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/937200


How to recover deleted folders or files (by shift+delete) from an NTFS partition

There are two command line tools available for Ubuntu to recover deleted files on an NTFS partition:

ntfsundelete: see details in this answer and in another answer here.

testdisk: see a detailed guide from CG-Security

Just to mention this in case you are uncomfortable with the command line. There is a graphical tool NTFS undelete available for Windows only.


Button padding only working on default theme

Here lies the answer:

A lot of Ubuntu users requested this guide, because the new Ubuntu 11.10 operating system doesn't provide a tool to add new GTK or icon themes. Why? Because of the GNOME 3 desktop.

How to Install GNOME Themes in Ubuntu 11.10

Tutorial


mysql access from netbeans 8.1 is very slow

Can you check what is the connector that NetBeans is using to connect to MySQL? It might be the slow connector for MySQL which might be causing the slowness.

You can get the latest MySQL connector from here

Moreover when you are connecting to MySQL from Workbench you are connecting via SSH Tunnel which is way too faster.

Apache Derby is in-memory database so comparing it to connect to MySQL from Netbeans IDE is a not very relevant. But if you are connecting to Derby and MySQL from NetBeans via JDBC driver then it's comparable...most probably you need to focus on the MySQL connector that is being used in NetBeans IDE to connect to MySQL.

When i am connecting to MySQL from the Java IDEs...i generally do all the DDL operations from the MySQL shell and only DML operations i perform from the Java IDE(via Java programs).


Can't install libdb4.8 and libdb4.8+++ on Ubuntu 19.04

The package is not available as the source and binaries were removed from the Ubuntu archive during Trusty development. They were obsolete in Ubuntu and Debian.


Why is full compression not used during squash?

Presumably because xz (LZMA) compression requires disproportionately more CPU time for both compression and decompression, something that does make a difference when loading the system from a live USB stick, for instance. See a wider discussion of xz vs gzip on Stack Overflow.

In a similar vein, there is an open blueprint for using xz to compress packages in the Ubuntu archive. This appears to be on hold for the moment on the basis it offers relatively little benefit.


I solved it and now Vdebug is working.

Enable xdebug in PHP
Edit your php.ini file and add the following under the "Module Settings" section:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

zend_extension=/path/to/my/xdebug.so

[debug]

; Remote settings

xdebug.remote_autostart=off

xdebug.remote_enable=on

xdebug.remote_handler=dbgp

xdebug.remote_mode=req

xdebug.remote_host=localhost

xdebug.remote_port=9000

; General

xdebug.auto_trace=off

xdebug.collect_includes=on

xdebug.collect_params=off

xdebug.collect_return=off

xdebug.default_enable=on

xdebug.extended_info=1

xdebug.manual_url=http://www.php.net

xdebug.show_local_vars=0

xdebug.show_mem_delta=0

xdebug.max_nesting_level=100

;xdebug.idekey=

; Trace options

xdebug.trace_format=0

xdebug.trace_output_dir=/tmp

xdebug.trace_options=0

xdebug.trace_output_name=crc32

; Profiling

xdebug.profiler_append=0

xdebug.profiler_enable=0

xdebug.profiler_enable_trigger=0

xdebug.profiler_output_dir=/tmp

xdebug.profiler_output_name=crc32

Try it out

Everything should be ready to go now. Restart apache and run phpinfo() to see if any xdebug information comes up. If it doesn't, then the apache error_log + google are your friends.

Otherwise, you are ready to run the debugger inside vim.

Open a PHP script in VIM that you can access from your localhost
Open that same PHP script in your web browser
Add F5. You should see at the bottom of VIM like "waiting for a new connection on port 9000 for 10 seconds..."
Within the next 10 seconds, refresh the browser page with the ?XDEBUG_SESSION_START=1 on the end of the URL.
Go back to VIM and you're in the debugger in all its glory.
Don't forget: to switch between windows in VIM, press CTRL-w-w.

Source -it applies to Ubuntu though it refers to another linux distribution-

Hope this helps.


Ubuntu 18.04.4 LTS Charging issue with dell latitude E5420

The issue appears to have been the battery was worn out. I went into bios to see what it said for charging and adapter wattage, while on that screen, I unplugged the power and let it go until it died. It got down to 1% then stayed there for about 20 minutes and finally shut off. Then I plugged the power back in and it charged up to 43%. However, when I unplugged the power with ubuntu up, it only lasted 15 minutes, then shut down.

I ordered a new factory sized battery, it came at 61% charged, so I ran it until it got down to 2% and shut it down, then plugged the power back in. After an hour or two, the charge light shut off and when I powered it up, it showed 100%.

I then bumped the screen to 100% bright and had a movie playing in full screen via vlc for over 3 hours until it got down to 2% again and I charged it back up.

This is what I get from upower:

Latitude-E5420:~$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               Samsung SDI
  model:                DELL 5CGM4A7
  serial:               30030
  power supply:         yes
  updated:              Fri 27 Mar 2020 10:50:59 PM CDT (37 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    energy:              51.3708 Wh
    energy-empty:        0 Wh
    energy-full:         51.3708 Wh
    energy-full-design:  48.84 Wh
    energy-rate:         0.0111 W
    voltage:             12.477 V
    percentage:          100%
    capacity:            100%
    technology:          lithium-ion
    icon-name:          'battery-full-charged-symbolic'
  History (charge):
    1585367459  0.000   unknown
  History (rate):
    1585367459  0.000   unknown

And from acpi -V

Latitude-E5420:~$ acpi -V
Battery 0: Full, 100%
Battery 0: design capacity 4400 mAh, last full capacity 4628 mAh = 100%
Adapter 0: on-line
Thermal 0: ok, 25.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 107.0 degrees C
Cooling 0: Processor 0 of 10
Cooling 1: LCD 14 of 15
Cooling 2: Processor 0 of 10
Cooling 3: x86_pkg_temp no state information available
Cooling 4: Processor 0 of 10
Cooling 5: intel_powerclamp no state information available
Cooling 6: Processor 0 of 10

The pack states that it's 65WH and 5500mah, so I guess I'm not getting full capacity. Then again, it was a $30 pack off amazon. It's far better than the 5 minutes I was getting before and the lack of charging.


Delete any previous launcher for Eclipse you may have made, this will create a completely new one.

Run these commands:

# Installs gnome-desktop-item-edit, a useful GUI to configure .desktop files
sudo apt-get install --no-install-recommends gnome-panel

# Symlinks eclipse to /usr/local/bin, allowing you to launch it from a command line
# If eclipse is not in /opt, change this to point to your eclipse executable
sudo ln -s /opt/eclipse*/eclipse /usr/local/bin/eclipse

# Creates a new .desktop file in '/usr/share/applications'
sudo gnome-desktop-item-edit --create-new "/usr/share/applications/eclipse-ide.desktop"

Then,
put these into the fields, leave others default (You can actually put whatever you want in these, except "Command"):

Name: "Eclipse IDE"
Command: Click the Browse button and find the eclipse executable file
Icon: Click the springboard icon (towards the top left), then browse to the file icon.xpm, in the same folder as the eclipse executable

Note: The default Eclipse icon is very bad with Unity, you can't tell if it's launched or not. I personally use this icon here. Just choose this downloaded icon instead of the default icon.xpm

Comment: Anything you want, I put (from Wikipedia)

  Eclipse is a multi-language IDE comprising a base workspace and an extensible plug-in system for customizing the environment.

Click "OK", then search the Dash for your new icon.

See this screenshot for reference only:


Permission on shared folder are correct but files can't be saved

Another possible solution is to set the "setgid" bit on your shared directory. This means that all files/directories created in the shared dir will automatically belong to the group. Like this:

chmod g+s <directory name>

You may also have to do this on existing subdirectories. In the future, when new directories are created, the setgid bit will automatically be turned on for them.


NVidia GeForce GT630 laggy in Ubuntu 14.04, specially flash player based videos. Why?

While using the proprietary driver (as indicated in Hatoru's response) will definitely increase the performance, it will also increase the energy consumption (and therefore decrease the battery life).

So, if you want to get maximum performance for applications that require it, and maximise the battery life for the rest, the only option as of now is to use the proprietary driver (as indicated by Hatoru) in combination with Bumblebee. Installation instructions are detailed in https://wiki.ubuntu.com/Bumblebee#Installation:

Enable the Universe and Multiverse repositories - you need to do this to allow the bumblebee and nvidia packages respectively to be installed.

Install the Nvidia proprietary driver (in this case 319, you should use the latest one available for your hardware in the Ubuntu repositories):

sudo apt-get install nvidia-319-updates nvidia-settings-319-updates

Install Bumblebee:

sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

Configure Bumblebee, editing /etc/bumblebee/bumblebee.conf:

Driver=nvidia
KernelDriver=nvidia-319-updates
LibraryPath=/usr/lib/nvidia-319-updates:/usr/lib32/nvidia-319-updates
XorgModulePath=/usr/lib/nvidia-319-updates/xorg,/usr/lib/xorg/modules

Then restart, and you are ready to run programs using the Nvidia card with:

optirun command


Reinstall in new hdd restoring home folder. What happens to apps?

I use dpkg to export list of installed apps. I run it as part of my regular rsync script so backup has latest list.

From old install

dpkg --get-selections > ~/my-packages

From New install

sudo dpkg --set-selections < my-packages
sudo apt-get -y update
sudo apt-get dselect-upgrade

IF you get this error:
dpkg: warning: package not in database

sudo apt-get install dselect
sudo dselect
   -> Update
   -> Install

Also how to list applications you installed.
http://askubuntu.com/questions/17823/how-to-list-all-installed-packages

http://askubuntu.com/questions/464701/find-out-what-packages-were-installed-after-os-install

But do not just import all sources as that can lead to issues of versions:

http://askubuntu.com/questions/2038/backup-software-sources


How do I get the filename from inotifywait events?

The cleaner way is illustrated in this blog entry:

inotifywait -m -r -q --format '%w' bootstrap/ | while read FILE
do
  echo "something happened on path $FILE"
done


Digging around, I've found one possible solution. This involves setting two hotkeys, and the usage of gsettings.

After configuring your proxy settings, you will need to go to Settings > Devices > Keyboard and create one custom hotkey that initiates the following command:

gsettings set org.gnome.system.proxy mode manual

Then create a second one for:

gsettings set org.gnome.system.proxy mode none

As the proxy settings remain saved whether enabled or not, you can then assign an 'enable' key for the first command, and a 'disable' key for the second.

Confirm the change by pressing your first hotkey and navigating to Settings > Network, then navigating away, pressing your second hotkey, and returning to the network settings. Assuming Tor is set up correctly, and passes https://check.torproject.org, this should be all that's needed.

Perhaps not the most ideal solution, but it will do for now, unless someone comes up with a toggle on the activity bar or something.

EDIT:

A slight improvement on the above, is to use one hotkey that checks the current state of the proxy mode, then sets it to the opposite. Grab your text editor and create a new file with the following contents:

case "$(gsettings get org.gnome.system.proxy mode)" in
"'none'") gsettings set org.gnome.system.proxy mode "'manual'"
notify-send "Tor Enabled";;
"'manual'") gsettings set org.gnome.system.proxy mode  "'none'"
notify-send "Tor Disabled" ;;
esac

This will also display a message showing the current state of your proxy settings.

Save the script somewhere, then reference the file location when creating a custom hotkey.


Using shortkeys to search the internet for a term selected in a text editor/viewer running under Wine?

This is a limited and incomplete answer, but maybe useful.

A program that runs under Wine and can search as required in the question is PDF-Xchange Viewer. The feature is part of this excellent program, only that it is not done by shortkey, but from the context menu.

So, selecting a text:

(the menu is already customized)

To add new options:

In this way the default Ubuntu web browser opens as expected.

(It is an example of text selected in a Wine program and searched outside Wine.)


Perhaps you installed the 32-bit version of Ubuntu. To check, open up a termianl and type uname -p. That will tell you if you have 32-bit (in which you'll get iX86, where X can be anything) or x86_64, 64-bit. You should have 64-bit. If not, it's time to back up and reinstall. Also, you have 12GB of RAM, which is quite a bit. I think that you should set your swappiness to 3. For information on how to do this, read the first answer here. Now, if you do have 32-bit Ubuntu, change the swappiness after you install 64-bit Ubuntu, as it will benefit you greatly. Use a task management tool like GNOME System Monitor (preinstalled with Ubuntu) to check your processor use. Maybe it's your processor that's slow. P.S. If you have a solid-state drive, set your swappiness to 0. If you have a solid-state drive, you NEVER EVER EVER want to make or use swap on it. If you have an SSD, I suggest deleting that swap right now.


Until and unless a website is hosted on a dedicated IP, you will never be able to reach the website/domain by typing in the IP in the address bar even though you will be able to ping the ip address. This is the reason, Hosting companies are able to host thousands/millions of domains on a single IP via shared hosting plans and as a result the hosting charges are less.


UEFI settings won't save and can't boot from USB

Issue that I (and many other Ubuntu users) was facing is described in this OMGUbuntu article.

A workaround using rEFInd is proposed on Lenovo forums.

Further description of the problem, that seems to be caused by Ubuntu enabling Intel SPI driver that's still in development, is available in this OMGUbuntu article.

Solution proposed in the OMGUbuntu article above:

Install UKUU - Ubuntu Kernel Update Utility
Install Linux 4.14.9
Reboot and select Linux 4.14.9 in GRUB
Boot fully
Shut down
Boot to BIOS, should work now

Not really sure why, but I can confirm it works, now I can boot from non-Ubuntu live-USB and change and save UEFI/BIOS settings.


Auto login with Kubuntu 14.10 KDE 5 plasma

Go to KDE settings
Go the "Login Screen" menu.
Go the Convenience tab.
Enable the "Auto-Login" checkbox.
Select your username from the dropdown.
???
Profit.


DEB Equivalent for RPM's 'replace' utility

This is an alternative way for replace 2.24 which is not from source using alien to install the rpm file since this is an app that is already part of Red Hat / CentOS.

Feel free to copy and paste the following lines in a terminal window.

cd /tmp
sudo apt install alien
wget https://extras.getpagespeed.com/redhat/7/x86_64/RPMS/replace2-2.24-1.el7.x86_64.rpm
sudo alien replace2-2.24-1.el7.x86_64.rpm
sudo dpkg -i replace2_2.24-2_amd64.deb

Then run the new app

$ replace2
replace 2.24 (C) Richard K. Lloyd 2004 - The sane person's alternative to sed

Syntax: replace2 [-?] [-A] [-b] [-c startcol] [-d tempdir] [-e] [-f]
                 [-h] [-i] [-L] [-l linenum] [-m maxreplines] [-n] [-P] [-p]
                 [-r|R] [-s] [-T] [-t maxtimes] [-u backupsuffix] [-v]
                 [-w] [-x suffix [-x...]] [-z]
                 old_str new_str [-a old_str new_str...] [filename...]

-? displays this syntax message.
-A forces the program to assume all files are text files. Normally, the first
   256 bytes are examined to auto-determine if a file is text or binary.
   This option is deprecated and may be changed or removed in a future release.
-a allows extra pairs of strings to be replaced in order.
-b forces the program to assume all files are binary files.
-c startcol starts the string replace from column 'startcol' rather than the
   first column.
-d specifies the temporary directory for storing modified files. If not
   supplied, the default directory is $TMPDIR or, if that isn't set, /tmp.
-e makes search case-sensitive. new_str exactly replaces old_str
   with no case-adjustment to new_str.
-f forces the update of files without any .cln backup.
-h indicates that replacement pairs are binary hex data.
-i interactively prompts the user to confirm if they want strings replaced in
   next file. Specifying -i -i switches to prompting for each replacement.
-L follows soft-links specified on the command line.
-l linenum starts the string replacement from line 'linenum' rather than the
   first line.
-m maxreplines specifies the maximum number of lines in a file that should
   have string replacements.
-n displays what strings would be replaced without actually replacing them.
   It also switches on verbose mode.
-P pre-pads new_str with leading spaces if it is shorter than old_str.
-p pads new_str with trailing spaces if it is shorter than old_str.
-r or -R recurses down the current directory tree (if no filenames are given),
   replacing strings in all files found. Use -x to narrow the recursion.
-s relaxes the condition that old_str has to match a 'word' i.e. it replaces
   old_str even if it is a substring of a 'word'.
-T retains the timestamps of the original unmodified files.
-t maxtimes states the maximum number of times a string can be replaced
   in any single line of a file.
-u backupsuffix specifies the backup suffix for the unmodified file.
-v increments (switches on) verbose mode, reporting a summary of replacements
   if specified once and all replacements if specified twice (i.e. -vv).
-w recursively replaces strings in all Web-related source files in the current
   directory tree. Equivalent to "-r -x .html -x .htm -x .asp -x .js -x .css
   -x .xml -x .xhtml -x .shtml -x .jsp -x .php -x .php3 -x .php4 -x .pl".
-x suffix specifies a case-insensitive filename suffix to look for when
   recursing. Multiple -x params can be supplied and have an "or" meaning.
-z Zero-terminate any binary replacement string.

Hope this helps!


Dell xps 13 ubuntu 20 touchpad not moving after login

After a long trial and error:
xinput set-prop 12 316 0

where 12 is the device id I got from xinput list, and 316 is a stupid attribute which is called Synaptics Off (316):. For me it was set to 1 for some reason, so I set it to 0 using the above command.


tar checkpoint action exec write to file

From the manual, it looks like tar doesn't invoke a shell, but performs some field splitting and expansion by itself on the exec argument. From the section on Running External Commands:

  Certain GNU tar operations imply running external commands that you
  supply on the command line. One of such operations is checkpointing,
  described above [...]

  Whenever such operation is requested, tar first splits the supplied
  command into words much like the shell does. It then treats the first
  word as the name of the program or the shell script to execute and the
  rest of words as its command line arguments. The program, unless given
  as an absolute file name, is searched in the shell's PATH.

  Any additional information is normally supplied to external commands
  in environment variables, specific to each particular operation. For
  example, the --checkpoint-action=exec option, defines the
  TAR_ARCHIVE variable to the name of the archive being worked upon.
  You can, should the need be, use these variables in the command line
  of the external command.

So, if you need other shell syntax like redirection, you'll need to invoke a shell:

tar ...  --checkpoint-action=exec='sh -c "echo $TAR_CHECKPOINT"0kiB" >> progress.txt"'

(The odd quoting works: sh should still get a single string echo  [...]0kiB > progress.txt as the argument following -c.)


how to install a downloaded package in ubuntu

gcc is available in the repository.

sudo apt update
sudo apt install gcc


Printer issue on Ubuntu 14.04 - Canon IP2770

I installed the printer using these commands:

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

then installed libtiff4 library on my 64-bit Ubuntu 14.04 using these commands:

wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/t/tiff3/libtiff4_3.9.7-2ubuntu1_amd64.deb
sudo dpkg -i libtiff4_3.9.7-2ubuntu1_amd64.deb
sudo apt-get install -f

After installing the libtiff4 library, install the printer driver using the following command:

sudo apt-get install cnijfilter-ip2700series

After rebooting, you can add the printer.

If you are using a 32-bit operating system, use these commands to install libtiff4 library:

wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/t/tiff3/libtiff4_3.9.7-2ubuntu1_i386.deb
sudo dpkg -i libtiff4_3.9.7-2ubuntu1_i386.deb
sudo apt-get install -f


Why does my computer start by itself when I open it?

Is it a bug?

Unlikely. Well it could have been a bug that got fixed and made it working on your machine.

  Or is it a new feature?

No. It has been around for a while: I would assume it is the "wake on lid-open" feature some computers have. It is a setting in the BIOS. Maybe you inadvertently activated it?

Random example from the web:


Is there a tool that can add a password to a PDF file?

Use pdftk. From its man page:

Encrypt a PDF using 128-Bit Strength (the Default) and Withhold All Permissions (the Default)

$ pdftk [mydoc].pdf output [mydoc.128].pdf owner_pw [foopass]

Same as Above, Except a Password is Required to Open the PDF

$ pdftk [mydoc].pdf output [mydoc.128].pdf owner_pw [foo] user_pw [baz]

Same as Above, Except Printing is Allowed (after the PDF is Open)

$ pdftk [mydoc].pdf output [mydoc.128].pdf owner_pw [foo] user_pw [baz] allow printing

pdftk has a lot of other uses as well and is worth installing if one works extensively with PDF files. To quote from the write-up in Synaptic:

  If PDF is electronic paper, then pdftk is an electronic
  stapler-remover, hole-punch, binder, secret-decoder-ring, and
  X-Ray-glasses. Pdftk is a simple tool for doing everyday things with
  PDF documents. Keep one in the top drawer of your desktop and use it
  to:

  Merge PDF documents
  Split PDF pages into a new document
  Decrypt input as necessary (password required)
  Encrypt output as desired
  Fill PDF Forms with FDF Data and/or Flatten Forms
  Apply a Background Watermark
  Report PDF on metrics, including metadata and bookmarks
  Update PDF Metadata
  Attach Files to PDF Pages or the PDF Document
  Unpack PDF Attachments
  Burst a PDF document into single pages
  Uncompress and re-compress page streams
  Repair corrupted PDF (where possible)


It looks like it is a one-year old bug that still hasn't been fixed:  https://bugs.kde.org/show_bug.cgi?id=340411


Unfortunately it looks like the project has died for the minute.

Quote from the projects SourceForge page:-

  This project is paused. dead. R.I.P.
  It will be reincarnated (with God's
  help) but don't know when.

You may want to get in contact with the developer to find out what the bug might be.

Meteorite at sourceforge
The developers site

Other than that running the program from terminal will give you an idea if its working or not and if not why. If you add the output of terminal it's possible there maybe a fix but I can't guarantee anything as by the developers own admission the project is dead.


Can no longer boot with rEFIt and Grub on early 2006 MacBook Pro

Ah, I need to run grub-install rather than update-grub.

Some googling around for documentation yielded the insight that update-grub just writes a new configuration file.  What I've been trying to do is to put a new boot loader into the beginning of my Ubuntu partition.

I have the following partitions:

/dev/sda1 EFI FAt (Empty; required by UEFI Spec)
/dev/sda2 HFS+ Mac OS X Snow Leopard
/dev/sda3 ext4 Ubuntu 11.04
/dev/sda4 NTFS Windows XP

The following would run to completion and report success when I booted from the Parted Magic Live CD:

# mount /dev/sda3 /mnt
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys
# mount --bind /dev /mnt/dev
# chroot /mnt
# /usr/sbin/update-grub /dev/sda3     ### THIS IS INCORRECT

The correct command seems at first to be:

# /usr/sbin/grub-install /dev/sda3

However, grub warns about installing onto a partition with blocklists, which it does not want to do.  I give it the "--force" option:

# /usr/sbin/grub-install --force /dev/sda3

After this, Ubuntu 11.04 boots just fine; I am running it now.

GNU Grub Manual 1.99

Installing Grub Using grub-install


Wifi not detecting after upgrading to Ubuntu 16.10 Yakkety

I had the same issue and reverted back to the last working kernel prior to upgrade using grub and my wifi adapter came up on boot.


Geforce(410m with CUDA) screen resolution on Ubuntu 12.04 issue

You can't force it to accept any higher resolution. I have the same laptop and the maximum resolution is exactly 1366x768. Everything works properly.


Why can't videos / streams run but youtube can?

Well, YouTube has dropped flash in favour of HTML 5 video, by default, but others are still relying on flash, to install flash and other media codecs that you might not have installed, you need to install a package called Ubuntu Restricted extras

Open up your terminal (Ctrl + Alt + T) and paste following command

sudo apt-get install ubuntu-restricted-extras

if you don't need or have already installed other media codecs, paste the command below (instead of the one above)

sudo apt install adobe-flashplugin


Is there a program for vectorial house plans \ sketches?

There is a program called Librecad  that may be what you are looking for.

To install LibreCad click the icon above or copy and paste the following command into Terminal

sudo apt-get install librecad

Then Press Enter, enter your password when prompted.


Cant change file permissions for External Drive- Steam Related

Probably your external drive is formatted as FAT32. That doesn't have the permissions.

If you don't care much about the interoperability with other OSes, reformat the external drive to ext4.


Neither mail, nor mutt sends emails with file attaches

Small variations the syntax of Gnu Mail / heirloom mailx / nail and friends have historically caused considerable confusion. In the case of Ubuntu 18.04 the default installation is actually mail from Gnu Mailutils. Tested on my own 18.04 installation:

andrew@corinth:~$ mail -V | head -n1
mail (GNU Mailutils) 3.4

In this case the correct syntax for your example would be:

mail -A file.txt -s "Test" me@myhome.com < /dev/null

Note the upper case -A which differs from your lower case example.

There will also be an informational message from mail complaining about the lack of a body to this email and this message can be avoided by running your example as follows, with an added option:

mail -E 'set nonullbodymsg' -A file.txt -s "Test" me@myhome.com < /dev/null

This was tested thoroughly on my own 18.04 installation and worked well, hopefully it will on yours as well :)


How do I make grsync exactly mirror my hard drive over multiple backups?

Check the "delete on destination" checkbox in the "basic options" tab. It's like specifying the -d option in rsync which will delete files and folders that are not on the source disk.


What driver do I needin order to install Epson XP202 all in one printer?

Try searching for "XP-202" at http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX

Have you tried just plugging it in with an USB cable and see if it "just works"?


For this error, you will need to install R for Windows within Wine.  That should resolve your errors which you are getting.


Is there a way to make the bash auto-complete show a list with line for each entry?

bind 'set completion-display-width 0'

If you run this in the shell, it will affect the current session. If you want it to affect all sessions, put it at the end of your ~/.bashrc.

Or you can put this line in your ~/.inputrc:

set completion-display-width 0

Source and more details: Grisha Levit's answer on this Stack Overflow question


How to connect several 4K monitors to ASUS GL552VW laptop?

The main issue here is bandwidth. According to this source which goes into detail about dasiy-chaining multiple displays using one DisplayPort 1.2 output shows that it will only support one 4K (3840x2160) display due to bandwidth issues. Taking this into account, DisplayPort 1.2 has an effective bandwidth of 17.28 Gbit/s whereas USB Type-C (USB 3.1 Gen2) has a maximum bandwidth of 10 Gbit/s. This suggests that USB Type-C lacks the required bandwidth to run more than one display at 4K resolutions.

There is also the GPU to consider, according to product page for the ASUS GL552VW the GTX 960M has 2 Gigabytes of GDDR5 and at the time of writing I am using two displays on Ubuntu 15.10, one is an ultra-wide @ 2560x1080 and other one is 4K @ 3840x2160 and the memory usage on my GTX 970 is 1207MB. With your proposed setup you'd be running three 4K displays @ 3840x2160 each and the display on the laptop which is 1080p, this would certainly over-strips the 2 Gigabytes of GDDR5 easily.

At this juncture you are best looking for a laptop with two mini displayport and one HDMI connector providing the GPU is capable of powering all those displays.


What is the scope of a public key added by apt-key?

It depends on the packages. I might have a repository with 2 package and sign each package with a different key.

For example a repository might have couple of maintainer and each of them sign packages with their own keys (or sub-keys) so you might have to add different public keys to verify packages from same repository.

However most of the times you only add one public key cause the packages are all signed with one key or related sub-keys thus they can be verified with that single public key.


The meta-information for the applications shown in Software-Center is provided by the app-install-data package. The title and short description can be translated through app-install-data's Rosetta page on Launchpad. I'm not sure if it is possible to submit a translation for the packages's long description.


Script in ~/.bashrc works when manually executed, but not otherwise

From your link, near the bottom of that page, I see this line:

echo "/home/myusername/sahiblib/sahibload" >> ~/.bashrc

This indicates that, when ~/.bashrc is run, it will execute sahibload, not source it.  That means that any functions defined by  sahibload will be lost when execution of  sahibload completes and control is returned to ~/.bashrc.

If you want functions defined by sahibload to survive, use:

echo ". /home/myusername/sahiblib/sahibload" >> ~/.bashrc

Simpler example

Let's consider this test file:

$ cat loader
#!/bin/sh
hello() { echo Hello; }

Before executing the script, there is no function hello:

$ hello
bash: hello: command not found

After we execute the script, there still is no function named hello:

$ ./loader
$ hello
bash: hello: command not found

In the above, loader is executed the same way that sahibload is executed in ~/.bashrc.

Now, let's source loader and observe that the definition of hello survives:

$ . ./loader
$ hello
Hello

sahibload needs to be sourced, not executed, in ~/.bashrc.


How do I get this script to run periodically via cron?

Assuming your crontab line just contains the script name, you need specify what should execute the script, either in crontab (assuming it should run with bash shell)

/5 * * * * /bin/bash /path/to/myscript.sh

or by adding a ``shebang'' line at the beginning of the script

#!/bin/bash

It is not obvious that the script depends on any environment variables, but it is worth noting a cron job runs with only HOME, LOGNAME, PATH, and SHELL set.

The script file also needs to be executable (chmod +x myscript.sh).


Ubuntu 16.04 loads Rainbow on Oracle VirtualBox

Ubuntu VirtualBox Rainbox Screen Fix

After trying different things with the Q&A method here as per the other answers and trying different variations of options for the VM configuration, etc. I decided to take a crack at googling it again and then I stumbled across this post that I figured I'd try to resolve my issue which is similar.

The keys I pressed to resolve were not exactly the same as mentioned in the post in my case for whatever reason, but this post absolutely gave me the pointer for the instruction.

  My Solution

  When the rainbow screen shows up, I pressed Right
  Ctrl+F7 together and then let off which
  popped up the below screen with just the little blinking cursor.

  At the blinking cursor screen I pressed Right
  Ctrl+F1 and then the option popped up to
  Install Ubuntu or Try Ubuntu as usual—in my case I will always Try Ubuntu and never install it so it'd be nice to have a fix to not
  have to press these keys per each load of the VM, but that's for a new
  question—I appreciate all the answers from everyone +1 for all
  efforts.

Final VM Configs


What's the latest, stable version of Ubuntu that doesn't use Unity?

Ubuntu 11.04 is the latest version that uses Gnome 2 (Although this isn't exactly what you want, as you actually are talking about gnome-panel, which 11.04 uses Unity), but this version is no longer supported.

Ubuntu 10.10 is the latest version that uses gnome-panel by default, but this version is no longer supported.

Ubuntu 10.04.2 is the latest LTS release that uses gnome-panel, which is supported until April 2013 (for the Desktop) and April 2015 (for the server)


Open terminal in current directory with tmux

Tmux always opens with your present working directory.

Like, if you are in /home/user/Desktop/, tmux session will start from this path only.

And please elaborate your question.


Earphone jack not working on Samsung All-in-one PC

Go to System Settings > Audio and see if your earphone jack is there. If it is, select it, the audio should work.


Try update your system or your services.

apt-get update

apt-get upgrade

do-release-upgrade


Why is drop box always trying and failing to connect to me on a high port in iptables logs?

The reason you're seeing this is because only root can open ports below 1024 so any application that wants an outgoing connection will open a port higher than that.

You can open ports between 1025 and 65335 inclusively as a non-root user.


I believe the Broadcom STA driver is incorrect for your device. I suggest you remove it:

sudo apt-get remove --purge bcmwl-kernel-source

With a temporary wired ethernet connection, then do:

sudo apt-get install linux-firmware-nonfree

Detach the ethernet cable and reboot.

Reference: Wireless isn't working in 12.04


Jetbrains Datagrip icon cannot lock to the launcher

Use the command described by @JonasCz. "Tools" > "Create desktop entry / launcher"

Then go to unity, search for DataGrip and drag it to the bar.

I don't know why pinning it doesn't work but the above worked for me. I imagine it has to do with pining the shortcut vs the running java app. The shortcut is probably a wrapper to start the main app.


Ethernet connection overrides wifi for internet access, despite no device blocking and "only resources of its network" setting

Resolved this. I was setting the IP manually as 10.0.0.10, but this automatically routed 10.0.0.0 IPs to the ethernet connection, where it was supposed to go to the wifi router. Changing the IP to 11.0.0.10 resolved the issue.


How can I run simultaneously two different firefox profiles

Use different profiles. Start Firefox as

firefox -ProfileManager -no-remote

to get the profile manager.


installing apache httpd server on ubuntu 12.04

You can just

sudo apt-get install apache2

or

sudo apt-get install apache2.2

If Tomcat is working on 80 port, than you might need more configurations, like default port etc...
Hope it helps.


When I look to the link you gave, there is a message there "Windows installer is not compatible with Windows 8 or UEFI firmware, and is not available for Ubuntu 13.04."
I think this is quite for your situation.
Please, download and try to reinstall with Ubuntu 13.04 64 bit version.
You can read this article about installation with EFI Computers.


How to block all traffic except for browsing?

Install the software called Uncomplicated Firewall. Open it and select "block all traffic". Then create rules for TCP/UDP to ALLOW OUTGOING dns and http (DESTINATION port 53, port 80 and port 443).


Recording a YouTube live stream using VLC

For livestreams I would recommend using livestreamer instead of VLC. Recording with livestreamer is a breeze, e.g.:

livestreamer <livestream-url> best -o vod.mp4

livestreamer supports dozens of different streaming providers and works very reliably, even with spotty streams.

For installation instructions check out this answer by @henry.


Firstly I edited the mkhomedir config file changing Default: no to Default: yes

Then I ran this command:

pam-auth-update --enable mkhomedir

I checked the pam-auth-update ncurses gui afterwards and the box was now selected


Simply dragging application icons from the dock to desktop won't add application launchers to the desktop. Follow the steps instead:

Open Files, Click on "+ Other Locations" in the sidebar

Click on "Computer" and then navigate to usr > share > applications. You should see icons of installed applications here.
Copy an application icon (say, Firefox) and paste to your desktop (or simply drag-&-drop).
In desktop it may look something like a file named firefox.desktop. Double click the file.
A warning window may appear asking you to "Trust and Launch". Do it.


How to assign static IP to Ubuntu Server (VirtualBox)

The answer is Yes if you assign a static ip from your router for your virtual box virtual machine. (This need specific ip address from your local router).
The answer is No if you aren't assign a static ip from your router for your virtual box virtual machine.
If not how can we access the virtual machine via our laptop terminal ?
This is the method how to do that !
Keep in mind this is temporary method and all settings are reset after you restart the virtual machine . This will also enable internet access on your virtual box sever.
According to your question ,
First configure NAT (Network Address Translation) setting for Network Adapter 1

Then configure Host-only Adapter setting for Network Adapter 2

After that manual IP address assignment

Here don't enable the DHCP server as below

These are the settings for your server virtual machine hardware (assume that your are using a Ubuntu server virtual machine) !
After that install the Ubuntu server on the virtual hard disk ...
After you log on to the Ubuntu server (i think you provided administrative credentials ) , you have to do the followings.
First issue the following command to see the ip settings assigned for network adapters on the virtual Ubuntu server
 ubuntu@vagrant:~$ ifconfig

On my test server there are eth0 , eth1 network interface cards , I have selected eth1 for this because eth0 is already assigned with an ip address by system default.
On Ubuntu server switch to the root user as ,
 ubuntu@vagrant:~$ sudo -i

Then the appear root user prompt as below ,
 root@vagrant:~#

Then issue the following command
 root@vagrant:~# ifconfig eth1 192.168.188.101 netmask 255.255.255.0

Once you done this exit from the root user by typing exit
Here don't turn off the virtual machine !
Then minimize the virtual machine and fireup a local terminal
After that issue ifconfig on the local terminal . Here you can see the various network adapters including the host only adaptor.
Then try to ping the ip address of the virtual machine as below
user@user-laptop:~$ ping 192.168.188.101

If this ping is success you can now ssh to the your virtual Ubuntu server as below
user@user-laptop:~ ssh ubuntu@192.168.188.101

Here you can provide the virtual server password .
So I think this method is worked for you if you are interested .


How to sign up a new shell without root authority?

Go to the oh-my-zsh github website and find file named as 'install.sh'.
Download the file and open it with a text editor ( or use wget command ) .
Delete the code line like this: CHECK_ZSH_INSTALLED=$(grep ......
Save changes.
Try to run the file and it will be ok.


Folderpane Tools add-on should allow you to override startup folder.

Can you give it a try and confirm if it fix your issue?


Installing Windows 7 hide Ubuntu on my machine

Steps:

Boot from a Ubuntu LiveCD.
Select Try Ubuntu.
Open a terminal (Ctrl + Alt + T).
Execute the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair sudo boot-repair

Follow the instructions.
Reboot.

This will re-install GRUB, which was removed by the Windows installer. You'll be able to boot into both operating systems now.


How can I set up password-less SSH login?

Answer

Execute this commands:

ssh-keygen

Then you'll need to copy the new key to your server:

ssh-copy-id user@host
## or if your server uses custom port no:
ssh-copy-id "user@host -p 1234"

After the key is copied, ssh into the machine as normal:

ssh user@host

You can now login without entering a password from the particular machine you executed the commands at.

Example

not-marco@rinzwind-desktop:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/not-marco/.ssh/id_rsa):
Created directory '/home/not-marco/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/not-marco/.ssh/id_rsa.
Your public key has been saved in /home/not-marco/.ssh/id_rsa.pub.
The key fingerprint is:
b1:25:04:21:1a:38:73:38:3c:e9:e4:5b:81:e9:ac:0f not-marco@rinzwind-desktop
The key's randomart image is:
+--[ RSA 2048]----+
|.o= . oo.        |
|*B.+ . .         |
|*=o .   o .      |
| = .     =       |
|. o     S        |
|E.               |
| o               |
|  .              |
|                 |
+-----------------+

not-marco@rinzwind-desktop:~$ ssh-copy-id not-marco@server
not-marco@server's password:
Now try logging into the machine, with "ssh 'not-marco@server'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Explanation

This assumes you already can successfully connect to your server via SSH.

You'll need to generate an SSH Keypair which will allow you to identify you as yourself without using a password. You can opt to protect keys with a passcode if you wish, but this can be left blank allowing totally password-less SSH access.

First create your SSH Keypair by running ssh-keygen this will create an id_rsa and id_rsa.pub file. The pub file is what goes on the servers, the private key (id_rsa) is what stays with you and is how you identify yourself.
Next copy the public key to your server with ssh-copy-id user@server replacing user with your remote user and server with the machine DNS name or IP address. It'll prompt for your SSH password, enter it and if all completes successfully you'll be able to access the machine via ssh user@server without needing a password.

References

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


I would recommend installing the 64-bit version, because you have a 64-bit processor and  more than 4 GB of RAM -- although the RAM is not as much an issue as it used to be since Ubuntu uses PEA (physical address extension -- see https://en.wikipedia.org/wiki/Physical_Address_Extension) by default.


As far as i can see it's not available a deb package of the linux kernel image v3.2-rc3 at the moment, but when it will be available you should be able to upgrade provided that you first install:

for a 32 bit system

OR

for 64 bit

After that, just download and install the three files you need from the link you posted (the xxx_all.deb and both xxx_i386.deb or xxx._amd64.deb).
Finally don't forget to run sudo update-grub2 from a terminal.
Note that it's not guaranteed to work properly, since the package it's not intended for maverick (and of course this is a release candidate!)


How do I resize hard disks on ubuntu 14.04 lts?

Install and use gparted, you can resize copie or move your partition without lost your data.

sudo apt-get update

sudo apt-get install gparted

or use gparted live cd/usb http://gparted.org/livecd.php


building kernel with non-retpoline compiler

Change CONFIG_RETPOLINE to n.

Run make menuconfig. Navigate to Processor type and features, and uncheck Avoid speculative indirect branches in kernel.

Note that your kernel can be exposed to kernel-to-user data leaks.


First off let me say that there are going to be varying opinions on what is better as for quality,  and this type of question isn't usually best suited for this type of forum, however I will try my best to tell you what has worked for me.

First answer: - 720 x 576 is actually a 5:4 ratio, so unless your source material is this ratio it will look a bit distorted. Essentially what you want to do is maintain the ratio of the original source material. You may wish to look into using anamorphic encoding. There is a good guide on the Hanbrake site HERE.

Second answer - This is a VERY loaded question with a plethora of possible answers. You may wish to visit the Handbrake forums to look at ways to maintain visual & audio fidelity.

One recommendation I would make would be to lose the MP3 audio. This format is simply not used in modern encodes, as it seems to be lossy compared to other formats.

Another thing to take note of in regards to quality of DVD rips is that many older DVDs were made with interlaced frames  which seems fine when viewed on CRT televisions, however when viewed on a more modern television set the picture will often look like it has jagged edges, especially when there is lots of movement. To avoid this interlacing of frames there is a feature called deinterlacing in Handbrake. You can check the handbrake site on interlacing HERE

Third answer - As for making smaller file sizes, if you navigate to the video tab in Handbrake and set the preset value to slow or very slow, you will get smaller file sizes and better quality, however this will come at the cost of the encode taking much more time to complete.


How to make keys pressed appear on screen

Have a look at the packages screenkey or key-mon


How can I force Firefox to open a aspx file?

Just viewed those sites in Firefox 10 on Ubuntu 11.10 and they display correctly. For Silverlight you can install Moonlight, it's the Linux equivalent. A webpage ending in ASPX has to be hosted on an IIS windows server, meaning you won't be able to save an ASPX page to file and do right-click>open with Firefox. That being said, I tried browsing those sites and following a few links, everything seemed to be fine. Make sure you run the latest software, I've found that a lot of bugs in Firefox 9 have been cleared out by using Firefox 10.


Merge multiple directories containing files with same name

You can do this with a script like

#!/bin/bash

mkdir merged
for dir in sent*
do
    cd "$dir"
    for file in *
    do
        mv "$file" "$file"_"${dir#sent.}"
    done
    mv * ../merged
    cd ..
done

if you want to rename each file according to the scheme in your question. If you'd like to rename them in such a way that their lexicographic order reflects in which folder the file was originally, just switch the order of the strings $file and ${dir#sent.}.


How to let `dpkg -i` install dependencies for me?

After using dpkg, running the following command helped me to install the required dependencies:

sudo apt-get -f install

In all, your terminal should look like this:

$ sudo dpkg -i package_with_unsatisfied_dependencies.deb
dpkg: dependency problems prevent ...
[additional messages]

$ sudo apt-get -f install
[apt messages]
Setting up [dependency]...
Setting up package_with_unsatisfied_dependencies...

Notice the line about Setting up package_with_unsatisfied_dependencies. This fixes (and completes) the installation of package_with_unsatisfied_dependencies.deb.


Join two files keeping the element order of one of them

Your awk is not sorting. The output is printed in the order it is found in file2 and that is sorted. To keep the order found in file1, just inverse it (I also removed the needless a[$1]"\t"$2, you were already saving $0 in a):

$ awk -F "\t" 'FNR==NR{a[$1]=$0; next}$1 in a {print a[$1]}' file2 file1
03873   0.852
03872   0.326
03871   0.852
03870   0.825


The easiest way, with the GUI, is via Startup Applications- you can create commands that will be run at startup.

Simply add your command(s)

xinput set-prop 13 "libinput Tapping Enabled" 1

(you need to add a single entry per command), and reboot.

If you want to do this via terminal, edit your .xsessionrc file (or create it in ~/ or /etc/x11), adding the xinput commands to that.


This appears to be a problem with some of the 64-bit packages being out of sync with the 32-bit packages (3.7.9-2ubuntu1 vs. 3.7.9-2ubuntu1.1).

The following answer is shamelessly cut'n'pasted from the thread at http://www.kubuntuforums.net/showthread.php?60125-Can-t-install-anything-bad-libsqlite3-0-amd64 which I recommend for a more thorough description (as well as steps to verify that this is indeed your problem.)

Download the 64-bit version:

apt-get download libsqlite3-0:amd64

Download the 32-bit version:

apt-get download libsqlite3-0:i386

Forcibly remove the existing 64-bit version:

sudo dpkg --force-depends --purge libsqlite3-0:amd64

Forcibly remove the existing 32-bit version:

sudo dpkg --force-depends --purge libsqlite3-0:i386

Manually install the 64-bit version:

sudo dpkg --install libsqlite3-0*amd64.deb

Manually install the 32-bit version:

sudo dpkg --install libsqlite3-0*i386.deb

Then see if your install of the -dev works, since one of those should match what it's looking for.


@Rinzwind is correct, you can just download a server or minimal/net install ISO of Debian or Ubuntu and install it very quickly as a VM. I did this yesterday using a Debian net install ISO, it's quick to download and install, and you are left with nothing but a beautiful, flashing prompt. Here's a direct link. https://www.debian.org/distrib/netinst Just uncheck Debian Desktop Environment and select if you need servers when the menu ask.

You could also check here http://www.osboxes.org for a prebuilt machine, but I felt it was more hassle than building my own.I didn't see a CLI only download for Debian, but perhaps they'll have another distro. By time you search you could probably have built one.

You could also just clone one of your running VM and remove X and the DE.

There's three options for you. Good luck.


How to convert 5.1 AAC streams to AC3 for S/PDIF output?

You can set codecs for individual streams in avconv with -c:n - where n is the number of the stream. Let's say that your AAC stream is stream 2 (so, the third stream in the container):

avconv -i input.mkv -c copy -c:2 ac3_fixed -b:2 448k output.mkv

Here's a quick & dirty script to find the stream number of an AAC stream, and feed that into avconv:

#!/bin/bash

foo=$(avconv -i "$1" 2>&1 | grep aac | grep 5.1 | sed -e 's/    Stream #0.//' -e 's/(.*//')

avconv -i "$1" -c copy -c:$foo ac3_fixed -b:$foo 448k "AC3-$1"

exit 0

This will not work if you have more than one 5.1 AAC stream, and it will only work with file names that have spaces if you quote them. To use it, paste that code scrap into gedit & save it as 'aac-only-to-ac3', somewhere in your $PATH (like ~/bin). Make sure you make it executable.

Then, to use the script,

aac-only-to-ac3 input.mkv

and to do every MKV in a directory

for i in *mkv; do aac-only-to-ac3 "$i"; done


Can I get a virus/malware from only visiting websites?

The title and body are not the same and has 2 different answers:

virus: no.
malware: yes.

Malware can get installed as part of extensions. Browsers use a sandbox system to prevent harm to your system. If anything bad happens it is limited to your /home/ section as long as you do not provide your admin password.

Virus tend to be part of installation of malicious software. So you need to download, and install it before you get affected. We, Linux users, generally use secure installation methods like software center and a package system that is checked on viruses.

If you run a web-server you need to also be aware of root kits. Those are far more a problem compared to virus and malware.

In general, a desktop user should not have to worry about this as long as one sticks to a couple of common rules:

keep your password safe.
don't install server software you do not need, and if you do, check the corresponding log files often.
don't install software outside of software center. If you do, make sure it is from a source you can relatively predict it is a good source.


VMs won't run on VirtualBox (Guru Meditation error 79)

I just realized I got a Multipass instance running.  Didn't even realize it was running :face_palm:

All I had to do was stop that instance.


I'm having the same problems, on a Dell XPS 12 9Q33 running Xubuntu 13.10

I installed touchegg using

$ sudo apt-get install touchegg

but nothing seemed to work in the program.

What was really odd was that when I tried to compile the touchegg gui from source:

https://github.com/Raffarti/Touchegg-gce

it wouldn't work...gave me a weird make error, something to to tune of:
"Make: No rule to make target `/usr/lib64/qt-3.3/mkspecs/de Make Stop"

Researching more, at least for, looks like it may be an upstream bug...because the system recognizes my touchscreen, the computer also thinks the touch pad is a normal touchpad, not a synaptics one

http://libcoding.wordpress.com/2013/11/02/issue-with-touchpad-in-ubuntu-13-10-in-xps-12/comment-page-1/#comment-22

Apparently the workaround is blacklisting the i2c_hid module , which the dude explains how to do


How can I configure vboxweb to listen on specific adress on Ubuntu 16.04?

I think your change to /etc/init.d/virtualbox does not work because that is not sourced by systemd. Try this.

Create a directory named `/etc/systemd/service/vboxweb.service.d
In it, create a file named custom-host.conf.

The contents of the file would be:

[Service]
Environment=VBOXWEB_HOST=0.0.0.0

Then:

systemctl daemon-reload
systemctl restart vboxweb

Using these kinds of files is described at in man systemd.unit:

  Along with a unit file foo.service, a "drop-in" directory foo.service.d/ may
  exist. All files with the suffix ".conf" from this directory will be parsed
  after the file itself is parsed. This is useful to alter or add configuration
  settings for a unit, without having to modify unit files. Each drop-in file
  must have appropriate section headers. Note that for instantiated units, this
  logic will first look for the instance ".d/" subdirectory and read its ".conf"
  files, followed by the template ".d/" subdirectory and the ".conf" files there.
  Also note that settings from the "[Install]" section are not honoured in
  drop-in unit files, and have no effect.

Setting environment variables is documented in man systemd.exec


How to figure if country repository is not updated

I don't think there is one; however, you can check this page to check when a given repository was last updated.


apache2 configtest failed with output "No MPM loaded."

I had the same problem Like :

Starting web server apache2
* The apache2 configtest failed.
Output of config test was: apache2:
Syntax error on line 140 of /etc/apache2/apache2.conf:
Syntax error on line 2 of /etc/apache2/mods-enabled/mpm_itk.load:
Cannot load /usr/lib/apache2/modules/mpm_itk.so into server:
/usr/lib/apache2/modules/mpm_itk.so: cannot open shared object file:
No such file or directory Action 'configtest' failed.
The Apache error log may have more information.

I try this : apt-get install libapache2-mpm-itk so I resolve my problem, reinstall the files which is missing so i can recover.

Thanks I hop you guys can get solution.


How do I re-route SSH connection depending on incoming address?

Client side

I do not think that this is possible to do as part of the ssh server configuration. The "Match" option does not allow the "User" directive to be used with it in order to force a different user account than the one requested.

However you could give Bob and Julia advice on how to configure this in their own ~/.ssh/config. For instance tell Bob to add the following to this file:

Host server_ip
    User admin

And Julia should add:

Host server_ip
    User non-admin

Now if they add this configuration on their client hosts 123.123.123.123 or 1.1.1.1 this would make them able to just run

ssh server_ip

and the ssh client will use admin or non-admin as the user part of the connection, depending on the client where it is executed.

This is for sure not exactly what you are asking for, but I guess the closest you can get using ssh.

Use authorized_keys

Depending on what Bob and Julia need to do on the server, you could also make them use public keys for authentication and hard code a given command into the authorized_keys file. The advantage of this is that in the authorized_keys file you can require a certain "from" address and force a certain command to be executed. See the "AUTHORIZED_KEYS FILE FORMAT" section in the sshd(8) manual page. Still, this will only allow you to restrict a certain public key to be used from a certain address, it will not do any rerouting of the connection to another account, as you originally asked.


According to the link in your question everything including caffe itself is packaged in 17.04 and higher versions, but you are currently using Ubuntu 16.04 which does not contain these packages in its default repositories.

caffe-cuda is not available from the default Ubuntu 16.04 repositories. Ubuntu 16.04 can be upgraded directly to Ubuntu 18.04 which is the next LTS release after 16.04. To install caffe-cuda in Ubuntu 18.04 and later open the terminal and type:

sudo apt install caffe-cuda

For information about installing other caffe packages in Ubuntu 16.04 see this answer.


Is there a standard place for placing custom Linux scripts?

As far as I know there is no place for custom Linux scripts. The directory that should be used for custom install is the /opt directory so it would be the safest option to place them there.
But keep in mind that for a script to be able to be used without the full path you need it to be included in the PATH variable.

If you need help changing the PATH variable for all users you can check How do I set PATH variables for all users on a server? which refers you to the /etc/environment file to configure this.

If your concern is to avoid clashes but you don't want to add another route to the PATH variable you could use /usr/local/bin. In my server installation it doesn't have any file  so that it could be a easy work-around.

Hope it helps


NTFS disk partition not recognised in Ubuntu 16.04

Just solved. For future references I'm posting the solution. First I've tried a normal hard disk format with gparted, but it did not work. Then
what I did was to shred the hard disk first using the command shred -vfz -n 10 /dev/sdc2. More info here: https://www.howtoforge.com/how-to-securely-destroy-wipe-data-on-hard-drives-with-shred. After that I reformat the partition using gparted and it finally mounted properly.

NAME   FSTYPE   SIZE MOUNTPOINT    LABEL
sdd           931.5G
├─sdd2 ntfs   465.8G /media/ao/HD2 HD2
└─sdd1 ntfs   465.8G /media/ao/HD1 HD1
sdb           232.9G
└─sdb2 ext4   232.9G /
sr0            1024M
sde           931.5G
├─sde2 ntfs   465.8G               WDHardDrive1
└─sde1 ntfs   465.8G               WDHardDrive
sdc           931.5G
├─sdc2 ntfs   465.8G /media/ao/HD4 HD4
└─sdc1 ntfs   465.8G /media/ao/HD3 HD3
sda           232.9G
├─sda2 ntfs   232.4G
└─sda1 ntfs     549M               System Reserved

Just in case, I've also checked in Win 10 and it also works.


I managed to make it work! I am not an experienced Linux user, therefore please feel free to comment/edit/improve my answer. As you will see, I don't understand why some things worked and some didn't...

So, I installed mysql-apt-config as a helper. This commented out all entries in /etc/apt/sources.list.d/mysql.list (created according to Kulfy's answer in this post)

This article also helped.

wget http://repo.mysql.com/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb

Run the command bellow and select MySQL 5.7 from the list:

sudo dpkg-reconfigure mysql-apt-config
sudo apt update
sudo apt-cache policy mysql-server

I don't know why, but without the following, it gave an error while installing mysql-community-server and failed.

sudo mkdir /etc/mysql/conf.d

Install the components in this order. Otherwise errors similar to the ones in my original question, are displayed. Basically, I tried installing mysql-server - it failed requesting mysql-community-server. I tried installing the later, it failed again, requesting mysql-client. I tried to install this one, and it worked. Then I traced my steps backwards - installed mysql-community-server and then mysql-server. It worked with no errors.

sudo apt install -f mysql-client=5.7.30-1ubuntu18.04
sudo apt install -f mysql-community-server=5.7.30-1ubuntu18.04
sudo apt install -f mysql-server=5.7.30-1ubuntu18.04

I used the following to secure the MySQL installation
sudo mysql_secure_installation

Prevent upgrading to MySQL 8 - thanks to NSwanson7 in this post

sudo nano /etc/apt/preferences.d/mysql

Add the following content in the above created file.

Package: mysql-server
Pin: version 5.7.30-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-client
Pin: version 5.7.30-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-community-server
Pin: version 5.7.30-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-community-client
Pin: version 5.7.30-1ubuntu18.04
Pin-Priority: 1001

Package: mysql-apt-config
Pin: version 0.8.10-1
Pin-Priority: 1001

Hope this helps!


Unable to boot Ubuntu 14.04 on Acer E3-112 laptop

It seems that your bios is configured to search boots with UEFI firmware boot.
Windows8 is working because boots with it.
It's possible that your Ubuntu doesn't install UEFI boot.

Search at bios configuration "SECURE BOOT" option and disable it. Try then.


Battery icon on top-right takes a long while to come after switching from Unity to GNOME Desktop

I resolved this issue by upgrading to gnome 3.12.


How to connect to a share with support for UTF-16

Sadly, this was all due to a specific error with Deluge as someone on Reddit told me. I tried checking the hash of torrent data with qBittorrent instead and it worked fine for most of them. So yes all Linux uses UTF-8 and it is able to manage other characters.


Fails to boot after upgrade, stuck on winbind package

You might want to try sudo dpkg --purge winbind to completely remove it first (this package is a part of samba  which facilitates sharing files over a network with machines running Windows). You can reinstall the package later if you wish.


Can't use GNOME Shell extensions due to "error parsing schema"

Using konsole has nothing to do with this.

Changed the files as mentioned in the article below:

/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py
/usr/lib/python2.7/dist-packages/gtweak/gsettings.py

Now have full access to all shell extensions. A few don't work (alt+tab one for example) but they are all accessible, and there is no longer an error from gnome-tweak-tool.

Steps

Replace lines 48-61 of /usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py:

class GnomeShell:

EXTENSION_STATE = {
    "ENABLED"       :   1,
    "DISABLED"      :   2,
    "ERROR"         :   3,
    "OUT_OF_DATE"   :   4
}

EXTENSION_TYPE = {
    "SYSTEM"        :   1,
    "PER_USER"      :   2
}

with these:

class GnomeShell:

EXTENSION_STATE = {
    "ENABLED"       :   1,
    "DISABLED"      :   2,
    "ERROR"         :   3,
    "OUT_OF_DATE"   :   4,
    "DISABLED"      :   6
}

EXTENSION_TYPE = {
    "SYSTEM"        :   1,
    "PER_USER"      :   2
}

This should get all extensions working.

Lastly, to clear up the remaining errors, replace lines 44-52 of /usr/lib/python2.7/dist-packages/gtweak/gsettings.py:

                        #summary is compulsory, description is optional
                    summary = key.getElementsByTagName("summary")[0].childNodes[0].data
                    try:
                        description = key.getElementsByTagName("description")[0].childNodes[0].data
                    except:
                        description = ""
                    self._schema[key.getAttribute("name")] = {
                            "summary"       :   summary,
                            "description"   :   description
                    }

with these:

                        #summary is compulsory, description is optional
                    try:
                        summary = key.getElementsByTagName("summary")[0].childNodes[0].data
                        description = key.getElementsByTagName("description")[0].childNodes[0].data
                    except:
                        description = ""
                        summary = "No Summary"
                    self._schema[key.getAttribute("name")] = {
                            "summary"       :   summary,
                            "description"   :   description
                    }

(Ubuntu Forums source)


Can I direct traffic on a subdomain to a Virtual Box running under Ubuntu?

The VM is not known by the router as its network is tunneled through the host. You have to open the port from your router to your host system, and in the Virtualbox settings of your VM -> Network -> Port Forwarding forward that port to the VM.

If you should do that is another question, opening ports to the internet is always a risk, especially when you don't know what you're doing.


Which version of Ubuntu should I use to begin my contribution in packaging?

From the Ubuntu NewPackages wiki:

  Submitting new packages through Debian is the preferred path. But, if your package is Ubuntu-specific or can't go into Debian for some other reason, you can submit it directly to MOTU. There are a limited number of available reviewers, so you may encounter delays here.

So, you should consider packaging your software for Debian Sid (the Debian continuous "development" version) and then, once this is accepted, ask for your package to be copied into Ubuntu repositories (this is called syncing, see the Ubuntu for Debian developers page).

Practically speaking, and from my own experience, you will have huge difficulties to find a sponsor to review and include your package in Ubuntu directly unless you are really working on some Ubuntu-specific software. It also makes more sense to include your software in Debian as your package will be synced to all other Debian-derived distributions besides Ubuntu. Finding a sponsor in this context will be much easier.

If you want to go through MOTU (upload into Ubuntu directly), use the current Ubuntu development version here. At the time this post is written (Tue Apr 30), it is Ubuntu 13.10.

On the opposite, if your goal is not to have a package officially included in the distribution, you may consider using an already released Ubuntu distribution. Usually, in this case, building a Debian package is mainly to avoid configuring and recompiling the same software on a set of computers your own. In this case, just choose the distribution these computers are running as an Ubuntu package for 13.04 will not probably be installable on an older release.


When I started python I followed the official documentation, but it seemed too complicated for me at the time.

There's a great tutorial series on youtube (you can skip the first one, since you already installed python).
Lynda has a training on python too, you can watch the second chapters for free.
You can also find some books on o'reilly from begginer to advanced, I have "Programming Python 3th edition" and I really like it.
This question on stackoverflow has been a guide for me when I wanted more hidden features of python, the answers I found there I couldn't find elsewhere.

The way I really started to learn python was using it all the time. Here where I work, I had to backup some files, this was my first official project with python, it took me about a week to finish it. I had to search on google each time I had a problem, but after some time, you get used to the overall language syntax.

I really recommend you start learning python first, I started learning programming using C, it was hard and I couldn't understand much of it, if I had started with python, my life would be a lot easier. The reason for this is that python is interpreted, the errors are much more readable, for a begginner:

Example of the classic Hello World in python:

 print "Hello, World!"

Now the same program in the C++ language:

#include <iostream>

int main()
{
   std::cout << "Hello, World!" << std::endl;
   return 0;
}

At the time, I had many questions when I saw this and I was too terrified to start programming in C++, if I had started with python or C#, I wouldn't be that scarified of learning a new language.


Actually the best way to do this is to use the \ escape character. The method that @Shauna suggests will work in this case but has limitations. For example if the filename has quotes in it what do you do? this?:

cd "some """Movie Title""""

No, that would be silly. You would do this:

cd some\ \"Movie\ Title\"

The next character after the escape \ is not interpretted by the shell. This is what we want.

There are three methods of escaping character in bash.

Double quotes

Least powerful method. Preserves literal value except for dollar sign, backticks, and backslash.(tldp.org)

Single quotes

Most powerful. Hides all special characters.

Backslash

Similar to single quotes, but only hides one character at a time.

A good resource for this is TLDP


Looping between /dev/sda1: recovering journal and login screen

Solved.

Boot into Recovery mode.
Repair broken packages.
Login works.


Ubuntu 14.04 LTS screen is flickering on Dell Optiplex 9010 AIO system.


How to run game on one monitor and have programs on other monitor still visible?

Windowed is as good as I've got, I'm afraid but to be fair, doing it any other way will be just as laggy because the system is rendering more. It's overlaying your game on a desktop as well as the other uncovered desktop and those applications, so yeah, it's a little more intensive and that's going to hurt in-game performance.

Coincidentally, I also use Compiz to make certain screen-sized windows render with fullscreen hinting (so they show above the panel, without window decoration). You can do this by opening CCSM (compizconfig-settings-manager), heading down to Window Rules, enabling it and entering a rule for your game's window.

This won't help performance, it'll just make it look how you'd expect.


Cannot install Perl Modules on Ubuntu 18.04

When downloading Perl modules with cpanminus you must have make installed.

sudo cpan App::cpanminus
sudo apt install make

Also, I had a module that kept failing to install. So I downloaded it, extracted it to its own folder.

Then I navigated to that folder and ran the make command.

It told me why it would not install: No GCC Compiler.

Once the compiler was installed, all modules downloaded and installed sucessfully!

Hope this helps someone.


Changing choice of folders in Download Dialog?

In the download dialog you can drag folders from the file list on the right into the shortcut list to add them.

Or you can edit the file $HOME/.config/gtk-3.0/bookmarks using a text editor like gedit.


system printing service not available ubuntu 18.10

I had the same problem. The solution given in this link  solves the problem.

There is a default configuration file which should be installed in /usr/share/cups/cupsd.conf.default so I ran:

sudo cp /usr/share/cups/cupsd.conf.default /etc/cups/cupsd.conf
sudo service cups restart


Root drive is running out of disk space. How can I free up space?

I successfully cleared 3.5 GB by removing old headers and images.
Please note on some systems this also attempts to remove the current kernel which is not a great idea - see comments below for how to check.
I used the following command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

You can check what packages will be purged executing the first part of the command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

Reference


"Please ensure you have JAVA_HOME points to JDK rather than JRE" message

You have to use the jre version in the jdk, you can do so by executing

    sudo update-alternatives --set java /usr/local/java/jdk1.7.0_17/jre/bin/java
    sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_17/jre/bin/javaws

Normally this can be done by using update-java-alternatives with a .jinfo file, but for some reason you can't find them on your system.


What are the accessibility problems of Qt?

I haven't done any development in Qt, but my gloss on the subject of accessibility there is that the concern might be a bit overblown.  My understanding is that while GTK has built-in ATK support, Qt has to use a 'bridge' component to tie its native system to the accepted Linux accessibility framework.

Update -- I might have been premature in calling this issue overblown.  For instance, as user9237 says, it doesn't look like AT-SPI was really ever implemented.  So the trolltech doc quoted looks to be a bit "optimistic" .
Here is an interesting blog post, unfortunately still a bit old, covering a lot of these issues : Qt/KDE and the state of free accessibility.

Here's Mark Doffman's code site for Qt AT-SPI.  Of which he says,

  This project is a Qt plugin that
  bridges the QAccessible API’s to the
  AT-SPI 2 protocol enabling Qt
  applications to be used with Orca,
  Accerciser, and GOK.

The possibly bogus Trolltech/Nokia link:

  Here's what Qt docs say about Qt
  accessibility (from
  trolltech/nokia):

    Accessibility support in Qt consists of a generic interface, implemented
    for a technology >on each platform:
    MSAA on Windows, Mac OS X
    accessibility on the Mac, and Unix/X11
    AT-SPI >on Linux. Qt's accessibility
    interface closely follows the MSAA
    (Microsoft Active >Accessibility)
    standard, which most clients support.
    Other technologies used by Qt >provide
    similar functionality.*

A slightly newer document gives an overview of Qt accessibility.

By contrast, here's a quick run-down on accessibility interfaces  from the Gnome project:
GAIL (GNOME Accessibility Implementation Library) is an implementation of the accessibility interfaces defined by ATK. GTK is a toolkit which is already mapped to ATK by the GAIL module. License, download and other information can be found here. The GAIL source code also serves as an excellent tutorial for advanced ATK usage. In addition, you may be interested in the GAIL Reference Manual.


To get a list of applications do:

gsettings get com.canonical.Unity.Launcher favorites > myfavs.txt

Then to reset the launcher to those applications do:

gsettings set com.canonical.Unity.Launcher favorites "`cat myfavs.txt`"

Icon size and other Unity settings are stored in this gconf file:

 ~/.gconf/apps/compiz-1/plugins/unityshell/screen0/options/%gconf.xml


Ubuntu 16.04 How to Disable UFW On Startup Through Config

pa4080's answer seems like the correct answer, but I found that UFW was blocking pings and Samba connections after a default Ubuntu 14.04 install, even though ENABLED=no is the default setting in /etc/ufw/ufw.conf. After I stopped UFW with service ufw stop I was able to connect to the machine as expected.

Disabling UFW on startup

On Ubuntu 14.10 and earlier: sudo echo manual > /etc/init/ufw.override

On Ubuntu 15.04 and later: sudo systemctl disable ufw

On anything else or just to be sure: sudo echo "service ufw stop" >> /etc/init.d/rc.local


I just installed 14.04 on a Dell Dimension 3100 (specs: http://www.engadget.com/products/dell/dimension/3100/specs/ ) and it's working, albeit a bit sluggishly with no lowering of eye candy.  Aside from some kind of particular incompatibility, I don't see why you wouldn't be able to run 14.x just fine with the specifications you posted.


You can list byobu current sessions with:

byobu list-session

You should see something like this:

session_1: 1 windows (created Tue Feb  6 18:05:35 2018) [237x49]
session_2: 1 windows (created Tue Feb  6 18:05:44 2018) [237x49]
session_3: 1 windows (created Tue Feb  6 18:06:05 2018) [237x49]

The first word in every line is the session name.

So, to kill a single session you can do:

byobu kill-session -t <session_name>

To kill session_2 in previous list, you can do:

byobu kill-session -t session_2


ubuntu 12.04 desktop Error: unknown command 'gfxmode'. Pressing any key continues

Try to re-install GRUB

sudo apt-get install --reinstall grub-common
sudo update-grub

Then you can use boot-repair software to re-install GRUB. There should be no error messages any more.


Instructions for Ubuntu 64-bits

According to this note in the PPA's project, the ppa was deprecated:

  Toggl Desktop in launchpad is now deprecated. We have a new version out which can be downloaded here: http://support.toggl.com/toggl-on-my-desktop/

Luckily, they are providing a deb package ready to install in their GitHub repository. You need to install certain dependencies and use Ubuntu 64 bits. This won't work in Ubuntu 32-bits.

sudo apt-get install libc6 libdrm2 libexpat1 libffi6 libgcc1 libgl1-mesa-glx libglapi-mesa libglib2.0-0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 liblzma5 liborc-0.4-0 libpcre3 libstdc++6 libx11-6 libx11-xcb1 libxau6 libxcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxml2 libxrender1 libxshmfence1 libxslt1.1 libxss1 libxxf86vm1 zlib1g
cd ~/Downloads
sudo dpkg -i toggldesktop*.deb

"Why installing all those packages if the only dependency is libxssl?" you may ask. Simply, because the binary needs all of them. If you run ldd ToggleDesktop on the binary you may find:

linux-vdso.so.1 (0x00007fff8cdfc000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fd4e1779000)
libXss.so.1 => /usr/lib/x86_64-linux-gnu/libXss.so.1 (0x00007fd4e1576000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd4df716000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd4df40b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd4df1f4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd4dee4b000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fd4dd7f0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd4dd5eb000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fd4dd3d9000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fd4da4b9000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd4da1aa000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd4d9ea9000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fd4d9c0e000)
libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fd4d9263000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd4d905b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd4e1fa7000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fd4d858d000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fd4d8387000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd4d816c000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fd4d7f62000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fd4d7d5f000)
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007fd4d7b1f000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fd4d77ba000)
libgstreamer-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0 (0x00007fd4d74c9000)
libgstapp-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0 (0x00007fd4d72bb000)
libgstbase-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0 (0x00007fd4d7061000)
libgstinterfaces-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0 (0x00007fd4d6e4e000)
libgstpbutils-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstpbutils-0.10.so.0 (0x00007fd4d6c28000)
libgstvideo-0.10.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-0.10.so.0 (0x00007fd4d6a0b000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fd4d57b8000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd4d554a000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fd4d5320000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007fd4d50f6000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fd4d4ef3000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fd4d4cec000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fd4d4aea000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007fd4d48d1000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007fd4d46cb000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007fd4d44c8000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007fd4d42c5000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fd4d40bd000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007fd4d3ebb000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fd4d3cb5000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fd4d3aa7000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fd4d2018000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fd4d1e14000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007fd4d1b8f000)

All those libraries weren't included in the package "Depends" field, but the binary needs all of them.

There's another option if you want to use the application without installing it in your system, in which case you need to download the binaries packages from this page, download the Linux version using a browser (wget and curl seems to fail to do this). The file will normally be downloaded into your ~/Downloads directory. Uncompress the files:

$ ~/Downloads
$ tar xzf toggldesktop_*.tgz
$ ls
cacert.pem  iconengines  imageformats  lib  platforms

Now make sure that the following packages are already installed:

sudo apt-get install libc6 libdrm2 libexpat1 libffi6 libgcc1 libgl1-mesa-glx libglapi-mesa libglib2.0-0 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 liblzma5 liborc-0.4-0 libpcre3 libstdc++6 libx11-6 libx11-xcb1 libxau6 libxcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxml2 libxrender1 libxshmfence1 libxslt1.1 libxss1 libxxf86vm1 zlib1g

Once this is done, just run ./TogglDesktop and ready.

Important notes from the installation page:

Toggl Desktop has been tested with Unity, Gnome and KDE in general should be working. There are known issues with LXDE.
At the moment there is only 64bit binary package available. 32bit version is planned. There are no distribution-specific packages available.

  We don’t have a version for 32bit Linux, but you’re able to create it by following the instructions here: https://github.com/toggl/toggldesktop
  They are working on adding a generic .deb package which should be usable on all (recent) Debian based distributions.
  Currently, Toggl Desktop is only tested on Ubuntu. Most probably all recent Debian-based distributions will work, but they are untested.
  Starting from Ubuntu 13.04 there is no tray (notification area icon) support.


Destination Host Unreachable sharing WiFi from Ubuntu to Win10

SOLVED: Ok so after some more digging around I ended up solving this myself thanks to a handy VM I quickly setup with Oracle VirtualBox.

Quick solution:

You need to create a new connection using nmcli for ethernet. Then edit the relevant config file, like so:

>$ nmcli connection add type ethernet ifname enp0s9 && nmcli connection

Name output should be equivalent: type-iface (in my case ethernet-enp0s9). Interchange nano with your editor of choice.

>$ cd /etc/NetworkManager/system-connections
>$ sudo nano ethernet-enp0s9

Now change the method from auto to shared!! Under the [ipv4] config tab:

[ipv4]
dns-search=
method=shared # should be auto by default

Save and then restart network manager with a simple systemctl restart NetworkManager

Long explanation:

So, my Mint VirtualBox VM helped a lot here.
After doing the usual GUI method to share the internet, checked the config (screenshot) & found the option for methods.
Now jump back to my headless system and uncomment of all my iface configs in /etc/network/interfaces (excluding lo), save & exit.
Create the new ethernet connection with nmcli, ethernet-enp0s9, jump to its config in /etc/NetworkManager/system-connections/ & simply edit the method to shared from auto like above.

Now issue a shutdown -r command, unplug & replug the ethernet cable & finally restart the PC for completeness!
I would also recommend double checking the UFW status after all this of course!

A final note:

Now in my case, I was messing around with the iptables beforehand and so forth, so I have a handy little script to reset the iptables which I run:

#!/bin/sh
#
# flush-iptables script.
#

# First delete all rules in the tables
iptables -F
iptables -t nat -F
iptables -t mangle -F

# Add default rules to the filter, nat & mangle tables:
iptables -P OUTPUT ACCEPT
iptables -P PREROUTING ACCEPT
iptables -P POSTROUTING ACCEPT

iptables -t nat -P INPUT ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT

iptables -P INPUT ACCEPT
iptables -P INPUT ACCEPT
iptables -P INPUT ACCEPT

# Remove all non-default chains in filter, nat & mangle tables. Usually what UFW adds
iptables -X
iptables -t nat -X
iptables -t mangle -X

# Finally restart network manager
systemctl restart NetworkManager && echo systemctl status NetworkManager
echo "__________________________________________DONE_________________________"

Hope this helps some other people! For some reason, this (I'll admit niche) topic is actually annoyingly hard to research for the CLI unless you were to really dig into. Which I would argue is a major point to using Linux! Even now that I know this solution, I have tried "reverse Googling" to try to find an official or even community solution to this problem & cannot find any relevant pages (correct me if I'm wrong of course!).


Programmatically Getting Name of Front-most (currently running) application in Unity

xprop can tell you the ID of the window that is active

xprop -root|grep '^_NET_ACTI'

And you can use the output of wmctrl to find out the name of all windows, matched up to their IDs

wmctrl -l

wmctrl isn't in the default install, so you'll need to sudo apt-get install wmctrl of course.

Note that there's no left-padding in the output of xprop, so we need to pad it before grepping for it within the output of wmctrl. All together, something like this should do it:

$ WINID=$(xprop -root|grep '^_NET_ACTI' |sed -e 's/.*# //' -e 's/0x/0x0/')
$ wmctrl -l |grep $WINID
0x07c00006  0 my-hostname The Title of The Window


Is it possible to create several debian packages with different names from one sources adding specific option

Well, debian/control supports variable substitutions.
The cleanest options I could think of:

(Dynamic) Change the binary package names to include your ${variable}  in debian/control then set debian/rules to pass the variable to directly using -V or by adding it to debian/substvars
Ref: Debian Policy 4.10. Variable substitutions: debian/substvars & 5.2. Source package control files – debian/control

(Static) Make debian/rules do multiple configure/build cycles and generate split binary packages. In this case, debian/control will have both packages per-declared and split build files using debian/<packagename>.install
Ref: Change environment variables in debian/rules according to debian/control targets (my answer for another related case)


Looking for a decent looking, battery-oriented desktop environment, with transparent panel

kde has transparency but it is not battery friendly as lot of processes keep running in background,  in unity also zeitgist and compiz keep running.
so for all this things together,  you only have xfce left to choose, it is lighter (battery friendly),  simplistic, highly configurable (hide/unhide) and you can enable compositor from settings / window manager tweaks  to get transparency of panels and menus.


Full brightness and keyboard backligh at boot

I would try changing the grub configuration file.

In a terminal type sudo gedit /etc/default/grub

Find the line where there is GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and change it to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"

Then type sudo update-grub in the terminal and reboot to test.

This worked for me on a previous computer.


SOLVED:

add to the Project->Properties->Environment

  Name: LD_LIBRARY_PATH
  Value:
  $LD_LIBRARY_PATH:/usr/lib/nvidia-current:/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64:/lib

but I don't know what happened as it worked before


Can't make Clockwordmod Tether on Ubuntu 16.10

That error is the C++ compiler complaining about some usable but less than ideal code.  With the right command line options, you can tell the compiler to ignore code issues like that and keep going.  This isn't always the best solution, but it will get things to compile and work.

First, run make clean to get rid of anything left behind from your old build attempt.

Then, run CXXFLAGS=-fpermissive make to try again with the C++ compiler downgrading those code issues to warnings.

I was able to reproduce your error on my 64-bit 16.10 install, and this workaround allowed the build to get past that error for me.

Unfortunately, the build seemed to fail further along with this issue:

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/username/work/Tether/node/out'
  LD_LIBRARY_PATH=/home/username/work/Tether/node/out/Release/lib.host:/home/username/work/Tether/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni; "/home/username/work/Tether/node/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"
Segmentation fault (core dumped)
deps/v8/tools/gyp/v8_snapshot.target.mk:13: recipe for target '/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc' failed
make[1]: *** [/home/username/work/Tether/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139
make[1]: Leaving directory '/home/username/work/Tether/node/out'
Makefile:26: recipe for target 'node' failed
make: *** [node] Error 2

I'm still looking into that issue.  Try the initial workaround, as maybe your system won't hit the second issue that mine did.

Update: I was able to sidestep that second issue by telling the config tool to skip the snapshot step.  Unfortunately, I have no idea what the snapshot step is supposed to do, and am afraid I might just be postponing a failure until later.  If you want to try this second workaround too, here is a command sequence to try:

make distclean
./configure --without-snapshot
CXXFLAGS=-fpermissive make


I can't log in on partypokers website why is that?

I think you've missed to install java for the browser. you can install it by this link here.

or installing it via the terminal by typing:

sudo apt-get install icedtea6-plugin