Err http://de.archive.ubuntu.com [...] 404 Not Found [IP: 141.30.13.20 80]
I've got often this error on just one server:
Err http://de.archive.ubuntu.com precise/universe amd64 Packages
404 Not Found [IP: 141.30.13.20 80]
But there was no problem with the network connection or the de.archive.ubuntu.com server.
After I deleted the local lists cache with rm -r /var/lib/apt/lists
it works again.
Upgrade from Ruby 1.8.7 to Ruby 1.9.2 on Ubuntu
Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if that is your setup. The rspec-rails gem has a fatal bug that was only fixed for rspec-rails-2.x, which only supports Rails 3. There is no fix for the rspec-rails-1.3.x series of the gem which supports Rails 2.
Anyway, here are upgrade instructions if you only work with Rails 3 or don't use RSpec. You will lose all your gems in the process, but you can get them back easily if you h...
Using Dropbox on Ubuntu
If you are exchanging files with a client via Dropbox you do not need to access the Web page every time you want to fetch files. Instead, you can fully integrate your Dropbox account(s) into nautilus (Gnome's file manager) with automatic synchronization.
- Get the
.deb
file for your system architecture (32 or 64 bit) from the Linux download page. - Install the downloaded package using either the Gnome integration (double-click it) or the shell, e.g.: `dpkg -i naut...
Defining host aliases in your SSH config
You probably already manage servers you often connect to inside the ~/.ssh/config
file. What is nice: you may define alias names for hosts so that you can say something like ssh foobar-staging
.
This is especially helpful for servers whose hostnames are hard to remember or who don't have a DNS record at all (and must be accessed via their IP address).
To achieve the above, you can define something like this in your ~/.ssh/config
:
Host foobar-staging
Hostname staging.example.com
Note that SSH will only match this for `ssh f...
Change the name of your Ubuntu machine
In order to rename your Ubuntu box, replace all occurences of the the old name in the following two files:
/etc/hostname
/etc/hosts
After a reboot your hostname is changed. If you don't want to reboot your Ubuntu box you have to execute hostname your.hostname
.
Farewell to the notification area « Canonical Design
Ubuntu is phasing out the notification area (a.k.a. “system tray”), because of its ineffectiveness at notifying people of things, and its inconsistent behavior. Many programs that previously used the notification area should use other notification mechanisms instead
Rotate a PDF under Ubuntu Linux
Use the PDF toolkit:
sudo apt-get install pdftk
To rotate page 1 by 90 degrees clockwise:
pdftk in.pdf cat 1E output out.pdf # old pdftk
pdftk in.pdf cat 1east output out.pdf # new pdftk
To rotate all pages clockwise:
pdftk in.pdf cat 1-endE output out.pdf # old pdftk
pdftk in.pdf cat 1-endeast output out.pdf # new pdftk
The E
(old pdftk) or east
(new pdftk) is meaningful if you want other rotations. From the man
page:
The page rotation setting...
Nautilus File Manager slows down the system after new installation of ubuntu
After a new system installation, Ubuntu One starts automatically and seems to try to sync your complete home directory. This slows down the Nautilus File Manager extremely. To prevent this, uncheck Ubuntu One from your start programs and restart the system.
Fixing: no sound on front audio in Ubuntu 11.04
My front audio output would not work even though the front mic input did fine.
The Pulse Audio mixer (= Ubuntu default) does not offer any complex controls to fix the issue. Instead, run gamix
(be prepared for a GUI blast) and switch "Independent HP" to OFF. The label may be different for your audio device.
This enables all available audio outputs.
How to pair a Bose Quiet Comfort 35 with your Ubuntu computer
You need to disable "Bluetooth low energy", then follow these core steps:
- Make sure the headphones are in pairing mode.
- Pair with System Settings > Bluetooth. On 16.04 I had to choose "proceed without pairing" and enter the PIN "0000"
- Select & test the headphones in System Settings > Sound. Choose High Fidelity Playback (A2DP Sink).
I also had to install a package with sudo apt-get install pulseaudio-module-bluetooth
and load it with pactl load-module module-bluetooth-discover
. Put the latter command into ~/.bashrc
or you'll...
How to rotate log files explicitly
Usually, the logrotate
service takes care of renaming log files each night or so to avoid logs becoming huge. That will rename your.log
to your.log.1
, the next time to your.log.2.gz
, etc. Here is how to make that happen out of band (you should rarely need to do that).
Logrotate won't touch all your logs automagically. There is a config file for each service which you can tell logrotate to use.
So if you need logs to be rotated right now, do this (as root):
logrotate --force PATH_TO_CONFIG_FILE
For example, to rotate all y...
Make timestamp of dmesg in Ubuntu human readable
dmesg
shows the kernel ring buffer containing low-level system messages.
Per default, dmesg
shows a timestamp:
12:59:26 fnordomator ~ > dmesg | tail
[101925.211846] usb 2-1.1: USB disconnect, device number 16
[110486.855788] usb 2-1.1: new high-speed USB device number 17 using ehci_hcd
If you're a human, use dmesg -T
to print the timestamp human readable:
12:59:31 fnordomator ~ > dmesg -T | tail
[Di Apr 21 12:43:16 2015] usb 2-1.1: USB disconnect, device number 16
[Di Apr 21 15:05:57 2015] usb 2-1.1: new hig...
Ubuntu 11.10: Playing sound over front and back panel (or headphones and speakers) at once
I have a pair of headphones connected to my desktop's back panel and a headset connected to the front panel. I used to play sound over both outputs, but this suddenly stopped working this week.
Apparently, (perhaps through some update) "jack sensing" got turned on, which disables the back panel as soon as you connect something to your front panel audio jack.
To disable this feature, I used alsamixer
(use the arrow keys to navigate right to "auto mute", and disable with the up key). For some reason the corresponding checkbox in the `gnome...
"Require group" doesn't work with Ubuntu's default Apache installation
If you want to use Require group $GROUPNAME
on your default Apache installation like this:
<Directory "/var/www/foobar">
Order allow,deny
Allow from all
Options None
AllowOverride all
AuthName "Area 51"
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
Require group admin
</Directory>
You need to first install libapache2-mod-auth-sys-group
. You don't get any error message if you haven't installed it but it doesn't work.
sudo apt-get install...
Get rid of US keyboard layout
Problem:
Keyboard layout reverting to US on (every) reboot
Cause:
I found the same problem, but only on my wife's account. I'd set her keyboard layout to UK through Gnome preferences and every time the US layout would reappear and be selected frustratingly.\
It turned out that on the gdm login screen her choice of keyboard layout in the discreet option bar at the bottom of the screen was set to US. That was then overriding the Gnome layout preference.
Solution:
Selecting the appropriate keyboard layout on the next login solved the...
How to fix: RubyMine does not remember last used monitor (on Ubuntu)
Every time I started RubyMine, it opened the main window on the left monitor -- when moving it to the center monitor and closing it, the next time it still opened up on the left one.
Here is how I forced RubyMine to start up on a different screen:
- Un-maximize the main window
- Move it to your preferred monitor
- Close RubyMine (keep it unmaximized)
- Start RubyMine again.
- You may now maximize your main window; the next time you start up RubyMine, it will open on the correct screen, maximized.
That's crazy!
Install rabbitmq plugins (e.g. management plugin) on Ubuntu 12.04
If you want to install rabbitmq plugins on Ubuntu 12.04 you can do this with:
/usr/lib/rabbitmq/lib/rabbitmq_server-2.7.1/sbin/rabbitmq-plugins
This binary is not in your default $PATH. Beause of this you have to give the full path.
Install LaTeX on Ubuntu 10.10
The Ubuntu Documentation on LaTeX says, that the packages tetex
are no longer supported. You can install the alternative texlive
(380 MB) via apt-get
.
sudo apt-get install texlive
Web Upd8: Ubuntu / Linux blog
Great blog with daily news and HOWTOs for Ubuntu, Linux and Gnome.
Move Window Buttons Back to the Right in Ubuntu 10.04 / 10.10
One of the more controversial changes in the Ubuntu 10.04 beta is the Mac OS-inspired change to have window buttons on the left side. We’ll show you how to move the buttons back to the right.
Or run this via console:
gconftool-2 --set /apps/metacity/general/button_layout \
--type string "menu:minimize,maximize,close"
Convert the colorspace of a PDF from RGB to CMYK under Ubuntu Linux
Note that converting from RGB to CMYK will usually degrade your colors because no exact mapping is possible. Anyway, this Stackoverflow post worked for me:
gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK \
-sOutputFile=output.pdf input.pdf
Ubuntu MATE: Add a new panel
To add a new panel in MATE:
- Right-click on an existing panel and choose New Panel
- A new panel will appear at the bottom of the screen
- Right-click on the new panel, choose Properties and uncheck Expand
- Alt+Drag the panel to the desired location (e.g. to a second monitor)
- In the properties, check Expand again.
Change default size of Gnome terminal
Open the configuration file:
gksudo gedit /usr/share/vte/termcap/xterm
Find a line like this:
:co#80:it#8:li#24:\
Change the first and last number to your desired columns and rows:
:co#160:it#8:li#40:\
Save your changes and close all open terminals. New terminals should now open with the new size.
Ubuntu Mate: Get rid of F12 drop-down terminal
To get your F12
key back for other shortcuts, stop Tilda:
killall tilda
To prevent Tilda from starting on boot you can remove it
sudo apt-get remove tilda
or disable auto start:
- Go to Mate Control Center > Startup Applications
- uncheck "Tilda"