How to create a icon to execute a script?

Create a launcher file for the script. A launcher file is a text file with specific format and .desktop extension, as outlined elsewhere on Askubuntu.

The line that defines the command that must be run is the line starting with Exec=. The parser for that line is rather primitive: you only can provide it with a single command and arguments. There are a couple of ways around that:

1) Create a wrapper script containing the commands and call the wrapper script on the Exec= line

2) Launch bash with the -c argument.

For approach 2), more practical for just a few commands, your specific Exec= line would appear as:

Exec=sh -c "cd /home/bmshamsnahid/Android/Sdk/emulator && ./emulator -avd Pixel_2_XL_API_29"

Create the .desktop file in .local/share/applications if it is only for you (no root permissions needed), or in /usr/share/applications if the launcher must be available for all users. Correctly formatted .desktop files in any of these directories will automatically appear in your application menu, from where you can optionally pin it to the Dock.


Any linux OS shuts down once the AC adapter is plugged in

This works for my Dell Inspiron running Ubuntu, which has the same problem you described: Close the laptop, plug in the adapter, wait a few seconds, reopen the lid. You're presented with the locked screen.

Perhaps this isn't a "solution" because the laptop shouldn't reboot on plugging in the power. But it may be a helpful workaround.


The open source drivers are fully supported by Ubuntu and provide support for older hardware which the proprietary drivers have abandoned. In my experience they are also more stable and less prone to random bugs and glitches (Unity randomly failing to start etc), although other people's experiences may vary.

The proprietary fglrx drivers on the other hand tend to support the very latest hardware before the open-source drivers have time to catch up, and provide much better 3D performance which is critical for games (although the performance is often still much worse than on Windows). Until recently they also implemented much better power management although this may no longer be the case following the recent radeon DPM changes.

If the open-source driver works fine for you, stick with it — there is no need to switch to fglrx just for the sake of it. If you want to play modern 3D games on Ubuntu however, or your graphics performance is very poor and you have a latest-generation GPU, you are probably better off with fglrx.


How to configure my VirtualBox's Ubuntu IP?

First you must install the following programs:

  sudo apt-get install uml-utilities
  bridge-utils

then you have to add something to the kernel:

  sudo modprobe tun

Now, Here is a script that allows a guest virtual machine to connect to the main host and also have internet on both machines, you have to make a small adjustment to changing the USER variable for your user and ready, I save the script as vb:

permission first :

  sudo chmod +x vb

then to start :

sudo ./vb start

if we do not need it anymore

sudo ./vb stop

create the virtual machine and configure it in the choice of network adapter bridge and interface vth0 and you are ready.,

Here the Script :

#!/bin/bash

if [ -z $1 ]; then
echo "Usage: $0 [start|stop]"
exit 1
fi

#Check root

USER=$(id -u)

if [ "$USER" -ne "0" ]; then
echo "Must be root"
exit 1
fi

USER=your user
TAP=vth0
BR=br0
ETH=eth0

function doStart {
#Create the bridge
brctl addbr $BR
ifconfig $ETH 0.0.0.0 promisc
brctl addif $BR $ETH
dhclient $BR

tunctl -t $TAP -u $USER
brctl addif $BR $TAP
ifconfig $TAP up

echo "$TAP ready"
}

function doStop {
ifconfig $BR down
ifconfig $TAP down
tunctl -d $TAP
brctl delbr $BR
dhclient $ETH

echo "Cleaned"
}

case $1 in
start)
doStart
;;

stop)
doStop
;;

*)
echo "Usage: $0 [start|stop]"
;;
esac

exit 0

Step :

Execute the script
create your virtual machine or modify, in the machine configuration select NETWORK

then select BRIDGE ADAPTER and interface VTH0


How to get the ip addresses of all units in a service in a charm-hook in another service?

The relation-list -r {id} should return all units in the relation. Perhaps you're only parsing the first (or last) value?

This is what my relation-* output looks like when I have multiple units of one application related to another (in this case, i'm looking at the monitors relation data between nagios and 3 units of nrpe; you probably want to substitute those with myCharm and your 3 units of wordpress):

$ juju run --unit nagios/0 'relation-ids monitors'
monitors:1

$ juju run --unit nagios/0 'relation-list -r monitors:1'
nrpe/0
nrpe/1
nrpe/2

$ juju run --unit nagios/0 'relation-get -r monitors:1 private-address nrpe/0'
172.31.13.216

I can put that all together in a loop that outputs the private-address for all units related to nagios like this:

$ juju run --unit nagios/0 'for i in `relation-ids monitors`; do for j in `relation-list -r $i`; do relation-get -r $i private-address $j; done; done'
172.31.13.216
172.31.30.157
172.31.49.121


Actually the problem might be that you install doesn't have the firmware for bluetooth, in terminal do
cd /lib/firmware/rtl_bt
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_bt/rtl8822b_config.bin
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_bt/rtl8822b_fw.bin

Then shutdown and boot


Is it possible to make gnome's "run command" show real time suggestion?

if you use Supera instead of AltF2it shows the list of all applications and then in the Type to Search dialogue, it will present all application beginning with what you have typed (such as Firefox, Files etc).

Here is a link to other useful Gnome keyboard shortcuts.


Why do you think you're having a CORS issue?

This is a very open configuration and should be placed inside the server block.  You should fine-tune it once you're live:

    add_header Access-Control-Allow-Methods "GET, POST, HEAD, OPTIONS";
    add_header Access-Control-Allow-Origin "*";


How to access folder named "x y" (x space y) using Ubuntu Bash script in Windows?

Either quote your argument:
cd "x y"

or escape (make not special) the space:
cd x\ y


ubuntu 14.04, after ubuntu-tweak, there is no GUI

I believe that what you need to do is reboot and when Ubuntu presents the screen with all the previous installations shown, arrow down to the choice marked "previous linux versions" (or words to that effect).  You should be able to boot to a previous version which will hopefully restore your GUI interface.  Ironically you can then uninstall whatever you did that made it stop working.  I had this very experience a couple of days ago, while experimenting on one of my "Mubuntsticks" in the quest to make Netflix work correctly under Ubuntu.


Why do I have to name my text file .cpp in order to compile a C++ program from command line?

You don't have to name your file with a particular suffix, however the gcc/g++ compilers use the suffix as a shortcut to decide how to process the files. If you want to use a different suffix (or no suffix) you can tell the compiler what kind of file it is explicitly using the -x command line option - see the answer to this similar previous question Compiling C source file without .c suffic


How to get my Broadcom 4365 WiFi adapter working?

What's your kernel version?

Type: uname -r. If it's 3.2 something try to install this package.

If it's not 3.2 or it doesn't work, please take a look at this.

To do things the safe way , here's the package author site, among with it's source and compiled deb.


This is easy,fast and worked greatly for me:
https://webwiks.com/techcorner/get-ralink-rt3290-bluetooth-work-in-linux/

Step 1: Download the Ralink rt3290 bluetooth Driver Package
Now the first step is to download the ralink rt3290 bluetooth Linux driver (rtbth-dkms) package. Download this driver file from below link:

for Ubuntu 18.04:

https://launchpadlibrarian.net/389907029/rtbth-dkms_3.9.6~git20180923-1~bionic~ppa1_amd64.deb (updated wrt link above)

Please Note: The current deb package of Ralink rt3290 bluetooth is only available for x64 based distribution for 32bit distors you need to manually compile the bluetooth package for more please follow this link.

Step 2: Install Ralink rt3290 bluetooth Driver
After you have downloaded driver file, the next step is to install the driver package, Although you can install driver package via command line but we recommend Gdebi as it can install any debian package within seconds. If you don’t have Gdebi installer then please install it via Software center or just open terminal by pressing Ctrl+Alt+T and type the below code:

sudo apt-get install Gdebi

Press Enter and when the installation succeed, Open the rtbth-dkms.deb file via Gdebi install and install the package.

Step 3: Run the Ralink rt3290 bluetooth module (rtbth)
As you have completed above steps, now just after the installation finish, the next step is to check the bluetooth module- by typing below cmd in terminal:

sudo modprobe rtbth

Soon as you launch this command you will get message “init complete” this indicates that your module have been successfully loaded. If the terminal doesn’t gives you any output then its advisable to please check your bluetooth area whether the ubuntu detects bluetooth or not. (If it doesn’t then read the below steps)

If the first command doesn’t works then toogle your WiFi switch on off and again type:

sudo modprobe rtbth

or:

sudo modprobe -r rtbth

And, Press Enter, You will see your Wireless or Bluetooth light which indicates your rt3290 bluetooth activated and you can now use your bluetooth adapter.

Step 4: Auto-Load Ralink rt3290 (rtbth) module at startup
Now, the final step is to auto load the rtbth module at startup which prevents you from activating module at every boot. For that you need to add the module in modules.conf file.

All you have to do is to find Kernel module file and its Located in /etc/modules-load.d/modules.conf

You can manually Browse this file in Nautilus or any other file manager. All you have to do is to run File Manager in Terminal by typing the command:

Sudo nautilus

or:

sudo su & nautilus

But if find this difficult then type in terminal:

sudo gedit /etc/modules-load.d/modules.conf

Then, Press Enter.

It will open the notepad file of modules.conf  and after that enter rtbth at end of file.

Just click on save and restart your PC and see if the modules load automatically.

Good Luck!


If you want to delete the Windows  hibernation file i.e. hiberfil.sys so that you can mount the  windows  hibernated partition
type this command in terminal:

sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda1 /media/windows

(Replace /dev/sda1 with your windows partition and create windows directory inside /media using sudo mkdir /media/windows  if it is not present).

Note: It can cause problem in Windows resume.


There's some file system problem with your Ubuntu partition. Fix it this way...

boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier

sudo fsck -f /dev/sda3

repeat the fsck command if there were errors
type reboot


How do I find the image with the greatest width in a group of images?

This command (identify from ImageMagick) output the image with the biggest width :

identify -format "%w %h %f\n" *.png | sort -n -r -k 1  | head -n 1

-format "%w %h %f = width, height, filename

Result : w h image.png

Source : Find Largest Image Dimensions in Folder :
https://unix.stackexchange.com/questions/155544/find-largest-image-dimensions-in-folder

If your images aren’t in the same folder, open a terminal and run this script from a folder contening subdirectories.

find . -iname "*.png" -type f -exec identify -format "%w %h %f\n" '{}' \;      | sort -n -r -k 1 | head -n 1

Note : If you have more than one image with the same width it will only show one result. To have a list of all images sort by width remove head -n 1 from the precedent command.


How to start a program always on second monitor

I had the similar issue and used the geometry to determine which monitor should display the image when using additional monitors in extended mode.  The issue is that the system sees the monitors as a single display with a single geomerty.  Using the xy offset you can dictate where the image displays

i.e.  I have two monitors A-1920x1080  and B-1680x1050

To display on the B monitor, I use the following

feh --recursive --randomize --auto-zoom --geometry 1680x1050+1920+0  --slideshow-delay 5 -B black --action "gvfs-trash '%f'" ~/Pictures


How, in a script, can I determine if a file is currently being written to by another process?

You can use lsof | grep /absolute/path/to/file.txt to see if a file is open.
If the file is open, this command will return status 0, otherwise it will return 256 (1).

Be aware that this command will take a second since there are, normally, a lot of files open at any time.

You can also use lsof -c gedit, for example, to see which file gedit has opened. Restricting the output to one process will reduce execution time to practically nought.

Here's a script to wait:

#!/bin/bash

while :
do
    if ! [[ `lsof -c python3.2 | grep test.py` ]]
    then
        break
    fi
    sleep 0.5
done
echo "done"

This runs while a process 'pyhton3.2' has got the file 'test.py' opened. As soon as the file is closed, it moves on to 'echo done' and exits.

I've put 'sleep 0.5' in there so that the loop doesn't hog the CPU all that badly. Otherwise, it will use 100% cpu.

Bonus
There seems to be an easy way to convent odt to pdf:

  Thanks to scls19fr on the OOo Forum
  for this lovely tip. You can convert
  OpenOffice Writer files to PDF from
  the command line using unoconv -f pdf
  input.odt To get unoconv, simply run
  sudo apt-get install unoconv at the
  terminal.
  (rhyshale of rhyshale.wordpress.com)


VDPAU is enable by default on the official nVidia binaries. If your card supports VDPAU you just need to install them and use a player that supports VDPAU.

Other then that video hardware acceleration should be implemented via libva if the vdpau-va-driver is installed.

sudo apt-get install libva1 vdpau-va-driver vainfo

Gstreamer should take care of the rest or if you are going to use a player like vlc you should have an option that enables that in the player it self.

To see if your card is supported run the command vainfo.

If you get an output like this

libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/vboxvideo_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

you card has no hardware acceleration.

If on the other hand you get something like this

libva: libva version 0.32.0
     Xlib:  extension "XFree86-DRI" missing on display ":0.0".
     libva: va_getDriverName() returns 0
     libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
     libva: va_openDriver() returns 0
     vainfo: VA API version: 0.32
     vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
     vainfo: Supported profile and entrypoints
     VAProfileH264High               :  VAEntrypointVLD
     VAProfileVC1Advanced            :  VAEntrypointVLD

your hardware supports video acceleration and its enabled.


Try using the density variable.

convert -density 400 *.pdf *.png


How to get my laptop to detect SD cards inserted into its built-in card reader?

Try this without your SD card inserted on boot.

From a post by PseudoPsyche at fedoraforums

  You must add the following lines to one of the .conf files in etc/modprobe.d folder. I believe it would be dist.conf*
  Do this, by typing the following into konsole/terminal. (substitute gedit with text editor of choice)

sudo -H gedit /etc/modprobe.d/dist.conf
alias mmc_core tifm_core
alias mmc_card tifm_sd

  Save the file.

*If this is the wrong .conf file, someone please correct me.


Bluetooth keyboard won't connect until PIN verification

It is a very easy task and I had no problems with a bluethooth keyboard (Thinkpad).

A) You can use the "add new device" wizard of Ubuntus standard bluetoth wizard (indicator symbol or system settings). It gives you a number. This number you simply enter on your keyboard, an press enter. Then the dialogue vanished and devices are paired.

OR

B) Use Blueman (sudo apt-get install blueman) and the "pair" command to easily add new devices.

search for new devices with blueman
right an press "pair"
enter "0000" on your UBUNTU PC (you can use any custom number
you like)
hit ENTER or press "OK" on the pc-dialogu
immediately AFTER THAT, type "0000" on your BLUETOOTH
KEYBOARD
hit ENTER on the keyboard

That's it. Devices paired.

Tested on Ubuntu 12.04 LTS and 14.04 LTS with Blueman and a Thinkpad Bluethooth keyboard (which should be same as a mac keyboard, due to bluetooth standard for input devices) on a Thinkpad W510, a Thinkpad X201 and a hinkpad X61s.


ldconfig errors caused by broken Nvidia symlink after upgrade to 18.04

Had more or less the same problem after an update (ldconfig error). The following command deleted all invalid links:

sudo update-alternatives --config i386-linux-gnu_egl_conf


The only possible solution which comes in my mind is to crack it by brute force. Rarcrack works with RAR and 7z as well.
Look at this page: Rarcrack
To be honest, if you set very long password or/and have slow computer, it may take days to crack.


Is there a free MySQL manager with a visual query builder for Ubuntu?

OpenOffice / LibreOffice has a graphical query designer in its database application.

Examples:


How to plot xy coordinate graph in Ubuntu?

If you want simple, you should probably just put your data into LibreOffice Calc and have it draw a plot.

If you want something you can customise more and script for repeated use, there are many choices, but since you say you know R this would be the obvious choice. Some others might be python+matplotlib, octave, gnuplot, etc...


keyboard shortcut gnome-terminal (ctrl-tab) and (ctrl-shift-tab) in 12.04?

A way to configure this is by setting gsettings from the terminal itself (two commands):

gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab '<Primary>Tab'
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ prev-tab '<Primary><Shift>Tab'

Source: the last comment in the bug report


/etc/network/interfaces versus addresses set via ip addr add

ip addr add is, as you've seen, for temporary changes. Persistent settings may be edited into /etc/network/interfaces. Use any text editor such as gedit, nano, kate or vim and edit the file. I suggest something like the following:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8

Of course, select an address outside the DHCP pool used in the router and substitute your details here.

Restart the interface:

sudo ifdown eth0 && sudo ifup -v eth0

And test:

ping -c3 www.ubuntu.com


I feel like I've already answered this question somewhere but I couldn't find it, so this answer (and this question) are possible duplicates.
Anyway, the command you're looking for is probably

gconftool-2 --set /apps/guake/general/use_vte_titles --type boolean false

This always does it for me.


Half-Half time boot failure of Ubuntu 16.04 LTS when installed alongside Windows 10 Enterprise

It turns out that this was caused by the default fast startup shutdown option of Windows 10. I followed the second approach on this link http://windowsten.info/tutorials/5767-how-to-fully-shut-down-windows-10, i.e. uncheck "Turn on fast startup (Recommended)" option at Control Panel/Hardware and Sound/Power Options/System Settings.

I've been using the two OS' for one week now, no startup problem ever occurred again.


Check configuration
man setxkbmap shows that
   -query  With this option setxkbmap just prints the current rules, model, layout, variant, and options, then exits.

so you can check the configuration (and it would help if you post the output) with
setxkbmap -query -v 10

Set configuration
You might need -variant intl or -variant altgr-intl.
But again, as per man page
   -variant name
           Specifies which variant of the keyboard layout should be used to determine the components which make up the  keyboard
           description.  The -variant option may only be used once. Multiple variants can be specified as a comma-separated list
           and will be matched with the layouts specified with -layout.

So for instance in my case to change the variant of the third layout from intl to altgr-intl I have to use a comma separated list
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     latam,il,us,us
variant:    ,,intl,
$ setxkbmap -variant ,,altgr-intl,

In addition,
you may need to use -model pc105.
I am not sure -model abnt is even a valid model (where did yo get that from? I could only find a few, not necessarily reputable sources, using it).
A hint to this assertion is given by
$ find /usr/share/X11/xkb/ -type f -exec grep -nH --color abnt {} \;
/usr/share/X11/xkb/geometry/pc:831:xkb_geometry "abnt2" {
/usr/share/X11/xkb/geometry/pc:886:}; // End of "abnt2" geometry
/usr/share/X11/xkb/symbols/sun_vndr/br:84:  xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/sun_vndr/br:85:  include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:2:xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/br:49:    include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:66:    include "br(abnt2)"

You may combine using Settings -> Region & Language -> Input Sources and choosing / adding an option (e.g., English (US, intl., with dead keys)), and then setxkbmap -query to see what may be the proper model and perhaps also rules.
Notes

Out of curiosity, I checked what character you were getting
 $ printf ¨ | recode ..dump
 UCS2   Mne   Description

 00A8   ':    diaeresis

You can check available options with (also 1, 2)
 man xkeyboard-config

or to cat instead of paging
 man -P cat xkeyboard-config

Old linuxes allowed for using ~/.xinitrc for permanent configuration (e.g. 3), I am not sure it still works.

I have just asked abnt not listed in xkeyboard-config models

Related

Keyboard is not configured for pt-BR
https://forum.mxlinux.org/viewtopic.php?t=45398&start=10
https://unix.stackexchange.com/questions/519711/portuguese-language-us-keyboard
How to write in Brazilian Portuguese using a US keyboard?
One keyboard two languages on Ubuntu 17.10
https://ubuntu-mate.community/t/problems-typing-portuguese-characters/10827
Use US(International with dead keys) in i3wm
https://superuser.com/questions/1029357/how-to-use-altgr-intl-in-kde
https://manpages.ubuntu.com/manpages/bionic/en/man5/keyboard.5.html
What file is the setxkbmap option -rules meant to take, and how can I add keyboard variants to that file?
https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_X_configuration_files


There is a tutorial in the official Documentation.

https://help.ubuntu.com/community/Repositories/Personal


Ubuntu Server 20.04.2 is getting the wrong address

Problem solved.
I found solution, when i was reading this article


How do I log-in to a user in my /home/ folder after mounting/copying it?

I think your question is answered in this thread.

I.e. you need to recreate the users by nominating the home folder and in case fix the permissions after.

sudo adduser --home /home/your_sister your_sister
sudo chown -R your_sister:your_sister /home/your_sister


You should be able to accomplish this by launching 'Software & Updates', selecting the 'Additional Drivers' tab, selecting the NVIDIA driver you want to use, and clicking 'Apply Changes'.

I can't post images because of this site's limitations, but here is what I mean:


"Connection timed out" after doing a "sudo reboot"

Digital Ocean is an ISP providing Internet access to servers.  I gather you do not have physical access to the machine that is at the IP address you are trying to SSH into.

I am unable to ping the server.  It apparently never came back up after you issued the reboot command, or it shut down and stayed powered off after you issued that command.

You'll need to contact the Digital Ocean Support guys and have them fire it back up for you.

As an aside, you should not resort to rebooting to solve problems before trying other solutions.  A better method would be to stop and restart the service.

sudo service mysql stop

sudo service mysql start

or

sudo service mysql restart


To add a custom program to the list of  All applications in the part Open with other application, add a file yourapp.desktop in folder ~/.local/share/applications
with content :

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=path_to_your_icon
Name[en_US]=yourapp
Exec=path_to_your_executable %F
Hidden=false


Assuming you have logged in after installing the package (as I'm sure James has), you can simply open up the Dash by clicking on the Dock button on the top left of the screen. The dash will open and there will be an icon of a cartoon balloon with "Ask" in it. Mine's in the middle of the set of icons. Each of these icons represent a lens.

Click in it and type "How to launch askubuntu lens". This very question will be in the penultimate row, in Answered Questions (unless you accept my or someone else's answer in which case it will move up a row to "Questions with Accepted Answers").

If you don't see the icon there I'd say there is a bug somewhere.


OK, the problem is that since you gave the guest the whole disk, it's creating "real" partitions so of course the host can see them.

In the future if you want to avoid this happening, on the host, partition /dev/sdb with a single partition /dev/sdb1 that fills the whole disk; then give the guest /dev/sdb1 as a block device.  The guest will then create its own partitions within /dev/sdb1 as its own native /dev/vda1, /dev/vda2, etc, and the host will only be able to see them via kpartx in the way you want it to.

You could also set up /dev/sdb1 as a block device for LVM on the host, create an LV within it, and give that to the guest as /dev/vda and partition from there.  Whatever makes you happy (I generally give my guests LVs as raw devices, personally).  Just avoid handing the guest the actual raw disk if you don't want it to create real partitions that the host sees and manipulates.


How to stop https warning of untangle captive portal?

Upload a valid certificate with a valid certification path (to a global root CA) to your captive portal and provide it to the connecting clients.

Or use HTTP.

A third option to force users to install your self-signed certificate is possible, but probably impractical in this scenario.


How can I force gdrive to download a folder as zipped file?

In the current iteration of gdrive, you can't.  The feature wasn't written or developed into it.

There have been several requests (like this one) for the functionality requested to be added, but they haven't had any action from the developer (yet).

(And something to note: the developer of gdrive hasn't made any changes since September of 2017, so it's possible this is an 'abandoned' project, and won't get further development; this is, however, not able to be easily determined)


GParted - Recursive partition on /dev/sda

I've seen a few partition edits go wrong and fixed them (without loss of data) a couple of way, but I had still backed up all data first just in case, even though it turned out I didn't need the backup.  That said, I've never seen gparted go that far wrong.  I can only imagine that there was a power interruption while it was working.

I will make a few suggestions, each with a link, none of which are remotely guaranteed to work, though I'm confident that what some of them reveal may help us all to help solve this.

I would first recommend you boot your computer to any live boot CD and open the included disk utility.  The odds are your hard drive will again appear unformatted with unallocated space, but it is always the first thing I do when things look weird.  It's like I want a second opinion just in case one program is acting wonky.  In general, gparted works great, but a lifetime of experience has taught me never to assume that any one person or program is correct.

The next thing I'd try is the near-miracle repair disk.  It makes a bootable cd which you first boot your computer to and then use the utility within to analyze your hard drive's boot issues. It is primarily made to fix problems with the grub, but I've seen it perform unexpected miracles.  It is possible that in searching for bootable partitions, it will recognize the messed up partition table and restore it.  Personally I doubt it will help, but it probably won't hurt anything.  When it offers you a url for further diagnostics, please record it and post it here in case any of us can decipher it.

I will now list the utility most likely to help you.  It is called Test Disk.  While I like that it claims to run under everything, I dislike that it appears to need a working operating system to work, which seems stupid.  I would run it under one of my live booting usb flash drives, personally, but most people aren't using those.  I personally think this product would benefit more people if they offered it as an ISO image download from which we could make a self-booting cd or flash drive in the same manner we currently employ the boot repair CD.


How to copy existing movie files on ipad to watch?

Yes, you can easily copy movies to an iPad (or other iOS device) in Ubuntu without using iTunes or Wifi or Dropbox or any of the other terrible solutions out there.

First, simply choose one of the many video player apps available from within the App Store. (Searching for video player returns many irrelevant results, I recommend searching for avi player or mp4 player or whatever your desired format is).  I found flex:player and that has worked for my needs and is free but has pretty much no features beyond video playback.  Other players provide more features but can cost between $0.99 and $4.99 generally.

Second, plug your iPad into your computer via USB.  You should hopefully get a popup showing two mount points for your iPad.

My iPad (or whatever your iPad's name is)
Documents on My iPad

I believe this functionality goes as far back as 11.04 but at least back to 11.10.  See troubleshooting below if this does not happen.

Navigate to 'Documents on My iPad' (again, your name will vary) and find the application you just installed.  It will look like an application with an icon but it is actually a folder for that app and its files (the user accessible ones at least).

Open that folder (i.e. double click on it) and then open the Documents folder within.

Now all you have to do is copy your video files into this folder.  When you next open your chosen video player, all of your movies should be visible and available for playback (assuming the video player supports your codecs, if it doesn't, another one probably does).

Note: I've generally found that if I load new video files onto the device while the app is open, I have to close and re-open the app for it to register the new files.  However, some apps may be more proactive in scanning for new files.

Troubleshooting:

If your device is not automatically paired and mounted:

Make sure you have libimobiledevice-utils and ifuse installed

sudo apt-get install libimobiledevice-utils ifuse

and then run

idevicepair unpair && idevicepair pair

and then disconnect and reconnect your device.

If you do not see video files you have copied

Make sure you copied the files to the correct app's individual Documents folder.
Close and reopen the app to get it to refresh its file list.
Read the app's documentation to ensure that the app you chose supports the video format and codec in question.

A file is visible but does not play properly/at all

Read the app's documentation to ensure that the app you chose supports the video format and codec in question.
If your video file is high resolution (such as 1080p), try a lower resolution file.  Some apps appear to have problems playing high definition video.  The older generation devices also sometimes have trouble because of their slower hardware.  You may be stuck downconverting to something more like 720p.  (But try a couple different apps first).


Chromium not seeing pepperflashplugin-nonfree

Well I don't know what happened, but Chromium just randomly crashed, then when I started it again, it worked(I had restarted after installing), maybe it was just taking a while.


I do have the same problem with 13.04.
If you want, you can adjust it through the system settingss --> brightness and lock.
I don't have  fix for  det shortcut..


Actually, In the documents of Lubuntu I found a GUI way but that is just for touchpad not the mouse. for setting Natural Scrolling in the both of this way works for me:

you can use any text editor but I'm so familiar with Vim:

sudo vim /usr/share/X11/xorg.conf.d/40-libinput.conf

then append this line Option "NaturalScrolling" "true" to the related device

you can see each device by the first line of input method:

Section "InputClass"
    Identifier "libinput pointer catchall"

this shows the mouse configs because it refers to the pointer it means mouse, or:

Section "InputClass"
    Identifier "libinput touchpad catchall"

this shows the Identifier refers to the touchpad

After adding you should have something like below:

Section "InputClass"
    Identifier "libinput pointer catchall"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "NaturalScrolling" "true"
EndSection

Attention: Just append the option line to the devices you want. do not append it to all identifiers.


Begin with man logrotate. /etc/logrotate.d/rsyslog exists on my Ubuntu 16.04.2 LTS system, and is part of the rsyslog package:

$ dpkg -S /etc/logrotate.d/rsyslog
rsyslog: /etc/logrotate.d/rsyslog


How can I properly install the latest NVIDIA GeForce drivers on 13.04? (x64)

Before install driver, first close desktop manager:

sudo service lightdm stop

For install propretary nvidia driver, follow this step:

1) download driver from: http://www.nvidia.com (select correct gpu, operating system and architecture (32 o 64 bit))

2) required: linux headers (if not installed) and other stuff:

sudo apt-get install build-essential linux-headers-`uname -r`

3) ctrl+alt+F4 (or another tty) and login.

4) install driver.

sudo sh <script NVIDIA>

Installer will configure and build module for your kernel. If anything ok, you must be able to restart your desktop manager with nvidia driver. (nvidia installer write xorg.conf: check correct configuration.)

5) restart desktop manager:

sudo service lightdm start

check if module was mounted on kernel:

lsmod | grep nvidia

N.B. Possible issue:

gcc version are different between driver and installed copy of gcc

Read /var/log/Xorg.0.log for error, if xserver fail during startup.


Trouble installing Rabbit VCS for nautilus

If you've used the PPA (ppa:rabbitvcs/ppa) and want to install the version that supports GNOME3/Nautilus 3, install "rabbitvcs-nautilus3" instead of "rabbitvcs-nautilus".

Well, that fixes the installation issues. However, for me it still doesn't show up on right click.

Edit: after upgrading to the latest Nautilus from the Ubuntu 11.10 proposed repository, the right click menu finally works!


Ubuntu server black screen after instalation and possibly no video drivers

Ok I was able to get in to the console by pressing Ctrl + Alt + F1 . But the resolution is wrong in console. I was able to enter the server with IPMI and the resolution is 640 x and something... I have an 1080p monitor and the problem was in console (not xorg). I think i need drivers for my Matrox G200.

EDIT: I figured that i need to change the resolution via grub.


Can a mouse button be simulated by the keyboard without enabling numpad mouse emulation?

Yes it can :) You have two choise.
A smart but dirty way is to use xmodmap -e to remap all keypad to corrensponding value on keyboard. Like KP9 to 9 (the proccess is the same as you do for mouse button)

The second way is to go /usr/share/X11/xkb/compat/mousekeys, read the file carefully and remove or comment those who are in relation with keypad. (you can comment is c++ way using //)

After edit, reboot the X or your computer and enabling xkb mouse controlbit by xkbset m won't affect keypad anymore.

PS: by the way I want to remap a key to mouse button 9 but Pointer_Button9 is not defined :( any comment?


How to install Ubuntu from an external HDD?

Installing Ubuntu from External USB Drive
Ubuntu can be installed from an external USB drive.
There are a few Challenges: Many Live installers such as Etcher, dd, mkusb, Gnome-Disks, Startup Disk Creator, Ventoy, Win32DiskImager, etc, clone the ISO as a ISO9660 partition and overwrite everything on the disk.
Other Live installers such as UNetbootin and YUMI-BIOS/UEFI, (version 0.0.8.1) will install to a partition on the disk, but only to a FAT32 partition They will not overwrite the whole disk like ISO9660 installers will. The maximum size of a FAT32 partition is 32GB on Windows, so most larger drives come as NTFS. A 4GB partition can be created on an external USB drive and Ubuntu Live can be installed to it.
YUMI-BIOS only, (version 2.0.7.9) and Universal USB installer, (version 1.9.9.7), will install to a NTFS partition without overwriting the whole disk or partition. These tools are available free from Pendrivelinux.com.
All of the above installers will overwrite any MBR on the partition being installed to, so we should be careful not to try to install Ubuntu or, any Linux, to a partition with a useful OS on it.


Is there a "don't disturb" option to temporarily hide notifications, like on macbooks?

Introduction

The script bellow allows muting any notifications from appearing on screen. There are two basic options -m for mute and -u for unmute.  Both are put together into a .desktop file to serve as a launcher.

When -m is used, the notify-osd will send a final notification before being blocked. If there is another instance of script running, it will show a graphical popup that will inform a user that the script is already doing its job.

When called with -u option, the script will stop blocking notifications and will confirm that by showing one. If no previous instance of script is running, the user will be notified that nothing is blocked right now.

Script Source

The script source is available here. For more up-to-date version you can always find it on my github. You can install git with sudo apt-get install git and clone the whole repository with git clone https://github.com/SergKolo/sergrep.git or use

wget https://raw.githubusercontent.com/SergKolo/sergrep/master/notify-block.sh  && chmod +x notify-block.sh

to get just the script itself.

#!/usr/bin/env bash
#
###########################################################
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: May 10th 2016
# Purpose: Notification blocker for Ubuntu
# Written for:
# Tested on:  Ubuntu 14.04 LTS
###########################################################
# Copyright: Serg Kolo ,2016
#
#     Permission to use, copy, modify, and distribute this software is hereby granted
#     without fee, provided that  the copyright notice above and this permission statement
#     appear in all copies.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
#     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#     DEALINGS IN THE SOFTWARE.

ARGV0="$0"
ARGC=$#

mute_notifications()
{

  self=${ARGV0##*/}
  CHECK_PID_NUMS=$(pgrep -f  "$self -m" | wc -l )
  if [ "$CHECK_PID_NUMS" -gt 2 ]; then
     zenity --info --text "Notifications already disabled"
     exit 0
  else
     killall notify-osd 2> /dev/null # ensure we have PID
     notify-send 'All notifications will be muted after this one'
     sleep 1
     while true
     do
        PID=$(pgrep notify-osd)
        [  "x$PID" != "x" ]  &&
        kill -TERM $PID
        sleep 0.25
     done
  fi
}

unmute()
{
  echo $0
  self=${0##*/}

  MUTE_PID=$(pgrep -f  "$self -m" ) #match self with -m option
  if [ "x$MUTE_PID" != "x"   ];then
     kill -TERM "$MUTE_PID" &&
     sleep 1 && # ensure the previous process exits
     notify-send "UNMUTED"
     exit 0
  else
     notify-send "NOTIFICATIONS ALREADY UNMUTED"
     exit 0
  fi
}

print_usage()
{
  cat > /dev/stderr <<EOF
  usage: notify-block.sh [-m|-u]
EOF
exit 1
}
main()
{
  [ $# -eq 0  ] && print_usage

  while getopts "mu" options
  do

     case ${options} in
          m) mute_notifications & ;;
          u) unmute ;;
          \?) print_usage ;;
     esac

  done
}
main "$@"

.desktop shortcut  template

This is just an example of what I personally use. Replace each Exec= line with appropriate path to script in your environment. Of course your Icon= will have to be changed as well. Preferably , keep this file in your ~/.local/share/applications folder

[Desktop Entry]
Name=Notification Blocker
Comment=blocks any on-screen notifications
Terminal=false
Actions=Mute;Unmute
Type=Application
Exec=/home/xieerqi/sergrep/notify-block.sh -m
Icon=/home/xieerqi/Desktop/no-notif2.png

[Desktop Action Mute]
Name=Mute Notifications
Exec=/home/xieerqi/sergrep/notify-block.sh -m
Terminal=false

[Desktop Action Unmute]
Name=Unmute Notifications
Exec=/home/xieerqi/sergrep/notify-block.sh -u
Terminal=false

Screenshots

The shortcut file locked to launcher

Final notification before muting


Trouble updating drivers on my AWUS036H USB wireless card

It seems there are some sintax errors, maybe a dot or dot-comma symbol is missing in the file, error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘rtl8187_usb_probe’ . As in any programming file, the problem could be near the beginning of the file.


Beginning of the partition (~3GB) deleted with "badblocks" command. Is data recovery possible?

You can try with testdisk and photorec from cgsecurity.org.

I am afraid, that testdisk will have problems unless one partition starts after the wiped first 3 GB of the drive.

But photorec can recover a lot without a file system by using the data on the 'disk surface' and identify the start of files by typical signatures for many files types including picture files and document files. This is explained at the cgsecurity web site.

But the files names are lost unless they are stored inside the files, and there is no directory structure. So it is a lot of hard work to identify the files and tell correct files from useless fragments and deleted versions.


PyCharm Community Edition won't display in Ubuntu 18.04

There was an issue with the display functionality on my Ubuntu where it thought that I had 2 displays. Therefore it was showing PyCharm on the other "display". Once I changed the display settings, PyCharm showed up on my display.


What determines PPA updates after new Ubuntu releases?

The only thing that determines when a PPA (or any package archive in general) will get support for a newer Ubuntu release, is when whomever owns that PPA or archive, decides to update it. There is no guarantee that any PPA on Launchpad, or archive on the Internet, will support whatever version of Ubuntu or Debian you have installed.


How can I install Roland Fantom-G6 via USB

The Fantom-G series is supported since kernel version 3.11.

You should upgrade the kernel.


How to resolve hash sum mismatch -- solution provided here does NOT work!

SOLVED!!!!

/var/lib/apt -- This was the real source of the problem. This was also where I actually located the mysterious files that kept showing up in the errors.

The first step is to MANUALLY delete thepartial folder. However, here is where something really weird happened. I opened the 'partial' folder and saw right away the troublesome error file—but before I could do anything, the troublesome file along with all other files in that same folder, one at a time, simply VANISHED in front of my eyes! I had  a hunch at this point and without bothering the other files in the 'apt' folder I tried Synaptic again—it reloaded PERFECTLY! Then I systematically, one at a time, re-checked EVERYTHING in the repositories.

The moral of the story? Anytime you have BADSIG, Hash sum mismatch etc. the first thing you do is go to /etc/apt –open the lists with leafpad—wipe out everything! Replace this with a list made by Ubuntu repository creator.

NEXT go to /var/lib/apt, if there is a 'partial' folder DELETE it. If this does not work then COPY AND PASTE all other files in this folder to somewhere else, then delete all these files in the folder you just C&Pasted from—then—add them back one at a time till things work right.

DO NOT, I repeat, DO NOT attempt to delete these things using CLEAN or AUTOCLEAN or any such. MANUALLY DELETE these!!!!!

THE PROBLEM is in the CLEAN and AUTOCLEAN features of Linux-Lubuntu. There is a real GLITCH here!!!

I have 5 computers ALL with Lubuntu--ALL with exactly the same issue!!!


How can I convert a folder of .pngs to .jpgs while setting the background color?

The JPEG format does not support transparency -- therefore maintaining the transparent backgrounds is not possible if you want to (or have to) use the JPEG format. See Wikipedia for an overview of the capabilities of different image formats.

Note that the JPEG 2000 does indeed support transparency, but it is much less common than the JPEG format. It depends on your use case whether this is a viable alternative.


What is the difference between dependencies and pre-depends?

As taken from this link: https://www.debian.org/doc/debian-policy/#document-ch-relationships

There are 5 types of dependencies:

The meaning of the five dependency fields is as follows:

Depends

This declares an absolute dependency. A package will not be configured unless all of the packages listed in its Depends field have been correctly configured. The Depends field should be used if the depended-on package is required for the depending package to provide a significant amount of functionality. The Depends field should also be used if the postinst or prerm scripts require the depended-on package to be unpacked or configured in order to run. In the case of postinst configure, the depended-on packages will be unpacked and configured first.
In the case of prerm or other postinst actions, the package dependencies will normally be at least unpacked, but they may be only "Half-Installed" if a previous upgrade of the dependency failed. Finally, the Depends field should be used if the depended-on package is needed by the postrm script to fully clean up after the package removal. There is no guarantee that package dependencies will be available when postrm is run, but the depended-on package is more likely to be available if the package declares a dependency (particularly in the case of postrm remove). The postrm script must gracefully skip actions that require a dependency if that dependency isn't available.

Recommends

This declares a strong, but not absolute, dependency. The Recommends field should list packages that would be found together with this one in all but unusual installations.

Suggests

This is used to declare that one package may be more useful with one or more others. Using this field tells the packaging system and the user that the listed packages are related to this one and can perhaps enhance its usefulness, but that installing this one without them is perfectly reasonable.

Enhances

This field is similar to Suggests but works in the opposite direction. It is used to declare that a package can enhance the functionality of another package.

Pre-Depends

This field is like Depends, except that it also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the pre-dependency, It works like this, when a package declaring a pre-dependency is about to be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or even if the depended-on package(s) are only unpacked or in the "Half-Configured" state, provided that they have been configured correctly at some point in the past (and not removed or partially removed since).
In this case, both the previously-configured and currently unpacked or "Half-Configured" versions must satisfy any version clause in the Pre-Depends field. When the package declaring a pre-dependency is about to be configured, the pre-dependency will be treated as a normal Depends. It will be considered satisfied only if the depended-on package has been correctly configured. However, unlike with Depends, Pre-Depends does not permit circular dependencies to be broken. If a circular dependency is encountered while attempting to honor Pre-Depends, the installation will be aborted.
Pre-Depends are also required if the preinst script depends on the named package. It is best to avoid this situation if possible. Pre-Depends should be used sparingly, preferably only by packages whose premature upgrade or installation would hamper the ability of the system to continue with any upgrade that might be in progress.

Smaller Version:

Both depends and pre-depends mention the dependencies a package needs before installing but pre-depends forces the installation and configuration of the dependency packages before even starting with the package that needs the dependencies. dpkg will not even unpack the main package until all pre-depend packages have been dealt with. With depends, the order of the dependency packages and the main one is not important. With pre-depends it takes into consideration this and also the verification if the pre-depends packages are configures and installed or not. Without this, the main package will not even be unpacked, configured or installed. You must either have the dependencies installed before starting the process of working with the main package. If not, they have to be downloaded/configured/installed first before proceeding. pre-depends are normally used in cases where the stability of the package is important and would not affect the system or program in a very bad way but this cases are avoided with several norms also mentioned in the link above.


How do I remove all Files and Folders from a Wine installation [Battle.net]

after extensive reading, the ideal solution was presented in the below link.
https://www.cyberciti.biz/faq/how-to-delete-and-remove-files-on-ubuntu-linux/

Open Terminal -- then type--> locate -i battle* - this will give the file paths
Within Terminal --type--> rm -rf -i /path/... either directory or file name


The package rkhunter is in the repos, so just

sudo apt-get install rkhunter

So is chkrootkit

sudo apt-get install chkrootkit

  "rkhunter vs chkrootkit?" comparison from wikipedia

rkhunter

  rkhunter (Rootkit Hunter) is a Unix-based tool that scans for
  rootkits, backdoors and possible local exploits. It does this by
  comparing SHA-1 hashes of important files with known good ones in
  online databases, searching for default directories (of rootkits),
  wrong permissions, hidden files, suspicious strings in kernel modules,
  and special tests for Linux and FreeBSD.

  The tool has been written in Bourne shell, to allow for portability.
  It can run on almost all UNIX-derived systems.

chkrootkit

  chkrootkit (Check Rootkit) is a common Unix-based program intended to
  help system administrators check their system for known rootkits. It
  is a shell script using common UNIX/Linux tools like the strings and
  grep commands to search core system programs for signatures and for
  comparing a traversal of the /proc filesystem with the output of the
  ps (process status) command to look for discrepancies.

  It can be used from a "rescue disc" (typically a Live CD) or it can
  optionally use an alternative directory from which to run all of its
  own commands. These techniques allow chkrootkit to trust the commands
  upon which it depends a bit more.

  There are inherent limitations to the reliability of any program that
  attempts to detect compromises (such as rootkits and computer
  viruses). Newer rootkits may specifically attempt to detect and
  compromise copies of the chkrootkit programs or take other measures to
  evade detection by them.


Bunsen Labs is based directly on Debian, so you shouldn't be able to install Handbrake from its official repository.

You can install it instead from Bunsen's repositories. It won't be the latest version but it should work on your machine.

First you have to remove the added repo with

sudo add-apt-repository --remove ppa:stebbins/handbrake-releases

and then do the following:

sudo apt-get update
sudo apt-get install handbrake


How to encrypt/decrypt a single file ecryptfs-style without mounting?

Since I couldn't find a utility to do that, I wrote one myself. Only does extraction to stdout at the moment and doesn't support encryption. It also only supports password protected files and doesn't support public keys. This thing hasn't been tested much, so there will be bugs, but it's at least a starting point in documenting the file format somewhat (which is flawed in quite a few ways):

https://github.com/pecryptfs/pecryptfs


If your Windows was installed in EFI mode, the machine has to be in EFI mode, not CSM, to boot Windows.

Since you removed your Ubuntu partition, and by that also GRUBs boot files, it can't staqrt up.

You have two options now:

Find your Windows install media, boot from that and repair MBR from there.
Boot from Ubuntu live DVD or USB and install Ubuntu again. This will also repair GRUB.

Good luck.


This is an BIOS/UEFI issue.
Make sure portable device it the first option, resp. your USB device is the first one in the hard drive boot priority.


Errors were encountered while processing: grub-efi-amd64-signed - Ubuntu 20.04.1 LTS

Update from today has resolved the issue:
grub-common/focal-updates 2.04-1ubuntu26.6 amd64 [upgradable from: 2.04-1ubuntu26.4]
grub-efi-amd64-bin/focal-updates 2.04-1ubuntu26.6 amd64 [upgradable from: 2.04-1ubuntu26.4]
grub-efi-amd64-signed/focal-updates 1.142.8+2.04-1ubuntu26.6 amd64 [upgradable from: 1.142.6+2.04-1ubuntu26.4]
grub-efi-amd64/focal-updates 2.04-1ubuntu26.6 amd64 [upgradable from: 2.04-1ubuntu26.4]
grub-efi/focal-updates 2.04-1ubuntu26.6 amd64 [upgradable from: 2.04-1ubuntu26.4]
grub2-common/focal-updates 2.04-1ubuntu26.6 amd64 [upgradable from: 2.04-1ubuntu26.4]


In your boot log, it looks like fsck is taking about 10 seconds to check your disks for errors.  That shouldn't happen on every boot, so it's an obvious place to start looking for problems.  In particular, it's taking time checking a vfat drive.

Try booting to rescue mode and check your disks for errors from there. There are certain filesystem problems that need to be resolved interactively.

If you are mounting windows drives, check them for errors from windows.


Running "eclipse-inst" file present in eclipse installer is giving an error

I found the answer. Actually, I installed 32 bit JDK on my 64 bits OS system (surprisingly I was able to compile and run java programs) and 64 bit Eclipse. Thus, I removed the installed version of java here's the link on removing java and installed the 64 bit java. Thus, I was able to run the eclipse installer file which was previously giving me an error.


Simple way to create a folder when nautilus file list is full of items

It has always been in the application menu, but it's been turned into an icon:

There is, of course, the keyboard shortcut Shift+Ctrl+N but some of us aren't always on a physical keyboard these days.


How do I download pictures from iPhone 7 to Ubuntu PC

Since ~5 years ago it is not possible.

I finally gave up.

But there’s something much more convenient: let your photos automatically upload to Dropbox.

I know, it’s not free software but neither is our iPhone ;-)


You should consider installing jupiter

You can select power modes with it, it's very easy to control, just set it to power on command, you wont notice that your laptop is on, until you start using heavy apps. Plus it will stay way cooler.

open terminal and do this:

  add the repository

sudo add-apt-repository ppa:webupd8team/jupiter

  update

sudo apt-get update

  install jupiter

sudo apt-get install jupiter

  and to other people reading this and are using an Asus EEPC netbook,
  install this asswell

sudo apt-get install jupiter-support-eee

Have a nice day :)


LightDM resolution when using two monitors

Does this answer help you? Need to reconfigure absolute position of dual monitors after reboot, how do I fix that? . This is how I worked around the exact same issue you are having. Sorry but I can't post comments yet in the site :(


Can I install Ubuntu 12.10 in a Intel Atom PC?

Yes you can install Ubuntu 12.10 in a Intel atom PC.


zscreen - real alternative for automated screen capture

Screenshot options in ubuntu are as follows:

shutter
Gnome Screenshot
screencloud
GIMP
5CM Uploader
kazam

and off course scrot.

So take a look and choose which is suitable for you. This question will help you


What does the root and # mean in the second command line tag?

It means you edit the system as "root". That is 1 more level up than from "sudo" and 1 more up from your normal users activities  ...

  what does this mode allow you to do

... and (almost) all permissions checks are neglected. So if want you can seriously destroy your system with a single command.

  and how do I get out of it?

Type

 exit


Mobile internet modem still not being detected

I totally forgot about this question. It seems that in Ubuntu 12.04 and 12.10, the default Network Connections is enough to fix the connection. Wait for the Modem icon to pop up in the Unity bar after plugging the mobile broadband stick. Right click on the icon and click on Eject modem. It will re-mount itself so right click on the icon again and click Eject modem once more. Wait for a short while and the Network icon should start showing your modem (usually follows New Mobile Broadband). Click on that and follow through with the installation as described, for instance, in this external site: http://daksh21ubuntu.blogspot.com/2012/02/how-to-establish-mobile-broadband.html


Wifi-Disabled: Ubuntu 19.10 - Intel Wireless 7265

Update: In my case WIFI works again after disabling 802.11n. I added the option 11n_disable=1 to /etc/modprobe.d/iwlwifi.conf - now it looks like this:

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac8021
options iwlwifi 11n_disable=1

See also https://wiki.archlinux.org/index.php/Network_configuration/Wireless#iwlwifi (the iwlwifi parameters apply to Ubuntu too and Arch has great documentation )

I have the exact same problem (no WIFI connections after upgrade to Ubuntu MATE 19.10) and the exact same WIFI card (same output of lspci).

The problem is also present for new installs of Ubuntu MATE and has nothing to do with the upgrade - I tried with the Ubuntu Mate 18.10 and Kubuntu 19.10 on a USB stick: same behavior. So I would say all Ubuntu 19.10 flavors are affected.

I want to elaborate on the what's not working part:

WIFI is active, and I can see available networks, e.g. with iwlist wlp3s0 scan
However, connecting to a network (with the GUI) fails: after entering credentials (for a password protrected WPA2 network) it tries to connect for a few seconds but then asks for a passphrase again .. and again ..
Also the problem is not the GUI, the exact same behavior is shown by nmtui

Checking the output of NetworkManager in /var/log/syslog we can see that the association is the one that fails:

sudo cat /var/log/syslog  | grep "(wlp3s0)" | sed 's/.*device //'

device (wlp3s0): Activation: starting connection 'MY_WIFI' (c5c790fb-86a8-4905-97b0-75170f5e985c)
device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): Activation: (wifi) access point 'MY_WIFI' has security, but secrets are required.
device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): Activation: (wifi) connection 'MY_WIFI' has security, and secrets exist.  No new secrets needed.
device (wlp3s0): supplicant interface state: ready -> scanning
device (wlp3s0): supplicant interface state: scanning -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> disconnected
device (wlp3s0): supplicant interface state: disconnected -> scanning
device (wlp3s0): supplicant interface state: scanning -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> disconnected
device (wlp3s0): supplicant interface state: disconnected -> scanning
device (wlp3s0): supplicant interface state: scanning -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> disconnected
device (wlp3s0): supplicant interface state: disconnected -> scanning
device (wlp3s0): supplicant interface state: scanning -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> disconnected
device (wlp3s0): supplicant interface state: disconnected -> scanning
device (wlp3s0): supplicant interface state: scanning -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> disconnected
device (wlp3s0): Activation: (wifi) association took too long
device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): Activation: (wifi) asking for new secrets
device (wlp3s0): supplicant interface state: disconnected -> scanning
device (wlp3s0): no secrets: User canceled the secrets request.
device (wlp3s0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')
device (wlp3s0): Activation: failed for connection 'MY_WIFI'
device (wlp3s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')

This is what the log looked like before the update with Ubuntu MATE 19.04

device (wlp3s0): Activation: starting connection 'MY_WLAN' (b3dffdda-2b7b-467d-a1f5-2b3077d26eb3)
device (wlp3s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): Activation: (wifi) access point 'MY_WLAN' has security, but secrets are required.
device (wlp3s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): Activation: (wifi) connection 'MY_WLAN' has security, and secrets exist.  No new secrets needed.
device (wlp3s0): supplicant interface state: ready -> authenticating
device (wlp3s0): supplicant interface state: authenticating -> associating
device (wlp3s0): supplicant interface state: associating -> associated
device (wlp3s0): supplicant interface state: associated -> 4-way handshake
device (wlp3s0): supplicant interface state: 4-way handshake -> completed
device (wlp3s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "MY_WLAN"
device (wlp3s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
dhcp4 (wlp3s0): activation: beginning transaction (timeout in 45 seconds)
dhcp4 (wlp3s0): dhclient started with pid 20140
dhcp4 (wlp3s0):   address 192.168.1.161
dhcp4 (wlp3s0):   plen 24 (255.255.255.0)
dhcp4 (wlp3s0):   gateway 192.168.1.1
dhcp4 (wlp3s0):   lease time 43200
dhcp4 (wlp3s0):   hostname 'whakaari'
dhcp4 (wlp3s0):   nameserver '192.168.1.1'
dhcp4 (wlp3s0): state changed unknown -> bound
device (wlp3s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
device (wlp3s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
policy: set 'MY_WLAN' (wlp3s0) as default for IPv4 routing and DNS
device (wlp3s0): Activation: successful, device activated.

Checking the journal and logs I can not find any errors or warnings, but I noted that iwlwifi seems to have a debug mode activated.

sudo journalctl | grep iwlwifi for Ubuntu 19.04:

Sep 10 19:59:56 whakaari kernel: iwlwifi 0000:03:00.0: loaded firmware version 29.1044073957.0 op_mode iwlmvm
Sep 10 19:59:56 whakaari kernel: iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
Sep 10 19:59:56 whakaari kernel: iwlwifi 0000:03:00.0: base HW address: 5c:e0:c5:63:e2:a5
Sep 10 19:59:57 whakaari kernel: iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
Sep 10 19:59:57 whakaari sensors[873]: iwlwifi-virtual-0
Sep 10 19:59:58 whakaari NetworkManager[856]: <info>  [1568138398.2497] rfkill3: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211/phy0/rfkill3) (driver iwlwifi)

sudo journalctl | grep iwlwifi for Ubuntu 19.10:

Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: Found debug destination: EXTERNAL_DRAM
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: Found debug configuration: 0
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: loaded firmware version 29.1654887522.0 op_mode iwlmvm
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: Applying debug destination EXTERNAL_DRAM
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: Allocated 0x00400000 bytes for firmware monitor.
Oct 19 16:16:30 whakaari kernel: iwlwifi 0000:03:00.0: base HW address: 5c:e0:c5:63:e2:a5
Oct 19 16:16:31 whakaari kernel: iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
Oct 19 16:16:32 whakaari sensors[941]: iwlwifi-virtual-0


Is there a Microsoft Office theme for LibreOffice?

It appears unlikely, if a quick Google search doesn't pick up simple things like themes for programs it's unlikely they exist without it requiring some substantial programming experience. Just use LibreOffice for a month and before long you will likely loose that confusion. If you want help with finding stuff in LibreOffice press 'F1' and use the help provided. Or you could just look through the menus under the headings, 'file' 'edit' etc. Good question though, I'm sure many have at least asked themselves that.


How to test whether port forwarding is working?

If you have setup a port forward on your Ubuntu, you can test it by
  running port forwarding tests on websites specialized in this job. One
  of these is How to test port forwarding. It automatically detects
  your IP and you have to enter only your port you are about to test,
  and hit Check.

Source:ubuntu-for-humans

ubuntu-for-humans


Run a script on login using ~/.bash_login

If .bash_profile exists, then Bash will not read .bash_login (or .profile). This annoying feature is described in some versions of the Bash manual, but not all.

.bash_profile and .bash_loginare analogous, so I recommend you put your commands in .bash_profile, because it's is commonly used and .bash_login is relatively unknown. Also consider putting your commands in .bashrc instead of .bash_profile. The manual describes difference between "interactive non-login shell" and "interactive login shell", so be sure to read that section.

The GNU Bash Reference Manual version 4.1: Bash Startup Files says:

  looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
  order, and reads and executes commands from the first one that exists
  and is readable.

Also see this question on superuser, and this Bash howto (Don't be deterred by the freeunix.dyndns.org:8088 address--- it's still a good quality manual and I have used it for years).

Update, since you say you don't have a .bash_profile.

It sounds like you are not using what's called a "interactive non-login shell" (See the Bash manual for a detailed description).

To test this, add something like the following each file: .bashrc, .bash_profile and .bash_login.

echo "DEBUG: I am .bashrc"

echo "DEBUG: I am .bash_profile"

Then log out and log in again. When you log in, I bet you will only see the phrase "DEBUG: I am .bashrc" but not "I am .bash_profile". If so, it means you are a "interactive non-login shell", which simply means that Bash will call .bashrc but not .bash_profile. For information why these dotfiles are the way they are, see @Andrejs Cainikovs's post below and http://mywiki.wooledge.org/DotFiles


Create custom shortcut GUI/view similar to the Super + hold feature

You're essentially looking for a Ubuntu version of CheatSheet. I don't know of any that exists off the top of my head. Have you tried holding Alt while in the active app? You can fuzzy search for app-specific commands.


This is all great and fine. But for a noob or anyone who is not accustomed to CLI it doesn't make the problem any less bothersome. Here is the solution that worked for me.

Completely remove Light Locker using Synaptic Package Manager
Install Gnome Screensaver from the Ubuntu Software Center
Restart the computer


Accessing a nameless folder via terminal

You can't have a file with an empty name. However, the name could be something you can't see. Like a space, a non-breaking space, a tab, a horizontal tab, or even a character which isn't even printable like a end of message character or an escape character.

To show this, I've just created a folder having a blank as its name and anther one having a non-braking space as its name.

$ ls -l
total 8
drwxrwxr-x 2 christoph christoph 4096 Sep 30 22:02
drwxrwxr-x 2 christoph christoph 4096 Sep 30 22:02

As you can see, there is no obvious way of seeing which one is which (though the non-breaking space really is displayed (in your browser: just copy one of the lines, press ctrl + F to search for it, and only 1 result will be shown) but ls -l doesn't display all characters, so it's possible to make different folders with actually the same output line of ls -l).

If you're using any version of Ubuntu but 15.04, first execute this command:

sudo apt-get install nautilus-open-terminal

This will give you the entry Open in Terminal in the context menu of Nautilus. If it doesn't Nautilus has to be restarted, so simply log out and log in again. Ubuntu 15.04 already comes with this entry, so you don't need to install nautilus-open-terminal or you'll have the entry twice.

Then you can use the opened terminal window to do whatever you want to do at this location.

Edit: I assumed you wanted to open the location in a terminal. If you want to browse it and only have a terminal available, you can use a terminal file browser like Ranger. Here is a page showing you how to install and use it.


Why is port not open? (Not UFW; Service is running)

It only listens on the loopback interface 127.0.0.1:

$ sudo netstat -tnlp | grep :2113
tcp        0      0 127.0.0.1:2113   0.0.0.0:*     LISTEN      24854/eventstored

Services will only receive packets from interfaces they listen to. You can commonly specify 0.0.0.0 as listen address in the service, to make it listen on all interfaces.

According to the documentation, port 2113 is the administrative interface. It may be a good idea to leave this accessible only to localhost, and use ssh port forwarding to access the service.


What development tools and languages are used for ubuntu mobile app development?

The Ubuntu SDK is only available for Ubuntu but since Qt Creator will run on windows it should be fairly easy to port. I would still recommend using Ubuntu because it will be easier. As for the language, QML and HTML are the two officially supported languages for the user interface. You can use whatever you want in the back. Also, I would recommend reading through the developer page. It provides a lot of useful information. Application requirements can be found here. A Debian based os will still be required to package your app but as long as you are not relying on Linux binaries, you can do the majority of the development on windows.


I managed to install it running the following command.

sudo apt-get install apache2=2.2.22-1ubuntu1.7 apache2.2-common=2.2.22-1ubuntu1.7 apache2.2-bin=2.2.22-1ubuntu1.7 apache2-mpm-worker=2.2.22-1ubuntu1.7

Thanks to this question here

Update:
It seems like 2.2.22-1ubuntu1.7 does not exist any more. Please try using 2.2.22-1ubuntu1.10

With my original question I have since found the original problem while downgrading so did not look into this problem any further since then.


What happens if I delete the swapfile in Ubuntu 17.10?

Nothing. It's not possible to delete a swap file that's in use.


From your brief description, it sounds like your gnome-control-center window is launching to another workspace than you'd like.
If that's really the case, hit ALT+F7 to move into the "screen" where the gnome-control-center window is, then hit the SUPER key, click and drag the gnome-control-center window into the desired workspace on the right side of the screen. Click SUPER to close the overview.


In dconf-tool, navigate to org.gnome.desktop.thumbnailers then in disable key within brackets write mime type of files, it will look like this.

  ['application/pdf', 'video/x-flv', 'video/mp4', 'video/webm',
  'video/3gpp', 'video/x-msvideo', 'video/quicktime', 'video/x-ms-wmv',
  'audio/mpeg', 'audio/mp4', 'video/mpeg', 'video/ogg',
  'video/x-matroska', 'video/x-ms-wmv']

then delete .thumbnails folder in home folder. DONE


Can I specify what characters set the double-click selection boundary in GNOME Terminal?

[Adding an answer since the accepted one no longer works.]

Script

I put this together into a script to set the word separators:

https://github.com/ab/ubuntu-wart-removal/blob/master/gnome-terminal-word-separators.sh

Background

GNOME Terminal has flip flopped several times on this subject.

This configuration feature was removed in gnome-terminal 3.14 (included in Ubuntu 15.04 Vivid)

https://bugzilla.gnome.org/show_bug.cgi?id=727743
https://bugzilla.gnome.org/show_bug.cgi?id=730632

Then in gnome-terminal 3.16 (included in Ubuntu 15.10 Wily), the option was reintroduced under the hood, but with no UI. In addition, colon : was changed to be treated as a word separator.

Editing with dconf

Per these instructions, you can configure the set using dconf: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1401207/comments/8

I like to use -#%&+,./:=?@_~ as the set of non-word-separators.

  Note that the use of colons there is /crazy/. Yes, there is :/: in there.

  1) edit -> profile preferences -> the General tab on your profile has its Profile ID, e.g. b1dcc9dd-5262-4d8d-a863-c897e6d979b9

  2) check you've got the syntax right with:

  $ dconf list /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/
  foreground-color
  visible-name
  palette
  use-system-font
  ...

  If it returns nothing, you've got it wrong; try again.

  3) dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/word-char-exceptions '@ms "-#%&+,./:=?@_~"'

  Specifically, this has ":" in, which makes it select URLs like I expect. (http://example.com doesn't select "//example.com").


I spent longer than intended on that one. My test script that takes two minutes to execute (way beyond my normal restart procedure) is able stall the shutdown and to write data on exit without any problems. Also, theoretically speaking, there should be no problem with your setup. Scripts are run sequentially, your script is at the beginning of the sequence in rc0.d, it should run as expected.

The only thing I can think of is that your script exits before a process called from the script has finished. You should run your setup with a test script. And you should check your script (or post it here). Pozdrawiam!


error when install Ubuntu 14.04 with easyBCD

Why not use PowerIso to make a bootable USB and use grub as bootmenu? Run it as administrator.


pdf opens in browsers but when downloaded looks for password

Some PDFs can have certain restrictions which evince (the one in 14.04) can't correctly handle and It asks for password. The solution is using other pdf readers.

Opening with browsers works great. But if you're looking for ways to open with desktop application you may try mupdf and foxit pdf reader. Mupdf is very barebone pdf reader and very fast and somehow it can manage to open such pdfs.

sudo apt-get install mupdf

will install it.

You can download foxit reader from here https://www.foxitsoftware.com/downloads/


Where can I find stories from people moving from a Windows OS?

I switched from using windows XP almost exclusively, to using Ubuntu exclusively about a year ago.  I made the switch because my installation of XP broke.  A re-install was not possible because I lost the product key.

The switch to Ubuntu was pretty brutal.  I needed my computer for college work etc. and it really took me a while to get used to.  Naturally I was looking for a windows like UI so I decided to try Kubuntu after a while.  This I did not like for some reason.  (KDE is a bit cumbersome I think).

I decided to try openSUSE because of their commitment to KDE, but I couldn't get used to YaST.  I tried some others (Debian and Arch Linux), but due to my rather limitted knowledge of the Linux OS I didn't get very far.  Eventually, I ended up using good ol' ubuntu again.  Since I hadn't used Ubuntu in the GNOME 2 era, Unity did not bother me so much.

When 12.10 came out I upgraded (which broke my install).  Rather than re-install ubuntu I figured I should try some other linux flavours.  Eventually I stuck with Arch Linux.  I stuck with it because I loved the minimalistic system I was able to build, as well as the pacman package manager.

On my laptop I still use Ubuntu because it requires much less maintainance than arch, and handles WI-FI connectivity out of the box.

At work I also use Ubuntu (I had no choice really), but I use the xfce desktop environment because it runs smoother on the hardware.

I have also recently re-installed windows (windows seven this time) for compatibility reasons, and because I like gaming.

My conclusion is that, unless you are intending to game or require specific software, Linux (which distro does not matter so much) is a superior OS, especially for software development.

As for Ubuntu itself, it is certainly not my favourite distro, (I prefer more lightweight alternatives) but with the xfce or lxde desktop environment it is very usable.  By far my favourite though is Arch Linux.

https://wiki.archlinux.org/index.php/Arch_Linux


You are not running the .jar file by itself. Instead you run java and pass the name of the jar file as a parameter. If you pass only the name of the file but not a full path  the system will assume the file is in your current directory and if it is not you will get the error you mentioned. You should pass the full path after the -jar flag and then you can run your alias from any directory.


I was able to install Compiz Settings Manager from the Ubuntu Software Center and turn on Wobbly Windows.  I admit, I just like it personally.  If it interferees with any aspect of use, or slows it down, I'm unaware of it, and that's not just because of the speed of "my system", as this is a portable (pendrive type) ubuntu installation, and alternates primarily between a 6core 64bit gaming desktop with 8gb ram and graphics accelerator, and a 32bit netbook with 2gb ram and minimal graphics.

Since my installation is on portable media I also I boot other people's hardware to my own drive with some frequency.  The result naturally is that while I am introducing new people to Ubuntu in general, in the course of relatively mundane activities, I'm dazzling them with graphic features they are not accustomed to seeing performed on their own hardware.  In most cases, people are instantly interested in learning how to get Ubuntu themselves.


Desktop is empty from Dock and icons and everythng

try this!!
Press the super key(window key) and then type Extensions under it turn on Ubuntu Dock.


Display number of hours since a specific time in bash

Generally speaking for times in Unix it's simplest to convert both datetimes into Unix Timestamps (that are seconds since 1970-1-1 00:00), subtract one from other and, in your case, divide by 3600 to get the hours.

SECONDS=`expr $(date -d "20110523" +%s) - $(date -d "20110522" +%s)`
expr $SECONDS / 3600

#Return is 24


Boot to safe mode to reset password not available

Being unable to access recovery mode at all, and being prompted for a password (which you don't have) to enter recovery mode, both make it so you can't use recovery mode to reset your password.

Therefore, your best bet is to reset the password using a live CD/DVD/USB.

(I'm not sure if this question should be closed as a duplicate of that one. My solution is the same, but the situation is different, and perhaps someone else can post an answer here about how to access the GRUB menu to enter recovery mode.)


Unexpected PHP version 5.5.15rc1 from ppa:ondrej/php5

To answer your questions - there's a crasher bug in locale setting when locale is empty, thus the emergency upgrade to RC1.   It might happen from time to time when I see a strong reason for the upgrade to the RC version.


Why does software updater insist on reinstalling mysql 5.7?

You can prevent a package from being updated by running the command

sudo apt-mark hold package

In your case, it should run

sudo apt-mark hold mysql5.6

If you wish to update it later, you can run

sudo apt-mark unhold package


How do I fix my Grub2 "permanently"? (No partition found)

Option 1:

Try running sudo update-grub. If that does not fix the problem, then try option 2:

Option 2:

Create a file /etc/grub.d/windows10_custom

menuentry "Windows 10" {
set root=(hd0,msdos6)
set prefix=(hd0,msdos6)/boot/grub/
insmod normal
normal
}

Run sudo update-grub

References

Ubuntu's guide to building custom menus for grub 2


How long will Ubuntu 13.04 be supported for?

The ubuntu wiki has a graph for this (see https://wiki.ubuntu.com/LTS for more information).

Ubuntu also has a 6 months cycle where new releases are release on the 4th and 10th month of the year (hence the 12.04, 12.10, 13.04, 13.10 etc).

  A new LTS version is released every 2 years. In previous releases, a Long Term Support (LTS) version had 3 years support on Ubuntu (Desktop) and 5 years on Ubuntu Server. Starting with Ubuntu 12.04 LTS, both versions will receive 5 years support. There is no extra fee for the LTS version; we make our very best work available to everyone on the same free terms. Upgrades to new versions of Ubuntu are and always will be free of charge.


Restoring themes and icons to default state?

The problem was apparently caused by leftover files in the /usr/share/themes directory. I knew that the files causing the entries in the Ubuntu Tweak Tool and other tweak tools should reside in either /usr/share/themes or ~/.themes since I deleted the latter one I found out that the files causing the problem was in the /usr/share/themes directory, I deleted them then purged all the PPAs associated with the themes then I got a near fresh install although I am not exactly sure if I had deleted any default themes by then or not. Anyways, the moral is that directly copy pasting themes from another computer may not work, especially if they are installed via PPA and you mess with permissions by carrying it with an USB pen formatted in NTFS or something that does not support Linux permissions.


Can't sync Nokia Lumia 800 on Ubuntu 12.04

The Lumia 800, like many other Lumia devices, seems to use MTP for providing access to the phone storage.

Ubuntu's filemanager does support MTP out of the box since 12.10 if I recall correctly. Also support for MTP devices improved in recent releases and with 14.04 a can finally use my Lumia 620.

I suggest you update from 12.04 LTS to 14.04 LTS.

Related:

My MTP capable device is not detected? What can I do about that?
My answer on Getting MTP enabled devices to work with Ubuntu?
Article from WorkArounds blog: Windows Phone 7.x on Linux


It seems to be a semi-intentional1 change in Docker 20.10.2, see the related discussion here: https://github.com/moby/libnetwork/issues/2607. Looks like a fix is underway.
In the meantime, downgrading to 20.10.1 works for me:
sudo apt install docker-ce=5:20.10.1~3-0~ubuntu-focal \
                 docker-ce-cli=5:20.10.1~3-0~ubuntu-focal
sudo apt-mark hold docker-ce docker-ce-cli

1 Semi-intentional because, apparently, this feature was never intended to be used this way. I’m as surprised as you are…


apt-get returns Err http://archive.ubuntu.com/ubuntu/ maverick/main b43-fwcutter i386 1:013-2 404 Not Found [IP: 91.189.92.201 80]

Go here b43zip file

Download the b43 zip file to a flash drive then drag and drop the file to your Ubuntu desktop. Right-click it and select Extract Here. Open a terminal and do:

sudo mkdir /lib/firmware/b43
sudo cp Desktop/b43/* /lib/firmware/b43
sudo rmmod -f b43
sudo rmmod -f ssb
sudo modprobe b43

if you have not installed any other wireless driver your wireless should now be working.

You are still going to have trouble updating 10.10 because it is no longer supported so the repositories are not available.

I found a link that will let you update packages but you need to know these are old packages they are no longer updated either.
update packages for old releases


Unity configure a desktop to occupy only part of the physical screen

Last time I checked, in Unity you could drag a window by its title to the left/right edge of screen and have it maximized to only 1/2 of the screen. Also, dragging a window to a corner of the screen would maximize it to only 1/4 of the screen.
There are also keyboard shortcuts which allow you to position windows with keyboard:
Window Placement
If you cycle through the same key Unity will cycle through different placement widths, so experiment by hitting the numkey multiple times, for example Ctrl-Alt-numpad 5 5 5:

Ctrl-Alt-Numpad 7 - Place window in top left corner of screen.
Ctrl-Alt-Numpad 8 - Place window in top half of screen.
Ctrl-Alt-Numpad 9 - Place window in top right corner of screen.
Ctrl-Alt-Numpad 5 - Center/Maximize the window in the middle of the screen. In 12.04 this toggles between maximize and restore state
Ctrl-Alt-Numpad 1 - Place window in the bottom left corner of the screen.
Ctrl-Alt-Numpad 2 - Place window in the bottom half of the screen.
Ctrl-Alt-Numpad 3 - Place window in the bottom right corner of the screen.
Ctrl-Alt-Numpad 0 - Minimize the current window (Ubuntu 12.04.1).

This would allow you to quickly position windows so they don't overlap, which basically achieves the same as your "sub-desktops" idea.
If you want to go further, then Welcome to the Wonderful World of Tiling Window Managers :) Just google for XMonad for a start.


Can you open a LibreOffice Draw file in MS Publsiher?

probaby your mom can open the file check this out

http://ask.libreoffice.org/en/question/14/can-i-use-microsoft-publisher-files-with-libreoffice/


Is there any file manager that tiles images with a best-fit UI like Google Image Search?

PCManFM has an additional folder view mode called "Thumbnail View" for the best-fit image browsing. The best-fit varies by the image file size (dimension) and zoom level that is currently used.

In the menubar, go to View > Folder View Mode (Qt variant: View) > Thumbnail View.

To make this mode as default, go to Edit > Preferences > General - Default View - View Mode (Qt variant: Behavior - Browsing - Default view mode) and change from "Icon View" to "Thumbnail View".

For Ubuntu or GTK+ desktop environment, install pcmanfm. Else for KDE or Qt desktop environment, install pcmanfm-qt (16.04+). Both PCManFM variants are available in the repository.


Is "Ubuntu for Phones" as powerful as Ubuntu for PC's?

It's too early to provide a fully satisfying answer as Ubuntu Touch has only started as a Developer Preview yet.

The idea is that the final Ubuntu Touch will allow you to connect the device (should be a powerful one) via docking station to monitor and keyboard/mouse and can be used as a normal workstation.

There are already devices which are powerful enough and Ubuntu with all components is already fully available for arm machines.

It will be exciting to find out if it's powerful enough but we will have to wait for at least half a year.

The only thing you can see right now is the new mobile version of unity and you can connect to your Ubuntu Touch via adb or ssh and you can run all possible command line programs.


Hey :)  I've just resolved the problem here, "window previews" wasn't checked in CCSM. I did so and it's working really well :) (no need to relaunch dockbarx)

Pierre


Can I be notified about blocked connection attempts?

There are no such firewalls for Linux. You are welcome to read a somewhat exhaustive discussion on the subject at ubuntuforums.org. To summarize, it pretty much boils down to the cliche - Linux != Windows.

http://ubuntuforums.org/showthread.php?t=1591340&highlight=application+based+firewall


Restore .img backUp...but is 1MB too big

To restore the image you have to select the block device /dev/mmcblk0 instead of the partition /dev/mmblk0p1 as the destination.


Ubuntu 16.04 LTS gigabit ethernet r8153 not recognised

Upgrade from Ubuntu 16.04LTS to 18.04LTS fixes this problem


VMware player fails to compile modules on Ubuntu 18.04- GCC error?

The new version VMware-Player-14.1.3-9474260.x86_64.bundle solves the issue for me. After installation, there is no prompt for module compilation or GCC.


Networking Setup Of An OpenStack-Based Environment

The official method is to use the Landscape OpenStack Autopilot.

If not using the autopilot, the next recommended method is to use MAAS to commission the machines, then use Juju to deploy OpenStack.

In these scenarios, MAAS handles DHCP for the broadcast domain behind your router ("LAN") and neutron handles DHCP for the instances in your tenant network(s).

When you deploy services with Juju and MAAS, the machines are automatically provisioned and configured, including their network interfaces.  Even for just a handful of servers, this makes deployment and management quite nice.  Bear in mind that the neutron-gateway unit needs to have two NICs connected.

It might end up looking something like this, assuming that you're using /24 networks with 255.255.255.0 subnet masks throughout:

11.11.11.11/24 <-WAN-> (YourRouter w/o DHCP@LAN) <-LAN-> 10.10.10.1/24
  MAAS @ 10.10.10.2/24
  MAAS configured to handle DHCP and DNS
  MAAS DHCP pool:              10.10.10.10  through .127
  Neutron floating IP range:   10.10.10.128 through .254
  Juju units @ 10.10.10.10 through .?, automatically assigned

Other recommended docs and links:

MAAS Documentation
A 4-machine Juju bundle example:  Ubuntu OpenStack "Basic"


This looks like a different handling of font hinting/aliasing from Fluxbox vs. GNOME/Unity.

  Warning: The following is for experiences users only!

According to the Fluxbox Wiki (untested as we do not run Fluxbox here) we can define font settings by creating a ~/.Xresources file in our HOME where font rendering can be defined with the following entries (amongst many others):

[...]
 Xft.antialias:                 true
 Xft.hinting:                   true
 Xft.hintstyle:                 hintfull
 Xft.rgba:                      rgb
[...]

To take effect we run

xrdb ~/.Xresources

Disclaimer: we have no own experience whether an additinoal .Xresources file also affects our GNOME/Unity XServer settings. Therefore do apply these settings with care. Update any pre-existing settings before you change anything as wrong X-server settings may render your X-display unusuable.


How to easily convert an MKV video to an MP4

One easy way (requiring a terminal), is using FFMPEG.
First, open a terminal and install FFMPEG with this command:
sudo apt install ffmpeg

Now all you have to do to convert your video is this one single command:
ffmpeg -i <inputfile> <outputfile>

For example, in your case:
ffmpeg -i input.mkv output.mp4

FFMPEG will automatically detect/use the correct input and output formats.
Conversion may take a few minutes based on length and frame rate of video.


call multiple functions in multiple terminals

On my version of gnome terminal

$ gnome-terminal --version
GNOME Terminal 3.22.0

I do not have option -c, but instead I have option -x or -e

However if you want to start gnome-terminal running internal function sourced in .bashrc you may try to do it this way:

gnome-terminal -x "bash" -ic "irene"

Please note that bash's -i option will make sure that your .bashrc is evaulated, therefore irene function is available.

Please also note, that after irene function finishes its operation, gnome-terminal will stop. You may consider running some commands after irene, like for example:

gnome-terminal -x "bash" -ic "irene; sleep 2;" # wait 2 seconds after "irene" stops

or

gnome-terminal -x "bash" -ic "irene; bash;" # run NEW instance of bash after "irene" stops

If irene function sets some environmental variables, they may be accessible in this NEW instance of bash only if you export them.

function irene() {
   # ...some code
   export variable="value of variable"
   # ...some code
}

instead of

function irene() {
   # ...some code
   variable="value of variable"
   # ...some code
}


apt-get update failed because certificate verification failed because handshake failed on nodesource

You can add [trusted=yes] in the sources.list. For example:

deb [trusted=yes] http://ppa.launchpad.net/repo_name/pkg/ubuntu vivid main
deb-src [trusted=yes] http://ppa.launchpad.net/repo_name/pkg/ubuntu vivid main


KDE5 shortcut for moving window to another workspace

In Kubuntu 17.04 Zesty, in System Settings > Shortcuts > Global Shortcuts > System Settings, you have an option Window One Desktop [Down/to the Left/to the Right/Up]. Which is a slightly different place from what the other answer says.


Upgrade from 14.04 to 14.10 Failed really bad

Test this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
nano /var/lib/dpkg/status

In the open file searching is a line saying:

Package: upstart-app-launch
Status: install ok installed
Installed-Size: xx
Maintainer: xxxxxx
Architecture: xxx
Version: xxxx
Replaces:
Provides:
Depends:
Description:

Delete all lines until the next:

Package:

Ctrl + O, save file. Ctrl + X, close nano.

Continue running in terminal:

apt-get autoremove
apt-get clean
UNUSCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
apt-get remove --purge $UNUSCONF
update-manager -d

Software Updater will show up and search for the new release, after a few seconds, you will see a screen that saying:

However, Ubuntu 14.10 is available now.

Press the button Upgrade to start upgrading to Ubuntu 14.10.

The Software Updater will ask you to confirm still you want to upgrade, press Start Upgrade to begin installing Ubuntu 14.10.

Now, the Software Updater will prepare to start setting up new software channels, and after a few minutes, the software updater will notify you the details the number of packages are going to be removed, and number of packages are going to be installed, press Start upgrade to continue.

Ended the dist-upgrade, reboot your system and:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean


14.04 does not have the logic to 'fix' this in the package - that said that package is actually older than 14.04 was.  This logic was introduced in Debian later than 14.04 to not clobber index files.  The amount of changes to the post-installation statements would break things; this is why the logic wasn't added to the 14.04 package as a backport or update.

With regards to changing the docroot, if you change your document root to /var/www/something then the packaging won't clobber it.  The packages don't touch /var/www/ in 14.04.  They do touch /usr/share/nginx/... though and it's why this is a pitfall on the NGINX documentation to use the defaults.

You should be fine if you use the /var/www/... docroot.


Switching to headphones with PulseAudio bridged to Jack

In case anyone else is stuck on this, I found an OK solution for myself: creating two bash scripts and adding keyboard shortcuts to them. To switch to speakers:
#! /bin/bash

amixer -c 0 set Speaker unmute
amixer -c 0 set Headphone mute
amixer -c 0 set Speaker 100%
amixer -c 0 set Headphone 100%

...and to switch to headphones:
#! /bin/bash

amixer -c 0 set Speaker mute
amixer -c 0 set Headphone unmute
amixer -c 0 set Speaker 100%
amixer -c 0 set Headphone 100%

I keep both at 100% volume but toggle which one is muted. This feels klugey, but works for now. Maybe someone has a better idea!


Being as the problem only began after you moved partitions around, it can only be that the partitions are not properly aligned. If you use gparted for Ext4 and swap partitions, it will make sure the partitions are aligned properly. Use Windows own Disk Management app to manage NTFS partitions.

In terminal...

To quick-check if that's the problem:

sudo fdisk -l

and it will say the partitions are misaligned or not.

However, a more accurate way is to use parted:

sudo parted
parted> print
1 {partition 1 detail}
2 {partition 2 detail}
parted> align-check optimal 1
parted> align-check optimal 2

for more help man parted.