How to install Ubuntu 15.04 on UEFI system with SSD

A short how to how I installed Ubuntu on my system:

Created an UEFI GPT pendrive with Rufus
Since I was using Windows 10 I have disabled “Fast Startup”, checked BitLocker is off and turned off hibernation (powercfg /h off).
Disabled Fastboot in UEFI
Also disabled Secure Boot (Switched to “Other OS”)
Booted from UEFI pendrive.
Created an 1024MB fat32 primary partition (with the label “EFI”) with a free space of 1MiB preceding
I have 16GB of RAM so I created a 16384MB swap partition with linux-swap file system.
The rest (without the 10-15% provisioning space) went for / (root) with ext4.
Agreed the UEFI install warning
Then the install method was the same like on a BIOS machine.
I have installed fglrx (fglrx-updates) for my Radeon R9 270X

This step is necessary if you have an ASUS Xonar sound card!

Turned volume to maximum in alsamixer for my Xonar DS in Master Front

P.S.: Alignment and TRIM is automatically enabled on newer Samsung SSDs.


It seems to me that your SSH process is not running. Therefore there is no software which accepts connections on that port. You can check it by:

sudo service ssh status

or

sudo /etc/init.d/ssh status

The script should output something like ssh start/running, process 1234 if SSH is running. If not, you'll see ssh stop/waiting. I suspect you'll get the last message. If this is the case, you just should start your SSH daemon by:

sudo service ssh start

Furthermore you should have a look in you sshd_config and in /etc/default/ssh if there are some "strange" options.


Why is / taking up 7 GB of space (running `du`)?

Everything you see is under / so its the sum up value of everything :P


How to get Synaptics Touchpad working under Ubuntu Mate 19.04

According to this seemingly identical bug report on launchpad you can fix this by passing

psmouse.elantech_smbus=0

to the boot options.

Take a look at How do I add a kernel boot parameter? if you need information as to how to add boot options.


Try:

sudo modprobe -v pcspkr

Then this should make a sound:

echo -e "\a"


Is there any way to save files when switching to a different version of Ubuntu?

You can simply upgrade your system, if it's connected to the Internet :

First, verify that a new version exists :

sudo do-release-upgrade --check-dist-upgrade-only

Then, if you're satisfied with the system proposed, do :

sudo do-release-upgrade -d

ATTENTION : you have to have enough space on your hard disk to do this upgrade. You won't be advised if you haven't enough free space and the upgrade will fail (and that's not good for your data)

Without an Internet connection on the computer where Ubuntu is installed, you can also download a LiveCD of Ubuntu and install it, it will ask you if you want to upgrade your current system or if you want to install a new one.


How to start tomcat service on Ubuntu restart

Start the Tomcat service by executing:

sudo systemctl start tomcat

Check the service status with the following command:

sudo systemctl status tomcat

OUTPUT:

⬤ tomcat.service - Tomcat 9 servlet container
  Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled)
  Active: active (running) since Wed 2018-09-05 15:45:28 PDT; 20s ago
 Process: 1582 ExecStart=/opt/tomcat/latest/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 1604 (java)
   Tasks: 47 (limit: 2319)
  CGroup: /system.slice/tomcat.service

If there are no errors enable the Tomcat service to be automatically started at boot time:

sudo systemctl enable tomcat

To allow traffic on port 8080 type the following command:

sudo ufw allow 8080/tcp

Here are all steps


I would also like to know how to establish a RemoteApp-Connection. I figured that running ./thinrdc will start up the gui, but I dont know how to go on from there.


Latest NVIDIA GPUs, especially if designed to gaming (like my GTX 750), aren't supported by kernel.

You have to add an external ppa, install the graphic driver and reboot, so type in terminal:

sudo add-apt-repository ppa:mamarley/nvidia -y
sudo apt-get update
sudo apt-get install nvidia-346 nvidia-346-uvm && sudo reboot

The maximum resolution will be automatically used since login screen.

PS I don't reccomend you to install Nvidia driver from the Additional Driver dialog (despite it should be easier), as you can choose only an older version (340.xx), the 346.xx one is not mentioned.


Run a script after unattended-upgrades runs (e.g. to update rkhunter)

1) If you installed rkhunter via apt-get, I believe you need to enable AutomaticSecurityUpdates.

2) If you compiled & installed rkhunter from tar.gz, you need to run:

sudo rkhunter --versioncheck

However, I don't see how one can link this back to Ubuntu update process.

3) Now if by updating rkhunter you mean to update the signature database on updating Ubuntu packages as documented here:

  To run rkhunter --propupd, automatic after software updates, add the
  line APT_AUTOGEN="yes" to /etc/default/rkhunter (this gets read by
  /etc/apt/apt.conf.d/90rkhunter)


I had this problem, too. I followed instructions from Juniper's site and . After reading logs in .juniper_networks/, I found out that the sh script to open NC.jar opens xterm. In order to fix this, you have to install xterm:

sudo apt-get install xterm

This will for sure make sure that sremote is actually working on Ubuntu 14.04 and Linux Mint 17. I've seen it work on some Ubuntu computers though... I am using webupd8team's java oracle 8 as the default and manually installed java oracle 8 u25 32-bit manually from the oracle site.

EDIT 2: A fresh Ubuntu 15.04 and the latest 32-bit oracle java 8 works straight out of the box!!!


The requested URL not found - in Digital Ocean LAMP Webmin server

Once I added a virtual host via webmin,

I will need modify sites-available .conf and add these codes to wrap inside my domain's <Directory> :

Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all


Can you recommend a good modern GUI download manager (wget wrapper?)

Gwget

  Gwget is a free graphical frontend for of Wget. GWget supports all of the main features that Wget does, as well as parallel downloads. Its name is derived from GUI - Graphical user interface, and Wget.

You can also install it by

sudo apt-get install gwget

Multiget

  MultiGet is an easy-to-use GUI file
  downloader.  It's programmed in C++
  and has a GUI based on wxWidgets. It
  supports HTTP/FTP protocols which
  covers the requirements of most users.
  It supports multi-task with
  multi-thread on multi-server. It
  supports resuming downloads if the Web
  server supports it, and if you like,
  you can reconfig the thread number
  without stopping the current task.
  It's also support SOCKS 4,4a,5 proxy,
  ftp proxy, http proxy.
  In v0.8.0, a new feature was introduced, that is so called P2SP, or in other words,  get file from multiple servers, and combine the data from different site into one file. This makes downloads complete much faster.

You can also install it by

sudo apt-get install multiget

Fatrat

  Fatrat is an open source download manager for Linux written in C++ and built on top of the Trolltech Qt 4 library. It is rich in features and is continuously extended.

You can also install it by

sudo apt-get install fatrat

Uget

  Uget (formerly urlgfe) is a Free and Open Source download manager written in GTK+ , it has many of features like easy-to-use , cross-platform (Windows & GNU/Linux) , support pause and resume , classify download , every category has an independent configuration , and more ...

You can also install it by

sudo apt-get install uget


Looking to use kill -9 instead of killall

The -9 argument you mentioned specifies the signal kill shall send to the process in question. The default is SIGTERM (terminate application), 9 is equivalent to SIGKILL (kill the application immediately and most brutally).

killall accepts signal arguments (like -9 or -KILL, I prefer the symbolic names over numbers) too:

killall -KILL processname

Alternatively, there is pkill, which kills processes that match a given command pattern, which accepts signal arguments just as well. You can "preview" what would be killed by it using pgrep -a, which lists the matching progresses instead of sending a signal and killing them:

pgrep -a processname
pkill processname

If you want to match your pattern against the whole command including its arguments and not just the base command, add the -f switch:

pgrep -a -f something
pkill -f something

For more information, check the relevant manual pages: man kill, man killall, man pkill for the various kill commands and man 7 signal for an overview of available signals.


You're supposed to replace the <> by the process id.
To get the process id, you can use the command

ps -aux

It will list all the processes, and you just have to choose the right process

If you have a single instance of a process, you can also use the pkill commmand with the name of the process,
eg

pkill -9 mysql


How to change btrfs partition label/uuid?

David Sterba has recently committed an UUID change option for btrfstune. You use it as btrfstune -U <uuid> <device>.


I got a very similar error when I tried to bootstrap Juju when I had two nodes that were both in the "Allocated" state.  I had to "Stop" one of the two nodes, putting it into the "Ready" state and bootstrap again.  Not sure if that's your issue but it's something I ran into.

Hope that helps.


How to install smoothtasks in Kubuntu??/ General tarball install help

Repositories

Many applications are in the official repositories. SmoothTasks is a plasma widget: http://packages.ubuntu.com/search?keywords=plasma-widget-smooth-tasks&searchon=names&suite=oneiric&section=all

PPA

https://launchpad.net/ubuntu/+ppas

Searching the plasma-widget-smooth-tasks: https://launchpad.net/ubuntu/+ppas?name_filter=plasma-widget-smooth-tasks

Building from the sources

A start point: https://help.ubuntu.com/community/CompilingSoftware or https://help.ubuntu.com/community/CompilingEasyHowTo

Generic plasmoid build

From a plasmoid README file:

  cd /where/your/applet/is/decompressed

  mkdir build

  cd build

  cmake -DCMAKE_INSTALL_PREFIX='kde4-config --prefix' ..

  make

  sudo make install

Different KDE versions. KDE 4.7 vs KDE 4.8

http://www.kubuntuforums.net/showthread.php?56838-SOLVED-When-plasma-widget-smooth-tasks-will-be-available

Build depencies

Q:

  I tried installing on KDE 4.7, then on KDE 4.8. Both give me missing
  dependency reports (if you need to see them I'll post them)

A:

The base package for the building:

build-essential

  If you have this package installed, you only need to install whatever
  a package specifies as its build-time dependencies to build the
  package.

From the official Ubuntu package:  plasma-widget-smooth-tasks/debian/control; Build-Depends:

gettext
kde-workspace-dev
libx11-dev
cmake


I wrote iconic to solve this problem by letting you define a grid size larger than the icons. Additionally it will:

Allow you to move icons to any of three monitors
Not suffer the "lost icon syndrome" that occurs when monitors of multiple resolutions are used
Sort icons alphabetically, alphabetically with "Link to" prefix ignored, sort by modified date ascending or date descending
Allow different grid size (columns x rows) depending on monitor, EG more on 4K monitor than 2K monitor
Instant Test button for quick experimentation on column x row changes or reserved space changes for monitor left, top, right or bottom areas
Test button will last for x seconds defined by you, clear all windows before test and restore them after test
Bash script for easy modifications

You can get the script on github.

Here's the main screen:

Visit the github page for iconic to see all the other screens, explanations and a copy of the script.


Login screen all screwed up on wakeup from suspend

It seems I got this symptom fixed by following instructions from Ubuntu wiki.

Relevant part here:

  Fix suspend

  If suspend does not work for you, there are various quirk options you
  can try. See the manpage for pm-suspend for a list of them all. One
  that has been reported to help is quirk-vbemode-restore, which saves
  and restores the current VESA mode.

  To test it, open a terminal and use the following commands

  sudo pm-suspend --quirk-vbemode-restore

  That should suspend your system. If you are able to resume, you'll
  want to configure UBuntu to use this option every time you suspend. To
  do this oOpen a terminal and use the following commands:

  gksu gedit /etc/pm/config.d/gma500

  Add in the following code and save the file:

  ADD_PARAMETERS='--quirk-vbemode-restore'


How do I get the new hostname into syslog after changing the hostname?

I found out:

the first hostname for 127.0.1.1 in /etc/hosts is mentioned in syslog, so you have to change:

127.0.0.1   localhost
127.0.1.1   silversurfer test

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
...


Maybe the service is already running and using that port, try to kill metasploit before the reinstallation:

sudo service metasploit stop

In the worse case, uninstall metasploit completely and install it again from scratch.


I forgot to post the solution to this. I finally fixed it by deleting the dock on top and  restarting the x server. this made it so i could actually right click the annoying one and delete it as weel. then i readded the one i actually wanted.


Whether unallocated space created after Shrinking Windows 10 partition can be used for Kubuntu installation?

It should be fine installing it on an unallocated space. (labeled as "free space" in ubuntu installation)
How to install (K)Ubuntu on free space (unallocated space)

Boot from the Ubuntu or Kubuntu LiveUSB
Click "Install (K)Ubuntu"
Select your keyboard layout, region, etc.
Select "Something Else"
Select the free space and click the "+" Button.
Create a root partition in it. and other partiton like swap and home. (if you allocated enough space for the ubuntu install)
Then, Click "Install Now" and wait for it to install the OS.


using Sed to search and replace text in XML file

The issue is that your search pattern contains / which you are using as the replacement delimiter, you need to use another character for that or escape the /:

sed -i 's#<!--UpdateAccountGUIDs>UpdateAndExit</UpdateAccountGUIDs-->#<UpdateAccountGUIDs>UpdateAndExit</UpdateAccountGUIDs>#' File.XML

or

sed -i 's/<!--UpdateAccountGUIDs>UpdateAndExit<\/UpdateAccountGUIDs-->/<UpdateAccountGUIDs>UpdateAndExit<\/UpdateAccountGUIDs>/' File.XML

Note that you should never use regular expressions to parse [X]HTML.

Finally, as a general rule, when working with regular expressions, less is more. You should try to specify the simplest possible exclusive pattern rather than repeat all text. This not only makes your code much easier to read, it also avoids problems like the one you were facing. For example:

sed -i -r 's/<!--(UpdateAccountGUIDs.+?)-->/<\1>/' File.XML

Here, the -r enables extended regular expression syntax so we can use () to capture a group (without needing to escape the parentheses) and then refer to the captured text as \1. So, the command above simply looks for a comment that is adjacent to UpdateAccountGUIDs, extends till the first end of comment statement and then does the replacement.


Merge multiple mp4 files into a single video via the terminal

Install package gpac

apt install gpac

That has a utility MP4Box that can concatenate:

MP4Box [-keepsys] -cat FILE1+FILE2+FILE3 out.mp4

Ubuntu 14.04 LTS ymmv.


I updated the system following this How can I fix E: Sub-process /usr/bin/dpkg returned an error code (2)?

Issue resolved.. Thank you, @Cristiana Nicolae for editing the question.


How to create a launcher icon for anaconda navigator in ubuntu 16.04?

To create a launcher icon, first create a .desktop file. You should call it Anaconda.desktop.
Inside the file, type:

[Desktop Entry]
Name=Anaconda
Exec= anaconda executable path here
Terminal=false
Type=Application

Then do chmod +x Anaconda.desktop so you can execute it. You should be able to execute it properly. Hope this helps


ROOT-installing with cmake succeds but is not usable

I see that ordinary make builds is not recommended by CERN, but you can try.

wget https://root.cern.ch/download/root_v6.12.04.source.tar.gz
tar -xzf root_v6.12.04.source.tar.gz

sudo apt-get install git dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev

sudo apt-get install gfortran libssl-dev libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmysqlclient-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev libqt4-dev

./configure
make -j4
sudo make install

Also for your information - Ubuntu Xenial has ROOT 5.34 packages in repositories. You can install them with

sudo apt-get install root-system-bin


In the process of installing Java and Hadoop, my user profile has disappeared?

Okay so here are a couple of points for for what you're doing wrong and how you should fix it:

The command you're supposed to run is sudo gedit /etc/profile, not etc/profile. That / before etc is very crucial. The command you are executing is trying to open another file, and if that file doesn't exist, you'll see a completely blank page like the one you're seeing.

  Note: you shouldn't be using sudo with gedit. Use gksu gedit /etc/profile. If that gives you an error, use sudo nano /etc/profile instead. This will not open up a pretty text editor like gedit, but it will allow you to edit the file from inside the terminal. To save your changes and close, hit Ctrl+X, then Y, then Enter. If you don't want to save your changes, hit Ctrl+X, then N.

You shouldn't actually be using /etc/profile. It's better to add the code you're trying to copy into ~/.bashrc or ~/.profile (which is the same as /home/YourUserName/.bashrc and /home/YourUserName/.profile). So you edit that file using gksu gedit ~/.bashrc or sudo nano ~/.bashrc (and the same for the other .profile file).
You have a few mistakes in the code you're trying to copy. It should look like this:

JAVA_HOME=/usr/local/java/jdk1.8.0_20
JRE_HOME=/usr/local/java/jre1.8.0_20
HADOOP_INSTALL=/home/YourUserName/hadoop/hadoop-1.2.1
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_INSTALL/bin
export JAVA_HOME
export JRE_HOME
export HADOOP_INSTALL
export PATH

You have to obviously change YourUserName to your actual username.

So, continue with whatever guide you're following and you should be set.


How can I disable AMD radeon and use Intel Integrated Graphics on 2011 iMac?

There is a Gnome shell extension to select the used graphics device from System76. The extension can be used with other desktops than Gnome as well (only from the terminal). This extention us usually used to save power, but it might be useful for your problem as well.

System76 gnome shell extension installation guide

This is not a very clean solution but might solve your problem after blacklisting was not successful.


My netbeans is not working after I deleted the jvm folder

Open netbeans.conf file available under etc folder.

Modify the netbeans_jdkhome variable to point to new JDK path, then restart your Netbeans.


Go to "sound preferences" from the top right corner of the screen and check if the balance is on the middle


The following worked for me:

bzr branch lp:fontforge
cd fontforge
./configure
make
sudo make install

I started it, by typing in the terminal fontforge.


KDE Plasma - ways to manage opened programs

Ctrl+F9 zooms out and shows all open windows. Common keystrokes are listed at https://docs.kde.org/trunk5/en/applications/fundamentals/kbd.html

You may find more useful information at https://docs.kde.org/trunk5/en/applications/fundamentals/kbd.html and
https://userbase.kde.org/System_Settings/Windows_Management


Logitech Wireless M510 Does Not Work 12.10

The problem with the Unifying Receiver is likely caused by this bug: https://bugs.launchpad.net/ubuntu/+bug/958174 which apparently has been fixed upstream. No fix as of yet in Ubuntu, but in the meantime running sudo modprobe -r hid_logitech_dj && sudo modprobe hid_logitech_dj a few times will probably fix it.

The message you're seeing (Operation not permitted) is because modprobe must be run as root (the most privileged user), which can be done using 'sudo' as above.


Finding a offset of file in a zip without unziping using shell?

Try running zipdetails on the file. [Full disclosure - I am the author of zipdetails]
In the example below, the offset for the file abc.txt is listed on the PAYLOAD line. The value in this case 41 hex
$ echo abc >abc.txt
$ zip test.zip abc.txt
  adding: abc.txt (stored 0%)

$ zipdetails test.zip
0000 LOCAL HEADER #1       04034B50
0004 Extract Zip Spec      0A '1.0'
0005 Extract OS            00 'MS-DOS'
0006 General Purpose Flag  0000
0008 Compression Method    0000 'Stored'
000A Last Mod Time         52984C29 'Sat Apr 24 09:33:18 2021'
000E CRC                   4788814E
0012 Compressed Length     00000004
0016 Uncompressed Length   00000004
001A Filename Length       0007
001C Extra Length          001C
001E Filename              'abc.txt'
0025 Extra ID #0001        5455 'UT: Extended Timestamp'
0027   Length              0009
0029   Flags               '03 mod access'
002A   Mod Time            6083D7CE 'Sat Apr 24 09:33:18 2021'
002E   Access Time         6083D7CE 'Sat Apr 24 09:33:18 2021'
0032 Extra ID #0002        7875 'ux: Unix Extra Type 3'
0034   Length              000B
0036   Version             01
0037   UID Size            04
0038   UID                 000003E8
003C   GID Size            04
003D   GID                 000003E8
0041 PAYLOAD               abc.

0045 CENTRAL HEADER #1     02014B50
0049 Created Zip Spec      1E '3.0'
004A Created OS            03 'Unix'
004B Extract Zip Spec      0A '1.0'
004C Extract OS            00 'MS-DOS'
004D General Purpose Flag  0000
004F Compression Method    0000 'Stored'
0051 Last Mod Time         52984C29 'Sat Apr 24 09:33:18 2021'
0055 CRC                   4788814E
0059 Compressed Length     00000004
005D Uncompressed Length   00000004
0061 Filename Length       0007
0063 Extra Length          0018
0065 Comment Length        0000
0067 Disk Start            0000
0069 Int File Attributes   0001
     [Bit 0]               1 Text Data
006B Ext File Attributes   81B40000
006F Local Header Offset   00000000
0073 Filename              'abc.txt'
007A Extra ID #0001        5455 'UT: Extended Timestamp'
007C   Length              0005
007E   Flags               '03 mod access'
007F   Mod Time            6083D7CE 'Sat Apr 24 09:33:18 2021'
0083 Extra ID #0002        7875 'ux: Unix Extra Type 3'
0085   Length              000B
0087   Version             01
0088   UID Size            04
0089   UID                 000003E8
008D   GID Size            04
008E   GID                 000003E8

0092 END CENTRAL HEADER    06054B50
0096 Number of this disk   0000
0098 Central Dir Disk no   0000
009A Entries in this disk  0001
009C Total Entries         0001
009E Size of Central Dir   0000004D
00A2 Offset to Central Dir 00000045
00A6 Comment Length        0000
Done

Dumping just the filneame & payload offset can be done as follows
$ zipdetails  test.zip | perl -00 -ne 'print "$1,$2\n" if /^\S+\s+Filename\s+'"'"'(.*?)'"'"'.*?^(\S+?)\s+PAYLOAD/ms'
abc.txt,0041

There a pile of shell escaping going on in that, so here is the perl statement without escaping
print "$1,$2\n"
    if /^\S+\s+Filename\s+'(.*?)'.*?^(\S+?)\s+PAYLOAD/ms;


Configure Ubuntu 13.10 to rotate display globally?

This answer is the key. You simply copy the .config/monitors.xml from your account to /var/lib/ligthdm/.config/monitors.xml and lightdm will pick up that configuration.


You don't need to have anyone "log in" to the server for the webserver to run. The web server (Apache?) Will run as either nobody, apache, http, or whatever user that service is designed to run as. It'll serve up content to whatever valid requests are made to it as long as it's on. Since it runs daemonized it will continue to run without anyone logged in actively. Furthermore, no one should have to log in as the webserver user for security reasons.

If you want users to be able to upload and place new content on the webserver without actually giving them access to the machine they don't need SSH access (though you could give them that) They really need FTP access to a secured location on the box which the web server is configured to read from. Typically most web servers read from /var/www - though you can configure it to read from any directory in the system. They don't constantly need to be logged in for it to run either. Just log in via FTP - upload files - refresh browser.


Ubuntu actually waits for all the essential drivers and environment application to load before log you in. In my case, I intended to overwrite the default (lightdm unity) with gnome-shell, bit it failed and the boot sequence was waiting infinitely for it to run. So I need to rollback my changes but there isn't much i can do since I cant actually get myself to terminal (the "shift" + boot didn't work).

Here's what I did to resolve the issue:

Plugged in my usb bootable ubuntu and ran trial version.
Browsed through the bootdrive and edited /etc/X11/default-display-manager.
It didn't allow me to write so I assigned writable permission to it
with sudo chmod 777 /etc/X11/ -R.
Then I changed the line  /usr/sbin/gdm  to /usr/sbin/lightdm and the rebooted. By doing this I rolled back the changed from gnome-shell to lightdm, and I saved myself from reinstalling the system.


Able to access shared files on Ubuntu from Windows only when I ping the IP from Ubuntu

All the symptoms you describe point to an IP address conflict within your network. Carefully check that no other computer has the same IP as either the Ubuntu system or the Windows box.


How do I establish an FTP connection from Windows to Ubuntu Server?

Short answer: try sftp instead of ftp.

Most likely, the problem is simply that you don't have an FTP service installed and configured. FTP service isn't installed by default on Ubuntu. I don't believe FTP service is considered part of the LAMP stack, and installing lamp-server via tasksel would not install FTP service.

However, sftp,  secure ftp, is provided by sshd, the secure shell daemon, which I believe is installed by default. That works quite nicely for authenticated FTP, and you can configure it to use  public key authentication, which is both more secure and more convenient. Not all FTP clients support sftp, but most current ones do, including Filezilla (or lftp on the Linux command line). If you want to use public key encryption on Windows, you'll want to install PuTTY to generate the keys. PuTTY is very useful for administering a Linux box from Windows. See the Ubuntu official page for more on SSH keys.

Alternately, if for instance you want to offer anonymous FTP as well as authenticated FTP, you could install and configure FTP service. vsftpd is quite good, and fairly easy to configure. See the official page on FTP servers.


How to reinstall ubuntu and preserve home directory

After spending the better part of a day on this, I finally have a good idea of what's going on. The installation package was on my flash drive, but Ubuntu itself was installed on the partition of my hard drive. So, the way to reinstall is to use the same flash drive that had the installation package and boot directly through that. This allows Ubuntu to do the installation process again, and about halfway through the installation process, you will have the option to either upgrade or install alongside the current version of Ubuntu, or "do something else". Since the installer version on my flash drive was actually older than the current version on the hard drive, I decided to re-download the most up-to-date version of Ubuntu on a new flash drive, and boot through that one instead. Then, using that, I chose the "do something else" option and was able to manually select the partition I wanted. The dialog box showed which one Ubuntu was already installed on, so I chose that partition, and then changed the mount point to '/'. Choosing this one meant that all of my stuff would stick around, and lo and behold, it did!

NOTE: if the version on the flash drive is newer than the version on the hard drive, your best bet is the upgrade option. This updates the OS but preserves all of your information/files/etc. I didn't have this option because my flash drive and hard drive versions ended up being the same.

This site contains a useful step-by-step guide, if you need any additional direction.


How to switch keyboard layout in Openbox using keyboard shortcuts?

Openbox looks for user defined configs at ~/.config/openbox. If nothing was there, then it looks for default config files at : /etc/xdg/openbox/.

Create a new user then make a copy of default config files in your user directory so we can edit them:

mkdir ~/.config && cp -r /etc/xdg/openbox ~/.config

Then add this line:

setxkbmap -layout "us,ru" -option "grp:alt_shift_toggle" &

To

~/.config/openbox/autostart

Now you can change the layout using Alt+Shift after a logout and re-login.


you can try reinstalling Ubuntu using a USB drive, and make sure you configure your bootloader properly this time.


When installing Ubuntu from a disk, will it overwrite my current Mac OS partition automatically?

It will not uninstall macOS unless you click on "Erase drive and install Ubuntu". Click on "Install Ubuntu".


Don't know how to install wireless card?

Hardwire the computer into your network with an ethernet cable so you have internet access, then verify the internet connection is working properly by going to Facebook or something.  In the top right corner of the screen click the Shutdown icon and click "System Settings".  Once that opens, click the "Software and Updates" icon.  Once that opens, you'll see a tab on the far right labeled "Additional Drivers"; click it.  It may take a few minutes, but if it can find a driver for your card, it should appear in this window and let you "activate" or "apply" it.  Do so, then reboot the computer.  If you have an AMD or NVIDIA graphics card, it may also show you drivers for that as well.  Generally speaking when selecting drivers, I pick the ones labeled "proprietary", or the ones with a little red ribbon on them.  Proprietary drivers are issued by the hardware manufacturer, and the little red ribbon means it has been tested pretty thoroughly.


winusb gives me the error "cannot move file to a subdirectory of itself". How do I debug and fix?

I got the same problem. I looked at /usr/bin/winusb script and found lines:

#boot dir should be lower case

if [ -d "$partitionMountPath/BOOT" ]; then mv "$partitionMountPath/BOOT" "$partitionMountPath/boot"; fi

So it wants to rename "BOOT" to "boot", but FAT16 and FAT32 are case-insensitive and so it's the same directory.

I've fixed this locally by changing the line to the following:

if [ -d "$partitionMountPath/BOOT" ]; then mv "$partitionMountPath/BOOT" "$partitionMountPath/boot_" && mv "$partitionMountPath/boot_" "$partitionMountPath/boot"; fi


Can I upgrade to Linux 3 Kernel on Ubuntu 10.10?

Or, as a last-ditch effort you could compile a new kernel from kernel.org and use that.

To get an ubuntu-styled kernel:

apt-get source linux-image-$(uname -r)
cd linux-image-$(uname -r)
make menuconfig #Then hit exit and save the configuration
cd ..
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.6.tar.bz2
tar -xjf linux-3.2.6.tar.bz2
cd linux-3.2.6
make menuconfig
cp ../linux-image-$(uname -r)/.config .
rm -R ../linux-image-$(uname -r)*
make
make install


Have you tried using the program Startup Disk Creator? It does USB as well, as long as you have the iso. I believe it is preinstalled with Ubuntu anyway. If not, go to the Software Center.


According to this, you can do the following to get i3-wm (without Regolith)

$ add-apt-repository ppa:kgilmer/regolith-stable

$ apt install i3-gaps i3-gaps-wm


Why do we need to create a bootable USB stick on Ubuntu?

Actually, you can: recent Ubuntu ISO images are "hybrid" and meant to be both writable to CD media or directly to a CD. Read here:

https://superuser.com/questions/683210/how-do-i-determine-if-an-iso-is-a-hybrid

If your host operating system is unable to write a raw image to the USB stick without mangling it (I know Ubuntu can do it, using the "dd" command, but I'm unaware if Windows or OS X can) then you need to use a USB creation tool which copies the files from the ISO in a different way and then prepares the stick to be generically bootable.

FWIW, I usually just sudo dd if=ubuntu-image.iso of=/dev/sdb (where /dev/sdb is the device for the USB stick) and the resulting stick boots fine.


You seem to misunderstand how to use your your public ip-address (98.xxx.xxx.xx/24) for your computer.

The public address is the address of your modem/ router. This device has (at least) two connections, a WAN (internet) and a LAN (your local network). The WAN connection is using the public ip 98.xxx.xxx.xx/24. On the LAN side there usually is a subnet with 256 ip numbers of which you can use 253, 192.168.1.2 to 192.168.1.254.

The gateway 192.168.1.1, is the ip numbet of the LAN connection on your rout/modem.

Only ip numbers 192.168.1.2 thtough 192.168.1.254 can be used by devices on you LAN.

If you want your ubuntu machine to listen for incoming connections from the internet on your public ip address you have to configure that on your router/modem. You can make your router/modem listen on tcp ports and pass incoming connections to tcp ports on your ubuntu machine.


incoming traffic blocked in firewall logs

Port 23 is for telnet connections. Telnet is the old protocol to open a text terminal on another machine and run commands there. Old and totally insecure.

Since you are on a VPS, you are quite simply being attacked by many machines from all over the world. They permanently try to open Telnet (and SSH) connections on all machines they can find, and there is nothing you can do about them. Just make sure you only run services that you truly need, and that those services are well secured. In particular, use a very strong SSH password, and preferably, disable SSH passwords and use a public/private key pair.

If the log bothers you, you can quite simply remove the firewall rule. Just make sure you have no program listening on port 23, and you will be fine.

The command netstat -l -n -A inet will list all Internet ports that are currently open on your server. On a basic server, you should only have port 22 (SSH), port 123 (NTP) and ports for the services you explicitly intend to offer (for example, port 80 and/or 443 for a web server).


Inside your Home Folder there's a Folder called PlayOnLinux virtual drives, click it.

Alternatively open your Home Folder, press Control+h and you'll see this:

Click it, then go to the folder wineprefix inside and then to the default inside of it.


How to mount ramdrive in 13.10 for fast drive space

Instead, create that ramdrive with

  tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777,size=1.6G 0 0


What desktop environments can group window icons in the taskbar like Windows 7?

Unity's launcher groups windows belonging to one application in the same icon.

For example, in this screenshot, I have two Firefox windows open, and one Thunderbird window open. The Firefox icon in the launcher has two corresponding arrows on the left to indicate this, and the Thunderbird icon has one arrow. If I click the Firefox icon, I can choose between its two windows, which are immediately rearranged and laid out on the screen.


What to do when my keyboard sensitivity decreases but returns to normal after re-log

This happened to me and I eventually worked out that the Slow Keys function (in universal access settings) had been switched on without me realising. Although this question is old, I post this in the hope that it helps future readers.


cleaning up from trials to setup VirtualBox from Ubuntu Software Centre in 14.04

There are no adverse effects to action you took and all of them were necessary.
Let's see them in detail,

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

This command installs linux headers which are a requirement for virtualbox. uname -r portion here give name and version of your os, you could even type it in a terminal to check output yourself.

sudo dpkg-reconfigure virtualbox-dkms

This command reconfigured virtualbox-dkms package. Normally a package gets configure at its install time but since you already had virtualbox-dkms package, you had to use dpkg-reconfigure.

sudo modprobe vboxdrv

This modprobe command here is used to set kernel modules. Virtualbox requires vboxdrv kernel module, thats why you have to modprobe it. Try man modprobe to find more about it.

sudo apt-get install --reinstall virtualbox-dkms

This command simply reinstalled virtualbox-dkms package. This command also has no adverse effect but it makes sudo dpkg-reconfigure virtualbox-dkms useless since package virtualbox-dkms will be reinstalled anyway so we dont need to reconfigure it.

Hope that clears it up :).
Also On a sidenote do run sudo apt-get autoremove --purge that will remove any left redundant package with it settings. If you want to get rid of apt cache you could also do apt-get clean.


Ubuntu 14.04 will not recognise my Epson WP4545 printer.

Download and install this file epson-inkjet-printer-201113w_1.0.2-1lsb3.2_i386.deb
Then go back to 'My printer' and press 'Find printer' then it will get installed.

Hope this works for you.


There's a part of the update-grub scripts that does a probe of each of the disks in your raid and inserts a partition module for each one.  It doesn't do any deduping.


Since Lucid you can install it from Ubuntu Software Center. You can find it here on-line: https://apps.ubuntu.com/cat/applications/julius-voxforge/

If needed you can also use the binary package. julius-4.2.1-linuxbin.tar.gz as an example.

http://jaist.dl.sourceforge.jp/julius-4.2.1-linuxbin.tar.gz
tar xvf julius-4.2.1-linuxbin.tar.gz && cd julius-4.2.1-linuxbin/ &&
sudo ./run_install.sh

You might need to install libx11 too and can install the prior to the install.sh script with:

sudo apt-get install libx11-dev


How to securely wipe files from SSD drive?

Currently there's no way to securely erase files on SSD without erasing the content of the whole drive or access to the firmware of the SSD.

It's impossible to know where the SSD may store previous copies of a logical block.
To make matters worse, due to journalling and copy-on-write mechanisms of the file system it may be impossible to know which logical blocks may  hold a previous copy of a particular file.

The only way to prevent the leakage of deleted files to someone with direct access to the drive is to encrypt them in the first place and keep the encryption key safe from prying eyes.

Addendum:

I did some research and found out that you can sort-of erase all previously deleted files if you manage to learn all the unoccupied sectors of a file system, which is generally possible and offered by some file system tools (e. g. for the ext* family), and then discard them (e. g. with blkdiscard(8) as outlined in this answer to the linked question), which returns the blocks for garbage collection until they're used again and overwritten in the process.

This is secure against everyone who cannot access the flash cells directly, so everyone who

doesn't have a suitable flash cell reading device and
cannot talk the drive firmware into revealing the content of unassigned blocks (which would require a meaningful modification of the firmware in most cases and custom ATA commands since there's no standardised way).


While Ctrl+Alt+F1, et. al., won't work under WSL, there are a few alternatives.
Each "console" in Windows Terminal is just a separate tab.  Just hit the drop-down menu (∨) and select your WSL profile there.  Assuming you are using the default keybindings for Windows Terminal, the keys chords to select a tab are close to those of a Linux console -- Ctrl+Alt+1 (numerals, rather than function keys).  Ctrl+Tab and Ctrl+Shift+Tab will also work there.  I'm guessing you could even assign the function keys as bindings for switching tabs as well.
You could even set up a startup script for Windows Terminal that automatically allocated 7 WSL profile tabs, so that they would always be available.  Note that exiting a session, however, would close the tab.  There's no concept of "returning to login" in WSL; really there's just no concept of "login".
Alternatively, I would propose tmux for managing multiple shell sessions in WSL (it's already installed by default in the Ubuntu distributions on WSL).  Then you would just start WSL once, with something like wsl tmux.  That would give you the ability to create new tmux windows/consoles at will.  It also provides keyboard based scrollback, along with a myriad of other features.


Howto automatically remove older package versions from a custom repository?

If I am understanding the question correctly I would recommend that you use apt-mirror

This can mirror whole Ubuntu distributions or just ppa's if you want.

It keeps the repo up to date, so you do not have to worry about keeping the versions up to date manually.

You basically just need to run one command every time to update.


ssh tunnel in and connect to local machine

It is not really clear from your question what you are trying to do and what problem you are having.

When you say "webmin http tunnel will allow access to outside webpages, but cannot access any addresses on the same network." it is ambiguous what 'same network' means and how you are trying to access (host name, ip address).

I can not determine if your problem is DNS or networking or ssh.

In general, tunnelling http over ssh is simple.

ssh -C2qTnN -D 8080 user@server

You then configure your browser (firefox) to use a proxy, localhost on port 8080

There is a great discussion on how to do this and optimize both the server and firefox here:

https://calomel.org/firefox_ssh_proxy.html


How do I X forward a Windows application to a Linux system using ssh?

I'm not aware of a way to do this with x11 (indeed, the Windows application is not running under X11). However, a similar result may be achieved using the Remote Desktop Protocol (RDP). rdesktop is a Linux client implementing RDP.

After installing redesktop (sudo apt-get install rdesktop), tunnel through SSH if the machine is not local and forward port 3389, launch an application through rdesktop by specifying the credentials, host and program to start.  (See man rdesktop for more information.)

On the Windows machine install SeamlessRDP (see http://www.cendio.com/seamlessrdp/ and the -A option to rdesktop)

On Linux machine:

ssh -L 3389:localhost:3389 user@windowsHost #Forward port 3398 if needed

rdesktop -u user -d domain -A -s seamlessrdpshell notepad.exe -f windowsHost/localhost #execute notepad

Launching without -s argument will give you a full interactive session similar to VNC, which would be a solution to achieve full remote control.


Best way to create virtual machine with 16.04?

As always or at least really often - there is no general best way.

What i can offer is a small and not complete list

Gnome Boxes
Virtualbox
VMware Workstation

Gnome Boxes and Virtualbox should be installable via apt, while the VMware product isn't.

I am using VMware (older Version 11) myself on Ubuntu 16.04 - but it was a mess to get it working on Xenial.


How to install NVIDIA GTX 950M driver in Ubuntu 18.04 LTS

It looks liek you have hybrid graphics in your laptop.
There are two video adapters Intel and Nvidia.
The i915 driver is for Intel.

When you run in terminal

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

you see both adapters (intel and nvidia).

Now follow this tutorial to pick which one you want to use
https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu


Step 1: Install Java 8 (JDK 8)

Add the webupd8team Java PPA repository in our system and install Oracle java8 using following set of commands.

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Step 2: Verify JAVA Version

After successfully installing Oracle Java using above step verify installed version using following command.

$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Step 3: Setup JAVA Environment

Webupd8team is providing a package to set environment variables, install this package using following command.

$ sudo apt-get install oracle-java8-set-default


Rename a file case in JFS, case insensitive

You can use the rename command.

It's not actually a built-in shell command, like mv, but a pearl script that comes by default with most GNU/Linux distros. It's usage is a bit different from mv because it uses Pearl regular expressions to compare against a list of files.

Here's how to use it in your case:

rename 's/Test\.txt/test\.txt/' *

The s tells the rename command to search and replace all occurrences of Test.txt with test.txt. The dots . inside the regular expression must be escaped with a \, that's why the filenames are written like Test\.txt. Notice the * at the end of the command, that means to look through all files in the current directory.

You can pass the -n option to the rename command if you want to test it without making any changes.


How to use a .iso image as a CD-ROM Repository?

This question has already been answered as part of an answer to a different question:
How to make USB drive as local repository

The easiest way to add the image as a software source is to burn it to a CD/DVD. You then need to go to System -> Administration -> Software Sources, click 'Other Software' and click 'Add CD-ROM...'.
If you want to use the ISO image as a software source without burning it, the process will be a bit more complicated. You will need to open a terminal Applications -> Accessories -> Terminal and run these commands:
sudo mkdir /aptoncd-mountpoint
sudo mount /media/USB/aptoncd.iso ~/aptoncd-mountpoint -oloop
sudo apt-cdrom -d=/aptoncd-mountpoint add
(source: http://www.debianhelp.org/node/10486)


Service (grafana-server) does not start automatically on Ubuntu 16.04

check if /etc/systemd/system/grafana-server.service if a correct link to /lib/systemd/system/grafana-server.service

If not, create /lib/systemd/system/grafana-server.service
the source file is here : https://github.com/grafana/grafana/blob/master/packaging/deb/systemd/grafana-server.service

Then create the correct link :

sudo ln -s /lib/systemd/system/grafana-server.service /etc/systemd/system/grafana-server.service

Then enable grafana-server

sudo systemctl enable grafana-server

Then start grafana-server

sudo systemctl start grafana-server


GRUB failed to install to the following devices error on upgrade

After a bit more fiddling I was able to narrow this down to a RAID-related issue with my laptop (which is a Sony Vaio Z). In the end I was able to solve the problem using Boot Repair, however running this from my existing Ubuntu didn't work - I had to run it from a 'Try Ubuntu' installer. Hopefully this will help someone else one day.


how to flash my Nexus 4 and install Ubuntu 13?

This must be the page you're looking for :
Installation instructions


After unlocking the widgets, drag and drop the folder you want to the panel, and choose icon from the menu that will appear. Then right click the icon and choose icon settings.
Click on the icon to browse different icon.


Ubuntu server can access internet but cannot ping systems in the LAN

Well, you have two different network interfaces connecting the same subnet (192.168.1.0) used by not directly connected devices (your router on one side and the internal LAN on the other side).

So it is normal that it is not functioning right away.

Eth0 is the first listed interface and the default route for the packet sent by your computer, so all packets sent to any 192.168.1.x address will sent to this interface, so to the router.

The easiest way is to use only one interface of your Linux system, connected to the same hub/switch where the router and the others servers are connected. This way, you can still use 192.168.1.x addresses everywhere. The router must be the default gateway of all servers.

If you really want to keep the things separated (router on one side and servers on the other side, your Linux machine acting as a gateway in-between), you'll have to configure two different subnet.
Let's keep eth0 as it is now (192.168.1.0 with 255.255.255.0 subnet mask).
But you'll have to put the eth1 and all the servers in another subnet, like 192.168.2.0 with subnet mask 255.255.255.0.
If you give 192.168.2.1 as IP address on eth1, this address must be configured as the default gateway of all your internal servers.
Also, you'll have to enable IP forwarding on Linux, which you already done.


How to search strings inside files like in Windows without search monkey?

There are almost too many options to list

grep -r 'pattern_to_match' directory_to_search

Will output the file name and full line matching the pattern.


how do I make a python program write directly to the command line?

You are probably looking for system() method in os package. Have rewritten the snippet, had a few corrections too:

#!/usr/bin/env python

import pygtk
import os
pygtk.require('2.0')
import gtk
class Base:
    def send(self, widget):
        os.system('ifconfig') #this executes commands on the terminal

    def writecommand(self, widget):
        self.textbox.get_text()

    def __init__(self):
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.set_position(gtk.WIN_POS_CENTER)
        self.window.set_size_request(600, 600)
        self.window.set_title("WINDOW")

        self.button = gtk.Button("SEND")
        self.button.connect("clicked", self.send)
        self.textbox = gtk.Entry()
        self.textbox.connect("changed", self.writecommand)

        self.box1 = gtk.VBox()
        self.box1.pack_start(self.button)
        self.box1.pack_start(self.textbox)

        self.window.add(self.box1)
        self.window.show_all()
base = Base()
gtk.main()

To find out more methods from the os package, in the python interpreter, type the following:

import os
dir(os)

which will list all methods. To get what those do, type

help(os.method_name)

for eg.

help(os.system)


How to show slide console on laptop and slide-show in the projector using Libreoffice 4.2 on Lubuntu 14.04?

Download the portable version of Libreoffice 3.3 from this list an use Impress for your presentations. This version can coexist with the installed one (the buggy 4.2.x or 4.3.x or whatever). I tested it and it works. By the way, it seems that this problem affects only Lubuntu. I tested a few live-distros: Ubuntu-Unity, Mint Mate and PCLinuxOS LXDE and the presenter-Console works like a charm.


How to uninstall all trackers (tracker-miner: fs, apps)

I solved by uninstalling Tracker-Extract:

sudo apt purge tracker-extract

This purges tracker-extract* tracker-miner-fs* and deletes data.


Why my swap area is set to zero in Ubuntu Server 18.04.2?

For some reason, some cloud (VPS) providers disable the swap in their (modified) installations. Nowadays Ubuntu support swap file, thus you do not need a separate partition for swap. To enable the swap via swap file follow these steps:

sudo fallocate -l 4G /swapfile  # Create a 'swap-file'; 4G in this case
sudo chmod 600 /swapfile        # Set the necessary file permissions
ls -lh /swapfile                # Check
sudo mkswap /swapfile           # Mark the file as 'swap'
sudo swapon /swapfile           # Enable the 'swap'
sudo swapon --show              # Check
free -h                         # Another check

Edit /etc/fstab and make the changes permanent. Use these commands to do the changes:

sudo sed 's/^.*swap.*$//' /etc/fstab -i.bak                # Remove the previous swap entries
                                                           # and create a backup copy of the file
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # Add a new entry

Or edit /etc/fstab and add the the following entry manually:

/swapfile none swap sw 0 0

That is it.

Ideas for additional tweaks (I would prefer to use the default settings for normal swap usage):

Change the frequency of RAM to SWAP data copy:

sudo sysctl vm.swappiness=10    # value 0-100: low value low frequency
cat /proc/sys/vm/swappiness     # Check

Change the frequency of Cache flush:

sudo sysctl vm.vfs_cache_pressure=50 # 0-100: high value high frequency
cat /proc/sys/vm/vfs_cache_pressure  # Check

Make the above changes permanent:

sudo cp /etc/sysctl.conf{,.bak} # Create a backup copy of the file '/etc/sysctl.conf'
echo -e '\nCustom settings: value 0-100; default 100\nvm.swappiness=10\nvm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf

Or edit /etc/sysctl.conf and add the the following entries manually:

# Custom settings: value 0-100; default 100
vm.swappiness=10
vm.vfs_cache_pressure=50


So using a LABEL= in /etc/fstab seemed to solve the problem. Silly question in hindsight, but I'll leave it here for people searching for the problem.

Perform blkid and put LABEL={label} or UUID={uuid} in /etc/fstab as per Is it normal for devices to change their device numbers's answer by @LilloX


I have installed Ubuntu along Win10 in my laptop (Legacy) successfully, but there is no easy/convenient way to choose the OS I want to use

That dual boot screen you're getting is expected behaviour. Something similar happened to me when I dual booted my laptop with Ubuntu. Some research led me to the conclusion that when you're just running Windows, it doesn't shut down completely when you select the Shut Down option. Instead, it hibernates. This was first implemented in Windows 8.

I think what's happening is that Windows is getting completely shut down now, and hence it's taking longer to reboot. I found a link that may help you change a setting inside Windows which will make it hibernate, instead of completely shut down. Do remember though, that you won't be able to access the Windows partition when you're booted into Ubuntu.
https://www.howtogeek.com/262325/why-is-windows-hibernating-instead-of-fully-shutting-down/


How to create a deb package that adds ppa then installs another package?

Are you able to add repositories via the Software Source Menu (Ubuntu Software Center -> Edit -> software sources -> other software -> add)? If were are able to, then you would perform "sudo apt-get update" to update your repo information. Then after that, just type in sudo apt-get install 'package name'(be as specific as possible as apt-get is very finicky)


Run Ubuntu Desktop 20.10 on Raspberry Pi 4 using OpenSSH

Ubuntu Desktop does not include an ssh server. There is nothing installed for your magic file to activate.

You must install openssh-server, which cannot be done headlessly on Ubuntu Desktop. It's trivial to install (sudo apt install openssh-server), it's simply not included with Ubuntu Desktop (most desktop users don't need it).
Remember to safely configure your ssh server to use keys. Password-protected ssh servers are strongly discouraged on internet-facing systems.

Ubuntu Server is different: Server includes the ssh server out-of-the-box, and the new 21.04 server installer even helps you configure the ssh server securely.


kubuntu muon package manager stop working

I had this problem too.

Try to run these commands in the terminal ("Konsole"):

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


Nautilus-Actions 3.1.4 - action ONLY for sftp files

In action CAPABILITIES add new capability LOCAL and select "Must not match any of" and
in mimetypes tab put in mimetype filter "all/allfiles"


How do I install driver for Radeon Mobility HD 3650?

Install Linux Generic Headers:

sudo apt-get install linux-headers-generic

Install the Drivers:

sudo apt-get install fglrx fglrx-amdcccle

OR

sudo apt-get install fglrx-updates fglrx-amdcccle-updates

Generate a fresh xorg.conf BEFORE REBOOTING!

sudo aticonfig --initial

OR

sudo amdconfig --initial

OR (for AMD dual GFX)

sudo aticonfig --adapter=all --initial

OR

sudo amdconfig --adapter=all --initial

REBOOT!

To confirm the drivers are working:

fglrxinfo

Output must be similar to:

fglrxinfo
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 3000M Series
OpenGL version string: 4.2.11733 Compatibility Profile Context


NVidia and Intel in same Laptop: which card is used?

After two weeks of fiddling around and getting nowhere, I finally got the Nvidia card working with the NVidia drivers.
The issue is that I originally tried to install the Nvidia drivers with the Ubuntu software installer (don't do this) which was originally happily using the Intel drivers. This didn't work, and several reboots later it has removed the Intel option and was apparently using the Nouveau drivers on the Intel card - a configuration I'm not sure is even possible. My system was immensely unstable in this configuration and would lock up with lspci or when using 3D graphics.
I went through a lot of steps in order to fix this, and I don't really know what worked.

Get rid of whatever's there:

sudo apt-get purge nvidia*
sudo apt-get purge nouveau*

Install the Intel driver. For some reason this uninstalls a load of stuff, such as wine. Can install it again later so don't worry.

sudo apt-get install xserver-xorg-video-intel

I never explicitly uninstalled this (apt-get purge intel* is way too dangerous because of all the other Intel stuff) so presumably the Intel drivers are still there.

Add some respositories:

sudo add-apt-repository ppa:bumblebee/stable
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

Install NVidia drivers and bumblebee:

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

This didn't work at first. I've no idea why. X would either not start, or keep returning me to the log-in screen. I tried replacing lightdm with gdm, that didn't work at all, so I went back to lightdm. Finally had one last try with the above and it worked. I can even use the nvidia-settings app to change to the Intel card.
Only problem is that I have a 4k screen on a 15" laptop. Most software doesn't scale properly. I can't run 1920x1080 anymore with the NVidia card for some odd reason (it runs in the centre of the screen with a massive black border) but it works with the Intel card ok.
I hope this helps somebody, but beware that hybrid graphics (on laptops) can be a complete pain to get working.


It's actually webbrowser-app

nano /usr/share/applications/webbrowser-app.desktop

The .desktop file

[Desktop Entry]
Version=1.0
Name=Browser
GenericName=Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Type=Application
Icon=browser
Exec=webbrowser-app %u
Terminal=false
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
X-Ubuntu-Touch=true
X-Ubuntu-Gettext-Domain=webbrowser-app
X-Ubuntu-Single-Instance=true
X-Ubuntu-Default-Department-ID=web-browsers
X-Screenshot=/usr/share/webbrowser-app/screenshot.png
X-Ubuntu-Splash-Color=#FFFFFF


Does Ubuntu One follow symlinks if synchronizing a folder?

From the Ubuntu One FAQ:

  Does Ubuntu One support symlinks or hard links?

  No, Ubuntu One does not currently support symlinks or hard links. If you are running Ubuntu 10.04 LTS or higher you can synchronize folders within your home directory by right-clicking on them and selecting "Synchronize on Ubuntu One".


If you do have an GUI installed, simply search in the dash for "Startup Applications".

This tool will allow you to add startup applications.

just write "quicksynergy" in the name and command fields, then reboot your PC to see if its working.


Fatal: can't open lock file /run/xtables.lock: Permission denied

1) "No such file or directory" is easy to troubleshoot - just look in your own filesystem. In this case, it's not 'eth0'. It's your actual network connection (likely something like 'tun_' or 'enp___' or 'wlp___').

2) "Permission denied" is also an easy one - it means you forgot to use sudo.


Try to create an instance of "compressor" first:
import zstandard

compressor = zstandard.ZstdCompressor()

input_data = b'11111'

compressed_data = compressor.compress(input_data)
Out[25]: b'(\xb5/\xfd \x05)\x00\x0011111'

https://python-zstandard.readthedocs.io/en/latest/compressor.html
Same goes for the decompression method...


Yes, you can add more workspaces!

Follow this steps:

Click on the "Lubuntu" icon in the bottom of the screen;
Set Preferences>>Openbox Configuration Manager
On the new window opened, click on "Desktop" option;
On the field labeled "Number of desktops" you can choose how many
workspaces do you need.
After all, just close the window.

Good luck, man!


grub-install error. failed to register the EFI boot entry: Operation not permitted. mount: /var/lib/grub/esp: mount point does not exist

After turning off Fast Boot UEFI settings, the grub-install problem vanished. I also turned off Fast Boot from withing Windows itself as advised by @oldfred. grub-install works. However, when I upgrade the grub-efi-amd64-signed package, I still get the same /var/lib/grub/esp error:
Setting up grub-efi-amd64-signed (1.142.9+2.04-1ubuntu26.7) ...
Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Installation finished. No error reported.
mount: /var/lib/grub/esp: mount point does not exist.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32
Errors were encountered while processing:
 grub-efi-amd64-signed

After that, purging grub and reinstalling grub by running the following commands solved the grub-efi-amd64-signed installation issue.
sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub


AMD graphics card not detected - Ubuntu 16.04

In 16.04 AMD drivers are pre-installed, and since 16.04 we can use only open source Radeon driver, there is no point in showing it in driver manager.
Also my last impressions are that the driver manager is broken.
Try this:
sudo apt-get install muon and then
sudo ubuntu-drivers devices.
This will show you the drivers that you can install so then you can install the driver manually.
`sudo apt-get install
You can also type this:

lspci -nnk | grep -i vga -A3 | grep 'in use' in terminal and see what video card is in use at the moment.


How to add a new screen resolution for nVidia?

Have tried System -> Administration -> Addition Drivers this will also install custom software for Nvidia graphics cards.

Under the screen section in xorg.conf try adding:

Section "Screen"
    ...
    SubSection     "Display"
        Depth       24
        Virtual     xdim ydim #your resolution x, y
    EndSubSection
EndSection


How do I change super + middle mouse button shortcut?

Open dconf-editor, if not yet installed..install it by below command

sudo apt update && sudo apt install dconf-editor

Search for "mouse-button-modifier" and change value to <Alt>

now search for "right-button" and make it to true.


How to extract files from a split 7zip archive ended by .001 and .002?

7z x data.7z.001

7z like that will find the others automatically (002 003 and so on)


How to ensure nfs-server is not started until it can resolve hostnames? (16.10)

In terms of what you are trying to do with systemd, you've already tried to do the best thing, which is to set your service to start after network-online. I read a lot of a systemd questions, and others have reported problems with the network not being fully online when they do this.

I recommend the idea of putting IP addresses in /etc/exports or /etc/hosts as you recommend. This simplifies an important disk mounting task during boot-up.

To make the system more robust, you could use a cron job or systemd timer that checks periodically to see if the DNS for the interesting hosts have changed. If so, automatically update /etc/hosts with the new values.


Create a custom keyboard key for opening the latest notification

It's a bit unclear if you want a keyboard shortcut to access the notification list or the currently active shortcut. Whichever the case, you don't need to add custom keyboard shortcuts for these tasks, as there already predefined ones exist:

If you want to open the notification list, just press Super+V. You can move between items in this list using the arrow keys. You can also open a notification by selecting it and pressing Enter or you can remove a notification by selecting it and pressing Delete.

If you want to focus the currently active notification, just press Super+N.

If you would like to use other shortcuts for these tasks, open Settings → Keyboard shortcuts, search for the Show the notification list (green ellipse in the screenshot below) or Focus the active notification (red ellipse in the screenshot below) shortcut, respectively, and change them to whichever shortcuts you like.


You could use eCryptfs to do this.

You'd need to do this as the root user, though.  Here's some instructions that would work:

root@server-59314:~# ecryptfs-setup-private
Enter your login passphrase:
Enter your mount passphrase [leave blank to generate one]:
************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
  ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************
Done configuring.
Testing mount/write/umount/read...
Inserted auth tok with sig [37d1d7fcf453d9d0] into the user session keyring
Inserted auth tok with sig [974bb07127cbe922] into the user session keyring
Inserted auth tok with sig [37d1d7fcf453d9d0] into the user session keyring
Inserted auth tok with sig [974bb07127cbe922] into the user session keyring
Testing succeeded.
Logout, and log back in to begin using your encrypted directory.

And then you would need to login as root, and run ecryptfs-mount-private.  Note that you will probably want to ensure that /var/www is not unmounted when root logs out.  To do this, just rm -f /root/.ecryptfs/auto-umount.

Full disclosure: I am one of the maintainers of the eCryptfs project.


Devices not working properly on Ubuntu 14.04 Desktop

Found the problem. There was something wrong with an earlier software update which exited unexpectedly. Running sudo dpkg --configure -a solved this problem and now devices are working again.


Install ruby1.9.1-dev for Jekyll

sudo apt-get install ruby1.9.1-dev

If you have other version of Ruby, remove it first.

i.e for Ruby 2.0

sudo apt-get purge ruby2.0*


Second monitor not working on Ubuntu 20.04 - Radeon

I have had a similar problem with Ubuntu 20.04, running a slightly older HP AMD-GPU laptop and connected to a single 4K external monitor via HDMI. In my case, I would get a green screen on the external monitor, and be unable to drop to shell to try and fix it. I still get a little bit of image tearing. My logs tell me nothing useful, so, it was mostly trial and error on my part.
You can try the following to get rid of tearing and problems with the external monitors.

When you login, make sure it is Gnome with Wayland, anything else wouldn't work for me.
Upgrade the kernel to the most recent stable version( example ), at the time of writing this was 5.8.1, though it worked with 5.7 too. I had to compile the kernel as simply installing .deb kernel files didn't work. I don't understand the difference between the two.
If the external monitor goes into power save mode, I often cannot recover the session and have to do a hard reboot.
When logging in, I need to place the mouse cursor in the external monitor before I enter my password, otherwise I get the dreaded green screen.

It is likely we need to post a bug against Wayland, though I'm unsure whether this is the problem. Hope there is something useful in here for you.


MySql Installation problem in dual boot ubuntu 14.04

Reinstall it using the cmd on terminal
sudo apt-get purge mysql-server-5.6
then
sudo apt-get install mysql-server-5.6


It turns out I had everything done correctly. What I missed was the cloud firewall on top of my VPS, imposed by my hosting provider. Fortunately, I have control over this through the cloud control panel they supply, so I was able to add port 3306 into that and all fell into place.


how to solve this phpmyadmin error in ubuntu 19.10?

Problem installing phpMyAdmin on Ubuntu 19.10 (Eoan Ermine)

You can use our PPA to fix this issue (if you wanted to re-install), phpMyAdmin is back in Ubuntu 20

sudo add-apt-repository ppa:phpmyadmin/ppa
sudo apt-get update
sudo apt-get install phpmyadmin


Setting up Rode Microphone with a Steinberg UR22 mk2 USB Audio Interface with Ubuntu 16.04

Install pulseaudio volume control  :

sudo apt-get install pavucontrol

Run it and select your device as default in "input device" tab by clicking corresponding  green button.

If problem, look in "configuration" tab  and use  profile for your device.

If no luck, go to Alsamixer as you did,    press F4 key  to display capture controls :
 Try to increase capture  volume (up/down key) or select capture source by pressing space key on the correct fader.


Why do NTFS partitions have to be mounted separately on media folder?

Not only NTFS but other partitions such as ext4 are also mounted on /media
/media and /mnt are used according to Filesystem Hierarchy Standards here and here. That means /media is used by system and /mnt is for user.
Not mounting partitions at startup is the default but you can change it by editing /etc/fstab or the GUI gnome-disks.


How do I change ssh settings of a live connection?

After connecting to a remote machine through ssh, press Return and then ~ Shift+C to get this prompt.

See the "Escape characters" section of the ssh manpage for some more special keys.


Problems installing TeX Live 2012 on 12.04

The problem with installing texlive 2012 on Ubuntu Precise 12.04 is that if things go wrong there isn't a whole lot of information out there on how to adequately uninstall it. I think it's important to explicitly say uninstall to improve the search results of others. I finally came across a solution which worked for me with the help of LaTeX Users Group on Google Groups.

Link to LaTeX Users Group

sudo apt-get remove texlive*
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get autoclean
sudo apt-get check

sudo rm /var/lib/dpkg/info/texlive*.postrm
sudo rm /var/lib/dpkg/info/texlive*.list

sudo dpkg --purge --force-all texlive*
sudo dpkg --purge --force-all tex-common*

sudo apt-get install texlive-latex-base
sudo apt-get install texlive-latex-extra
sudo apt-get install texlive-full

This all assumes that you've added Backports repositories as described here


This problem has been solved here

Problem with xrandr rotation inverted

Hope it will work for you


You're missing out on a auto eth5 line above iface eth5 inet static.
Check that all other interface management processes aren't using the interface. A common mistake is to still have a dhclient process (DHCPd client) running when the interface was set to DHCP before. Verify using for example with pgrep -l "(NetworkManager|dhclient)".

In general, learn to use ifup <interface> and ifdown <interface> commands instead of manually configuring it. Also it's a good practice to always bring the interface down before editing the interfaces file because of results like mentioned in 2 could happen otherwise.


Change default downloader in Firefox or Chromium

i'm using internet download manager in windows, and can't say it works on ubuntu or not (for example under wine), but here you can find recomendations about download managers in ubuntu IDM-Like softwares in ubuntu


Try installing the PPA: https://launchpad.net/~minetestdevs/+archive/stable

To do this, open a terminal (CTRL + ALT + T), and run this:

sudo add-apt-repository ppa:minetestdevs/stable
sudo apt-get update
sudo apt-get purge minetest* # Remove the old packages
sudo apt-get install minetestc55

Then it should work.


"Vmware Kernel Module Updater" problem in Ubuntu 16.04 LTS

Download vmmon &vmnet source module for your workstation version from this repository
https://github.com/mkubecek/vmware-host-modules


How to make an executable file to update mysql database?

Making a command script

If the script you have to create is just to be executed as-is by people having access to the server and if the data to be put into the DB are delivered to you (so nothing dynamic), you would have to make a bash script like this :

#!/bin/bash

if [ "x$1" == "x" ]; then
   echo "Usage: $0 <SQL commands file>"
   exit 1
fi

if [ ! -f "$1" ]; then
   echo "The file specified in parameter ($1) does not exist or is not readable"
   exit 2
fi

USER=myUser
PASS=myPassword
DB=myDB
SERVER=ipMysql

mysql -u$USER -p$PASS -h$ipMysql $DB < $1

Copy all the above in one test file that you can call dataUpload.sh and then make it executable : sudo chmod +x dataUpload.sh.

What does this script do?

Check that you give a mandatory parameter : the path to a text file containing SQL command to update data in the DB (see below)
Check that the file given in parameter is accessible by the script
Set some variable with the credential to connect to the DB (attention that this is a quick approach here not taking some security aspect into consideration : for instance the password will be visible in clear text in the script and in the process list - ps -ef or ps auxwww when the script will run. You may look for a more secure approach)
Load the SQL commands of the SQL file into the DB using the command line mysql client.

A SQL command file

This SQL command file is just a text file containing all the SQL command to INSERT or UPDATE data you would have done yourself if you could access the server. One command by line, like in this example:

UPDATE myDb.member SET member_creditDueDate='2025-09-21 12:00:00';
UPDATE myDb.member SET member_credutDueDate='2025-10-11 00:00:00';

and so on.

If you write a file, lets say, called 20140620_dbupdate.sql, then the person who has access to the DB will just have to execute dataUpload.sh 20140620_dbupdate.sql at the command line prompt.

By splitting the shell and SQL commands, you can:

easily test the logic that loads data into the DB
pass only once the executable script
for later update, just focus on building a SQL commands file

More to do

This is a first quick approach to solve your problem, to be exhaustive I would need to cover :

Securing the password
Making use of SQL transactions
More error detection and reporting in the script


How to install CPU Sim 3.9.0

Open a Terminal with Ctrl + Alt + T. Download the CPUSim-Zipfile:

wget http://www.cs.colby.edu/djskrien/CPUSim/CPUSim3.9.0.zip

Install unzip

sudo apt-get install unzip

Unzip the CPUSim3.9.0.zip-file

unzip CPUSim3.9.0.zip

Go into the newly created folder

cd CPUSim3.9.0/

If you haven't install a Java JRE or JDK yet, you need to install it now. If you are unsure write java -version. if this results with an error you must install it.

You need to first enable the universe repository. Then you can install the Java Runtime Environment (JRE).

sudo apt-get install openjdk-7-jre

Create an executable start script

cat <<'EOF' > cpusim
#!/bin/bash
java -cp CPUSim3.9.jar:jhall.jar:CPUSimHelp3.9.jar cpusim.Main -m SampleAssignments/Wombat1.cpu -t SampleAssignments/W1-0.a
EOF
chmod +x cpusim

Execute the script to run CPU Sim 3.9.0

./cpusim


Unable to compile the Virtual Network Device and start VMware

Ensure you install the player correctly.

Download VMware Player from here

I noticed it downloads as a text file via chrome.
Ensure you rename the file extension to ".bundle"

Install the player

sudo sh ./VMware-Player-4.0.2-591240.x86_64.bundle

Download the package from here
Extract it package and run the patch

sudo ./patch-modules_3.2.0.sh

That should work.

@redshark: Thanks for the link!

For VMware player version 4.0.3 see answer by @dbrewer on How do I install VMware Player 4.0.3 (and patch the installer to work on my 12.04 system)?


Check the following code
import os
os.system('/usr/bin/xdg-open /home/dinom/Documents/testfolder')
import time
time.sleep(1)
window.activate("testfolder",switchDesktop=True)
import subprocess
active_title =window.get_active_title()
time.sleep(1)
if (active_title == "testfolder"):
    start_time = time.time()
    keyboard.wait_for_keypress("n", timeOut=1)
    if (time.time()-start_time < 0.9):
        time.sleep(0.2)
    keyboard.press_key("<ctrl>")
    keyboard.press_key("<shift>")
    keyboard.press_key("n")
    keyboard.release_key("n")
    keyboard.release_key("<ctrl>")
    keyboard.release_key("<shift>")
    time.sleep(4)
    keyboard.send_keys("sample")
    keyboard.send_keys("<enter>")
else:
    subprocess.Popen(['notify-send', "Couldn't find testfolder"])

Use this link for reference


Swapping one character in filename with another


How do I build a custom Ubuntu ISO that can be booted from USB and used without modification?

You can use systemback https://sourceforge.net/projects/systemback-source-1-9-4/,
that allows you to make a live system, system copy, system install and the possibility to prepare if you want a personalized ISO. Personally I use it to copy my system to a different backup pendrive.

How to install
from sourceforge:
$ cd Downloads/
$ tar xvf systemback-install_pack-1.9.4.tar.gz
$ cd systemback-install_pack-1.9.4/
$ chmod +x install.sh
$ sudo ./install.sh

from Github:
$ git clone https://github.com/fconidi/systemback-install_pack-1.9.4.git
$ cd systemback-install_pack-1.9.4/
$ chmod +x install.sh
$ sudo ./install.sh

How to use
Create an ISO from your Linux System (*)
You can learn  here how to create a live, fully bootable and installable image from your current system and convert it to ISO.
At the end you can create your modified linux distribution customizing installed SW and its configuration as you prefer and distribute the package as you like.
Backup/Restore your Linux System (*)
Systemback makes it easy to create backups of the system and the users configuration files. In case of problems you can easily restore the previous state of the system. There are extra features like system copying, system installation and Live system creation.
NOTE (*):
I 've tested only installation by file as indicated from sourgeforce. Installation from PPAs are often referred to old ubuntu releases and can give you problems and waste of time.


Bluetooth mouse OKLICK 406S connects, but work as a battery level indicator, not mouse in Ubuntu 13.04

It happens with every bluetooth mouse that informs its battery status. I got my mouse working again doing these steps: connects the bluetooth mouse, wait it to stop pointing, disable my laptop bluetooth adapter, re-enable it, switch to some tty (TTY1, for example) and switch back to TTY 7 (graphical interface). Doing so, my mouse battery stopped being monitored and the pointing service was well stablished again. Now I have no problems (until reboot system :-/ ).

Source: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1072234/comments/2


Migrating linux systems to VMware using rsync

I propose you to try the following approach:

On the server for new VM's download Rescatux ISO.
Create the VM for the first server and make sure it has a virtual machine disk image attached (VMDI from now on).
Attach the disk of your Physical Server (PSD for now on) and the Rescatux ISO.
Set VM to boot from this ISO. And start it.
Select "Rescatux auto detect" from the menu and after loading run GParted.
You'll have listed 2 disks on the top right corner combo box /dev/sda & /dev/sdb one for the VMDI and one for your PSD.
On the combo box select the PSD entry. The partitions on that disk will display below. Also check the "View menu" and see the "Device information". Take note.
Now select the VMDI entry and replicate the partitioning scheme your PSD has (top left corner, sheet icon).
IMPORTANT: The "boot" partition is recommended to not be smaller than 250MB. You can identify it on your PSD because it is marked with the "boot" flag, and is probably the partition at the top of the list.
When done partitioning, click the green mark icon to apply all your changes.
You can now set up all the "flags" needed (such as "boot") by right clicking the newly created partition. You can exit GParted.
Mount both disk's PSD & VMDI on the file manager and.
Rsync is probably not installed, so open a terminal and run sudo apt-get install rsync.
Run rsync '/mnt/source/partition/' '/mnt/new/partition/' (I don't know hot to use rsync sorry). You can also do this steep by running rsync on your Physical Server, but you will have to configure the network before. Double and triple check source and target so you don't mess up stuff.

When done copying files from each partition we can say the disk has been cloned. But at this point if you reboot and boot from VMDI it wont run.

Shutdown the VM, eject PSD (just to be sure things wont mess up). Boot from Rescatux again.
Select "Rescatux auto detect" once loaded, select "Grub" > "Restore Grub" > "Restore Grub!!!"
Choose the correct disk and press "OK"
You are set, can shutdown, detach Rescatux ISO and boot your new VM.


There are other ways to launch a script on Ubuntu?

Create a /etc/systemd/system/xrandr.service file (you could specify the service name you like) using:

sudo -H gedit /etc/systemd/system/xrandr.service

Put the next inside of it:

[Unit]
After=multi-user.target

[Service]
User=your_user
ExecStart=/home/your_user/scripts/xrandr.sh

[Install]
WantedBy=default.target

Place your script into /home/your_user/scripts folder or specify path to your script.
sudo chmod 664 /etc/systemd/system/xrandr.service
sudo systemctl enable xrandr.service
Check if it is working by sudo systemctl start xrandr.service

Also, you could modify your file the next way:

#!/bin/bash
echo "Starting command to put resolution on 1920x1080" | logger
export DISPLAY=:0 && xhost + local
echo "Password_of_sudo" | sudo -S xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync &&
sudo xrandr --addmode Virtual1 1920x1080_60.00 &&
sudo xrandr --output Virtual1 --mode 1920x1080_60.00
echo "Finished." | logger

But it is better do not use sudo or admin privileges if commands do not require it:

#!/bin/bash
echo "Starting command to put resolution on 1920x1080" | logger
export DISPLAY=:0
xrandr --newmode "1920_new_name" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync &&
xrandr --addmode Virtual1 1920x1080_60.00 &&
xrandr --output Virtual1 --mode 1920x1080_60.00
echo "Finished." | logger

Check your display by echo $DISPLAY, then if you have not :0, then change it in your script.

To see what is wrong with your script, you could use the next command for monitoring in terminal:

$ journalct -f


PHP 7.4 Warning: Unable to load dynamic library 'sqlsrv.so' and 'pdo_sqlsrv.so'

Finally got it to work. You need to set the cli version to 7.4
sudo apt install php7.4-dev
sudo update-alternatives --set php /usr/bin/php7.4
sudo update-alternatives --set php-config /usr/bin/php-config7.4
sudo update-alternatives --set phpize /usr/bin/phpize7.4
sudo pecl install -f sqlsrv
sudo pecl install -f pdo_sqlsrv
sudo phpenmod -v 7.4 sqlsrv pdo_sqlsrv
sudo service apache2 restart


How to prevent Firefox add-ons from being installed?

Add-ons are not installed system-wide but by each user just for herself. And they are stored within their home directory.

So there is no way (apart from making the profile directory read-only) to prevent a user from installing them.

In case you want to experiment with the profile: visit about:profile within Firefox to find out where your profile is stored. But keep in mind (as Dan stated in a comment) that nothing can prevent a user to create and use a new profile for her browser.


squid3 PAM_Auth authentication not working

I had the same problem. This solved it:

sudo chmod u+s /usr/lib/squid3/pam_auth

It seems pam_auth needs special permissions for other users. squid3 ran with the user "proxy". I switched to this user with su -u squid and tested /usr/lib/squid3/pam_auth. It returns OK if given username and password separated with a space when executed as the same user or root.


So, i want to install Spotify but it wont let me, it is a dpkg error

Try the snap version of spotify. Install it by running the follow command in Terminal:

sudo snap install spotify


How can I enable unity 3d on a Dell XPS 15 L502x?

Bumblebee and your graphics card were already largely discussed here. Have a look.

Basic recommendation is stay away from optimus, nvidia does not give driver support for linux on those yet!

The only methods known to do anything in your graphics is to disable the nvidia card with acpi calls, saves battery but that wont do any good on turning your unity3d on, you will be running with your default Intel card, which is also a very bad thing.


"Compliance checks" are code-word for piracy shakedown. When you enter into corporate licensing agreements with Microsoft you often sign over rights for them to come into your business to check that you're only running the number of licenses you've purchased.

They do this because some companies have in the past signed up for near-unlimited MSDN licenses and have then ended them but kept the software.

You will likely find that your contract with Microsoft allows them to come over and look at the computers for a certain number of years past the contract date. You have a few choices:

You allow them in per the terms of that contract. This assumes there is a contract that does allow them access but if this is something you have agreed to, let them come over and marvel at all the lost business they've created.
You tell them where to stick it and prepare for a fight (or to fight a contract-agreed fine).
If you can't find anything in your contract (talk to a lawyer please!) about these sorts of check-ups, tell them where to stick it. They can go through civil procedures to gain access but they'll have to show evidence that you're doing something bad.


HDMI Displaying on TV but Not Displaying Correctly. Fixes?

Ubuntu by default uses the 'Extend' configuration when connecting to an external monitor, this configuration basically extends your screen. I think that if you hold Alt when the mouse is at the edge, it'll cross over to the other display. You can use this to move a window over to the other display.

You can make it clone the displays by going here

  System Settings -> Displays

and changing the settings as you like.


no sound in headphones on hp dv6 6154tx in ubuntu 12.04

Seems something like this: My headphones mute AlsaMixer when I plug them in, HP DV6 12.04

I had this problem and I only did what is written there:

  Edit sudo gedit
  /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

  and modify the [Element Speaker] section as follows:

[Element Speaker]
; link to muting
switch = mute
; set volume to zero, so only the master slider controls playback volume. This gives better linearity.
volume = zero

  After this, I had to restart the system: you might try to restart only
  pulse audio with pulseaudio -k.


The greeter (screen) is provided by the display manager.

Assuming you are using X server (not Wayland, Mir or others), you can find your default display manager from the file /etc/X11/default-display-manager.

If you have started a display manager manually for the current session and display, you can check where the X server has stored the authentication cookie (this is typical for all display managers i have come across including lightdm, mdm, gdm):

% pgrep -af Xorg
1050 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

/var/run/lightdm/root/:0 suggests my current display manager is lightdm on display :0. Match your display manager and display accordingly.

You can also do pgrep -af dm but that can get you false positive (i.e. you would not get any conclusive result) for multiple displays.

After you find the display manager in operation, you can dump the running configuration of the DM to get the greeter, for example for lightdm:

% lightdm --show-config
   [LightDM]
A  backup-logs=false

   [Seat:*]
B  greeter-wrapper=/usr/lib/lightdm/lightdm-greeter-session
C  guest-wrapper=/usr/lib/lightdm/lightdm-guest-session
D  user-session=ubuntu
E  greeter-session=unity-greeter
F  xserver-command=X -core
G  autologin-guest=false
G  autologin-user=
G  autologin-user-timeout=0

Here my greeter session is unity-greeter, now check the unity-greeter binary's source for all the gory details.


Setting up email for drupal application for linode 12.04

Figured this out. I tailed the apache log and it indicated that /usr/bin/sendmail was not found.

In order to fix this, you just need to install exim:

sudo apt-get install exim4-daemon-light mailutils; dpkg-reconfigure exim4-config

Source: Linode


People nearby and bonjour not working over the same wireless and wired network

If both computers are invisible for each other, this could be a setting in your router.

In my router I have to check the option "All computers are in the same IP-network", to be able to connect to other local computers.

If this doesn't solve your problem please post the local IP-addresses of both computers.


GnuPG installed from source causing issue with Seahorse and GPA

Reconfigure the compilation using flags --prefix=/usr/bin

Be careful. It may breaks existing gpg package which comes preinstalled with ubuntu.

If you want to be safe, instead of manually compiling and installing, you should consider packaging it. Learn more about Ubuntu packaging here.

Packaging is better than manual install, since packaged apps are tracked by apt package manager and easy to maintain (upgrade, uninstall, and reinstall)


Setting up remote desktop via ssh? Not actually at the machine but can ssh

One option is to use a little script that tunnels the remote desktop session (using x11vnc) over the ssh,

file: vncoverssh

#!/bin/sh

USERHOST=$1

ssh -f -L 5900:localhost:5900 $USERHOST \
  x11vnc -scale 0.5 -safer -localhost -nopw -once -display :0 \
  && sleep 5 \
  && vncviewer -encodings "tight" localhost:0

This can then be called using

vncoverssh USER@HOST

This script can be modified to store the user and host name if desired.


Not an actual answer but it looks like an unusual number of these popping up, for example see I can't log in to Ubuntu one from windows client.  The answer seems to come from a credible source though for me the latest version cured a number of problems.  I did however need to reboot before I restarted the Ubuntu One service for it to to work properly. My case is different however because I am on 32 bit XP.


I was messing with CompizConfig and now I lost the top panel

Seems like you need to reset Unity. You can do that by installing dconf-tools

sudo apt-get install dconf-tools

then run

dconf reset -f /org/compiz/

which will reset all the dconf settings for compiz.

then you need to restart unity which can be done with this command

setsid unity


I have a blank screen after upgrading to Ubuntu 14.10

Install the proprietairy drivers for your system. They usually work better and they are a good idea trying if you don't get an image on your screen with the standard Ubuntu out of the box.

You can install the proprietairy drivers using the Driver Manager.


To solve this problem , open terminal then try these commands :

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

Then try again to update your system .


Same specs, but Ubuntu is more sluggish than Windows. Why?

Let's see if we increase your /swapfile from 2G to 4G if that helps...
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 8G RAM and 4G swap

Edit /dev/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation


Download speed extremely slow Ubuntu 14.04 on VMware

I was using VMWare player 6.03, booting Ubuntu 16.04 on a Windows 7 host. Both the wireless and wired connections were atrociously slow. Apt install of chromium-browser was going to take an hour just to fetch from the repo.

This link provided a recommendation to check which Network Adapter you are using.

In VMWare under the Edit virtual machine settings -> Hardware tab -> Network Adapter, my Network connection mode was set to NAT. I changed this to Bridged, rebooted the vm and voila it only took a couple of minutes to install chromium-browser with apt.

Hope this helps!


Is it slow only when connecting or during the SSH session, once connected?

You can diagnose the point at which it "stalls" during session startup by using the -v parameter. My hunch is that it's stalling when trying to resolve your computer's IP address. If you have control over the SSH server to which you're connecting, you could add

UseDNS no

to /etc/ssh/sshd_config to bypass the DNS resolving step. Optionally (and IMHO better/safer, but not always feasible), add your computer's IP address to the server's /etc/hosts so it resolves more quickly.

If it's slow during the session, that would sound like a lower-level networking problem, you can use ping to the server to diagnose round-trip times and see if they are OK (anything above 100-200 ms is going to start feeling sluggish for interactive use -depends on how patient you are :) ).


14.04 boot stuck at "Loading initial ramdisk"

I made the mistake of assuming all the background was part of the problem, when the problem was just that grub2 couldn't find the system:

Kernel panic - not syncing: VFS: Unable to mount root fs...

I imagine the cause is that I forgot to run "sudo update-grub2" after running "sudo update-initramfs."

The solution turned out to be to boot to a Live CD, mount and chroot to the hard drive, and re-run update-initramfs and update-grub2, as detailed here.

Two complications I encountered were:

"fdisk -l" doesn't work on GPT volumes; you have to use "gdisk -l" instead.
I have /boot and / on different volumes, and / is encrypted.

So I needed to modify the mount sequence as follows:

sudo cryptsetup luksOpen /dev/sdaX sdaX_crypt
sudo mount /dev/mapper/sdaX_crypt /mnt
sudo mount /dev/sdaY /mnt/boot
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt

So I am back into my system, though I still don't have a cursor. But that is another problem.


Build Android L error after upgrade system today

It seems kernel 3.13.0-59-generic caused this issue.
Downgrading to 3.13.0-57-generic fixed it.


iptables: No chain/target/match by that name

It depends on if the netfilter string module has been compiled into the kernel, or as a module, or not. Some years ago, and due to the "string" module's potential high CPU usage, it was not available by default in Ubuntu kernels. In more recent years years (I don't recall when, exactly) it is available, as a module, by default. The way to check for your Ubuntu kernel is to search for it in the kernel configuration module. Example:

doug@s17:~$ uname -a
Linux s17 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
doug@s17:~$ grep -i NETFILTER_XT_MATCH_STRING /boot/config-4.15.0-36-generic
CONFIG_NETFILTER_XT_MATCH_STRING=m

So, it is there as a module on my system. And the command loads fine for me:

doug@s17:~$ sudo iptables -I FORWARD -m string --algo bm --string "instagram" -j DROP
doug@s17:~$ sudo iptables -v -x -n -L
Chain INPUT (policy ACCEPT 210 packets, 15763 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       0        0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0            STRING match  "instagram" ALGO name bm TO 65535

Chain OUTPUT (policy ACCEPT 141 packets, 36585 bytes)
    pkts      bytes target     prot opt in     out     source               destination


How to install Maxima CLI-only in Ubuntu 20.04?

You can take more control on Maxima installation by using special options to specify that you do not want to get recommended and suggested dependencies:

sudo apt-get install maxima --no-install-suggests --no-install-recommends

For example on minimal 20.04 LTS installation it will result in:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  texmacs maxima-doc xmaxima maxima-emacs wish
Recommended packages:
  maxima-share gnuplot-x11
The following NEW packages will be installed:
  maxima
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 6928 kB of archives.
After this operation, 53.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 maxima amd64 5.43.2-3 [6928 kB]
Fetched 2494 kB in 1s (3163 kB/s)
Selecting previously unselected package maxima.
(Reading database ... 62984 files and directories currently installed.)
Preparing to unpack .../maxima_5.43.2-3_amd64.deb ...
Unpacking maxima (5.43.2-3) ...
Setting up maxima (5.43.2-3) ...
Processing triggers for man-db (2.9.1-1) ...

Analyzing the above output we can see that gnuplot-x11 may be a reason to install X11 stuff.


There is a problem with md raid installation from 19.10 "live-server" iso.

It is better to use:

http://cdimage.ubuntu.com/ubuntu/releases/19.10/release/ubuntu-19.10-server-amd64.iso

(That's the alternative server installer for 19.10.)


Accidentally modified .bashrc and now I cant login despite entering password correctly

Use LiveUSB or LiveDVD.

Boot into live session, mount your hard-drive, and copy your original .bashrc file over the modified.

Then you can safely reboot (eject USB or DVD).

General info: In case you wouldn't have backup of .bashrc file, you can use the one from liveUSB/DVD.