Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a script I found a while back to speed up installing Minecraft... for my kid... Anyway, I recently changed to Xubuntu and figured the same script would be ok, not taking into consideration the different desktop managers. When i ran the script, "The application Desktop closed unexpectedly" and now i just have a grey desktop.

Im running xubuntu 12.04 64 bit with an ati graphics card and ati drivers. If any other info is needed please ask away.

I hope someone knows how i can reverse the script (below).

Thanks.

echo -ne "writing bin shell"
    # this writes a seperate shell script in the /usr/local/bin folder, this is what allows the user
    # to run minecraft from terminal, just by typing minecraft.
    dots
    if [ ! -e /usr/local/bin/minecraft ] 
    then
    touch minecraft
    echo java -jar /home/$(whoami)/.minecraft/minecraft.jar >> minecraft
    echo -ne saving to usr/local/bin
    dots
    echo this requires root access:
    sudo cp minecraft /usr/local/bin/
    cd /
    cd /usr/local/bin
    sudo chmod +x minecraft
    echo "done"
    else 
    echo excecutable already written
    fi
    echo ""
    #--------------------------------------------
    echo -ne writing desktop shortcut
    dots
    cd /home/$(whoami)/.minecraft/
    if [ -e /home/$(whoami)/.minecraft/install_files ] 
    then
    echo -ne previous version detected, updating
    dots
    rm -rf install_files
    fi
    mkdir install_files
    cd install_files

    touch alloc-installer.desktop
    echo "[Desktop Entry]" >> alloc-installer.desktop
    echo "Type=Application" >> alloc-installer.desktop
    echo "Encoding=UTF-8" >> alloc-installer.desktop
    echo "Name=Minecraft" >> alloc-installer.desktop
    echo "Comment=awesome game" >> alloc-installer.desktop
    echo Exec= java -jar /home/$(whoami)/.minecraft/minecraft.jar >> alloc-installer.desktop
    echo Icon= /home/$(whoami)/.minecraft/icon.png  >> alloc-installer.desktop
    echo Categories=Game >> alloc-installer.desktop
    echo "Terminal=false" >> alloc-installer.desktop
    #----------------------------------------------------
    echo -ne granting the shortcut excecution permissions
    dots
    echo this requires root access
    cp alloc-installer.desktop /home/$(whoami)/Desktop
    sudo chmod +x /home/$(whoami)/Desktop/alloc-installer.desktop
    echo "done"
    echo ""
    #---------------------------------------------
    echo -ne writing menu item
    dots
    touch alloc-menu.directory
    echo [Desktop Entry] >> alloc-menu.directory
    echo Value=1.0 >> alloc-menu.directory
    echo Type=Directory >> alloc-menu.directory
    echo Encoding=UTF-8 >> alloc-menu.directory
    echo "done"
    echo ""
    echo -ne installing to Applications menu
    dots
    xdg-desktop-menu install alloc-menu.directory alloc-installer.desktop
    xdg-desktop-menu forceupdate
    echo installed
    #--------------------------------------------
    echo ""
    echo "SUCCESS!"
    echo ""
    echo -e "Minecraft has been successfully Downloaded and Installed \nCheck your desktop and Applications menu for launchers! \nYou can also run it from terminal with a 'minecraft' command! \ncontact: alloc@dr.com" 
    echo "Happy Mining!"

    echo""

EDIT: Thanks Mik. I tried running xfwm4 --replace (with sudo) and got this:

`(xfwm4:2025): GLib-CRITICAL **: g_str_has_prefix: assertion `prefix != NULL' failed

(xfwm4:2025): xfwm4-WARNING **: The property '/general/double_click_distance' of type int is not supported

(xfwm4:2025): GLib-WARNING **: (/build/buildd/glib2.0-2.32.3/./glib/gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)

(xfwm4:2025): xfwm4-WARNING **: Failed to connect to session manager: Failed to     connect to the session manager: SESSION_MANAGER environment variable not defined`

Still have the grey screen though. Probably going to reinstall tomorrow, unless any of the above gives you any other clues?

share|improve this question
    
Something like xfwm4 --replace might reset it if you are using xfce on Xubuntu. –  user76204 Mar 1 '13 at 19:31
    
xfwm4 --replace is not usually used with sudo. Try also reconfiguring lightdm (this time with sudo): sudo dpkg-reconfigure lightdm. You probably need to look through the other questions on graphic drivers and display manager problems on the site. I can't see why your script could cause a problem that crashed your display and which problem then persisted over reboots. –  user76204 Mar 5 '13 at 0:24
    
Also try xfwm4 --replace again, without sudo, as the errors you are encountered are because your environmental variables were not read. I did not say you should use sudo. –  user76204 Mar 5 '13 at 0:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.