Wifi Gui – Arch Linux – I3wm

I got sick of using the wifi-menu command everytime I started up my Arch Linux i3 box pretty quick, so I had to figure out how to get networkmanager going after the fact. Here’s how:

Install the networkmanager package, you’ll probably want the network-manager-applet package too (to put an icon in your taskbar). Now you’re probably thinking… this should frickety work now, right? Not so fast, you’ve got to enable and start the networkmanager service to make your headache stop:

 systemctl enable NetworkManager.service

and then:

 systemctl start NetworkManager.service

Finally, if you’re using i3wm, you’re gonna wanna put the applet in your ~/.config/i3/config file so it runs at startup:

exec nm-applet

Now, you can rest your weary hands, at startup, and connect automagically.

Love Arch Linux? Buy a T-shirt to show your love.

 

Using Firefox with an SSH VPN

As I am becoming a bit more of an open-source purist in my software choices, I’ve switched from Chrome to Firefox (and yes, I know Chromium is Open Source). If Chrome world, I used an SSH VPN an awful lot, and wasn’t quite ready to go back to OpenVPN (as it causes some hiccups for me at work). Here’s how to get an SSH VPN going in Firefox.

The ssh piece itself is identical, if you’re using a Mac or Linux, enter the following command to setup your SOCKS Proxy:

ssh -D 8080 server.address.com

If you’re using Windows, check out Linux! or, you can use putty to setup your connection.

Once you have your connection, open up firefox, and go to “preferences” -> “Advanced” -> “Network” and click the “Settings” Button.

Click “Manual proxy configuration” and set your SOCKS host to 127.0.0.1 and whatever port you set after the “D” option in your ssh command. Click “SOCKS v5 as your connection type, and you should be able to leave the others as defaults (if you want to proxy DNS, make sure to select that button).

Now, Click Okay, and you should now be tunneling all Firefox traffic through your ssh tunnel.

Dunst – DPI/font-sizing issue – Manjaro/Arch Linux

So I’m still a big fan of the Manjaro I3WM community distro, it’s probably my favorite operating system of all time.  However, now that I’m running a 4k Monitor, there have been a couple things that I’ve had to figure out. That last issue that I have had is a problem with the on-screen notifications. First, I had to figure out what the heck was supplying the notifications (it’s a program called Dunst). Second, I had to do a little research on why it wasnt accepting the DPI settings I had set using the xrandr command, and the .Xresources file. It turns out it’s a known bug. However, I was able to find a workaround.

To fix this, you’ll need to open up your favorite editor (I used nano) and change the dunstrc file.

nano ~/.config/dunst/dunstrc

From here change the “global” font setting (on my 28″ 4k screen, I doubled the font size, which seems about right):

font = Cantarell 20

Once your done, you’ll need to either restart, or kill dunst, and start it back up. Once that’s done, you should be able to read your notifications once again!

 

Use an Android Tablet as a Second Monitor for Linux PC

Since I’ve moved full time to Linux, there has always been one thing that has bugged me about making the switch — its easy with a Windows and Mac PC to use your tablet as a second monitor. With Linux the only thing I ever even made sort of work was the Synergy software, and the Open-Sourced Android client  requires root, and sort of sucks. So I put this want on the backburner, and learned to make due with just my laptop when I was on the go.

So now, it’s a good news bad news situation. The bad news is, it’s still not “install an app” easy. The good news, its not too bad to get this functionality working and I’ll describe how below:

First a little information about my setup:

  • Manjaro Linux (Most any distro should work… just adjust the installation steps)
  • Kindle Fire 2015 – Anything that can use a VNC client works… but not all VNC clients show the hosts cursor, so you may have to find one that does “bVNC Pro” works well on Android.

Okay, so first, install a VNC server  on your host. I’m using TightVNC from the AUR repository.

yaourt tightvnc

That was easy right? Okay, so next we need to create a new mode for your android monitor. First let’s type a command to get some information we’re going to need:

gtf 600 975 60

Okay, so this returns a line of information we’re going to want, but quickly, the first two numbers are resolutions, and the last number is the refresh rate. We’re using this number for the Amazon Fire because the built in soft controls are going to steal about 49px from our tablets display space.

Okay so our last command returned this:

Modeline "600x975_60.00" 48.92 600 640 704 808 975 976 979 1009 -HSync +Vsync

Throw that into your clipboard, or a notepad somewhere. We’re going to use that next when creating a new xrandr mode.

xrandr --newmode "600x975_60.00" 48.92 600 640 704 808 975 976 979 1009 -HSync +Vsync

Cool, now add the mode to the display you want to use (just make sure its not already in use) I’m going to use the “virtual” display

xrandr --addmode VIRTUAL1 600x975_60.00

Alright, let’s turn on our new virtual monitor, and move it to the left of or real screen… and yes, the location is important.

xrandr --output VIRTUAL1 --mode 600x975_60.00 --left-of LVDS1

LVDS1 is my laptop screen, yours might be different. You can find information out about all your displays by simply typing “xrandr” into a command prompt.

Okay, finally, use the command below to stretch your screen to the virtual monitor. I don’t know a ton about this command, but this is the piece that stretches the screen to the left (along with the –left-of option in the xrandr command)

x11vnc -clip 600x975+0+0

Now, all you have to do is connect your VNC Client (Android Tablet) to your PC’s VNC server address on port 5900.

Looking for a new tablet to use as a second monitor? The Fire HD 8 is a great tablet for under a hundred bucks.

SSH in Arch Linux (or Manjaro)

Here’s a quicky on how to get a SSH (server setup in Arch Linux).

Install ssh server package:

[bash]pacman -S openssh[/bash]

Create an SSH Key(I created my key in ~/.ssh/id_rsa):

[bash]ssh-keygen[/bash]

Enable the ssh service to start automatically when the system is booting:

[bash]systemctl enable sshd.service [/bash]

Start the ssh service:

[bash]systemctl start sshd.service[/bash]

Ubuntu Linux – Detatching Program from Terminal – Bash Script

Here’s a quick and dirty Linux tip that I always wanted to do, but never figured out until today: If you want to close a terminal after opening a program via a script, you can do so with the “disown” command.

[bash]
sudo bash ~/Software/smartgit/bin/smartgit.sh & disown
[/bash]

This way, after your terminal completes opening the script, it relinquishes any control of the program allowing you to close the terminal without affecting the program. I suppose if you wanted actually close the program you could add an “exit” at the end of the script:

[bash]
sudo bash ~/Software/smartgit/bin/smartgit.sh & disown & exit
[/bash]

The 5 Best Things About Linux

Linux_Wallpaper_1_1_by_technokoopa

  1. So many choices. If you don’t like one flavor, or it doesn’t suit your needs, another surely will.
  2. Linux, the antivirus. Like any software, linux does have security holes, but you’re 100 times more likely to find malware on a Windows PC than on Linux.
  3. Open source. If you’re the type to question how things work, or if you even want to improve your OS, it’s easy to jump into Linux Code.
  4. It’s great for both beginners and experts. Beginners will like all of the software available and the ease of adapting to the right Linux distro (I swear my mom has fewer PC questions now that I switched her to Linux (from Windows).  Experts will like the ease of which they can modify system behavior.
  5. Ball on a Budget. Many Linux distributions are free, most are very inexpensive. You cant try a distro and if you find one your really like, you can donate a couple bucks.

Fedora (v22) Linux and Juniper Network Connect

Here are the steps to get Juniper Network Connect working in Fedora linux, This should work for just about any linux distro:

  1. Open Firefox, and go to your vpn login page, view the pages source, and search for “realm” in the source code. Note the “value=xxxxxx” part of the realm input html tag…. You’ll need it while connecting.
  2. Return to the VPN login page and login.
  3. Download the following jar file and extract it to ~./juniper_networks/network_connect
    1. https://your.domain.com/dana-cached/nc/ncLinuxApp.jar
  4. change directory to ~./juniper_networks/network_connect
    1. cd ~./juniper_networks/network_connect
  5. If you’re running a 64 bit os, download the following libraries glibc.i686 zlib.i686 nss-mdns.i686.

    1. sudo dnf install glibc.i686 zlib.i686 nss-mdns.i686
  6. Update permissions using the following commands

    1. sudo chown root:root ncsvc
      sudo chmod 6711 ncsvc
      chmod 744 ncdiag
      chmod +x getx509certificate.sh
  7.  Grab the cert from your company

    1. ./getx509certificate.sh your.domain.com filename.cert
  8.  And now, you’re ready to connect:

    1. ./ncsvc -h your.domain.com -u yourusername -p yourpassword -r realmnamefromstep1 -f ./filename.cert

Need to yell at a computer? Buy an Amazon Echo today.

 

Lenovo Yoga 2 & Ubuntu 14.04 WiFi issue – make nothing to be done for all

*Update*

The driver issue that caused this problem has been fixed in the latest linux kernel. You should consider using Ubuntu 14.10 or higher with this notebook.

 

Alright, So I just spent a reasonable amount of time banging my head against the wall on this one, despite some pretty decent documentation existing on the subject. Please Note this is only for the Intel 7260 Non-Pro version of the Lenovo Yoga 2 . My main source was here:

http://ubuntuforums.org/showthread.php?t=2215044&page=3

So, follow Haohe’s walkthrough, BUT when you get to the part where you create the Makefile, make sure to correct the formatting that gets goofed up on the website. You’ll know the formatting is wrong because you will get the error:

“make nothing to be done for all”

To correct this, use the fix posted by osor found on this page:

http://www.linuxquestions.org/questions/linux-kernel-70/simple-makefile-error-all-nothing-need-to-be-done-600403/

(just be sure to change the filename to match the object you’re making.

I’d repost the fix here, but you’re better off following the link as I don’t want to find out I got the format goofed up on my webpage!

 

 

 

 

 

Ubuntu – Wine – Linux Steam for Windows Shows No Text

Alright, so I’ve slowly been abandoning Windows altogether, turning myself into a true computer Hipster. Actually, I don’t really care one way or another, but since Microsoft made Technet worthless, I’ve been slowly changing things over to the Linux world. My home desktop is finally making the switch.

While I don’t do a ton of PC gaming, I occasionally want to play a PC game or two, Therefore, getting Steam (for Windows) working in my Ubuntu environment (with Wine) was a must. Anyway, the install of Steam went without a hitch, however when getting the login window, I got no text, to fix this, I did the following with the Steam Client closed:

Run wine regedit.
Navigate to HKEY_CURRENT_USERSoftwareValveSteam in the tree on the left.
Look for a DWriteEnable value in the pane on the right. If it doesn’t exist, add it as a DWORD value.
Set DWriteEnable to 0 and exit out of the registry editor.
Your existing launchers should now start Steam with visible text.

I found this fix here: http://askubuntu.com/questions/214361/steam-not-displaying-text-on-wine-1-5-running-on-ubuntu-12-04