Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, November 13, 2012

Using the script command

For years I've wondered why the script command gives no output in Ubuntu. I still don't know the answer, but I just found that by using the "-q" option it works!

-q is supposed to be for "quiet" mode, which I guess turns off the little messages like "script started". But it causes script to actually produce a script.
$ script -q <filename>

Thursday, November 8, 2012

Reset USB ports in Ubuntu 12.10

From http://davidjb.com/blog/2012/06/restartreset-usb-in-ubuntu-12-04-without-rebooting

If your USB port gets mangled and a device isn't working as it should:

  tward $ lspci | grep USB 
  00:1a.0 USB controller: ...
  00:1d.0 USB controller: ...

Then do the following:

  tward $ echo -n "00:1a.0" | \
          sudo tee /sys/bus/pci/drivers/ehci_hcd/unbind
  tward $ echo -n "00:1a.0" | \
          sudo tee /sys/bus/pci/drivers/ehci_hcd/bind

For each of the above controllers. 

Be aware that after you write to unbind, anything connected to that particular USB controller will be unavailable until you write to bind on the next command. So if your keyboard is connected to one of those, you may be in trouble.

Note: See the comment below for an updated procedure.

Thursday, November 1, 2012

Disable overlay scrollbars in Ubuntu 12.10 (Quantal)

Since I upgraded to 12.10, (Quantal) I have have all sorts of issues because apparently gnome is moving away from compiz and using something of their own, but I'm using cairo-session which uses gnome-session, ... Whatever anyway ubuntu-tweak isn't working completely for me and the stupid overlay tool bars kept reappearing. The command below disables them:
gsettings set com.canonical.desktop.interface scrollbar-mode normal
Another thing that's not persisting is window focus mode:
dconf write /org/gnome/desktop/wm/preferences/focus-mode \'sloppy\'
dconf write /org/gnome/desktop/wm/preferences/auto-raise false

Friday, October 19, 2012

Disable overlay scrollbars in Ubuntu

Some nice tricks from noobslab for Ubuntu 12.10

Disable overlay scroll bars in Ubuntu

gsettings set com.canonical.desktop.interface scrollbar-mode normal

Disable crash reports

I have had a lot of issues with crash reports that just keep on occurring, even when I say "don't tell me again" and when nothing has apparently happened.
sudo gedit /etc/default/apport  
change "enabled=1" to "enabled=0"
sudo service apport stop

Add "open as administrator" as a right click option in nautilus

wget http://dl.dropbox.com/u/53319850/NoobsLab.com/libnautilus-gksu.so 
sudo cp libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/ 
sudo rm libnautilus-gksu.so

Tuesday, April 10, 2012

Fixing screen resolution issues in Ubuntu

About a year ago I got a new Dell laptop with integrated Intel video card. Beginning with Ubuntu 11.10 there was an issue. It would boot up and set the screen resolution to the maximum (1920x1080) but it would give me no options to reduce it. I use my laptop with projectors all the time, but I was unable to mirror my output because all I could get was 1920x1080. So I've been using Mint, thinking the next version would fix it. No dice though. So I dug in and figured out my issue. First of all, Ubuntu no longer creates an xorg.conf file in the /etc/X11 folder. However you can put a config file in there and Ubuntu will use it. So in order to get Ubuntu to generate an xorg.conf file, you run:
tward $ X :1 -configure
:1 specifies the display to use, :0 is default but you are (probably) already using that one. This should put xorg.conf.new in your home folder. Now you need to add modeline options to it, these tell it what to do with the monitor at various resolutions. To create these modelines use cvt (the etc.. part is my own).
tward $ cvt 800 600
# 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
Modeline "800x600_60.00" 38.25 <...etc...> 624 -hsync +vsync
Do this for each resolution you want to have and copy the lines into xorg.conf in the Monitor section for Monitor0.
Section "Monitor"
  Identifier   "Monitor0"
  VendorName   "Monitor Vendor"
  ModelName    "Monitor Model"

  Modeline "1280x1024_60.00" 109.00 <...etc...> 1063 -hsync +vsync
  Modeline "1024x768_60.00" 63.50 <...etc...> 798 -hsync +vsync
EndSection
Finally, you need to (maybe not??) add the resolution strings to the Screen section, Display SubSections where applicable:
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
....
        SubSection "Display"
                Viewport   0 0
                Depth     1
                Modes "1920x1080" "1280x1024" "1152x865" "1024x768"
        EndSubSection
 EndSection
Reboot, or otherwise restart X and everything is now working.