You know what we call things like this? Ads. I don’t care if they paid, but I don’t want them there, they’re basically ads. (Or they’re not any better than any average laptop running Windows from BestBuy — a junk heap full of crap software, which are basically ads.)
Ubuntu has been going down hill since 10.10, since the inclusion of Unity in 11.04. If this goes through to the final builds without some very specific customizations and explainations, I think this could be the end of the line for Ubuntu.
I installed a little ftp-server on my ubuntu dev-server. After configuring some ports and other users, I needed to restart the service. Since most daemons run as services now, anything
/etc/init.d/name restart is now just
service name restart. But of course, nothing is that easy.
ryan@ryan-desktop:~$ service vsftpd restart
I ran this to restart the service for the ftp daemon but I was rejected.
If you have an IP address but you don’t have a hostname to go along with it, you can easily get it via Ubuntu’s host command.
For instance, I have an IP, 188.8.131.52, and I needed the hostname. To get it, I simply ran
ryan@ryan-desktop:~$ host 184.108.40.206
220.127.116.11.in-addr.arpa domain name pointer 97-115-69-11.mpls.qwest.net.
Funny thing. I blog about Ubuntu all the time but I don’t have a category for Ubuntu. No, I have a category for Linux. I don’t have a catch-all category for crappy-closed-source-operating-systems either. No, I have one for Windows.
No, it wasn’t my idea. johntkucz from a thread on the Ubuntu Forums mentioned that he made an alias, sagi.
His reasoning for it is, “to make my ‘trip to the linux store’ even more ridiculously easy.” I think that sums up the power of apt-get and Linux quite nicely. sagi becomes a bonus in that case.
You could make the alias be anything, but the acronym is fitting because it describes each of the key pieces of
sudo apt-get install.
alias sagi='sudo apt-get install'
With this, you could install my new favorite text editor just like this:
sagi kate. It would probably prompt you for your password and then it would install kate thereafter. It’s a shortcut that looks nice and saves time.
After writing the post and actually using this in person and via ssh, it seems that sagi only remains during the session it is defined in. To make it stay around for ever, put it in your
.bashrc file in your home folder. That should do it.
I took my parents old 32-inch flat screen TV into the basement and hooked it up to an old laptop I had just sitting around. With Ubuntu on it, I wanted to keep it shut and tucked out of the way, and just remote in whenever I wanted to do something with it. Great idea, right?
For some reason, Ubuntu’s 10.04 Gnome does not have a do nothing action for when the lid closes on the laptop. You have blank screen, which is normally fine but it cuts VGA/HDMI output. There are suspend and hibernate which would be rather useless in this situation too.
Well, as with many things you are not supposed to do as a regular user, you can in fact get around the lack of this option. While not exposed via any public control panel, the Configuration Editor has the setting.
Open the terminal and run
sudo gconf-editor. Once the window opens up, you’ll see a bunch of closed trees. Navigate through the trees:
apps > gnome-power-manager > buttons. Once there, you’ll see the settings and their descriptions for the setting values.
The description for lid_ac, that is, when the lid closes while plugged in is:
The action to take when the laptop lid is closed and the laptop is on AC power. Possible values are “suspend”, “hibernate”, “blank” and “nothing”.
It strikes me that gnome should know enough to put the nothing choice in there. Finally, change the lid_ac setting to nothing, the word nothing, not blank, and then close the editor. Restarting Ubuntu will put the new setting into effect.
That should do it!
I love my fantastic dv6-2150us HP laptop to death. I love Ubuntu too for a lot of things. For the longest time though,plugging headphones into the headphone jack would not disable the laptop speakers, so it would be annoying to listen to music and work at the same time.
Since I was tired of dealing with it today, I decided to figure out how to fix it. Apparently, this particular Intel board has some strange out of the box incompatibility with Ubuntu. Fixing it is pretty trivial though.
I found a very useful thread on the Ubuntu forums detailing a procedure to fix the problem.
Essentially the fix boils down to editing the alsa configuration file so that it recognizes the dv6 as a dv5.
The first suggestion is to try this at the bottom of the /etc/modprobe.d/alsa-base.conf file.
options snd-hda-intel model=hp-dv5
options snd slots=snd-hda-intel, snd-hda-intel
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-inteloptions snd-hda-intel model=hp-dv5
Like someone mentioned in the thread, it didn’t work for me after restarting – the soundcard was nonexistent. The fix for that was the same as the thread again, just keeping the first line among the others.
options snd-hda-intel model=hp-dv5
That’s all you should need at the bottom of your configuration file for it to work. After a quick restart and testing some youtube videos, the headphone jack now does indeed disable the speakers just like they should.
I was using
top recently to see what processes were running. Everything looked fined but the watchdog process looked like it didn’t match with the rest of the processes.
barbara@barbara-desktop:~$ barbara@barbara-desktop:~$ top
Tasks: 164 total, 2 running, 162 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0%us, 25.0%sy, 0.0%ni, 50.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2836916k total, 1872104k used, 964812k free, 125044k buffers
Swap: 1861624k total, 0k used, 1861624k free, 622060k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8182 barbara 20 0 2548 1208 904 R 69 0.0 0:00.43 top
1 root 20 0 2780 1624 1164 S 0 0.1 0:00.42 init
2 root 20 0 0 0 0 S 0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0 0.0 0:00.13 ksoftirqd/0
5 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/0
6 root RT 0 0 0 0 S 0 0.0 0:00.01 migration/1
7 root 20 0 0 0 0 S 0 0.0 0:00.12 ksoftirqd/1
8 root RT 0 0 0 0 S 0 0.0 0:00.00 watchdog/1
9 root 20 0 0 0 0 S 0 0.0 0:00.26 events/0
10 root 20 0 0 0 0 S 0 0.0 0:00.32 events/1
11 root 20 0 0 0 0 S 0 0.0 0:00.00 cpuset
12 root 20 0 0 0 0 S 0 0.0 0:00.00 khelper
13 root 20 0 0 0 0 S 0 0.0 0:00.11 netns
14 root 20 0 0 0 0 S 0 0.0 0:00.00 async/mgr
15 root 20 0 0 0 0 S 0 0.0 0:00.00 pm
17 root 20 0 0 0 0 S 0 0.0 0:00.01 sync_supers
A quick search on ubuntu packages leads to the watchdog page which summarizes the package like so:
The watchdog program writes to /dev/watchdog every ten seconds. If the device is opened but not written to within a minute, the machine will reboot. This feature is available when the kernel is built with ‘software watchdog’ support (standard in Debian kernels).
The ability to reboot will depend on the state of the machine and interrupts.
With that said, I still don’t know the purpose of it. It’s really not something you want to mess with.
If you have a command that needs to run when you login there’s a way to do just that.
cd ~/.config/autostart/.to jump into the autstart directory. To make a command run when you login, you need to make a file.
vim somename.desktop. The someone part isn’t so important, but the .desktop part is. Here’s the file template.
Exec=Put Your Command Here
Name[en_US]=Name of Command Here
Name=Name of Command Here Again
Comment[en_US]=Description of Command Here.
Comment=Description of Command Here Again.
Then just save your file with
:wq! and you should be all set. If you go to System > Preferences > Start Applications, you should see an entry of your newly made start up command.
When making a SOCKS tunnel through the the terminal, sometimes the port might be skipped when you’re in a hurry.
ryan@ryan-laptop:~$ ssh -D email@example.com
Bad dynamic forwarding specification 'firstname.lastname@example.org'
Again, this is probably a silly error. I forgot to specify the port and ssh thought my host connection that server address was the port itself. The fix is easy.
ryan@ryan-laptop:~$ ssh -D 9988 email@example.com
Just add the port and it should work. Missing obvious things is so easy to do when you haven’t had your coffee.
I’m not sure when the little pencil icon disappeared from the Nautilus window. In Windows 7, I love being able to edit the path in the window to jump anywhere in the system quickly. This is even more useful in Linux actually because there are loads of hidden folders you cannot get to unless you jump there directly. You’d think the Ubuntu equivalent to Windows Explorer would offer this feature in a more obvious way.
When I look at my home directory,
/home/ryan, all I see is the two buttons in the path that make up those directories. That’s great because I can jump between the levels easily, but it doesn’t allow me to jump anywhere else outside that hierarchy.
Luckily, you can hand type a path in place of those jumping navigation buttons easily. Simply use
CTRL + L. This will transition the buttons to an input box where you can easily type out any path you want. It’ll even attempt to auto-complete for you just as if you were running in the terminal. When you’re ready to jump, hit enter and off you go. I demonstrated above how I navigated with the by hand editor to jump to my
/home/ryan/.config folder which is normally hidden from display.
That’s all there is to typing paths by hand in Nautilus on Ubuntu!
I periodically check on my grandmother’s XP-look-alike-edition of Ubuntu to see how it’s doing. While the general
top command can tell me what she has running, it doesn’t tell me how long the computer has been running. Luckily, there’s a command for that.
While there are other methods of getting the system uptime, I find this method by far the easiest. Simply enter
uptime into your terminal and out pops something similar to the following:
19:41:33 up 9 days, 4:35, 2 users, load average: 1.00, 0.45, 0.26
The output essentially tells you the time and the number of days, or the next smallest unit in the case it’s been less than a day, and the number of users logged in and finally, the average load as you would normally see from
uptime is a nice and easy command to do something specific. No hunting with grep necessary.
If you have a fresh Ubuntu install, you may not be able to access Windows Shares properly. You might find that Windows will reject any attempt to access a Share, not with an error, but instead with the same credentials prompt over and over again, even though the credentials are correct.
On the Windows machine, make sure that full rights are granted for Everyone which includes read and write access. Just checking Share on a folder isn’t enough – Ubuntu sharing requires full rights.
Another thing to check is that there is a password. Ubuntu won’t allow sharing if there is no password set on the Windows side. In short – if the account that owns the share does not have a password, Ubuntu won’t like it.
Samba is probably what is being used to share files. There might be a couple of Samba packages but the one that is needed most for Linux to Windows sharing is the the sbmfs package.
sudo apt-get install smbfs.
Now try to access the Windows Share again and the odds are you’ll get through this time.
I love using a mouse but sometimes I’d love some finger gestures. I’ve heard about the new Wacom Bamboo Touch, but apparently everyone hates it. I’ve seen the Magic Track pad but on Windows it’s crippled anyway. Oh, and it’s $70.
In my search for the solution, I came across RemotePad. It’s an iOS app that works on all platforms. That is, it works on Windows, OSX and Linux. Since I’m not running at home right now but instead on the road, I’m using my ubuntu laptop. Working on Windows would’ve been great alone, but all three? That’s the jackpot.
RemotePad is an open source application that controls the mouse cursor of your desktop PC. This way, you can use your iPhone or iPod touch as a wireless touchpad!
Setup is relatively easy on Ubuntu.
Download companion application source code for Linux. It needs to be compiled.
Open the terminal and extract the downloaded RemotePadServer-1.10-X11-Source.tgz with
tar xvfz RemotePadServer-1.10-X11-Source.tgz.
Since some compiling is necessary, you’ll need the packages build-essential and libXtst-dev. If you don’t already have them, run
sudo apt-get install build-essential libXtst-dev.
Navigate into the extracted folder and then into the X11 folder.
Run these scary commands:
sudo ./configure && make && make install.
This will set some configuration settings, make will prep the installer and finally, install the best thing ever.
The final step is to run
cd ~/.config/autostart/. Then run a ls. A list of files that mirror the start up programs of the current user will come up. This list would have dropbox in it if it were installed.
Make a new file with
vim remotepad.desktop. Add this to the file.
Comment[en_US]=Starts the RemotePad terminal.
Comment=Starts the RemotePad terminal.
This will add the remotepad command to autostart whenever the current user logs in.
RemotePad is really quite fantastic. Enjoy RemotePad!
SSH and SFTP are easy to setup.
For SSH, it’s as easy as.
While SSH can send commands to the remote computer, files need secure copy, or SCP..
scp -r /home/ryan/www/files/ firstname.lastname@example.org:/home/ryan/www/files
The -r switch is for copying directories recursively. If it were just a single file being copied, then it wouldn’t be needed.
Covering commands and files, seeing the web as the remote computer does is quite useful as well. To do that, sockets are required.
SSH -D 8899 email@example.com
This will make a tunnel to the remote computer at localhost:8899. To finish, set your browser’s proxy settings to run off of localhost:8899 and that should do it.