Categorygaming

Setting up your own Counter-Strike 1.6 dedicated server via Docker

Once upon a time, you had to run the HLDSUpdateTool, and then SteamCMD. But now, awesome people on the internet have created Docker images for setting up a Counter-Strike 1.6 dedicated server. Now, all you have to do is:

  1. Install Docker on your machine
  2. Get a Docker image for a CS 1.6 server (I created this one, which is based off of an existing one. Mine has:
    • A lot of maps
    • Metamod
    • AMXModX (with high ping kicker, podbot control menu, round money, rock the vote, and admin all in one)
    • Podbot
  3. Customise the server (e.g. editing the server.cfg, amxx.cfg, and other config files, etc.)
  4. Start it up! (the README.md in the above linked Git repos has more info on this)

As far as ports go, I only needed to forward 27015 on my machine, but your mileage may vary. Others have reported that some more ports must also be forwarded on some machines.

Then optionally, if you’re running Ubuntu and you want this server to start up like a service via systemd, you’ll need this:

  1. An executable script with path /usr/local/bin/hlds with contents (make sure the DIR variable matches your installation directory):
    #!/bin/sh
    
    # Do not change this path
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
    
    # The path to the game you want to host. example = /home/newuser/dod
    DIR=/opt/cs-16-server/bin
    DAEMON=./server
    
    start()
    {
        echo  -n "Starting HLDS"
        if [ -e $DIR ]; then
            cd $DIR
            $DAEMON start
        else
            echo "No such directory: $DIR!"
        fi
    }
    
    stop()
    {
        echo -n "Stopping HLDS"
        if [ -e $DIR ]; then
            cd $DIR
            $DAEMON stop
        else
            echo "No such directory: $DIR!"
        fi
    }
    
    reload()
    {
        echo -n "Restarting HLDS"
        stop
        sleep 1
        start
    }
    
    case "$1" in
        start|stop|reload)
            "$1"
            ;;
        *)
            echo  "Usage: $ 0 {start | stop | reload | status}"
            exit  1
            ;;
    esac
    
    exit  0
    
  2. A script with path /etc/systemd/system/hlds.service with contents:
    [Unit]
    Description=HLDS
    
    [Service]
    Type=oneshot
    ExecStart=/usr/local/bin/hlds start
    ExecStop=/usr/local/bin/hlds stop
    ExecReload=/usr/local/bin/hlds reload
    RemainAfterExit=yes
    
    [Install]
    WantedBy=multi-user.target
    
  3. Then execute:
    systemctl daemon-reload
    systemctl enable hlds
    service hlds start
    

Feel free to check out my server that’s running right now with the same Docker image! Here’s the command to connect via the console.

connect henrypoon.com:27015

Running League of Legends in PlayOnLinux (Ubuntu 14.04)

There are various guides floating around on the Internet for running League of Legends on Linux, and no single guide worked for me, but after piecing the information together from various places, I managed to get it to work on my system.

My computer specifications:

  • Intel Core i5-4570
  • 16 GB Memory
  • Radeon HD 5770

I followed the instructions here, with these changes:

  • Using video driver “fglrx-updates” (the tutorial talks about NVIDIA cards)
  • Did not install TuxLoL
  • Did not do anything regarding the “Maestro error” since it only applies to Optimus Notebook users
  • Did not follow step 6 because I did not run into the problem for big item icon text for the item shop
  • EDIT: Thanks to Ingvar’s comment, the installation progress for the game can be viewed like so: open terminal (Ctrl+Alt+T) and execute:
    # tail -f ~/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot\ Games/League\ of\ Legends/Logs/Patcher\ Logs/*.log

There are also other steps that I had to do, which I read from here:

  • Click configure for the “League of Legends” entry in “PlayOnLinux” and find the “Display” tab and then choose the following options:
    • Direct Draw Renderer – gdi
    • Video memory size – 4096 (or something else depending on graphics card)
    • Offscreen rendering mode – fbo\0
    • Everything else on default
  • Create a file called “game.cfg” in the directory “/home/your-username-here/PlayOnLinux’s virtual drives/LeagueOfLegends/drive_c/Riot Games/League of Legends/Config”. Below is what I have in my “game.cfg”:
[General]
EnableAudio=1
GameMouseSpeed=10
UserSetResolution=1
BindSysKeys=0
SnapCameraOnRespawn=0
OSXMouseAcceleration=1
AutoAcquireTarget=0
EnableLightFx=0
WindowMode=0
ShowTurretRangeIndicators=0
PredictMovement=0
WaitForVerticalSync=0
Colors=32
Height=1080
Width=1920
SystemMouseSpeed=0
CfgVersion=5.3.296
x3d_platform=1
[HUD]
CameraLockMode=0
MiddleClickDragScrollEnabled=0
KeyboardScrollSpeed=0.5000
ChatScale=50
ObjectTooltips=0
AutoDisplayTarget=0
ShowAllChannelChat=1
ShowTimestamps=1
ItemShopPrevY=39
ItemShopPrevX=106
NameTagDisplay=1
ShowChampionIndicator=0
ShowSummonerNames=1
ScrollSmoothingEnabled=0
MiddleMouseScrollSpeed=0.5000
MapScrollSpeed=0.5000
ShowAttackRadius=0
NumericCooldownFormat=1
SmartCastOnKeyRelease=0
EnableLineMissileVis=0
FlipMiniMap=1
ItemShopResizeHeight=0
ItemShopResizeWidth=164
ItemShopPrevResizeHeight=1080
ItemShopPrevResizeWidth=1920
ItemShopItemDisplayMode=1
ItemShopStartPane=1
[Performance]
CharacterInking=1
ShadowsEnabled=1
EnableHUDAnimations=0
PerPixelPointLighting=0
EnableParticleOptimizations=0
BudgetOverdrawAverage=0
BudgetSkinnedVertexCount=0
BudgetSkinnedDrawCallCount=0
BudgetTextureUsage=0
BudgetVertexCount=0
BudgetTriangleCount=0
BudgetDrawCallCount=0
EnableGrassSwaying=0
EnableFXAA=0
AdvancedShader=0
FrameCapType=6
GammaEnabled=0
Full3DModeEnabled=0
AutoPerformanceSettings=0
CharacterQuality=4
EffectsQuality=4
EnvironmentQuality=4
ShadowQuality=4
GraphicsSlider=6
paths=0
[FloatingText]
EnemyTrueDamageCritical_Enabled=1
EnemyMagicalDamageCritical_Enabled=1
EnemyPhysicalDamageCritical_Enabled=1
TrueDamageCritical_Enabled=1
MagicalDamageCritical_Enabled=1
PhysicalDamageCritical_Enabled=1
Countdown_Enabled=0
EnemyTrueDamage_Enabled=0
EnemyMagicalDamage_Enabled=0
EnemyPhysicalDamage_Enabled=0
TrueDamage_Enabled=0
MagicalDamage_Enabled=0
PhysicalDamage_Enabled=0
Score_Enabled=0
QuestComplete_Enabled=0
QuestReceived_Enabled=0
Disable_Enabled=0
Level_Enabled=0
Dodge_Enabled=0
Heal_Enabled=0
Special_Enabled=0
Invulnerable_Enabled=0
Debug_Enabled=0
Absorbed_Enabled=0
OMW_Enabled=0
EnemyCritical_Enabled=0
MagicCritical_Enabled=0
Critical_Enabled=0
[Volume]
SfxVolume=0.5
MasterVolume=0.5

 

Running TurboTax 2014 in PlayOnLinux

This guide describes how to run TurboTax 2014 in PlayOnLinux.  The PlayOnLinux (in combination with WINE) software allows users to install Windows-based software.

**********************************************************************************
CAVEAT: NETFILE did not work for me.  I had to submit my taxes through an installation done on Windows
**********************************************************************************

  1. Install PlayOnLinux and then run it (e.g. starting it through the Terminal)
sudo apt-get install playonlinux
  1. Click “Tools” > “Manage wine versions”
  2. Choose 1.7.27 under “Available Wine versions” and then click the right arrow “>”
  3. Go through the steps in the installer and let it finish
  4. Back in the PlayOnLinux main screen, click “Install” in the menu, and then click “Install a non-listed program” on the bottom left
  5. Choose “Use another version of Wine”, when asked, and then choose 1.7.27
  6. Choose “Install a program in a new virtual drive”, when asked
  7. Choose “32 bits windows installation”, when asked
  8. Find the location of setup.exe for the TurboTax installer (I copied the files off of the disc to a place on my hard drive)
  9. Ignore the message “Error in FS_Check” if it appears
  10. Let the install complete, but do not launch TurboTax right away
  11. Choose “tt2014.exe”, if asked to create a shortcut
  12. Back in the PlayOnLinux main screen, select entry for TurboTax and click “Configure” in the menu
  13. Make sure the “Wine version” is set to 1.7.27
  14. Under “Install components”, install the following in this order (some of these may not be required, but I don’t know which since this is the configuration that worked for me):
    • vcrun2012
    • Microsoft Core Fonts
    • msvc100
    • RegisterFonts
    • vcrun2010
    • dotnet40
    • d3dx9
    • mono28
    • Internet Explorer 8 (click “Restart” in the installer)
    • crypt32
  15. Back in the PlayOnLinux main screen, clicking “Run” for TurboTax 2014 should now work!

This is what worked for me, so hopefully this will work for others.

Installing Epson WF-3520 Printer on Ubuntu

Just had an issue where I couldn’t set up my printer (connected on the network) on my Ubuntu machine because I didn’t have the drivers.  The automatic printer set up would keep crashing half way through.

This post from askubuntu.com hits this issue right on the head: http://askubuntu.com/questions/333534/installing-epson-wf-3520

I thought I’d leave a post here, just so I know where to find it again in case I forget.

Groovy/Grails unable to resolve class – even if the class is in the same package

The Problem

Every now and then I get this annoying problem in GGTS (Grails/Groovy Tool Suite – Version 3.6.2.RELEASE at the time of this writing), where the IDE just complains about how it can’t resolve a class.  The weird thing is that the file that the IDE is complaining about is in the same package as the class that I’m trying to use.  It built before, and the source hadn’t changed – so clearly this should not be happening.

The Fix

Hitting the Clean button on the Eclipse side (Project -> Clean) seems to make the errors go away.

This apparently has been a problem since June 2010 (forum post reference here), so I’m surprised that it is still an issue in the current version.

© 2019 Henry Poon's Blog

Theme by Anders NorénUp ↑