I had the same problem: XUbuntu 12.10, two monitors, and I had to reset my screen layout with ARandR each time I logged in.  By default it wanted to "mirror" the displays.

I configured the monitors the way I wanted them in ARandR and saved a single layout in ARandR, dual_monitor.sh.  ("Layout | Save As" from the ARandR menu.)  The file went to /home/user/.screenlayout/dual_monitor.sh.  I was pleasantly surprised to discover that was all I had to do.  With no further adjustments I logged out, logged back in, and the two monitor configuration was in place.

I have no answer to the HDMI switch portion of the question.


What does the symbol % in '%sudo ALL=(ALL:ALL) ALL' mean?

Adapted from an answer on SuperUser:

  A percent sign is used to indicate that the identifier that follows should be used as the name of a group instead of a user.

So here, sudo is the name of the group not the user sudo.


how to create auto paste in script bash with touch?

In some of my scripts I do something like this:

touch ~/Templates/"untitled_document"

LOG=/var/log/backup.log
echo "* $(date -R) *" >> $LOG

Or:

fname=/etc/fstab
str1="# Entry for /dev/sdb6 :"
echo $str1 >> $fname

Note that one > overwrites or creates new file and >> adds to end of file. I have additional data I add to log file. Also better with Linux to use CamelCase, under_score or justonename rather than spaces. You have to escape spaces in future commands which makes it more complicated.


The trash is at ~/.local/share/Trash/files. Try Shift-Delete all files there.

Even better - do it from command line:

rm -rf ~/.local/share/Trash/files

Does it solve You problem?


Using apt-cache and awk

apt-cache showpkg kubuntu-desktop | awk '/Dependencies:/,/Provides:/ {for(i=1;i<NF;i++) {if(i%3==0) {print $i}}}' | tee log_file.txt

Example (with ubuntu-desktop, sorry)

% apt-cache showpkg ubuntu-desktop | awk '/Dependencies:/,/Provides:/ {for(i=1;i<NF;i++) {if(i%3==0) {print $i}}}' > out

% cat out
alsa-base
alsa-utils
anacron
at-spi2-core
baobab
bc
ca-certificates
checkbox-gui
dmz-cursor-theme
doc-base
eog
evince
file-roller
fonts-dejavu-core
fonts-freefont-ttf
foomatic-db-compressed-ppds
gedit
genisoimage
ghostscript-x
gnome-calculator
gnome-font-viewer
gnome-menus
gnome-power-manager
gnome-screenshot
gnome-session-canberra
gnome-system-log
gnome-system-monitor
gstreamer1.0-alsa
gstreamer1.0-plugins-base-apps
gstreamer1.0-pulseaudio
gucharmap
gvfs-bin
inputattach
language-selector-gnome
libatk-adaptor
libnotify-bin
libpam-systemd
libsasl2-modules
lightdm
memtest86+
nautilus
nautilus-sendto
notify-osd
openprinting-ppds
printer-driver-pnm2ppa
pulseaudio
rfkill
seahorse
software-center
software-properties-gtk
ssh-askpass-gnome
system-config-printer-gnome
ubuntu-artwork
ubuntu-drivers-common
ubuntu-release-upgrader-gtk
ubuntu-session
ubuntu-settings
ubuntu-sounds
ubuntu-sso-client-qt
unity
unity-control-center
unity-greeter
unity-settings-daemon
unzip
update-manager
update-notifier
wireless-tools
wpasupplicant
xdg-user-dirs
xdg-user-dirs-gtk
xdiagnose
xkb-data
xorg
yelp
zenity
zip
acpi-support
activity-log-manager
aisleriot
app-install-data-partner
apport-gtk
avahi-autoipd
avahi-daemon
bluez
bluez-cups
branding-ubuntu
brasero
brltty
cheese
cups
cups-bsd
cups-client
cups-filters
deja-dup
empathy
example-content
firefox
fonts-droid
fonts-guru
fonts-kacst-one
fonts-khmeros-core
fonts-lao
fonts-liberation
fonts-lklug-sinhala
fonts-nanum
fonts-sil-abyssinica
fonts-sil-padauk
fonts-takao-pgothic
fonts-thai-tlwg
fonts-tibetan-machine
gcc
gnome-accessibility-themes
gnome-bluetooth
gnome-disk-utility
gnome-keyring
gnome-mahjongg
gnome-mines
gnome-orca
gnome-screensaver
gnome-sudoku
gnome-terminal
gnupg-agent
gvfs-fuse
hplip
ibus
ibus-gtk
ibus-gtk3
ibus-table
im-config
kerneloops-daemon
landscape-client-ui-install
laptop-detect
libgail-common
libnss-mdns
libpam-gnome-keyring
libproxy1-plugin-gsettings
libproxy1-plugin-networkmanager
libqt4-sql-sqlite
libreoffice-calc
libreoffice-gnome
libreoffice-impress
libreoffice-math
libreoffice-ogltrans
libreoffice-pdfimport
libreoffice-style-human
libreoffice-writer
libwmf0.2-7-gtk
make
mousetweaks
nautilus-share
network-manager-gnome
network-manager-pptp
network-manager-pptp-gnome
onboard
overlay-scrollbar
pcmciautils
plymouth-theme-ubuntu-logo
policykit-desktop-privileges
printer-driver-brlaser
printer-driver-c2esp
printer-driver-foo2zjs
printer-driver-min12xxw
printer-driver-ptouch
printer-driver-pxljr
printer-driver-sag-gdi
printer-driver-splix
pulseaudio-module-bluetooth
pulseaudio-module-x11
python3-aptdaemon.pkcompat
qt-at-spi
remmina
rhythmbox
rhythmbox-plugin-magnatune
shotwell
simple-scan
sni-qt
speech-dispatcher
telepathy-idle
thunderbird
thunderbird-gnome-support
totem
transmission-gtk
ttf-ancient-fonts-symbola
ttf-indic-fonts-core
ttf-ubuntu-font-family
ubuntu-docs
unity-webapps-common
usb-creator-gtk
vino
whoopsie
xcursor-themes
xdg-utils
xterm
xul-ext-ubufox
zeitgeist-core
zeitgeist-datahub


boot problem system stops ubuntu-GNOME 13.04

You can get to your desktop still

cryptsetup luksOpen /dev/sda5 sda5_crypt
lvm vgchange -a y
exit

im not sure does this work for you but it worked atleast for me, because i have my ubuntu on sda5, you could still try it. Then you will be getting to desktop (its useful) but it wont solve it, you can get to desktop with it.
Im having the same problem, but that is useful to get to desktop.
You could try to use Boot-repair from liveCD or USB.


Looking at the permissions you set I don't think you have granted "others" permissions to write to the directory. Looking at the permissions you've granted

drwxrwsr-x

I'm pretty sure that breaks down as:

type: d
owner: rwx (Read/Write/Execute)
group: rws (Read/Write/Special)
all/others: r-x (Read and Execute)

Since the folder was created as root (sudo) only the root user has access to write to the folder (although as a user you can read the contents of the directory).

I think to fix the problem you should be able to run:

sudo chmod o+w /to

Naturally replacing /to with the real folder name/path. This will give ALL users write access to the folder which is probably not ideal. Alternatively you can take ownership of the folder (and all files within the folder):

sudo chown -R jgossage /to

Again replacing /to with the real folder name/path. This should keep the directory permissions the same (drwxrwsr-x) which would mean that the owner would have read/write/execute permissions but other users would only have read and execute permissions.


You c ould use expect to automate the process, altenatively, you could write username and password as variables, and call them in your script. You could also read them in from user input. I think the simplest way would be to use epect though, which can easily handle things like dealys, and stepping thought interactive processes.

an example login script with expect could look like this:

#!/usr/bin/expect
#./script user passwd
spawn login  [lindex $argv 0]
set passID [lindex $argv 1]
expect "Password:"
send "$passID\r"
spawn echo "lol\r\r"
expect eof

There are many ways to do this task, what ever you choose, I would avoid saving the password inside the script if possible.


Issue with increasing the root partition from the swap

Good shot! :-)  now try this:

swap off
move the swap as far as possible into the unallocated area
commit the change

if this fails, then stop and report it here.
grow your ext4 partition
commit the change

report if it worked or where it failed.


To stop the xserver temporalily use the following cmd:

sudo service gdm stop

Reboot the system after installing the drivers to re-start the xserver.


Where does Ubuntu 14.04 install NetBeans

It depends on your installation process. If you dont install it as root, it should be located at ~/netbeans-x.x otherwise it is at /usr/local/netbeans-x.x.


How to split the lines in a text file into two consecutive lines in a new file?

Your question and my understanding of it

Your question currently lacks concrete examples of input and desired output, hence I will try to answer your answer as I understand it, and edit accordingly when you provide more info.

The way I understand your question right now is that you are running something along the following lines:

find /path/to/directory  -exec grep -H -n 'SomeString' {} \;

Which produces a result that is something like this:

$ find /home/$USER/fortesting -type f -exec grep -H -n 'HelloWorld' {} \;
/home/serg/fortesting/file3:1:HelloWorld
/home/serg/fortesting/file1:4:HelloWorld

Or in general /path/to/file:lineNumber:String

Possible solutions

Appropriately enough,this is a job for awk: you have 3 fields separated by colon (field separator), which translates into awk code awk -F":" '{printf $1 FS $2 FS "\n" $3 "\n" }' Thus we can do the following:

$ find /home/$USER/fortesting -type f -exec grep -H -n 'HelloWorld' {} \; | awk -F ":" '{printf $1 FS $2 FS "\n" $3 "\n" }'
/home/xieerqi/fortesting/file3:1:
HelloWorld
/home/xieerqi/fortesting/file1:4:
HelloWorld

Now, awk is a versatile tool; we can mimick the output of find -exec grep with `find -exec awk '(awk code here)' , which will already will be processed, and saves on piping.

Consider the code bellow :

$ find $PWD -type f -exec awk  '/HelloWorld/ {print FILENAME":"FNR"\n"$0 }' {} \;
/home/xieerqi/fortesting/file3:1
HelloWorld
/home/xieerqi/fortesting/file1:4
HelloWorld

Less piping and the contents are being processed as they are found.In addition, if the file has colon in its name, this code will still process it correctly, since we are not depending on field separators, but rather printing variable FILENAME followed by colon, followed by FNR (the input record number in the current input file), and the found line separated by newline.

Efficiency

Now, lets consider efficiency as the number of files goes large.
First, I create files file1 to file1000, and then we use /usr/bin/time to test each version of command.

$ echo 'HelloWorld' | tee file{$(seq -s',' 1 1000)}
$ /usr/bin/time find /home/$USER/fortesting -type f -exec grep -H -n 'HelloWorld' {} \; | awk -F ":" '{printf $1 FS $2 FS "\n" $3 "\n" }'  > /dev/null
0.04user 0.34system 0:03.09elapsed 12%CPU (0avgtext+0avgdata 2420maxresident)k
0inputs+0outputs (0major+113358minor)pagefaults 0swaps

$ /usr/bin/time find $PWD -type f -exec awk  '/HelloWorld/ {print FILENAME":"FNR"\n"$0 }' {} \; > /dev/null
0.82user 2.03system 0:04.25elapsed 67%CPU (0avgtext+0avgdata 2856maxresident)k
0inputs+0outputs (0major+145292minor)pagefaults 0swaps

So the lengthy version seems to be more efficient, takes less time and CPU percentage.

Now, here is a compromise - change \; to + :

/usr/bin/time find $PWD -type f -exec awk  '/HelloWorld/ {print FILENAME":"NR"\n"$0 }' {} +

What does the + operator do ? The big difference is that + tells exec to list as many files as input to awk command as possible, while \; makes awk be called each and every time for each and every single found file.

$ /usr/bin/time find $PWD -type f -exec awk  '/HelloWorld/ {print FILENAME":"FNR"\n"$0 }' {} + > /dev/null
0.00user 0.02system 0:00.02elapsed 74%CPU (0avgtext+0avgdata 3036maxresident)k
0inputs+0outputs (0major+398minor)pagefaults 0swaps

Hey, much faster, right ? Though still heavy on CPU.

Outputting to another file

As for outputting to another file , add use > operator for redirection


Ubuntu 17.04 wifi not working and shown as unclaimed

I have been struggling with the same problem (same hardware but Xubuntu 16.04). This is not the solution (as I have not managed to solve it), but some links/info that I've come across in my searches that hopefully get us closer to the answer and might enable the experts to help us get there.

I believe we have the Realtek 8821CE Wireless card (see https://unix.stackexchange.com/questions/379049/realtek-wifi-driver-problem-in-linux-mint-18-2).

It seems the card does not yet have a supported linux driver. I gathered this from this thread: https://ubuntuforums.org/showthread.php?t=2371149 Praseodym's suggested trial solution from that thread (using 8887285-rtl8821ce_Test_2b.tar.bz2) did not work for me. It caused my computer to freeze and I had to restart with secure boot enabled.

As is indicated at the end of that thread, there might be a driver on someone's github page (or still under development?), but I don't know how to go about trying to install it:
https://github.com/endlessm/linux/commit/2baadff71422704848a39fba8849dde3222cb1bd

Hopefully experts can help us further. Afraid I don't understand much about these things.


Can I make a launcher shortcut perform different actions based on a condition?

I noticed that lampp starts proftpd so we can modify a scirpt that checks for a running service, if that service is running then it will stop lampp, I modified the script from here - http://www.anyexample.com/linux_bsd/bash/check_if_program_is_running_with_bash_shell_script.xml

So first make an empty text file, or open gedit, and paste this code-

#!/bin/sh
SERVICE='proftpd'

if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
    gksudo /opt/lampp/lampp stop && notify-send -i /opt/lampp/htdocs/xampp/img/logo-small.gif "XAMPP stopped."

else
    gksudo /opt/lampp/lampp start && notify-send -i /opt/lampp/htdocs/xampp/img/logo-small.gif "XAMPP started."

fi

This should also send notification that it starts and stops.

Save the file as lampp.sh and make it executable - right click => Properties => Permissions => Allow executing file as program.

Now use your favorite method to make a launcher with the script, How can I create launchers on my desktop?

Or I made one that includes the icon-

Place lampp.sh in /usr/local/bin

Create a file named Lampp.desktop and paste this into it-

[Desktop Entry]
Version=1.0
Type=Application
Name=Lampp
Comment=
Exec=/usr/local/bin/lampp.sh
Icon=/opt/lampp/htdocs/xampp/img/logo-small.gif
Path=
Terminal=false
StartupNotify=true
GenericName=

Or if you want you can make a right click list for the different functions to achieve start and stop function without the script-

[Desktop Entry]
Version=1.0
Type=Application
Name=Lampp
Comment=
Exec=gksudo lampp
Icon=/opt/lampp/htdocs/xampp/img/logo-small.gif
Path=/opt/lampp
Terminal=false
StartupNotify=true
GenericName=

X-Ayatana-Desktop-Shortcuts=NewWindow;Start;Stop;Restart;Security
[Start Shortcut Group]
Name=Start
Exec=start
TargetEnvironment=Unity

[Stop Shortcut Group]
Name=Stop
Exec=stop
TargetEnvironment=Unity

[Restart Shortcut Group]
Name=Restart
Exec=restart
TargetEnvironment=Unity

[Security Shortcut Group]
Name=Security
Exec=security
TargetEnvironment=Unity

So use one or the other, have fun.

Also I found they wrote a control panel for the program to use-

gksudo /opt/lampp/share/xampp-control-panel/xampp-control-panel.py

I you want to try this with other programs you can make scripts that will check if the are running and will kill them (warning might loose work, but would be nice for frozen programs) Say for example conky or any other program, mostly.

#!/bin/sh
    SERVICE='conky'

    if ps ax | grep -v grep | grep $SERVICE > /dev/null

    then
        killall conky

    else
        conky

    fi

save as conky.sh put in /usr/local/bin

Next is the hard part, you need to find the conky.desktop file, so in terminal type locate conky.desktop then navigate to that folder and edit the desktop file in gedit (or your favorite editor, may need privileges depending on where it is) and replace the Exec= line with Exec=/usr/local/bin/conky.sh (note that this will break any of the launchers that have right click menus)


Postfix + Sendmail (Rails): Mail not being sent out

I think I have seen the same kind of message ("SASL client initialization: generic failure") before and here's the configuration that is working for me. The options that made the difference are enable_starttls_auto and openssl_verify_mode.

This is the config/configuration.yml file of a Redmine installation. I am no Rails expert and am not sure whether the configuration is the same for other Rails applications - probably only for those using ActionMailer to send mails.

You can find additional information in the Rails docs: http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration

However I just found out that the openssl_verify_mode option is undocumented and some information can be found here: https://rails.lighthouseapp.com/projects/8994/tickets/6508-undocumented-actionmailer-openssl_verify_mode-option

# default configuration options for all environments
default:
  # Outgoing emails configuration (see examples above)
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: false
      openssl_verify_mode: 'none'
      address: your.mailserver.com
      port: 587
      domain: yoursenderdomain.com
      authentication: :login
      user_name: "username"
      password: "password"


I already answer in this other question Cannot install ubuntu Kylin 32bit on mini winpad laptop.
I did it in another tablet with Lubuntu amd64.
After i made a custom kernel i was able to use the touch almost perfectly (see above).
The wi-fi is working (by default) but no microphone, camera, speakers, bluetooth, and the touch hold function (for right click) is not the best.
Set onboard to appears in the login How to get the onscreen keybord appear on login (see all the answers).
And set gsettings set org.gnome.desktop.a11y.mouse secondary-click-enabled "true" (hold left mouse for right click) and activate hover click in onboard.


Slow, intermittent wifi on Ubuntu 16.04 Intel NUC - are my drivers up to date?

As it happens, I also own a NUC with Ubuntu installed on it. Although updating the BIOS is off-topic, I willl very briefly discuss it. It should be easy to download the .bio file (not the .exe) from Intel specific to your NUC model, place it in the top level of a USB key; that is, not in a folder, and at the BIOS, press F7 - Update BIOS and proceed. I did so on mine yesterday.

Having said that, I doubt that it will materially affect your wireless speeds and stability.

I have my doubts about the ability of wireless in a NUC because the antenna is confined in a very small area. My NUC doesn't have wireless so I can't report my experience. If you have the option for ethernet, as I do, I recommend it.

In your dmesg, we see:

[    3.712400] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-24.ucode failed with error -2
[    3.712411] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-23.ucode failed with error -2
[    3.712419] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-22.ucode failed with error -2
[    3.728307] iwlwifi 0000:03:00.0: loaded firmware version 21.302800.0 op_mode iwlmvm

In human terms, the driver looked for -24, didn't find it, looked for -23 and so on and then found and loaded -21. The latest linux-firmware package from Ubuntu only contains -21. There are sites that contain -22, -23, -24 and beyond. Whether they are helpful would only be a guess. It costs nothing to try. From the terminal:

cd /lib/firmware
sudo wget https://github.com/wkennington/linux-firmware/raw/master/iwlwifi-8000C-22.ucode
sudo wget https://github.com/NetBit73/NeteXt73_pakiety/raw/master/iwlwifi/iwlwifi-8000C-23.ucode
sudo wget https://github.com/NetBit73/NeteXt73_pakiety/raw/master/iwlwifi/iwlwifi-8000C-24.ucode

Reboot. Check which firmware loaded:

dmesg | grep iwl

Any improvement?

Next, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=8

If it helps, make it permanent:

sudo -i
echo "options iwlwifi 11n_disable=8"  >>  /etc/modprobe.d/iwlwifi.conf
exit

If necessary, I will address the issue of an external USB adapter later.


Thanks everyone I have solved it.

Basically it would give me same error (error given above) no matter what try.
So I logged out and pressed ALT+CTRL+F1 to enter tty1. There all the apt commands worked. Once I logged back in, I had issues with PATH variable which I had to export


After upgrade 14.04 to 16.04.1 Postgresql server does not start

Systemd should use script from /etc/init.d. Instead, systemd uses some kind of template file. To fix that, follow that steps:

Remove invalid service script:

# rm /lib/systemd/system/postgresql.service
Reload daemon scripts:

# systemctl daemon-reload
Enable postgresql service:

# systemctl enable postgresql

After that, you would be able to start postgres with any preferred variants: sudo systemctl start postgresql, sudo service postgresql start, or sudo /etc/init.d/postgresql start. To check that postgresql actually run, please check the status of service: sudo systemctl status postgresql. It sould looks like:

% sudo systemctl status postgresql
● postgresql.service - LSB: PostgreSQL RDBMS server
   Loaded: loaded (/etc/init.d/postgresql; bad; vendor preset: enabled)
   Active: active (running) since Пт 2016-08-12 10:13:43 MSK; 1h 37min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/postgresql.service
           ├─4086 /usr/lib/postgresql/9.5/bin/postgres -D     /var/lib/postgresql/9.5/main -c  config_file=/etc/postgresql/9.5/main/postgresql.conf
           ├─4099 postgres: checkpointer process
           ├─4100 postgres: writer process
           ├─4101 postgres: wal writer process
           ├─4102 postgres: autovacuum launcher process
           └─4103 postgres: stats collector process

авг 12 10:13:40 ubuntu-precise systemd[1]: Starting LSB: PostgreSQL RDBMS server...
авг 12 10:13:40 ubuntu-precise postgresql[4009]:  * Starting PostgreSQL 9.5 database server
авг 12 10:13:43 ubuntu-precise postgresql[4009]:    ...done.
авг 12 10:13:43 ubuntu-precise systemd[1]: Started LSB: PostgreSQL RDBMS server.


Same command that works in terminal does not work as Thunar Custom Action

There are two issues here. One is that the && is not recognized and you need a full shell and the other is that in order for it to run, you need a tty which thunar doesn't have when launched from the GUI menu. So, first write a script with these contents:

#!/bin/bash
gpg --passphrase-file /home/beos/.gnupg/sympass --symmetric "$1"  && rm "$1"

Make the script executable (chmod a+x /path/to/script.sh) and then set the action to:

xfce4-terminal -x /path/to/script.sh %f

That should cause it to run in a terminal and in a normal bash session so it should work as expected.


Ubuntu Server 18.04 LTS cannot change resolution in Hyper-V

I changed both the CMD_LINE_DEFAULT and the next CMD_LINE with the same value (resolution I wanted), updated then rebooted, and it worked.

Like this:

GRUB_CMDLINE_LINUX_DEFAULT=video=hyperv_fb:1366×768
GRUB_CMDLINE_LINUX=video=hyperv_fb:1366×768


Is there any type of file that can execute commands with double click without being assigned permissions?

A definite solution depends on where you want to give the double click; on the desktop or in File Manager. Consider the following scenario, trusting you are familiar with notify-send.

Open a terminal and enter:

$ echo "notify-send 'hello world!'" > Notify

Check the file does not have x-bits:

$ ls -l Notify
-rw-rw-r-- 1 willem willem 32 apr 22 15:06 Notify

Test that it works:

$ bash Notify

Close the terminal, then start File Manager. Right click on Notify and select Open With -> Open With Other Application. Click on Use a custom command and type in bash, click on Open. You should see the "Hello world!"  response.

Next double click Notify and voila!
To finish, right click on Notify -> Send to -> Desktop (Create Link). An icon appears on the desktop. Double click it...

Done !


After upgrading to 16.04.3 LTS device drivers are missing from current kernel libraries

On my system driver 3c59x.ko is located in both installed kernels:

  $ dpkg -S 3c59x.ko
     linux-image-extra-4.4.0-103-generic: /lib/modules/4.4.0-103-generic/kernel/drivers/net/ethernet/3com/3c59x.ko
     linux-image-extra-4.4.0-104-generic: /lib/modules/4.4.0-104-generic/kernel/drivers/net/ethernet/3com/3c59x.ko

You can remove old kernels with

sudo apt-get install byobu
sudo purge-old-kernels

Try to reinstall linux-image-extra for 4.4 and normal LTS kernel:

sudo apt-get install --reinstall --install-recommends \
linux-image-generic-lts-xenial

sudo apt-get purge linux-generic-hwe-16.04 linux-headers-3.13.* \
linux-headers-4.8.* linux-headers-4.10.* linux-headers-4.11.* \
linux-headers-generic-hwe-16.04 linux-image-3.13.* \
linux-image-4.8.* linux-image-4.10.* linux-image-4.11.* \
linux-image-extra-3.13.* linux-image-extra-4.8.* \
linux-image-extra-4.10.* linux-image-extra-4.11.* \
linux-image-generic-hwe-16.04


Maybe it's a bug. Have you tried the Ubuntu2d setting on the Ubuntu button at login?


After ending compiz process Ubuntu 16.04 no longer works as expected

Unless you un-installed compiz you can simply reboot which will fix it anyways. Closing down a process in the process manager does not uninstall it.

However from your comments it seems you borked up the compiz settings. To fix I'd suggest renaming your current home folder and creating a new one with the following commands:

# rename/move your actual user home directory
sudo mv /home/<your username>{,.old}
# create a new home directory
sudo mkdir /home/<your username>
# take ownership of the new directory as it is currently owned
# root which is wrong
sudo chown <your username>:<your username> /home/<your username>
# make sure you still have access to the old user home directory
# the move/rename you performed earlier might have changed
# the user on that directory
sudo chown <your username>:<your username> /home/<your username>.old
# copy the essential files into the new home directory
cp /etc/skel/* /home/<your username>

After that it should work again, and then you can copy your data from the renamed folder over bit by bit as you need it.


Upload photos to Facebook page (not personal profile)

@fluteflute is not totally wrong. It is right that, BY DEFAULT Picasa doesn't support Facebook (or Gallery2, Flickr or anything other than Picasaweb), but Picasa is extendable and has several modules to do so:

http://apps.facebook.com/picasauploader/
http://googlesystem.blogspot.com/2007/06/picasa2flickr-upload-photos-from-picasa.html
http://codex.gallery2.org/Gallery2:Modules:picasa

I've never used the Facebook or Flickr modules but the gallery2 one, yes, and it's not so easy to install at all, but it works.

So to answer Steve K, yes, you can use Picasa to upload your pictures to Facebook, but with the installation of a specific module.


Upgrading Ubuntu when having drivers from xorg-edgers

General rule: when upgrading manually installed PPA's need to be disabled. The system will do this for you while upgrading. But from topics on AU it seems that this sometimes causes problems.

Mosttimes (but not always) you can re-use a PPA in a new release so I would 1st try to track down those PPA's and see if there are versions for the new release (be it the current one or a PPA that got a new name or version). There is no guarantee that the PPA's you used in 1 release are available in another release. The PPA might have become obsolete (hopefully because of Ubuntu adopting similar features), break your system or just stop working.

  Do I really need to completely remove my nvidia drivers when I do a distro upgrade?

It is adviced to remove drivers you installed that are not included by default. So not just for the video card.

3rd party software is the most likely cause for problems with upgrading.


How can I replace the CouchDB server for Ubuntu One?

CouchDB can sync to other servers

http://guide.couchdb.org/editions/1/en/replication.html

You can use futon ('web' interface)

http://guide.couchdb.org/editions/1/en/tour.html#replication

Your own futon address:

$HOME/.local/share/desktop-couch/couchdb.html

or

file:///home/{username}/.local/share/desktop-couch/couchdb.html


command to check RAM slots in motherboard?

You can use this command:

sudo lshw -class memory

It will give you an output like this:

 *-memory
       description: System Memory
       physical id: 33
       slot: System board or motherboard
       size: 4GiB
     *-bank:0
          description: DIMM [empty]
          physical id: 0
          slot: ChannelA-DIMM0
     *-bank:1
          description: DIMM [empty]
          physical id: 1
          slot: ChannelA-DIMM1
     *-bank:2
          description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
          product: AD73I1C1674EV
          vendor: Fujitsu
          physical id: 2
          serial: 43D30100
          slot: ChannelB-DIMM0
          size: 2GiB
          width: 64 bits
          clock: 1333MHz (0.8ns)
     *-bank:3
          description: DIMM [empty]
          physical id: 3
          slot: ChannelB-DIMM1

Here in my system I have 4 memory slots in which currently I am using only one slot. In other slots you can see it shows empty.

For maximum supportable memory use:

sudo dmidecode -t 16

or

sudo dmidecode -t memory

or

 sudo dmidecode | grep -i "Maximum Capacity:" | uniq

EDIT: more interactive way to see Slot use small script (suggested by Serg)

sudo lshw -class memory | awk '/bank/ {count++} END {print "You have " count " slots for RAM"}'


14.04 LTS unknown display, 1024x768 only

You can use xrandr:

The commands to be executed in order:

cvt 1920 1080
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

The part of the line after xrandr --newmode is similar to the ouput you should get when using the cvt command, so copy the output from the "resolution_refreshRate" to the +vsync point and add it to xrandr --newmode.

Then:

xrandr --addmode LVDS1 resolution_refreshRate (don't use speechmarks)
xrandr --output LVDS1 --mode resolution_refreshRate

If you want to make the changes permanent:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it: #!/bin/bash
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
sudo xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00
Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

Note: I'm using LVDS1 as the supposed monitor name, but yours probably won't be the same. You can find your monitor name using:

xrandr | grep " connected " | awk '{ print$1 }'

This might be useful to you.


Cannot get DVD drives to work on Ubuntu 17.10

Create the mount point by running sudo mkdir -p /mnt/cdrom, then retry.


Installing ubuntu for the first time dual os

Back in the days when I used Ubuntu and Windows in dual boot my steps to achieve this where:

Create 2 main partitions one for each system: you can do this with Windows or Linux install CD/USB it doesn't matter.
Install Windows on first partition;
Create a back-up copy;
Install Linux on second partition. Set grub as default boot-loader when asked.

I do not know what you did to install this dual boot system of yours and I will gladly help you with more information but you need to provide more information about what you did and how because you are pretty vague. To give you an example a useful information will be what O.S. you tried to install first?


Trying to issue a command through a Launcher

Add this :

Exec=gnome-terminal -x bash -c "cd /minecraft/server; java -Xmx768M -Xms768M -jar craftbukkit.jar; exec $SHELL"


The last version of Quanta Plus was released 3,5 years ago, it's website seems to be down at the moment so it seems the project is pretty much dead. Which is a pity, I used to use it.

Your options are either to find a replacement (kate is quite good as an editor, though maybe has less features for html/php coding) - or be a real man and see what it takes to compile it from the source. If you do this, maybe you'll become a new maintainer...

UPD: Actually, the last commit in the Quanta's repository seems to be almost 4 years ago - I'm not even sure there ever was a KDE4 version... most likely it remained a KDE3 application, which makes it surprising it was still working in 11.04.


How to make xdotool auto-click repeatedly?

I found the solution after reading around and experiment. So, I post it here for others who might need help with the same issue.

Settings > Devices > Keyboard > Keyboard Shortcuts > (Scroll down) Custom Shortcuts > Click on + and create new shortcut with the attributes:

Name: Auto-click (or whatever you want)
Command: xdotool click 1
Shortcut: press a combination of keys. Some keys might not work because they are bound by the system. Try an other combination. Done!


Why some software aren't detectable by the system?

The scid package doesn't have a .desktop file according to this. The applications which present you with a menu of installed apps generate that menu from the .desktop files present on your system in the /usr/share/applications/ or in the ~/.local/share/applications/ directory. If a program doesn't have a .desktop file in one of those directories it won't show up in the menu.

This is by design. There are a lot of programs (mostly terminal based ones) which shouldn't show up in the graphical menu. If you want this program to show up in the application menu you can make a .desktop file for it.

Also if you feel that this program is that kind of program which should automatically install a .desktop file for itself you may file a bug report.


Why are menus in LibreOffice not rendering correctly and how can I fix this?

LibreOffice is not 100% Unity compliant.  I have asked a question in the past related to the LibreOffice icon and Unity launcher:

libreoffice-problem-integrating-with-unity

Maybe installing lo-menubar fixes some of your issues.

Cheers.


Is there any way to make Nautilus use different colors when showing list of files?

There is no Configuration for Coloured view as in terminal , but definitely File type based is available .

Go to Edit=>Preferences ,select in List columns as

which will enable you to view  File Type in List View under MIME type , (Application to open it) as

And in TYPE column , seen as

Or in Icons view , press Ctrl+S and type the file type you want to view as *.jpg  and wall* for file names to Highlight all the respective Files.


Java (IcedTea) doesn't have a PPAPI plugin available, and so it's not usable in Chromium, since Chromium 34 in Trusty has switched to the Aura rendering framework and no longer allows NPAPI plugins. See also https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1308783.


VPN's are added to network manager. So see network manager at the top right


Does Ubuntu compile all their non-proprietary packages on their repo from source or do they use the dev's pre-compiled binary?

Developers cannot upload pre-compiled binaries into the Ubuntu archive. All packages in the main Ubuntu archives are built from the source packages.

From the Ubuntu for Debian Developers wiki page:

Ubuntu does not permit binary uploads (builds performed by the developer on their own system) for any architecture. All builds are performed in clean chroots by Launchpad, and uploads are source-only (dpkg-buildpackage -S).


XEN cannot start domains after upgrading from 18.04 to 20.04

This wasn't enough for me, my XEN service wasn't starting correctly and it was a conflict with QEMU. I haven't managed to work neither on Ubuntu 20.04 nor 20.04.1. I had to upgrade to Ubuntu 20.10.

Back up all the XEN configuration under /etc/xen/

Uninstall XEN and QEMU:

apt purge xen-system-amd64 xen-hypervisor-common xen-hypervisor-4.9-amd64 xen-hypervisor-4.11-amd64 xenstore-utils xen-utils-common xen-tools xe-guest-utilities  libxen-dev qemu-system qemu-system-common qemu-block-extra qemu-efi-aarch64 qemu-efi-arm qemu-slof qemu-system qemu-system-arm qemu-system-common qemu-system-data qemu-system-gui qemu-system-mips qemu-system-misc qemu-system-ppc qemu-system-s390x qemu-system-sparc qemu-system-x86 qemu-user qemu-user-binfmt qemu-utils
apt autoremove

Upgrade to Ubuntu 20.10

Edit /etc/update-manager/release-upgrades and set Prompt=normal in order to upgrade to latest version (non LTS).
do-release-upgrade

Install just the XEN hypervisor on Ubuntu 20.10

apt install xen-hypervisor

Restore the XEN configuration

Reboot


"Shake to Find Cursor" feature for Ubuntu 18.04 LTS

It is possible on Ubuntu 20.04 (GNOME Shell version 3.36.x) using a GNOME Shell extension called 'Jiggle'.

Jiggle is a Gnome Shell extension that highlights the cursor position when the mouse is moved rapidly.

It provides some customisation options too:

Besides the 'cursor scaling' effect (as in the screencast above), it currently provides two more effects: 'fireworks' and 'spotlight'.


You can find it at Epson Driver Download Site
Type XP-6100 and you'll get the driver.


If running on discrete card with Bumblebee, will games on Steam also run on said card?

No, they will not be using nvidia's discrete card. You're not alone in trying to find a solution for this, I'm currently trying to figure out a way that doesn't involve running

LD_LIBRARY_PATH=~/Steam/ubuntu12_32 optirun ~/Steam/SteamApps/common/$GAMEYOUWANTTOPLAY/$NAMEOFTHEIRBINARYFILE

in a terminal every time you want to run a game. On the plus side, it does mean you don't need to optirun steam at all, invoking that launch command will run the game itself with the discrete card regardless of what steam is running with.


Acutally adding a greeter-hide-users=true to /etc/lightdm/lightdm.conf was enough (it disables the history of users on the login screen and adds a field where you have to enter username and password).


Battery not charging beyong a certain percentage

You should try recalibrating it; discharge first to the auto-shutdown/hibernate point (~5%), not to 0%. Does it charge with earlier Ubuntu versions? If so, that may indicate a problem with Ubuntu.


No, there is no other software than Outlook to open .oft.

  seem to be mails stored in an MS Outlook format

No, ".oft" is an template for formatting mails in outlook. Not actual mails.
Mails (and other personal data like contacts) should be a ".pst" (Personal Storage Table).

Here is an example of an OFT (using VB.net):

' Load the Outlook template (OFT) file in MailMessage's instance
Dim message As MailMessage = MailMessage.Load("invitation to meeting.oft", MessageFormat.Msg)

' Set the sender and recipients information
Dim senderDisplayName As String = "John"
Dim senderEmailAddress As String = "john@abc.com"
Dim recipientDisplayName As String = "William"
Dim recipientEmailAddress As String = "william@xzy.com"
message.Sender = New MailAddress(senderEmailAddress, senderDisplayName)
message.To.Add(New MailAddress(recipientEmailAddress, recipientDisplayName))
message.HtmlBody = message.HtmlBody.Replace("DisplayName", "" & recipientDisplayName & "")

' Set the name, location and time in email body
Dim meetingLocation As String = "" & "Hall 1, Convention Center, New York, USA" & ""
Dim meetingTime As String = "" & "Monday, June 28, 2010" & ""
message.HtmlBody = message.HtmlBody.Replace("MeetingPlace", meetingLocation)
message.HtmlBody = message.HtmlBody.Replace("MeetingTime", meetingTime)

' Send the email or save as MSG and open in Outlook for further editing
Dim client As SmtpClient = New SmtpClient("host", 25, "username", "password")
client.Send(message)

' Save the message in MSG format and open in Office Outlook
Dim msg As MapiMessage = MapiMessage.FromMailMessage(message)
msg.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT)
msg.Save("Invitation.msg")
Process.Start("Invitation.msg")


Where / which is the actual kernel source?

From the Debian Wiki:

  Source packages provide you with all of the necessary files to compile or otherwise, build the desired piece of software.

  It consists, in its simplest form, of three files:

  The upstream tarball with .tar.gz ending
  A description file with .dsc ending. It contains the name of the package, both, in its filename as well as content (after the Source: keyword).
  A tarball, with any changes made to upstream source, plus all the files created for the Debian package.

  This has a .debian.tar.gz (source format : 3.0)
  or a .diff.gz ending (source format : 1.0)

It's quite the same for Ubuntu, and in your case:

"linux-lts-vivid-3.19.0": the actual kernel, patched starting from the upstream tarball "linux-lts-vivid_3.19.0.orig.tar.gz" with the modifications listed in "linux-lts-vivid_3.19.0-30.34~14.04.1.diff.gz";
"linux-lts-vivid_3.19.0-30.34~14.04.1.diff.gz": a tarball, with any changes made to upstream source, plus all the files created for the Debian package;
"linux-lts-vivid_3.19.0-30.34~14.04.1.dsc": a descrition file ".dsc" ending. It contains the name of the package, both, in its filename as well as content (after the Source: keyword);
"linux-lts-vivid_3.19.0.orig.tar.gz": the upstream tarball with ".tar.gz" ending (mind that in my experience it's not always a ".tar.gz" file, it can be in slightly different formats, such as ".tar.xz");

When you run apt-get source linux-image-$(uname -r), the upstream tarball is automatically patched with the modifications listed in "linux-lts-vivid_3.19.0-30.34~14.04.1.diff.gz" in "linux-lts-vivid-3.19.0":

% apt-get source linux-image-$(uname -r)
# ...
dpkg-source: info: extracting linux in linux-3.19.0
dpkg-source: info: unpacking linux_3.19.0.orig.tar.gz
dpkg-source: info: applying linux_3.19.0-30.34.diff.gz
# ...


How to upgrade ubuntu 12.04 LTS to 14.04 LTS in Dual boot?

you can upgrade it without any trouble

& if something happens you can fix it with grub

updating

First things first: make sure that you are fully up-to-date. Double check by opening the Update Manager application from the dash and installing all updates listed

$ sudo update-manager -d

click upgrade


No, it does not have to be contiguous.  Any virtual page can be mapped to any physical page.
For the most part, yes, the kernel memory is limited to 1 GB, but the page cache can grow larger than that because only a small bit of it must be mapped into the kernel address space at a time.
Kernel memory is non pagable.

Note that this applies to the 32 bit kernel only.


Accessing files/folders across OS partitions

Is it possible to open up Ubuntu and read a .docx file from my Windows partition?

Certainly.

  Are there any non-obvious ramifications for doing so (corrupting files, unable to access partition, etc)?

Well, the MS Office file formats aren't the best supported, so you might cause some unexpected change if you wrote to the file. The NTFS driver is fairly stable, so filesystem-level corruption is unlikely.

  If it is indeed possible to access files from another os on the same machine, what does that mean for the computer's information security if anyone with a Linux live boot thumb drive can access the anything on the hard drive(s) connected to the machine?

An attacker has physical access to the system?

Game Over.*

* Full-disk encryption might help.


I think the recommendation of using the STA driver is because the open source driver brcm80211 is still considered unstable. It is in the 'staging' area of the kernel.

For example, my machine (which also has a BCM4313) freezes if I toggle the hardware switch. (this has been fixed in the Oneiric kernel.) The open source driver does give a more stable connection than the STA driver, though, especially with WPA/Enterprise connections.

My recommendation is to use the open source driver. It works better for me, and from your question I gather that it works better for you as well. And it is open source, too.


How to change the background colour of a window?

First install dconf-editor if you dont have it already:

sudo apt-get install dconf-tools

And then run the dconf editor:

sudo dconf-editor

Browse to org.gnome.desktop.interface and locate: gtk-color-scheme

Edit the property to the colours of your choosing:

bg_color:#f0f1f2;selected_bg_color:#4677f0

The colours are in hexadecimal in the format #RedRedGreedGreedBlueBlue

For example:

Black = #000000  (None of any colour)
White = #ffffff  (The maximum
of every colour) Red   = #ff0000  (Red Only)

Happy Customising!


Random freezing on typing or opening softwares // High speed and noisy CPU FAN on Linux distros

Solved the temp/and the noisy fan by disabling Core Performance Boost in my bios;

 1. BIOS "Advanced";
 2. AMD CBS;
 3. Core Performance Boost > DISABLED;
 4. F10
 5. SAVE;

The freeze/lag while typing was an error with the keyboard layout I was using (ABNT2).
I followed this tutorial Ubuntu 18.04 input slow when Portuguese (Brazil) layout among keyboard input sources


The easiest way is creating an Ad-Hoc network. It's really simple (if your hardware drivers support it).

Click the Network Manager applet
Click Create New Wireless Network...
Give it a name. Set the security.
Connect to it from your other devices!


Monday as first day in Gnome-Shell (instead of Sunday)

To adjust this, change or add the following lines in the LC_TIME section in /usr/share/i18n/locales/<your_locale>:

week            7;19971130;5
first_weekday   2
first_workday   2

And then update the system:

sudo locale-gen


How can I help translating Ubuntu One Client for Windows?

The Beta was an initial proof of concept that we used to test if the solution was possible. After the beta there has been a lot of work trying to get the code used on Linux to Windows, and at the moment we are very close.

At the moment the code is mostly shared between the Linux version and the Windows version with a lot of development being done. When we made the move from C# and WPF (for way to many reasons to explain here) to python we decided to use Qt + gettext so that the translations could be done in launchpad.

So in summary, you can do the translations in Launchpad and we would be grateful for your help. The projects you can take a look at to translate are:

lp:ubuntuone-control-panel (ready to be translated)

lp:ubuntu-sso-client (ready to be translated)

lp:ubuntuone-windows-installer (not much work done just yet)

On each page, there is a link under the "Get Involved" heading that provides information for assisting with translations.

I hope the info helps you.


What is Web server replication?
Replicating a web server machine is
the process of synchronizing two or more machines, so that they each
have the exact same files, at any given point in time.
Benefits of Web server replication
There are two primary benefits to web server replication:

High availability
Performance during high load times

Rsync
Rsync is a Linux shell utility that supports efficient copying of data
between two servers.
Unlike "normal copy" - Rsync only copies differential data (what just
got changed, instead of all the files). Another benefit of Rsync is
that it copies over SSH - so data is encrypted across the channel.
Rsync is one of the most popular methods to replicate web servers.
It's reliable, easy to setup and fast.
This guide,  will walk you through the process of using Rsync to
replicate two web server machines.
Below are the needed setup steps

Install RSync
Select folder(s) to replicate
Create Rsync server config file
Installing & Running Rsync server
Fetching changes with the Rsync client
Setting Rsync client as a cronjob 1

Read More
1Source: SPI


There is no menu buttons for GIMP 2.8 in Ubuntu 16.04?

I didn't find the update you were talking about.
I'm having the issue after I upgrade from Ubuntu 14.04 to 16.04.
I'm using Gimp 2.8.16 and I have this problem both in single window and multiple window mode.
The only workaround I found is to logout and then login after the first boot up in the OS.
Suggestions are welcome.


Xubuntu 16.04 desktop icons after update

Apparently this is because of a bug in gtk2-engines-murrine .

I rolled back to the previous version of the package:

sudo apt-get install gtk2-engines-murrine=0.98.2-0ubuntu2

and

Voila! Everything is properly aligned again!

You can track the bug here

Additionally if you don't want to upgrade this package automatically in future:

sudo echo "gtk2-engines-murrine hold" | sudo dpkg --set-selections


cp can do numbered back-up copies:

$ cp --backup=numbered folder.png folder.png folder.png folder.png foo
$ ls foo
folder.png  folder.png.~1~  folder.png.~2~  folder.png.~3~

Now, just rename these:

$ rename -n 's/(.png).~(\d+)\~/$2$1/' foo/*
rename(foo/folder.png.~1~, foo/folder1.png)
rename(foo/folder.png.~2~, foo/folder2.png)
rename(foo/folder.png.~3~, foo/folder3.png)

The -n means that changes will be reported, but not actually performed. Run without the -n after verifying the output.


Solution worked for me:
IEC958 (S/PDIF) not working
sudo apt install libavresample-dev pavucontrol libasound2-plugins-extra


Is there anything that should be done to increase security on a new system?

Your question is pretty broad, but inferring from your first sentence about "different security measurements" for home, etc, I would recommend you try gufw

gufw is a GUI front-end to the ufw firewall and it allows you to create profiles for home, etc.

sudo apt-get install gufw

As a simple solution, you can just set the default Incoming rule to Deny and default Outgoing rule to Allow.  Then add exceptions for incoming on the ports/services you want in each profile.


If the software is not for Ubuntu and only for Windows WINE is going to be one of your only hopes.

If you absolutely do not want to use WINE I would recommend trying to find some poker sites that are browser based and do not need to install software.


I found the solution, here: https://github.com/hughperkins/cltorch/issues/74#issuecomment-222333852

The solution is that you have to do sudo su and run from root.


Problem with Java while trying to run pycharm-community-4.5

Open the file pycharm64.vmoptions

nano /opt/pycharm-community-4.5/bin/pycharm64.vmoptions

and add a # at the beginning of the line

# -XX:MaxPermSize=350m

Open the file pycharm.vmoptions

nano /opt/pycharm-community-4.5/bin/pycharm.vmoptions

and add a # at the beginning of the line

# -XX:MaxPermSize=250m

MaxPermSize support was removed in Java 8.0, but the error message

Unrecognized VM option MaxPermSize=350m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

does not look like Oracle Java 8 or OpenJDK 8.

The PyCharm starter pycharm.sh tries to find Java:

# ---------------------------------------------------------------------
# Locate a JDK installation directory which will be used to run the IDE.
# Try (in order): PYCHARM_JDK, ../jre, JDK_HOME, JAVA_HOME, "java" in PATH.
# ---------------------------------------------------------------------
if [ -n "$PYCHARM_JDK" -a -x "$PYCHARM_JDK/bin/java" ]; then
  JDK="$PYCHARM_JDK"
elif [ -x "$IDE_HOME/jre/bin/java" ] && "$IDE_HOME/jre/bin/java" -version > /dev/null 2>&1 ; then
  JDK="$IDE_HOME/jre"
elif [ -n "$JDK_HOME" -a -x "$JDK_HOME/bin/java" ]; then
  JDK="$JDK_HOME"
elif [ -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
  JDK="$JAVA_HOME"
else
  JAVA_BIN_PATH=`which java`
  if [ -n "$JAVA_BIN_PATH" ]; then
    if [ "$OS_TYPE" = "FreeBSD" -o "$OS_TYPE" = "MidnightBSD" ]; then
      JAVA_LOCATION=`JAVAVM_DRYRUN=yes java | "$GREP" '^JAVA_HOME' | "$CUT" -c11-`
      if [ -x "$JAVA_LOCATION/bin/java" ]; then
        JDK="$JAVA_LOCATION"
      fi
    elif [ "$OS_TYPE" = "SunOS" ]; then
      JAVA_LOCATION="/usr/jdk/latest"
      if [ -x "$JAVA_LOCATION/bin/java" ]; then
        JDK="$JAVA_LOCATION"
      fi
    elif [ "$OS_TYPE" = "Darwin" ]; then
      JAVA_LOCATION=`/usr/libexec/java_home`
      if [ -x "$JAVA_LOCATION/bin/java" ]; then
        JDK="$JAVA_LOCATION"
      fi
    fi

    if [ -z "$JDK" -a -x "$READLINK" -a -x "$XARGS" -a -x "$DIRNAME" ]; then
      JAVA_LOCATION=`"$READLINK" -f "$JAVA_BIN_PATH"`
      case "$JAVA_LOCATION" in
        */jre/bin/java)
          JAVA_LOCATION=`echo "$JAVA_LOCATION" | "$XARGS" "$DIRNAME" | "$XARGS" "$DIRNAME" | "$XARGS" "$DIRNAME"`
          if [ ! -d "$JAVA_LOCATION/bin" ]; then
            JAVA_LOCATION="$JAVA_LOCATION/jre"
          fi
          ;;
        *)
          JAVA_LOCATION=`echo "$JAVA_LOCATION" | "$XARGS" "$DIRNAME" | "$XARGS" "$DIRNAME"`
          ;;
      esac
      if [ -x "$JAVA_LOCATION/bin/java" ]; then
        JDK="$JAVA_LOCATION"
      fi
    fi
  fi
fi

$PYCHARM_JDK
$IDE_HOME/jre/bin/java
$JDK_HOME
$JAVA_HOME

Make sure you are using the Java version that you'd like to use.


Default image showing up in panel for applications

Everything I mentioned in the question is in reference to a JFrame. The Frame on opening up shows up with a default icon in Ubuntu panel. I want my app logo  to appear in here instead. This was my issue and I fixed it.
This is the code I used to add icon to my JFrame.
 ImageIcon img=new ImageIcon(getClass().getResource("/leaf.png"));
        frame.setIconImage(img.getImage());

This image will never show up in JFrame but will appear as icon in the Ubuntu panel whenever the JFrame is opened.


Extremely slow WiFi speeds on Lubuntu 19.04?

If WiFi was working great on 17.10 but not so good on 19.04, then maybe you should go back to using 17.10 to verify it's still working fine in 17.10. This would rule out hardware/environment (such as a microwave oven being used nearby, bluetooth devices, or USB 3.0 hard drive) being changed somehow to cause the issue.

After that, perhaps try some intermediate version like 18.04 to try to pin-point when the WiFi got broken. Using the closest two versions where one works great and then other is slow, start looking around to see what is different between the two versions. Did the WiFi kernel module used get changed? If so, can you get 19.04 to work well by switching the kernel module for WiFi back to the one that was working well in previous distribution version?

If it's the same kernel module being used, then maybe you could try installing older Linux kernels on 19.04 back to the kernel version that works. When you can finally pinpoint the closest two kernel versions that work/don't work, you can then do a source code diff between those kernel versions and try to figure out what the developers did that made your WiFi get real slow. Then you can report on the Linux Kernel mailing list or contact the developer that made the offending change and tell them what has happened.


Enter BIOS to Load Ubuntu from inside Windows instead?

You could always buy a second keyboard from a supermarket, they are cheap enough. Plug that directly into the main computer's USB socket and use that to  get into the BIOS. I've tested on my machine and with two keyboards, I can start typing a word or sentence on one keyboard and switch to the other to finish, without any problem.


You should try to login on a console. For that Ctrl+Alt+F1 and at the login: prompt give your username, then on the password: prompt give your password.

Once you are login either clean up, or move things from /home to /.

Cleaning up can e.g. be done by removing the .cache. You can first try to see how much Mb that would bring you, then remove it and finally check the free space on the partition:

 du -sm ~/.cache
 rm -rf ~/.cache
 df -h /home

Assuming that you have used the system for browsing etc, the removing the ~/.cache should free up enough space to login using the graphics screen once more (press Alt+F8 (maybe F7) to switch back to the graphical login page). Make sure to free up enough space to not let this happen again.


Problem installing R 4.0 on Ubuntu 18.04

To answer your questions

Ubuntu usually packages software versions that are the ones that they tested, so when they are going to do a Ubuntu release, they get all stable packages one day and after that, they start testing all the packages so they ensure good reliability so they don't update those packages in their repos, that's way you won't get latest packaged inside ubuntu's repos

and for installing latest versions of some packages you could add repos, download snaps or just rely on the good old deb

here is how you can download latest R

First, you should run:
this will remove R

$ sudo apt remove r-base

then type this, so you can add the GPG Key

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

Now add this repo

$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

then update your packages list

$ sudo apt update

now install R

$ sudo apt install r-base

Here is the link to cran project and the manual for ubuntu instalation


I had problems, but I followed this steps and it comes to work well:
How to install nvidia optimus driver?

Basically, taken from CruzBishop:

#if you have previously installed nvidia or bumblebee from the repos:
sudo apt-get purge bbswitch-dkms bumblebee-nvidia

#if you have previously installed nvidia drivers from the Nvidia.com binary, you can uninstall it running the same installer.

#next steps:
sudo apt-get install linux-headers-3.5.0-17-generic
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia
#reboot
#install cuda the old way, as you have done in 12.04

It worked out for me.


Try Ctrl+Alt+F6 to get terminal
Reset unity
Then Ctrl+Alt+F7 to get back


Ubuntu 18.04.3: Set the environment for bash script that runs through Gnome Startup Application

System-wide startup applications are stored as .desktop files in the /etc/xdg/autostart/ directory. If you (or an application) have manually added a startup application only for the current user, then it would be found in your ~/.config/autostart/ directory. You can edit the .desktop files with a text-editor of your choice.


Can't browse to www folder from some programs

I have found uninstalling Gitkraken via snap and downloading it from the website and re-installing it that way has worked. Presumably snap ads extra restrictions.


It's advisable to install FLASH from Adobe on your system for watching YT-video's.

Open the softwarecenter and typ in the search-field: restricted extra's
install the pack for Ubuntu (not Xubuntu or Kubuntu !!) this will deliver you automatically the desired FLASH-player.

Updates for FLASH come with the updatemanager, so no worry's there. Only updates , not new versions of Flash since Adobe stopped making new versions for Linux in general. (doesn't matter, all YouTube video's work fine with this version Adobe releases)

JAVA is not used for watching YouTube-video's, so there you are wrong.

Some YouTube video's however come already in HTML5, what is to become the new standard.

Succes !

You can also install Chromium from the softwarecenter, if desired.


Warnings and Errors when trying to do anything with UFW - uncomplicated fire wall

The /etc/ufw/applications.d directory and /etc/default/ufw file would have been created when ufw was originally installed - it sounds like you manually deleted them at some point.

You can see what packages (aside from ufw itself) would have placed application profiles into the directory on your particular system using a dpkg search:

$ dpkg -S /etc/ufw/applications.d
postfix, openssh-server, samba, cups-daemon, ufw: /etc/ufw/applications.d

and re-install them e.g.

sudo apt install --reinstall ufw openssh-server


If you are using Compiz for visual effects, you have an option.

If you do not already have the CompizConfig Settings Manager you can install it by sudo apt-get install compizconfig-settings-manager.

Warning: What are some of the issues with CCSM and why would I want to avoid it?

Under the CompizConfig Settings Manager:

Click on Window Decoration
Type in the blank next to Decoration windows: (any)&!(name=opera)

Now all windows will have a window decoration besides Opera.  However, you lose the ability of dragging to resize or to move the window.  You will have to use keystrokes for it (ie. holding Alt to move the window)


thinking pvmove is the command-line you are looking for...details here: http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html


Stop windows from shifting order in Ubuntu Dock

The dock in Ubuntu 18.04 is a modified version of the original Dash to Dock gnome shell extension. The order of window previews is hard coded and was recently changed from recently used to when opened in response to this issue.

So no, you can't rearrange the window previews. I don't know when the changed behaviour will be merged into the Ubuntu version, but since it hasn't been included in 18.10, it may take some time, if it will happen at all.

You can, however install the latest version of Dash to Dock by following the instructions on the homepage.

Alternatively, as a user on the github page explained, you can supposedly replace the file /usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/windowPreview.js with this version to make the window previews appear in the order the windows were opened.


Does anybody know the view plugin that appears on the mid-click. I remember it was a circle with some useful buttons

Check Gnome-Pie

sudo apt-add-repository ppa:simonschneegans/testing
sudo apt-get update
sudo apt-get install gnome-pie

Start with gnome-pie via Dash or Activities

If you don't like Gnome-Pie, simply remove via

sudo purge-ppa ppa:simonschneegans/testing


Using flash player i.e. watching a video in fullscreen (Mozilla), freezes computer

Adobe Flash player support and updates for linux platform has been stopped. Therefore you might experience some problems.

As an alternative you should disable Flash plugin.

  Press CTRL+SHIFT+A
  Go to the PLUGIN section, and disable Shockwave flash player.
  Reload the Youtube video. Now It will use HTML 5 player to play it.

I hope HTML5 player wont cause any trouble!


Because of the choices that you made during the installation of Ubuntu, you can't use gparted to modify the partition structure. You need to use LVM utilities instead.

In terminal type apropos lvm and you'll see some of the CLI (command-line-interface) tools to use. Type man tool_nameto get help on any specific tool. These can be quite terse and complicated to use.

Another way to manage LVM partitions is to use a graphic interface tool like system-config-lvm.

Here's the description:

System-config-lvm provides a graphical interface to the LVM tools (and related utilities, including fsck and resize2fs) which is good for non-emergency storage administration. It enables you to manage your logical volume and filesystem configuration with a few mouse clicks, and it prevents potentially-disasterous command-line mistakes such as reducing a logical volume size before reducing the filesystem contained within that volume.

To install system-config-lvm:

In terminal...

sudo apt-get update

sudo apt-get install system-config-lvm

Then type lvm into the Unity dashboard search to start this tool.

To get more help on LVM, please see https://wiki.ubuntu.com/Lvm


Using parens puts the commands in a subshell which is not always what you want.  Alternatively, use curly braces:

command && echo "Ok, continuing" || { echo "Check internet connection"; exit 1; }

The trick here is that, unlike parens, the final command in braces must be followed by ;.

Why a semicolon or newline is required

A curly brace is a valid argument to a command.  For example, here is a curly brace as an argument to echo:

$ echo }
}

Consequently, if the shell sees:

{ command1; command2 }

The shell interprets command1 as having no arguments and command2 as having one argument consisting of the character }.  A curly brace } is only interpreted as closing  a grouping if it follows a semicolon or newline.  To make the above work:

{ command1; command2; }

Subshells and the difference between {...} and (...)

Observe that the following sets x to 10 but that that setting is forgotten before the echo command runs:

$ x=0; false || ( echo Hello; x=10 )
Hello
$ echo $x
0

With curly braces, by contrast, the setting of x=10 is remembered:

$ x=0; false || { echo Hello; x=10; }
Hello
$ echo $x
10

The difference is because variable assignments in a subshell do not survive after the subshell completes.

Documentation

From man bash:

  (list)

  list is executed in a subshell environment (see COMMAND EXECUTION
  ENVIRONMENT below).  Variable assignments and builtin commands  that
  affect              the shell's environment do not remain in effect
  after the command completes.  The return status is the exit status of
  list.

  { list; }

  list is simply executed in the current shell environment.  list must
  be terminated with a newline or semicolon.  This is known as a group
  command.  The return status is the exit status of list.  Note that
  unlike the metacharacters ( and ), { and } are reserved words and
  must  occur where  a reserved word is permitted to be recognized.
  Since they do not cause a word break, they must be separated from list
  by whitespace or another shell metacharacter.

  [Emphasis added]


Well, I found this script

export PACKAGES=$(dpkg -l | awk '{if ($1 == "rc") print $2" "}' | tr -d '\n') [ -n "$PACKAGES" ] && sudo apt-get purge $PACKAGES

on ubuntuforums.org that shall purge the removed installations. So maybe it could work also for purging menu.


when I install ubuntu by deleting my previous os , will my previous programs and programs save data be lost?

Deleting Windows XP WILL remove the programs and program files from your computer's harddisk.


Why does my newly complied and installed linux kernel appear in 'Advanced options for Ubuntu'

Submenu Display

  The Grub2 menu will look unchanged until more than one kernel is available for selection. When more than one kernel is available, Grub2 will automatically add a submenu.

  The latest kernel is displayed on the main menu. Additional (older) kernels are displayed in the submenu.
  The submenu is a special menuentry with a title of "Previous Linux versions".
  In GRUB 2.0 (Ubuntu 12.10, Quantal Quetzel and later) the submenu title is "Advanced options ..."
  Users access additional kernels by highlighting the "Previous Linux versions" menuentry and pressing the ENTER key.

  Once the submenu is selected additional kernels will be displayed on a secondary menu.
  When a newer kernel is installed, the previous kernel on the main menu will be moved to the submenu.
  The submenu feature is only created by default on the currently running Linux system.

Source


unable to uninstall comodo on 12.04 lts 32-bit system

Step #1 = Boot an Ubuntu disc, and choose try without installing

Step #2 = open nautilus and open your ubuntu install, thus mounting it.

Step #3 = Open terminal and type:

"sudo mount --bind /dev /#location#/dev"

"sudo mount --bind /proc /#location#/proc"

"sudo mount --bind /sys /#location#/sys"

"sudo chroot /#location#" (don't close the terminal or you'll have to type this again)

"apt-get --purge remove cav-linux"

Step # 4 = shutdown the live cd and reboot into your Ubuntu 12.04 install.

[#location# equates to the mounted access for your ubuntu install, eg /media/ubuntu/sda1 ]


nautilus --browser will ensure that Nautilus is launched in browser mode even if you're normally using it in spatial mode.

You can append the path you want to open to the end:

nautilus --browser ~/some/directory


files where break-in attempts are logged

SSH authentication failures are logged by default to /var/log/auth.log.

You should still see auth failures being logged there after the changes you describe -- something else must have changed. I have root login disabled entirely, and key-based auth only with passwords disabled for user accounts. I still see a few failures per hour in auth.log before they get blocked with fail2ban.

Well-designed services will log authentication failures with the syslog auth facility and would be logged here as well. It's good practice to export your logs to a remote syslog server to make it difficult for an attacker to hide their intrusion if they get root.

In a more general sense, "break-in attempts" is too vague a term for this question. It could mean anything from SQL injection to buffer overflows. Intrusion attempts can be subtle and difficult or impossible to distinguish from legitimate traffic. You can't detect every attack.


Backup sources and setting for reinstall

Find some removable medium, e.g. a flash drive.
Save /etc/apt/sources.list and every file in /etc/apt/sources.list.d/ to it.
Open System > Administration > Synaptic Package Manager. Go to File > Save Markings As... , check the box labeled "Save full state, not only changes", and save it to the removable medium. This file is basically a list of every single package you have installed.

Once you've reinstalled:

Restore your /etc/apt/sources.list and contents of /etc/apt/sources.list.d/ to the computer.
Open Synaptic again, and press Reload.
Still in Synaptic, go to File > Read Markings. Open the markings file you saved previously. Then press Apply, sit back, and relax.


How can I move the Applications and Files & Folders lenses in the launcher?

There is no way you can change that behavior.

The upper part is for custom user launcher items, basically shortcuts, the bottom part is for lenses, like the Applications and Files & Folders lenses which are installed by default and there is the Trash launcher items which is fixed at the very bottom of the launcher.

You can customize the position of every item in its group however.


sed: -e expression #1, char 56: unknown option to `s'

It's not the spaces that's causing the problem, but the / in the text. Your command reads: sed 's/570455066 .../ TYPE/5704550660.../ TYPE/g' - do you see the problem? You need to use a different character as the delimiter which doesn't appear in the replacement text, say :

sed 's:5704550660          SPP91564_2                              ANT # / TYPE:5704550660          SPP91564_2      NONE                    ANT # / TYPE:g'

You can also just escape the / in the text with a backslash: \/.


How to disable low disk space notification?

Found via https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/881376

gsettings set org.gnome.settings-daemon.plugins.housekeeping active false


Why does Anacron need the full path to commands in $PATH

I think this is done just before the commands in the anacrontab according to the man 5 anacrontab pages:

  Environment assignment lines are of the form:

     VAR = VALUE

  Spaces around VAR are removed.  No spaces around VALUE are allowed (unless you want them to be part of the  value).
  The  assignment takes effect from the next line to the end of the file, or to the next assignment of the same vari‐
   able.

  Empty lines are either blank lines, line containing white-space only, or lines with white-space followed by  a  '#'
   followed by an arbitrary comment.

  You can continue a line onto the next line by ending it with a '\'.

Have a look in the /etc/anacrontab file:

# /etc/anacrontab: configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root

# These replace cron's entries
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly    15  cron.monthly    run-parts --report /etc/cron.monthly

As you can see the environmental variables are set before the commands.


Unable to install MS Office, wine1.7, and getting updates

I have installed Office 2007 on Ubuntu 13.04, and it runs great. Maybe you can use this link.

First you have to install the libraries that the link tells you to install and then install Office. Office updates have to be installed manually.


Windows 8 Problem installing Ubuntu - Bios Setting

I don't see the attachments but you should make sure that you've disabled

  Secure Boot

from boot options


dpkg reports gtk is installed, but make can't find it

You need the development packages, they should be available in 14.04 from the trusty main repository. Try running:

sudo apt-get install libgtk2.0-dev


Wubi installation did not prompt me for username or password; now I'm stuck as a guest

I had that happen to me as well. You should be prompted for a password during the install process. If not, use Windows Control Panel, add/remove programs to remove ubuntu and start over. Sounds like a pain, but it doesn't actually take that long.


Short answer: Yes you can.

The project seems to use node.js and redis, both of which are available in Ubuntu repositories.

Balloons.IO's repository even has some installation docs: https://github.com/gravityonmars/Balloons.IO/blob/master/README.md


From http://library.gnome.org/admin/system-admin-guide/stable/mimetypes-registering.html.en:

Registering applications to handle MIME types is fairly straightforward. Applications are registered by creating a MimeType key in their .desktop entry file and listing each MIME type separated by a semicolon. The MimeType key should only be used in .desktop files whose Type key has the value Application. For more information on .desktop files, see Section 2.3 ― Desktop Entry Files.

Nautilus gets this infomation from the mimeinfo.cache files located in $XDG_DATA_DIRS/applications and $XDG_DATA_HOME/applications/ that are created by update-desktop-database.


each user has their account, the only one with root privileges is me. In this way, they can still modify the start of applications, as well as the toolbar


I had the same problem and I was ble with a small tweak to upgrade "as-usual" my Jaunty server and Desktop installations to the latest LTS.

I have put all the details how to do a smooth upgrade from Jaunty to Karmic (even if EOL) in another answer.


System boots straight into Windows without showing GRUB

Re-installing GRUB is almost certainly overkill, and carries a small risk of messing things up. Instead, try this:

Boot to Windows.
Open an Administrator Command Prompt window by right-clicking the Command Prompt icon and selecting the option to run it as Administrator.
Type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
Reboot.
If you boot into Ubuntu but GRUB did not give you a menu or if that menu did not include Windows, type sudo update-grub in a Terminal.

That should fix it. Alternatively, instead of steps #2-3, you could try the third-party EasyUEFI, which gives you a GUI menu for rearranging EFI boot priorities. Some EFIs provide similar functionality in their setup utilities. You can also do the same thing with efibootmgr in Ubuntu, but that sometimes fails due to bugs in either efibootmgr or EFIs, and it's harder to explain than is the same procedure with bcdedit in Windows.


wireless problem ubuntu 12.04, rfkill commands not working and no internet access via cable

Ok, fixed it by using my android phone as an internet source through an usb cable and then updating the system by just hitting ok to the automatic updates that show up on screen


echo 1 > /sys/bus/pci/slots/$4/power bash: /sys/bus/pci/slots//power: Permission denied

echo won't work like that.

You would need use sudo tee instead like so to allow permission:

echo 1 | sudo tee /sys/bus/pci/slots/4/power

Also, I think you probably meant to specify slot 4 which would be 4 instead of $4.


Ubuntu dock's "Show Applications" button is missing in Ubuntu 20.04 on VirtualBox

One possibility is that you have set an incorrect screen resolution and that's why the whole bottom part of the screen is getting truncated. In that case change the screen resolution to a suitable one.

Otherwise, if the 'Show Applications' button accidentally got disabled somehow, then running the following command in Terminal should bring it back:

gsettings set org.gnome.shell.extensions.dash-to-dock show-show-apps-button true


error: invalid arch independent ELF magic. dual boot with SSD

I had the same problem “invalid arch independent ELF magic”.

I was installing from a USB stick booted from the Bios in UEFI mode.

After a couple a couple unsuccessful reinstallation of 12.04,I tried the same installation with the the USB stick booted without the UEFI mode and it works.

For your information my setting on a 120GB SSD

sda1 /windows 90 GB windows 7 64bits

sda2 /boot 100 MB

sda5 swap 1 GB

sda6 / 18GB ubuntu 12.04

sda7 /home 8GB

My motherboard is P8P67 Pro with Asus EZbios and I had two choices in my boot menu for the USB with 12.04 installation.

Hope it helps!


The instructions above are for some other version of Linux; they are incorrect for Ubuntu. Please open a terminal and do:

sudo -i
echo rtl8192cu >> /etc/modules
exit
gksudo gedit /etc/rc.local

Right above 'exit 0' add these two lines:

modprobe rtl8192cu
echo "2001 330D" > /sys/bus/usb/drivers/rtl8192cu/new_id

Proofread carefully, save and close gedit. You should be all set.


Desktop bigger then screen after nvidia drivers installed

According to Ubuntu Wiki you can use following options to set your screen resolution to correct value:

Resetting an out-of-range resolution
If you set a resolution inappropriate for your monitor in the Screen Resolution GUI tool, you can reset it from a terminal by running:

$ rm ~/.config/monitors.xml

Dynamically testing different resolutions
You can either use the Screen Resolution GUI tool to experiment with different resolutions, or the more powerful xrandr command-line tool. Without parameters, xrandr shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each:

$ xrandr
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1400 x 1400
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 286mm x 214mm
   1400x1050      60.0*+   50.0
[...]

You can direct xrandr to set a different resolution like this:

$ xrandr --output LVDS --mode 1024x768
$ xrandr --output VGA1 --mode 1024x768

The refresh rate may also be changed, either at the same time or independently:

$ xrandr --output LVDS --mode 1024x768 --rate 75
$ xrandr --output VGA1 --mode 1024x768 --rate 60

Setting xrandr changes persistently

There are several ways to make xrandr customizations permanent from session to session: a) .xprofile, b) kdm/gdm, c) xorg.conf. Each of these mechanisms will be discussed in turn.

Setting xrandr commands in .xprofile

A user's ~/.xprofile file is executed on Xorg startup if it exists and is executable. You can copy and paste xrandr command line strings into this file so they're executed when you log in. For example:

$ xrandr --output VGA-0 --mode 800x600

There are two disadvantages to using .xprofile for xrandr settings. First, it occurs fairly late in the startup process, so you'll see some resolution resizing during the initial screen draw; in some cases panel windows may resize improperly as a result. Second, as this is a per-user setting, it won't affect the resolutions of other users, nor will it alter the resolution on the login screen.

Setting xrandr commands in kdm/gdm startup scripts

Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/ , while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts. For GDM, try putting them right before

initctl -q emit login-session-start DISPLAY_MANAGER=gdm

in /etc/gdm/Init/Default.

This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using .xprofile, and will apply to all users including the login screen.

Setting resolution changes in xorg.conf

While xorg.conf is largely empty these days, it can still be used for setting up resolutions. For example:

Section "Monitor"
    Identifier      "External DVI"
    Modeline        "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
    Option          "PreferredMode" "1280x1024_60.00"
EndSection
Section "Device"
    Identifier      "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    Driver          "ati"
    Option          "Monitor-DVI-0" "External DVI"
EndSection
Section "Screen"
    Identifier      "Primary Screen"
    Device          "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    DefaultDepth    24
    SubSection "Display"
        Depth           24
        Modes   "1280x1024" "1024x768" "640x480"
    EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Primary Screen"
EndSection

See man xorg.conf for full details on how to craft an xorg.conf file.


I want Ubutu but i have a question first

You do not need that information to boot or install ubuntu. You might need to make a windows recovery disk. I would make one if you do not have one.

You need a windows recovery disk in the event you have a problem with windows.


Ok, I think I found a way to atleast partialy do the intended "takeaway".

Systemback is a Windows Restore like app and can make live copy of my system to USB stick so I can use it on other computers.

So when I come back from my trip where i cant/don't/need to take my hardware
I can just flash the LiveUSB to my notebook and I'm back up to date.

Also, Systemback is a great Ubuntu repair tool. It saved me hours or reinstalling and "sudo dat sudo that" last 24h. From the point you have a perfect Ubuntu running, back it up, it takes 2min and you are safe ;)


If your device is okay on other computers and if it is a laptop, try using other USB ports. and if possible try using it connected to AC power. This seems like a power issue to me :)


Print PDF from Okular without scaling down?

Created an image in LibreOffice Draw with precise dimensions.

Printed directly from Draw, image dimensions are OK.
Export to PDF
Print from Okular with defaults, image is scaled down
In Draw, File>Open and open the PDF then print, dimensions are OK
Looking at the Okular print dialog more closely, I stumble upon this set of options ("Options" fold out):

This works, but... the image seems to be printed shifted so that it fits the printable area. So if the initial PDF contents just fit the printable area the right edge is going to be trimmed.


Messed up configuration by uninstalling PhpMyAdmin

I have read your post again. Just remove the symbolic link: sudo rm /etc/apache2/sites-enabled/phpmyadmin.conf.

Edit: /etc/apache2/apache2.conf doesn't have line 219 (for this case) because the complete file which the Apache2 server uses is consisted of the main content of the file and the content of all .conf files, involved with directives like: IncludeOptional mods-enabled/*.conf.

Check for additional phpmyadmin.conf file in /etc/apache2/conf-available/.
If it is there, I think you must do:

sudo a2disconf phpmyadmin
sudo rm /etc/apache2/conf-available/phpmyadmin.conf

or (which is the same):

sudo rm /etc/apache2/conf-enabled/phpmyadmin.conf
sudo rm /etc/apache2/conf-available/phpmyadmin.conf


Why do I need to replace "quiet splash" with "nomodeset"?

Short answers for your questions:

1) The option nomodeset means do not load video drivers.

2) Install suitable video drivers or read second option of long answer

Long answers:

  1) nomodeset

  The newest kernels have moved the video mode setting into
  the kernel. So all the programming of the hardware specific clock
  rates and registers on the video card happen in the kernel rather than
  in the X driver when the X server starts.. This makes it possible to
  have high resolution nice looking splash (boot) screens and flicker
  free transitions from boot splash to login screen. Unfortunately, on
  some cards this doesnt work properly and you end up with a black
  screen. Adding the nomodeset parameter instructs the kernel to not
  load video drivers and use BIOS modes instead until X is loaded.

  Note that this option is sometimes needed for nVidia cards when using the default "nouveau" drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia

  quiet

  This option tells the kernel to NOT produce any output (a.k.a. Non verbose mode). If you boot without this option, you'll see lots of kernel messages such as drivers/modules activations, filesystem checks and errors. Not having the quiet parameter may be useful when you need to find an

  splash

  This option is used to start an eye-candy "loading" screen while all the core parts of the system are loaded in the background. If you disable it and have quiet enable you'll get a blank screen.

Source: https://ubuntuforums.org/showthread.php?t=1613132

What do the nomodeset, quiet and splash kernel parameters mean?

2) To find drivers in Ubuntu, open the menu, type Drivers, and select Additional Drivers.
Upon opening, the system will run a quick scan. This will find out if your system has hardware that would benefit from having proprietary drivers installed. It is here that you will find proprietary drivers.

Source: https://www.makeuseof.com/tag/install-proprietary-graphics-drivers-ubuntu-fedora-linux/

Second option:

How to permanently set kernel boot options on an installed OS?

Press Ctrl+Alt+T and type:

sudo gedit /etc/default/grub

A text editor will open with the grub configuration file. Near the top of that file you will see something very similar to this:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

add your custom boot options to the GRUB_CMDLINE_LINUX_DEFAULT line, so for instance:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

Then do update your grub:

sudo update-grub

Enjoy!

Source: https://ubuntuforums.org/showthread.php?t=1613132


How to create a new partition on an already encrypted hard drive?

You are likely better off backing up your files and reinstalling as this guide suggests, either way, this should help.

ResizeEncryptedPartitions | Ubuntu Community Help Wiki


You have to set the flat-volumes option to no in the ~/.pulse/daemon.conf:

$ cat ~/.pulse/daemon.conf
...
flat-volumes = no
...

From man pulse-daemon.conf

  flat-volumes=  Enable  'flat' volumes, i.e. where possible let the sink
         volume equal the maximum of the volumes of the inputs connected to  it.
         Takes a boolean argument, defaults to yes.

Then restart the daemon :

pulseaudio -k ; pulseaudio -D

I had a similar problem and that worked for me.

Read more about it here.


Please help me with An error occurred, please run package manager

You may want to re-install the package with the missing dependencies first:

sudo apt-get -f install

Should that fail, you'll have to purge spotify:

sudo apt-get purge spotify*


Increase my Ubuntu performance without swap partition

Swap partition is needed for the system itself and some apps go crazy if there is no swap partition, and it is used for hibernation too. So I think it would worth that amount of space it needs.


How do I change from Ubuntu 18.04 to Lubuntu 18.04?

sudo apt-get install lubuntu-desktop

or

sudo apt install lubuntu-desktop

will install the lubuntu desktop and all its standard applications. After executing the command, log out and on the log-in screen, use the cog to select the Lubuntu session and then provide your password to log in to the Lubuntu desktop.

There is, perhaps unfortunately, no standard way to cleanly remove anything related to the Ubuntu desktop to leave only the Lubuntu packages.


The HP Tilt Pen works out of the box on fully updated version of 18.04 and above, so simply do a:

sudo apt update && sudo apt dist-upgrade

and it'll just work!


Can't get to login screen (Ubuntu server 14.04 with Lubuntu)

open Terminal using ctrl+alt+F3 and login
type ls and you'll see a file in your home called .Xauthority
replace it using this command

  mv .Xauthority .Xauthority1
  then reboot
  tell us if it works


Can't find windows 7 partitions in ubuntu

How many windows partitions do you have? Many OEM (retail bought) machines will limit the number of partitions a drive can have. The only time I've experienced this it's been limited to 4 partitions, but your mileage may vary.


Wireless stopped working on a Gateway LT2805u

It seems many people are having a problem with that wireless card and I could not find a solution that works for everyone.

The most common solution is

echo "blacklist acer_wmi" | sudo tee -a /etc/modprobe.d/blacklist.conf
echo "options ath9k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath9k.conf

Then reboot.

Posted on this blog - http://ubuntulinuxgethelp.com/2012/02/ubuntu-sony-vaio-atheros-ar9285-suddenly-keeps-dropping-wifi-connection/

Same commands are posted on the forums and askubuntu

Example: Why is my internet so slow with an Atheros wireless card?

You can also try (you will have to enable the backports repository first).

sudo apt-get install linux-backports-modules-wireless-lucid-generic

From https://help.ubuntu.com/community/WifiDocs/Device/Atheros/AR9285

My advice would be for you to try a more up to date version of Ubuntu as this is goin gto be dependent on the kernel. You may want to try 12.04, and if it does not work, file a bug report.


Dell Monitor not working after Ubuntu upgrade

After the last update everything works fine, I don't know what was the problem because I still have NVIDIA driver 384.69.


Update Manager Error - Invalid Package Name

It seems like your /var/lib/dpkg/available file is corrupted. So delete or move the current one and create a new file from backup.

sudo mv /var/lib/dpkg/available ~/Desktop
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available


Is there a way to shutdown the X display?

X is currently handled by gdm (Gnome Display Manager). The "proper" way for starting, stopping and restarting the graphical server is:

sudo stop gdm
sudo start gdm
sudo restart gdm

Commands like startx aren't recommended as they're not setting important environment variables or neccessarily pulling in the right configuration. Using startx instead of gdm also makes it harder to close ;)


trouble installing suggested packages to play dvds on 14.04

I suspect you have the CD-ROM box checked on the screen below.

Uncheck it and click close. You'll be asked for your password in here somewhere.

After that, retry your install.


What are the consequences of using codename of a newer Ubuntu release in apt source?

If I understand what you've described (you didn't say what repositories, nor if you put any package restrictions in place), it'll cause your bionic system to upgrade to groovy and likely break, as that's not a tested/supported upgrade path, and misses the protections provided by correct release-upgrade tools. Your system will also EOL when groovy does, ie. also no longer be a LTS release. It's unwise unless you consider the consequences (research on the packages to be installed, what parts of your software stack will be changed impacting what else you have installed etc)
reworded clarification
Apt & package tools look for packages that can be updated... and upgrade any bionic packages that are found in groovy sources (ie. nearly every package you have installed) which is why I said you won't be running bionic any longer. You'll be switching to groovy and likely break your system. Even if you switch sources back to bionic, you won't be running bionic anymore, but instead a frankensystem
If you do the change, sudo apt update and then try and install only a single package, that may not work either, it'll depend on the package.
If the package is for example wallpapers for groovy, it'll have ~no depends rules that will pull in other groovy packages. However most packages will have depends rules which cause other packages to be installed, those packages likewise have their own depends rules etc... thus a single package usually pulls in others, the others pulling in more.  (snowball effect)
For the groovy wallpaper package (eg. https://packages.ubuntu.com/groovy/ubuntu-wallpapers shows one focal depends (which really is because groovy hasn't had it's wallpapers packaged yet so the quick work-around fix is just to use focal's.. an easy example).  Most packages however aren't that simple which is the problem.
this really is just slightly edited comments


Macbook pro 8,1 ubuntu 12.04 sd card reader doesnt work

on MacBook Pro the wireless and the card reader have the same controller in a integrated chip:

http://www.broadcom.com/products/Ethernet-Controllers-and-Adapters/Enterprise-Client-Controllers/BCM57765

thus, there is a relation between the network and the card reader...

I also have the MacBook Pro 8,1 with Ubuntu 12.10. So far I didn't find any solution. And I don't have ethernet right now to try this one... but I'll try later.

Please post if you find a solution.

Cheers


Can I install Ubuntu in dual boot mode on a disk that has GPT partition style?

Yes you can. Make certain to defrag then use the disk management to free up space for new partitions. If you want swap then make a tiny about 8gb or leave it out entirely if SSD. It causes too much wear and the OSs like Ubuntu will detect and create a virtual disk for you for its use if necessary. The rest of the free space would be used for the OS install. You need to check your machine is set to boot only EFI by making sure the CSM compatibility is turned off in your firmware. Good luck on the install.


Does Reboot command invoke scripts in /etc/rc0.d/ directory?

If you just want to kill some processes the way you want when you're shutting down , you can write two simple scripts as follows :

#Shutdown.sh
killall blah blah blah
init  0

and

#Reboot.sh
killall blah blah blah
init 6

and make some aliases in the .bashrc file of each user you log-in as :

alias shutdown_custom="Shutdown.sh"
alias reboot_custom="Reboot.sh"

and run those commands each time you want to reboot ( or shutdown)

But if you insist to use a init script , you can put your script in the /etc/init.d directory and issue the following command (with super-user permission) :

update-rc.d script-name enable 0 6

But be aware that you should mention the runlevels in the header of your script . For example this can be found for most linux services :

# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6

In my system the contents of /etc/rc0.d and /etc/rc6.d is exactly the same , so looks like shutting down and rebooting is the same from the systemd's perspective.

If anybody has a better solution I'm glad to hear.


The answer was to delete the Super key binding, which is used to open the dash. I think the search lens is bound to <whatever opens the dash>+C so that did it.


New install displays errors and boots into cmd line

WUBI (Windows UBuntu Installer) is discontinued, and as such is not recommended for installing Ubuntu. You can use UNetbootin to make a bootable USB with Ubuntu. Grab UNetbootin from here.

You can then install Ubuntu by following this.


dpkg killed when removing python packages

Since you wrote: "I'm really at my wits' end, and I'm open to drastic solutions."

I'd suggest removing the block of the corresponding package from /var/lib/dpkg/status

this should do the trick


You don't need to compile Gsync here, since what you downloaded is the binary packages. That means there is nothing for compile. Just extract the archive and start to use it via binaries:

cd goodsync-release-i686 # or whatever you downloaded
./gsync

http://www.goodsync.com/support/manual#command_line


I got both external 4k monitors working correctly.

The solution was a combination of kernel and nvidia driver.

Since I last posted I was using the 4.4.0-31. I upgraded to the 4.4.0-34 kernel but that caused even more problems. Things that worked in -31 no longer worked in -34. One example is a video converter to take mDP output and convert it to VGA for a conference room projector. Under -31 it worked perfectly, using -34 it would not recognize the projector at all.

I then recently updated the kernel to -36 and at the same time purged the existing nvidia drivers and installed 370.23. This combination of kernel and video drivers allowed me to use both external 4, monitors along with the built in 4k display on the notebook.


Don't worry about that message. The message is misleading as described in this mail

  That said, the message is misleading.  It probably should have read:

  "Power capping has not been verified to work on this platform.
  Please ask the platform vendor email X to have it added to the list."


The default works well for me Super+space.

Run ibus-setup
Advanced tab → Uncheck Use system keyboard layout
If it didn't work, General tab → Change Net input method shortcut to something else.